]> granicus.if.org Git - postgresql/blob - configure
Add -lcrypto as one of the possible link dependencies of libkrb5.
[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 enable_profiling 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-profiling      build with profiling enabled
869   --enable-dtrace         build with DTrace support
870   --enable-depend         turn on automatic dependency tracking
871   --enable-cassert        enable assertion checks (for debugging)
872   --enable-thread-safety  make client libraries thread-safe
873   --enable-thread-safety-force  force thread-safety in spite of thread test failure
874   --disable-largefile     omit support for large files
875
876 Optional Packages:
877   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
878   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
879
880   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
881   --without-docdir        do not install the documentation
882   --with-includes=DIRS    look for additional header files in DIRS
883   --with-libraries=DIRS   look for additional libraries in DIRS
884   --with-libs=DIRS        alternative spelling of --with-libraries
885   --with-pgport=PORTNUM   change default port number [5432]
886   --with-tcl              build Tcl modules (PL/Tcl)
887   --with-tclconfig=DIR    tclConfig.sh is in DIR
888   --with-perl             build Perl modules (PL/Perl)
889   --with-python           build Python modules (PL/Python)
890   --with-krb5             build with Kerberos 5 support
891   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
892   --with-pam              build with PAM support
893   --with-ldap             build with LDAP support
894   --with-bonjour          build with Bonjour support
895   --with-openssl          build with OpenSSL support
896   --without-readline      do not use GNU Readline nor BSD Libedit for editing
897   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
898   --with-libxml           build with XML support
899   --without-zlib          do not use Zlib
900   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
901
902 Some influential environment variables:
903   CC          C compiler command
904   CFLAGS      C compiler flags
905   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
906               nonstandard directory <lib dir>
907   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
908               headers in a nonstandard directory <include dir>
909   CPP         C preprocessor
910   LDFLAGS_SL
911   DOCBOOKSTYLE
912               location of DocBook stylesheets
913
914 Use these variables to override the choices made by `configure' or to help
915 it to find libraries and programs with nonstandard names/locations.
916
917 Report bugs to <pgsql-bugs@postgresql.org>.
918 _ACEOF
919 fi
920
921 if test "$ac_init_help" = "recursive"; then
922   # If there are subdirs, report their specific --help.
923   ac_popdir=`pwd`
924   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
925     test -d $ac_dir || continue
926     ac_builddir=.
927
928 if test "$ac_dir" != .; then
929   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
930   # A "../" for each directory in $ac_dir_suffix.
931   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
932 else
933   ac_dir_suffix= ac_top_builddir=
934 fi
935
936 case $srcdir in
937   .)  # No --srcdir option.  We are building in place.
938     ac_srcdir=.
939     if test -z "$ac_top_builddir"; then
940        ac_top_srcdir=.
941     else
942        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
943     fi ;;
944   [\\/]* | ?:[\\/]* )  # Absolute path.
945     ac_srcdir=$srcdir$ac_dir_suffix;
946     ac_top_srcdir=$srcdir ;;
947   *) # Relative path.
948     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
949     ac_top_srcdir=$ac_top_builddir$srcdir ;;
950 esac
951
952 # Do not use `cd foo && pwd` to compute absolute paths, because
953 # the directories may not exist.
954 case `pwd` in
955 .) ac_abs_builddir="$ac_dir";;
956 *)
957   case "$ac_dir" in
958   .) ac_abs_builddir=`pwd`;;
959   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
960   *) ac_abs_builddir=`pwd`/"$ac_dir";;
961   esac;;
962 esac
963 case $ac_abs_builddir in
964 .) ac_abs_top_builddir=${ac_top_builddir}.;;
965 *)
966   case ${ac_top_builddir}. in
967   .) ac_abs_top_builddir=$ac_abs_builddir;;
968   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
969   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
970   esac;;
971 esac
972 case $ac_abs_builddir in
973 .) ac_abs_srcdir=$ac_srcdir;;
974 *)
975   case $ac_srcdir in
976   .) ac_abs_srcdir=$ac_abs_builddir;;
977   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
978   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
979   esac;;
980 esac
981 case $ac_abs_builddir in
982 .) ac_abs_top_srcdir=$ac_top_srcdir;;
983 *)
984   case $ac_top_srcdir in
985   .) ac_abs_top_srcdir=$ac_abs_builddir;;
986   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
987   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
988   esac;;
989 esac
990
991     cd $ac_dir
992     # Check for guested configure; otherwise get Cygnus style configure.
993     if test -f $ac_srcdir/configure.gnu; then
994       echo
995       $SHELL $ac_srcdir/configure.gnu  --help=recursive
996     elif test -f $ac_srcdir/configure; then
997       echo
998       $SHELL $ac_srcdir/configure  --help=recursive
999     elif test -f $ac_srcdir/configure.ac ||
1000            test -f $ac_srcdir/configure.in; then
1001       echo
1002       $ac_configure --help
1003     else
1004       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1005     fi
1006     cd $ac_popdir
1007   done
1008 fi
1009
1010 test -n "$ac_init_help" && exit 0
1011 if $ac_init_version; then
1012   cat <<\_ACEOF
1013 PostgreSQL configure 8.3devel
1014 generated by GNU Autoconf 2.59
1015
1016 Copyright (C) 2003 Free Software Foundation, Inc.
1017 This configure script is free software; the Free Software Foundation
1018 gives unlimited permission to copy, distribute and modify it.
1019
1020 Copyright (c) 1996-2007, PostgreSQL Global Development Group
1021 _ACEOF
1022   exit 0
1023 fi
1024 exec 5>config.log
1025 cat >&5 <<_ACEOF
1026 This file contains any messages produced by compilers while
1027 running configure, to aid debugging if configure makes a mistake.
1028
1029 It was created by PostgreSQL $as_me 8.3devel, which was
1030 generated by GNU Autoconf 2.59.  Invocation command line was
1031
1032   $ $0 $@
1033
1034 _ACEOF
1035 {
1036 cat <<_ASUNAME
1037 ## --------- ##
1038 ## Platform. ##
1039 ## --------- ##
1040
1041 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1042 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1043 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1044 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1045 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1046
1047 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1048 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1049
1050 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1051 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1052 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1053 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1054 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1055 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1056 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1057
1058 _ASUNAME
1059
1060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1061 for as_dir in $PATH
1062 do
1063   IFS=$as_save_IFS
1064   test -z "$as_dir" && as_dir=.
1065   echo "PATH: $as_dir"
1066 done
1067
1068 } >&5
1069
1070 cat >&5 <<_ACEOF
1071
1072
1073 ## ----------- ##
1074 ## Core tests. ##
1075 ## ----------- ##
1076
1077 _ACEOF
1078
1079
1080 # Keep a trace of the command line.
1081 # Strip out --no-create and --no-recursion so they do not pile up.
1082 # Strip out --silent because we don't want to record it for future runs.
1083 # Also quote any args containing shell meta-characters.
1084 # Make two passes to allow for proper duplicate-argument suppression.
1085 ac_configure_args=
1086 ac_configure_args0=
1087 ac_configure_args1=
1088 ac_sep=
1089 ac_must_keep_next=false
1090 for ac_pass in 1 2
1091 do
1092   for ac_arg
1093   do
1094     case $ac_arg in
1095     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1096     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1097     | -silent | --silent | --silen | --sile | --sil)
1098       continue ;;
1099     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1100       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1101     esac
1102     case $ac_pass in
1103     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1104     2)
1105       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1106       if test $ac_must_keep_next = true; then
1107         ac_must_keep_next=false # Got value, back to normal.
1108       else
1109         case $ac_arg in
1110           *=* | --config-cache | -C | -disable-* | --disable-* \
1111           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1112           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1113           | -with-* | --with-* | -without-* | --without-* | --x)
1114             case "$ac_configure_args0 " in
1115               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1116             esac
1117             ;;
1118           -* ) ac_must_keep_next=true ;;
1119         esac
1120       fi
1121       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1122       # Get rid of the leading space.
1123       ac_sep=" "
1124       ;;
1125     esac
1126   done
1127 done
1128 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1129 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1130
1131 # When interrupted or exit'd, cleanup temporary files, and complete
1132 # config.log.  We remove comments because anyway the quotes in there
1133 # would cause problems or look ugly.
1134 # WARNING: Be sure not to use single quotes in there, as some shells,
1135 # such as our DU 5.0 friend, will then `close' the trap.
1136 trap 'exit_status=$?
1137   # Save into config.log some information that might help in debugging.
1138   {
1139     echo
1140
1141     cat <<\_ASBOX
1142 ## ---------------- ##
1143 ## Cache variables. ##
1144 ## ---------------- ##
1145 _ASBOX
1146     echo
1147     # The following way of writing the cache mishandles newlines in values,
1148 {
1149   (set) 2>&1 |
1150     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1151     *ac_space=\ *)
1152       sed -n \
1153         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1154           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1155       ;;
1156     *)
1157       sed -n \
1158         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1159       ;;
1160     esac;
1161 }
1162     echo
1163
1164     cat <<\_ASBOX
1165 ## ----------------- ##
1166 ## Output variables. ##
1167 ## ----------------- ##
1168 _ASBOX
1169     echo
1170     for ac_var in $ac_subst_vars
1171     do
1172       eval ac_val=$`echo $ac_var`
1173       echo "$ac_var='"'"'$ac_val'"'"'"
1174     done | sort
1175     echo
1176
1177     if test -n "$ac_subst_files"; then
1178       cat <<\_ASBOX
1179 ## ------------- ##
1180 ## Output files. ##
1181 ## ------------- ##
1182 _ASBOX
1183       echo
1184       for ac_var in $ac_subst_files
1185       do
1186         eval ac_val=$`echo $ac_var`
1187         echo "$ac_var='"'"'$ac_val'"'"'"
1188       done | sort
1189       echo
1190     fi
1191
1192     if test -s confdefs.h; then
1193       cat <<\_ASBOX
1194 ## ----------- ##
1195 ## confdefs.h. ##
1196 ## ----------- ##
1197 _ASBOX
1198       echo
1199       sed "/^$/d" confdefs.h | sort
1200       echo
1201     fi
1202     test "$ac_signal" != 0 &&
1203       echo "$as_me: caught signal $ac_signal"
1204     echo "$as_me: exit $exit_status"
1205   } >&5
1206   rm -f core *.core &&
1207   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1208     exit $exit_status
1209      ' 0
1210 for ac_signal in 1 2 13 15; do
1211   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1212 done
1213 ac_signal=0
1214
1215 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1216 rm -rf conftest* confdefs.h
1217 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1218 echo >confdefs.h
1219
1220 # Predefined preprocessor variables.
1221
1222 cat >>confdefs.h <<_ACEOF
1223 #define PACKAGE_NAME "$PACKAGE_NAME"
1224 _ACEOF
1225
1226
1227 cat >>confdefs.h <<_ACEOF
1228 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1229 _ACEOF
1230
1231
1232 cat >>confdefs.h <<_ACEOF
1233 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1234 _ACEOF
1235
1236
1237 cat >>confdefs.h <<_ACEOF
1238 #define PACKAGE_STRING "$PACKAGE_STRING"
1239 _ACEOF
1240
1241
1242 cat >>confdefs.h <<_ACEOF
1243 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1244 _ACEOF
1245
1246
1247 # Let the site file select an alternate cache file if it wants to.
1248 # Prefer explicitly selected file to automatically selected ones.
1249 if test -z "$CONFIG_SITE"; then
1250   if test "x$prefix" != xNONE; then
1251     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1252   else
1253     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1254   fi
1255 fi
1256 for ac_site_file in $CONFIG_SITE; do
1257   if test -r "$ac_site_file"; then
1258     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1259 echo "$as_me: loading site script $ac_site_file" >&6;}
1260     sed 's/^/| /' "$ac_site_file" >&5
1261     . "$ac_site_file"
1262   fi
1263 done
1264
1265 if test -r "$cache_file"; then
1266   # Some versions of bash will fail to source /dev/null (special
1267   # files actually), so we avoid doing that.
1268   if test -f "$cache_file"; then
1269     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1270 echo "$as_me: loading cache $cache_file" >&6;}
1271     case $cache_file in
1272       [\\/]* | ?:[\\/]* ) . $cache_file;;
1273       *)                      . ./$cache_file;;
1274     esac
1275   fi
1276 else
1277   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1278 echo "$as_me: creating cache $cache_file" >&6;}
1279   >$cache_file
1280 fi
1281
1282 # Check that the precious variables saved in the cache have kept the same
1283 # value.
1284 ac_cache_corrupted=false
1285 for ac_var in `(set) 2>&1 |
1286                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1287   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1288   eval ac_new_set=\$ac_env_${ac_var}_set
1289   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1290   eval ac_new_val="\$ac_env_${ac_var}_value"
1291   case $ac_old_set,$ac_new_set in
1292     set,)
1293       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1294 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1295       ac_cache_corrupted=: ;;
1296     ,set)
1297       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1298 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1299       ac_cache_corrupted=: ;;
1300     ,);;
1301     *)
1302       if test "x$ac_old_val" != "x$ac_new_val"; then
1303         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1304 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1305         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1306 echo "$as_me:   former value:  $ac_old_val" >&2;}
1307         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1308 echo "$as_me:   current value: $ac_new_val" >&2;}
1309         ac_cache_corrupted=:
1310       fi;;
1311   esac
1312   # Pass precious variables to config.status.
1313   if test "$ac_new_set" = set; then
1314     case $ac_new_val in
1315     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1316       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1317     *) ac_arg=$ac_var=$ac_new_val ;;
1318     esac
1319     case " $ac_configure_args " in
1320       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1321       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1322     esac
1323   fi
1324 done
1325 if $ac_cache_corrupted; then
1326   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1327 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1328   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1329 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1330    { (exit 1); exit 1; }; }
1331 fi
1332
1333 ac_ext=c
1334 ac_cpp='$CPP $CPPFLAGS'
1335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
1369 ac_aux_dir=
1370 for ac_dir in config $srcdir/config; do
1371   if test -f $ac_dir/install-sh; then
1372     ac_aux_dir=$ac_dir
1373     ac_install_sh="$ac_aux_dir/install-sh -c"
1374     break
1375   elif test -f $ac_dir/install.sh; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/install.sh -c"
1378     break
1379   elif test -f $ac_dir/shtool; then
1380     ac_aux_dir=$ac_dir
1381     ac_install_sh="$ac_aux_dir/shtool install -c"
1382     break
1383   fi
1384 done
1385 if test -z "$ac_aux_dir"; then
1386   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1387 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1388    { (exit 1); exit 1; }; }
1389 fi
1390 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1391 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1392 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1393
1394
1395 configure_args=$ac_configure_args
1396
1397
1398
1399 cat >>confdefs.h <<_ACEOF
1400 #define PG_VERSION "$PACKAGE_VERSION"
1401 _ACEOF
1402
1403
1404 # Make sure we can run config.sub.
1405 $ac_config_sub sun4 >/dev/null 2>&1 ||
1406   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1407 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1408    { (exit 1); exit 1; }; }
1409
1410 echo "$as_me:$LINENO: checking build system type" >&5
1411 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1412 if test "${ac_cv_build+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   ac_cv_build_alias=$build_alias
1416 test -z "$ac_cv_build_alias" &&
1417   ac_cv_build_alias=`$ac_config_guess`
1418 test -z "$ac_cv_build_alias" &&
1419   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1420 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1421    { (exit 1); exit 1; }; }
1422 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1423   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1424 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1425    { (exit 1); exit 1; }; }
1426
1427 fi
1428 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1429 echo "${ECHO_T}$ac_cv_build" >&6
1430 build=$ac_cv_build
1431 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1432 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1433 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1434
1435
1436 echo "$as_me:$LINENO: checking host system type" >&5
1437 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1438 if test "${ac_cv_host+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   ac_cv_host_alias=$host_alias
1442 test -z "$ac_cv_host_alias" &&
1443   ac_cv_host_alias=$ac_cv_build_alias
1444 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1445   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1446 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1447    { (exit 1); exit 1; }; }
1448
1449 fi
1450 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1451 echo "${ECHO_T}$ac_cv_host" >&6
1452 host=$ac_cv_host
1453 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1454 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1455 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1456
1457
1458
1459 template=
1460 echo "$as_me:$LINENO: checking which template to use" >&5
1461 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1462
1463
1464 pgac_args="$pgac_args with_template"
1465
1466
1467 # Check whether --with-template or --without-template was given.
1468 if test "${with_template+set}" = set; then
1469   withval="$with_template"
1470
1471   case $withval in
1472     yes)
1473       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1474 echo "$as_me: error: argument required for --with-template option" >&2;}
1475    { (exit 1); exit 1; }; }
1476       ;;
1477     no)
1478       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1479 echo "$as_me: error: argument required for --with-template option" >&2;}
1480    { (exit 1); exit 1; }; }
1481       ;;
1482     *)
1483
1484   case $withval in
1485     list)   echo; ls "$srcdir/src/template"; exit;;
1486     *)      if test -f "$srcdir/src/template/$with_template" ; then
1487               template=$withval
1488             else
1489               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1490 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1491    { (exit 1); exit 1; }; }
1492             fi;;
1493   esac
1494
1495       ;;
1496   esac
1497
1498 else
1499
1500 # --with-template not given
1501
1502 case $host_os in
1503      aix*) template=aix ;;
1504     bsdi*) template=bsdi ;;
1505   cygwin*) template=cygwin ;;
1506   darwin*) template=darwin ;;
1507     dgux*) template=dgux ;;
1508  freebsd*) template=freebsd ;;
1509     hpux*) template=hpux ;;
1510     irix*) template=irix ;;
1511  linux*|gnu*|k*bsd*-gnu)
1512            template=linux ;;
1513    mingw*) template=win32 ;;
1514   netbsd*) template=netbsd ;;
1515 nextstep*) template=nextstep ;;
1516  openbsd*) template=openbsd ;;
1517      osf*) template=osf ;;
1518      sco*) template=sco ;;
1519  solaris*) template=solaris ;;
1520    sunos*) template=sunos4 ;;
1521  sysv4.2*)
1522         case $host_vendor in
1523           univel) template=univel ;;
1524         esac ;;
1525    sysv4*) template=svr4 ;;
1526    sysv5*) template=unixware ;;
1527   ultrix*) template=ultrix4 ;;
1528 esac
1529
1530   if test x"$template" = x"" ; then
1531     { { echo "$as_me:$LINENO: error:
1532 *******************************************************************
1533 PostgreSQL has apparently not been ported to your platform yet.
1534 To try a manual configuration, look into the src/template directory
1535 for a similar platform and use the '--with-template=' option.
1536
1537 Please also contact <pgsql-ports@postgresql.org> to see about
1538 rectifying this.  Include the above 'checking host system type...'
1539 line.
1540 *******************************************************************
1541 " >&5
1542 echo "$as_me: error:
1543 *******************************************************************
1544 PostgreSQL has apparently not been ported to your platform yet.
1545 To try a manual configuration, look into the src/template directory
1546 for a similar platform and use the '--with-template=' option.
1547
1548 Please also contact <pgsql-ports@postgresql.org> to see about
1549 rectifying this.  Include the above 'checking host system type...'
1550 line.
1551 *******************************************************************
1552 " >&2;}
1553    { (exit 1); exit 1; }; }
1554   fi
1555
1556
1557 fi;
1558
1559
1560 echo "$as_me:$LINENO: result: $template" >&5
1561 echo "${ECHO_T}$template" >&6
1562
1563 PORTNAME=$template
1564
1565
1566 # Initialize default assumption that we do not need separate assembly code
1567 # for TAS (test-and-set).  This can be overridden by the template file
1568 # when it's executed.
1569 need_tas=no
1570 tas_file=dummy.s
1571
1572
1573
1574 ##
1575 ## Command line options
1576 ##
1577
1578 #
1579 # Installation directory for documentation
1580 #
1581
1582 pgac_args="$pgac_args with_docdir"
1583
1584
1585 # Check whether --with-docdir or --without-docdir was given.
1586 if test "${with_docdir+set}" = set; then
1587   withval="$with_docdir"
1588
1589   case $withval in
1590     yes)
1591       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1592 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1593    { (exit 1); exit 1; }; }
1594       ;;
1595     no)
1596       docdir=
1597       ;;
1598     *)
1599       docdir=$withval
1600       ;;
1601   esac
1602
1603 else
1604   docdir='${prefix}/doc'
1605 fi;
1606
1607
1608
1609
1610 #
1611 # Add non-standard directories to the include path
1612 #
1613
1614 pgac_args="$pgac_args with_includes"
1615
1616
1617 # Check whether --with-includes or --without-includes was given.
1618 if test "${with_includes+set}" = set; then
1619   withval="$with_includes"
1620
1621   case $withval in
1622     yes)
1623       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1624 echo "$as_me: error: argument required for --with-includes option" >&2;}
1625    { (exit 1); exit 1; }; }
1626       ;;
1627     no)
1628       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1629 echo "$as_me: error: argument required for --with-includes option" >&2;}
1630    { (exit 1); exit 1; }; }
1631       ;;
1632     *)
1633
1634       ;;
1635   esac
1636
1637 fi;
1638
1639
1640
1641 #
1642 # Add non-standard directories to the library search path
1643 #
1644
1645 pgac_args="$pgac_args with_libraries"
1646
1647
1648 # Check whether --with-libraries or --without-libraries was given.
1649 if test "${with_libraries+set}" = set; then
1650   withval="$with_libraries"
1651
1652   case $withval in
1653     yes)
1654       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1655 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1656    { (exit 1); exit 1; }; }
1657       ;;
1658     no)
1659       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1660 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1661    { (exit 1); exit 1; }; }
1662       ;;
1663     *)
1664       LIBRARY_DIRS=$withval
1665       ;;
1666   esac
1667
1668 fi;
1669
1670
1671
1672 pgac_args="$pgac_args with_libs"
1673
1674
1675 # Check whether --with-libs or --without-libs was given.
1676 if test "${with_libs+set}" = set; then
1677   withval="$with_libs"
1678
1679   case $withval in
1680     yes)
1681       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1682 echo "$as_me: error: argument required for --with-libs option" >&2;}
1683    { (exit 1); exit 1; }; }
1684       ;;
1685     no)
1686       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1687 echo "$as_me: error: argument required for --with-libs option" >&2;}
1688    { (exit 1); exit 1; }; }
1689       ;;
1690     *)
1691       LIBRARY_DIRS=$withval
1692       ;;
1693   esac
1694
1695 fi;
1696
1697
1698
1699 #
1700 # 64-bit integer date/time storage (--enable-integer-datetimes)
1701 #
1702 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1703 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1704
1705 pgac_args="$pgac_args enable_integer_datetimes"
1706
1707 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1708 if test "${enable_integer_datetimes+set}" = set; then
1709   enableval="$enable_integer_datetimes"
1710
1711   case $enableval in
1712     yes)
1713
1714 cat >>confdefs.h <<\_ACEOF
1715 #define USE_INTEGER_DATETIMES 1
1716 _ACEOF
1717
1718       ;;
1719     no)
1720       :
1721       ;;
1722     *)
1723       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1724 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1725    { (exit 1); exit 1; }; }
1726       ;;
1727   esac
1728
1729 else
1730   enable_integer_datetimes=no
1731
1732 fi;
1733
1734 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1735 echo "${ECHO_T}$enable_integer_datetimes" >&6
1736
1737
1738 #
1739 # NLS
1740 #
1741 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1742 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1743
1744 pgac_args="$pgac_args enable_nls"
1745
1746 # Check whether --enable-nls or --disable-nls was given.
1747 if test "${enable_nls+set}" = set; then
1748   enableval="$enable_nls"
1749
1750   case $enableval in
1751     yes)
1752       :
1753       ;;
1754     no)
1755       :
1756       ;;
1757     *)
1758       enable_nls=yes
1759 WANTED_LANGUAGES=$enableval
1760       ;;
1761   esac
1762
1763 else
1764   enable_nls=no
1765 fi;
1766
1767
1768 if test "$enable_nls" = yes; then
1769
1770 cat >>confdefs.h <<\_ACEOF
1771 #define ENABLE_NLS 1
1772 _ACEOF
1773
1774 fi
1775
1776 echo "$as_me:$LINENO: result: $enable_nls" >&5
1777 echo "${ECHO_T}$enable_nls" >&6
1778
1779
1780
1781 #
1782 # Default port number (--with-pgport), default 5432
1783 #
1784 echo "$as_me:$LINENO: checking for default port number" >&5
1785 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1786
1787 pgac_args="$pgac_args with_pgport"
1788
1789
1790 # Check whether --with-pgport or --without-pgport was given.
1791 if test "${with_pgport+set}" = set; then
1792   withval="$with_pgport"
1793
1794   case $withval in
1795     yes)
1796       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1797 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1798    { (exit 1); exit 1; }; }
1799       ;;
1800     no)
1801       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1802 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1803    { (exit 1); exit 1; }; }
1804       ;;
1805     *)
1806       default_port=$withval
1807       ;;
1808   esac
1809
1810 else
1811   default_port=5432
1812 fi;
1813
1814 echo "$as_me:$LINENO: result: $default_port" >&5
1815 echo "${ECHO_T}$default_port" >&6
1816 # Need both of these because some places want an integer and some a string
1817
1818 cat >>confdefs.h <<_ACEOF
1819 #define DEF_PGPORT ${default_port}
1820 _ACEOF
1821
1822
1823 cat >>confdefs.h <<_ACEOF
1824 #define DEF_PGPORT_STR "${default_port}"
1825 _ACEOF
1826
1827
1828
1829 #
1830 # Option to disable shared libraries
1831 #
1832
1833 pgac_args="$pgac_args enable_shared"
1834
1835 # Check whether --enable-shared or --disable-shared was given.
1836 if test "${enable_shared+set}" = set; then
1837   enableval="$enable_shared"
1838
1839   case $enableval in
1840     yes)
1841       :
1842       ;;
1843     no)
1844       :
1845       ;;
1846     *)
1847       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1848 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1849    { (exit 1); exit 1; }; }
1850       ;;
1851   esac
1852
1853 else
1854   enable_shared=yes
1855
1856 fi;
1857
1858
1859
1860 #
1861 # '-rpath'-like feature can be disabled
1862 #
1863
1864 pgac_args="$pgac_args enable_rpath"
1865
1866 # Check whether --enable-rpath or --disable-rpath was given.
1867 if test "${enable_rpath+set}" = set; then
1868   enableval="$enable_rpath"
1869
1870   case $enableval in
1871     yes)
1872       :
1873       ;;
1874     no)
1875       :
1876       ;;
1877     *)
1878       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1879 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1880    { (exit 1); exit 1; }; }
1881       ;;
1882   esac
1883
1884 else
1885   enable_rpath=yes
1886
1887 fi;
1888
1889
1890
1891 #
1892 # Spinlocks
1893 #
1894
1895 pgac_args="$pgac_args enable_spinlocks"
1896
1897 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1898 if test "${enable_spinlocks+set}" = set; then
1899   enableval="$enable_spinlocks"
1900
1901   case $enableval in
1902     yes)
1903       :
1904       ;;
1905     no)
1906       :
1907       ;;
1908     *)
1909       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1910 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1911    { (exit 1); exit 1; }; }
1912       ;;
1913   esac
1914
1915 else
1916   enable_spinlocks=yes
1917
1918 fi;
1919
1920
1921 #
1922 # --enable-debug adds -g to compiler flags
1923 #
1924
1925 pgac_args="$pgac_args enable_debug"
1926
1927 # Check whether --enable-debug or --disable-debug was given.
1928 if test "${enable_debug+set}" = set; then
1929   enableval="$enable_debug"
1930
1931   case $enableval in
1932     yes)
1933       :
1934       ;;
1935     no)
1936       :
1937       ;;
1938     *)
1939       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1940 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1941    { (exit 1); exit 1; }; }
1942       ;;
1943   esac
1944
1945 else
1946   enable_debug=no
1947
1948 fi;
1949
1950
1951
1952 #
1953 # --enable-profiling enables gcc profiling
1954 #
1955
1956 pgac_args="$pgac_args enable_profiling"
1957
1958 # Check whether --enable-profiling or --disable-profiling was given.
1959 if test "${enable_profiling+set}" = set; then
1960   enableval="$enable_profiling"
1961
1962   case $enableval in
1963     yes)
1964       :
1965       ;;
1966     no)
1967       :
1968       ;;
1969     *)
1970       { { echo "$as_me:$LINENO: error: no argument expected for --enable-profiling option" >&5
1971 echo "$as_me: error: no argument expected for --enable-profiling option" >&2;}
1972    { (exit 1); exit 1; }; }
1973       ;;
1974   esac
1975
1976 else
1977   enable_profiling=no
1978
1979 fi;
1980
1981
1982
1983 #
1984 # DTrace
1985 #
1986
1987 pgac_args="$pgac_args enable_dtrace"
1988
1989 # Check whether --enable-dtrace or --disable-dtrace was given.
1990 if test "${enable_dtrace+set}" = set; then
1991   enableval="$enable_dtrace"
1992
1993   case $enableval in
1994     yes)
1995
1996 cat >>confdefs.h <<\_ACEOF
1997 #define ENABLE_DTRACE 1
1998 _ACEOF
1999
2000 for ac_prog in dtrace
2001 do
2002   # Extract the first word of "$ac_prog", so it can be a program name with args.
2003 set dummy $ac_prog; ac_word=$2
2004 echo "$as_me:$LINENO: checking for $ac_word" >&5
2005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2006 if test "${ac_cv_prog_DTRACE+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   if test -n "$DTRACE"; then
2010   ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
2011 else
2012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2013 for as_dir in $PATH
2014 do
2015   IFS=$as_save_IFS
2016   test -z "$as_dir" && as_dir=.
2017   for ac_exec_ext in '' $ac_executable_extensions; do
2018   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2019     ac_cv_prog_DTRACE="$ac_prog"
2020     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2021     break 2
2022   fi
2023 done
2024 done
2025
2026 fi
2027 fi
2028 DTRACE=$ac_cv_prog_DTRACE
2029 if test -n "$DTRACE"; then
2030   echo "$as_me:$LINENO: result: $DTRACE" >&5
2031 echo "${ECHO_T}$DTRACE" >&6
2032 else
2033   echo "$as_me:$LINENO: result: no" >&5
2034 echo "${ECHO_T}no" >&6
2035 fi
2036
2037   test -n "$DTRACE" && break
2038 done
2039
2040 if test -z "$DTRACE"; then
2041   { { echo "$as_me:$LINENO: error: dtrace not found" >&5
2042 echo "$as_me: error: dtrace not found" >&2;}
2043    { (exit 1); exit 1; }; }
2044 fi
2045
2046       ;;
2047     no)
2048       :
2049       ;;
2050     *)
2051       { { echo "$as_me:$LINENO: error: no argument expected for --enable-dtrace option" >&5
2052 echo "$as_me: error: no argument expected for --enable-dtrace option" >&2;}
2053    { (exit 1); exit 1; }; }
2054       ;;
2055   esac
2056
2057 else
2058   enable_dtrace=no
2059
2060 fi;
2061
2062
2063
2064 #
2065 # C compiler
2066 #
2067
2068 # For historical reasons you can also use --with-CC to specify the C compiler
2069 # to use, although the standard way to do this is to set the CC environment
2070 # variable.
2071
2072 pgac_args="$pgac_args with_CC"
2073
2074
2075 # Check whether --with-CC or --without-CC was given.
2076 if test "${with_CC+set}" = set; then
2077   withval="$with_CC"
2078
2079   case $withval in
2080     yes)
2081       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2082 echo "$as_me: error: argument required for --with-CC option" >&2;}
2083    { (exit 1); exit 1; }; }
2084       ;;
2085     no)
2086       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
2087 echo "$as_me: error: argument required for --with-CC option" >&2;}
2088    { (exit 1); exit 1; }; }
2089       ;;
2090     *)
2091       CC=$with_CC
2092       ;;
2093   esac
2094
2095 fi;
2096
2097
2098 case $template in
2099   aix) pgac_cc_list="gcc xlc";;
2100  irix) pgac_cc_list="cc";; # no gcc
2101     *) pgac_cc_list="gcc cc";;
2102 esac
2103
2104 ac_ext=c
2105 ac_cpp='$CPP $CPPFLAGS'
2106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109 if test -n "$ac_tool_prefix"; then
2110   for ac_prog in $pgac_cc_list
2111   do
2112     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2113 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2114 echo "$as_me:$LINENO: checking for $ac_word" >&5
2115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2116 if test "${ac_cv_prog_CC+set}" = set; then
2117   echo $ECHO_N "(cached) $ECHO_C" >&6
2118 else
2119   if test -n "$CC"; then
2120   ac_cv_prog_CC="$CC" # Let the user override the test.
2121 else
2122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2123 for as_dir in $PATH
2124 do
2125   IFS=$as_save_IFS
2126   test -z "$as_dir" && as_dir=.
2127   for ac_exec_ext in '' $ac_executable_extensions; do
2128   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2129     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2130     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2131     break 2
2132   fi
2133 done
2134 done
2135
2136 fi
2137 fi
2138 CC=$ac_cv_prog_CC
2139 if test -n "$CC"; then
2140   echo "$as_me:$LINENO: result: $CC" >&5
2141 echo "${ECHO_T}$CC" >&6
2142 else
2143   echo "$as_me:$LINENO: result: no" >&5
2144 echo "${ECHO_T}no" >&6
2145 fi
2146
2147     test -n "$CC" && break
2148   done
2149 fi
2150 if test -z "$CC"; then
2151   ac_ct_CC=$CC
2152   for ac_prog in $pgac_cc_list
2153 do
2154   # Extract the first word of "$ac_prog", so it can be a program name with args.
2155 set dummy $ac_prog; ac_word=$2
2156 echo "$as_me:$LINENO: checking for $ac_word" >&5
2157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2158 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2159   echo $ECHO_N "(cached) $ECHO_C" >&6
2160 else
2161   if test -n "$ac_ct_CC"; then
2162   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2163 else
2164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2165 for as_dir in $PATH
2166 do
2167   IFS=$as_save_IFS
2168   test -z "$as_dir" && as_dir=.
2169   for ac_exec_ext in '' $ac_executable_extensions; do
2170   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2171     ac_cv_prog_ac_ct_CC="$ac_prog"
2172     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2173     break 2
2174   fi
2175 done
2176 done
2177
2178 fi
2179 fi
2180 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2181 if test -n "$ac_ct_CC"; then
2182   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2183 echo "${ECHO_T}$ac_ct_CC" >&6
2184 else
2185   echo "$as_me:$LINENO: result: no" >&5
2186 echo "${ECHO_T}no" >&6
2187 fi
2188
2189   test -n "$ac_ct_CC" && break
2190 done
2191
2192   CC=$ac_ct_CC
2193 fi
2194
2195
2196 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2197 See \`config.log' for more details." >&5
2198 echo "$as_me: error: no acceptable C compiler found in \$PATH
2199 See \`config.log' for more details." >&2;}
2200    { (exit 1); exit 1; }; }
2201
2202 # Provide some information about the compiler.
2203 echo "$as_me:$LINENO:" \
2204      "checking for C compiler version" >&5
2205 ac_compiler=`set X $ac_compile; echo $2`
2206 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2207   (eval $ac_compiler --version </dev/null >&5) 2>&5
2208   ac_status=$?
2209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2210   (exit $ac_status); }
2211 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2212   (eval $ac_compiler -v </dev/null >&5) 2>&5
2213   ac_status=$?
2214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2215   (exit $ac_status); }
2216 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2217   (eval $ac_compiler -V </dev/null >&5) 2>&5
2218   ac_status=$?
2219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2220   (exit $ac_status); }
2221
2222 cat >conftest.$ac_ext <<_ACEOF
2223 /* confdefs.h.  */
2224 _ACEOF
2225 cat confdefs.h >>conftest.$ac_ext
2226 cat >>conftest.$ac_ext <<_ACEOF
2227 /* end confdefs.h.  */
2228
2229 int
2230 main ()
2231 {
2232
2233   ;
2234   return 0;
2235 }
2236 _ACEOF
2237 ac_clean_files_save=$ac_clean_files
2238 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2239 # Try to create an executable without -o first, disregard a.out.
2240 # It will help us diagnose broken compilers, and finding out an intuition
2241 # of exeext.
2242 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2243 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2244 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2245 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2246   (eval $ac_link_default) 2>&5
2247   ac_status=$?
2248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2249   (exit $ac_status); }; then
2250   # Find the output, starting from the most likely.  This scheme is
2251 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2252 # resort.
2253
2254 # Be careful to initialize this variable, since it used to be cached.
2255 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2256 ac_cv_exeext=
2257 # b.out is created by i960 compilers.
2258 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2259 do
2260   test -f "$ac_file" || continue
2261   case $ac_file in
2262     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2263         ;;
2264     conftest.$ac_ext )
2265         # This is the source file.
2266         ;;
2267     [ab].out )
2268         # We found the default executable, but exeext='' is most
2269         # certainly right.
2270         break;;
2271     *.* )
2272         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2273         # FIXME: I believe we export ac_cv_exeext for Libtool,
2274         # but it would be cool to find out if it's true.  Does anybody
2275         # maintain Libtool? --akim.
2276         export ac_cv_exeext
2277         break;;
2278     * )
2279         break;;
2280   esac
2281 done
2282 else
2283   echo "$as_me: failed program was:" >&5
2284 sed 's/^/| /' conftest.$ac_ext >&5
2285
2286 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2287 See \`config.log' for more details." >&5
2288 echo "$as_me: error: C compiler cannot create executables
2289 See \`config.log' for more details." >&2;}
2290    { (exit 77); exit 77; }; }
2291 fi
2292
2293 ac_exeext=$ac_cv_exeext
2294 echo "$as_me:$LINENO: result: $ac_file" >&5
2295 echo "${ECHO_T}$ac_file" >&6
2296
2297 # Check the compiler produces executables we can run.  If not, either
2298 # the compiler is broken, or we cross compile.
2299 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2300 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2301 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2302 # If not cross compiling, check that we can run a simple program.
2303 if test "$cross_compiling" != yes; then
2304   if { ac_try='./$ac_file'
2305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2306   (eval $ac_try) 2>&5
2307   ac_status=$?
2308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2309   (exit $ac_status); }; }; then
2310     cross_compiling=no
2311   else
2312     if test "$cross_compiling" = maybe; then
2313         cross_compiling=yes
2314     else
2315         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2316 If you meant to cross compile, use \`--host'.
2317 See \`config.log' for more details." >&5
2318 echo "$as_me: error: cannot run C compiled programs.
2319 If you meant to cross compile, use \`--host'.
2320 See \`config.log' for more details." >&2;}
2321    { (exit 1); exit 1; }; }
2322     fi
2323   fi
2324 fi
2325 echo "$as_me:$LINENO: result: yes" >&5
2326 echo "${ECHO_T}yes" >&6
2327
2328 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2329 ac_clean_files=$ac_clean_files_save
2330 # Check the compiler produces executables we can run.  If not, either
2331 # the compiler is broken, or we cross compile.
2332 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2333 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2334 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2335 echo "${ECHO_T}$cross_compiling" >&6
2336
2337 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2338 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2339 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2340   (eval $ac_link) 2>&5
2341   ac_status=$?
2342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2343   (exit $ac_status); }; then
2344   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2345 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2346 # work properly (i.e., refer to `conftest.exe'), while it won't with
2347 # `rm'.
2348 for ac_file in conftest.exe conftest conftest.*; do
2349   test -f "$ac_file" || continue
2350   case $ac_file in
2351     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2352     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2353           export ac_cv_exeext
2354           break;;
2355     * ) break;;
2356   esac
2357 done
2358 else
2359   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2360 See \`config.log' for more details." >&5
2361 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2362 See \`config.log' for more details." >&2;}
2363    { (exit 1); exit 1; }; }
2364 fi
2365
2366 rm -f conftest$ac_cv_exeext
2367 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2368 echo "${ECHO_T}$ac_cv_exeext" >&6
2369
2370 rm -f conftest.$ac_ext
2371 EXEEXT=$ac_cv_exeext
2372 ac_exeext=$EXEEXT
2373 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2374 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2375 if test "${ac_cv_objext+set}" = set; then
2376   echo $ECHO_N "(cached) $ECHO_C" >&6
2377 else
2378   cat >conftest.$ac_ext <<_ACEOF
2379 /* confdefs.h.  */
2380 _ACEOF
2381 cat confdefs.h >>conftest.$ac_ext
2382 cat >>conftest.$ac_ext <<_ACEOF
2383 /* end confdefs.h.  */
2384
2385 int
2386 main ()
2387 {
2388
2389   ;
2390   return 0;
2391 }
2392 _ACEOF
2393 rm -f conftest.o conftest.obj
2394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2395   (eval $ac_compile) 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; then
2399   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2400   case $ac_file in
2401     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2402     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2403        break;;
2404   esac
2405 done
2406 else
2407   echo "$as_me: failed program was:" >&5
2408 sed 's/^/| /' conftest.$ac_ext >&5
2409
2410 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2411 See \`config.log' for more details." >&5
2412 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2413 See \`config.log' for more details." >&2;}
2414    { (exit 1); exit 1; }; }
2415 fi
2416
2417 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2418 fi
2419 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2420 echo "${ECHO_T}$ac_cv_objext" >&6
2421 OBJEXT=$ac_cv_objext
2422 ac_objext=$OBJEXT
2423 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2424 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2425 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2426   echo $ECHO_N "(cached) $ECHO_C" >&6
2427 else
2428   cat >conftest.$ac_ext <<_ACEOF
2429 /* confdefs.h.  */
2430 _ACEOF
2431 cat confdefs.h >>conftest.$ac_ext
2432 cat >>conftest.$ac_ext <<_ACEOF
2433 /* end confdefs.h.  */
2434
2435 int
2436 main ()
2437 {
2438 #ifndef __GNUC__
2439        choke me
2440 #endif
2441
2442   ;
2443   return 0;
2444 }
2445 _ACEOF
2446 rm -f conftest.$ac_objext
2447 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2448   (eval $ac_compile) 2>conftest.er1
2449   ac_status=$?
2450   grep -v '^ *+' conftest.er1 >conftest.err
2451   rm -f conftest.er1
2452   cat conftest.err >&5
2453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2454   (exit $ac_status); } &&
2455          { ac_try='test -z "$ac_c_werror_flag"
2456                          || test ! -s conftest.err'
2457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2458   (eval $ac_try) 2>&5
2459   ac_status=$?
2460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2461   (exit $ac_status); }; } &&
2462          { ac_try='test -s conftest.$ac_objext'
2463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2464   (eval $ac_try) 2>&5
2465   ac_status=$?
2466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2467   (exit $ac_status); }; }; then
2468   ac_compiler_gnu=yes
2469 else
2470   echo "$as_me: failed program was:" >&5
2471 sed 's/^/| /' conftest.$ac_ext >&5
2472
2473 ac_compiler_gnu=no
2474 fi
2475 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2476 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2477
2478 fi
2479 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2480 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2481 GCC=`test $ac_compiler_gnu = yes && echo yes`
2482 ac_test_CFLAGS=${CFLAGS+set}
2483 ac_save_CFLAGS=$CFLAGS
2484 CFLAGS="-g"
2485 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2486 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2487 if test "${ac_cv_prog_cc_g+set}" = set; then
2488   echo $ECHO_N "(cached) $ECHO_C" >&6
2489 else
2490   cat >conftest.$ac_ext <<_ACEOF
2491 /* confdefs.h.  */
2492 _ACEOF
2493 cat confdefs.h >>conftest.$ac_ext
2494 cat >>conftest.$ac_ext <<_ACEOF
2495 /* end confdefs.h.  */
2496
2497 int
2498 main ()
2499 {
2500
2501   ;
2502   return 0;
2503 }
2504 _ACEOF
2505 rm -f conftest.$ac_objext
2506 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2507   (eval $ac_compile) 2>conftest.er1
2508   ac_status=$?
2509   grep -v '^ *+' conftest.er1 >conftest.err
2510   rm -f conftest.er1
2511   cat conftest.err >&5
2512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2513   (exit $ac_status); } &&
2514          { ac_try='test -z "$ac_c_werror_flag"
2515                          || test ! -s conftest.err'
2516   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2517   (eval $ac_try) 2>&5
2518   ac_status=$?
2519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2520   (exit $ac_status); }; } &&
2521          { ac_try='test -s conftest.$ac_objext'
2522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2523   (eval $ac_try) 2>&5
2524   ac_status=$?
2525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2526   (exit $ac_status); }; }; then
2527   ac_cv_prog_cc_g=yes
2528 else
2529   echo "$as_me: failed program was:" >&5
2530 sed 's/^/| /' conftest.$ac_ext >&5
2531
2532 ac_cv_prog_cc_g=no
2533 fi
2534 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2535 fi
2536 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2538 if test "$ac_test_CFLAGS" = set; then
2539   CFLAGS=$ac_save_CFLAGS
2540 elif test $ac_cv_prog_cc_g = yes; then
2541   if test "$GCC" = yes; then
2542     CFLAGS="-g -O2"
2543   else
2544     CFLAGS="-g"
2545   fi
2546 else
2547   if test "$GCC" = yes; then
2548     CFLAGS="-O2"
2549   else
2550     CFLAGS=
2551   fi
2552 fi
2553 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2554 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2555 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2556   echo $ECHO_N "(cached) $ECHO_C" >&6
2557 else
2558   ac_cv_prog_cc_stdc=no
2559 ac_save_CC=$CC
2560 cat >conftest.$ac_ext <<_ACEOF
2561 /* confdefs.h.  */
2562 _ACEOF
2563 cat confdefs.h >>conftest.$ac_ext
2564 cat >>conftest.$ac_ext <<_ACEOF
2565 /* end confdefs.h.  */
2566 #include <stdarg.h>
2567 #include <stdio.h>
2568 #include <sys/types.h>
2569 #include <sys/stat.h>
2570 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2571 struct buf { int x; };
2572 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2573 static char *e (p, i)
2574      char **p;
2575      int i;
2576 {
2577   return p[i];
2578 }
2579 static char *f (char * (*g) (char **, int), char **p, ...)
2580 {
2581   char *s;
2582   va_list v;
2583   va_start (v,p);
2584   s = g (p, va_arg (v,int));
2585   va_end (v);
2586   return s;
2587 }
2588
2589 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2590    function prototypes and stuff, but not '\xHH' hex character constants.
2591    These don't provoke an error unfortunately, instead are silently treated
2592    as 'x'.  The following induces an error, until -std1 is added to get
2593    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2594    array size at least.  It's necessary to write '\x00'==0 to get something
2595    that's true only with -std1.  */
2596 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2597
2598 int test (int i, double x);
2599 struct s1 {int (*f) (int a);};
2600 struct s2 {int (*f) (double a);};
2601 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2602 int argc;
2603 char **argv;
2604 int
2605 main ()
2606 {
2607 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2608   ;
2609   return 0;
2610 }
2611 _ACEOF
2612 # Don't try gcc -ansi; that turns off useful extensions and
2613 # breaks some systems' header files.
2614 # AIX                   -qlanglvl=ansi
2615 # Ultrix and OSF/1      -std1
2616 # HP-UX 10.20 and later -Ae
2617 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2618 # SVR4                  -Xc -D__EXTENSIONS__
2619 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2620 do
2621   CC="$ac_save_CC $ac_arg"
2622   rm -f conftest.$ac_objext
2623 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2624   (eval $ac_compile) 2>conftest.er1
2625   ac_status=$?
2626   grep -v '^ *+' conftest.er1 >conftest.err
2627   rm -f conftest.er1
2628   cat conftest.err >&5
2629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630   (exit $ac_status); } &&
2631          { ac_try='test -z "$ac_c_werror_flag"
2632                          || test ! -s conftest.err'
2633   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2634   (eval $ac_try) 2>&5
2635   ac_status=$?
2636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2637   (exit $ac_status); }; } &&
2638          { ac_try='test -s conftest.$ac_objext'
2639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2640   (eval $ac_try) 2>&5
2641   ac_status=$?
2642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2643   (exit $ac_status); }; }; then
2644   ac_cv_prog_cc_stdc=$ac_arg
2645 break
2646 else
2647   echo "$as_me: failed program was:" >&5
2648 sed 's/^/| /' conftest.$ac_ext >&5
2649
2650 fi
2651 rm -f conftest.err conftest.$ac_objext
2652 done
2653 rm -f conftest.$ac_ext conftest.$ac_objext
2654 CC=$ac_save_CC
2655
2656 fi
2657
2658 case "x$ac_cv_prog_cc_stdc" in
2659   x|xno)
2660     echo "$as_me:$LINENO: result: none needed" >&5
2661 echo "${ECHO_T}none needed" >&6 ;;
2662   *)
2663     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2664 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2665     CC="$CC $ac_cv_prog_cc_stdc" ;;
2666 esac
2667
2668 # Some people use a C++ compiler to compile C.  Since we use `exit',
2669 # in C++ we need to declare it.  In case someone uses the same compiler
2670 # for both compiling C and C++ we need to have the C++ compiler decide
2671 # the declaration of exit, since it's the most demanding environment.
2672 cat >conftest.$ac_ext <<_ACEOF
2673 #ifndef __cplusplus
2674   choke me
2675 #endif
2676 _ACEOF
2677 rm -f conftest.$ac_objext
2678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2679   (eval $ac_compile) 2>conftest.er1
2680   ac_status=$?
2681   grep -v '^ *+' conftest.er1 >conftest.err
2682   rm -f conftest.er1
2683   cat conftest.err >&5
2684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685   (exit $ac_status); } &&
2686          { ac_try='test -z "$ac_c_werror_flag"
2687                          || test ! -s conftest.err'
2688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2689   (eval $ac_try) 2>&5
2690   ac_status=$?
2691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2692   (exit $ac_status); }; } &&
2693          { ac_try='test -s conftest.$ac_objext'
2694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2695   (eval $ac_try) 2>&5
2696   ac_status=$?
2697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698   (exit $ac_status); }; }; then
2699   for ac_declaration in \
2700    '' \
2701    'extern "C" void std::exit (int) throw (); using std::exit;' \
2702    'extern "C" void std::exit (int); using std::exit;' \
2703    'extern "C" void exit (int) throw ();' \
2704    'extern "C" void exit (int);' \
2705    'void exit (int);'
2706 do
2707   cat >conftest.$ac_ext <<_ACEOF
2708 /* confdefs.h.  */
2709 _ACEOF
2710 cat confdefs.h >>conftest.$ac_ext
2711 cat >>conftest.$ac_ext <<_ACEOF
2712 /* end confdefs.h.  */
2713 $ac_declaration
2714 #include <stdlib.h>
2715 int
2716 main ()
2717 {
2718 exit (42);
2719   ;
2720   return 0;
2721 }
2722 _ACEOF
2723 rm -f conftest.$ac_objext
2724 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2725   (eval $ac_compile) 2>conftest.er1
2726   ac_status=$?
2727   grep -v '^ *+' conftest.er1 >conftest.err
2728   rm -f conftest.er1
2729   cat conftest.err >&5
2730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2731   (exit $ac_status); } &&
2732          { ac_try='test -z "$ac_c_werror_flag"
2733                          || test ! -s conftest.err'
2734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2735   (eval $ac_try) 2>&5
2736   ac_status=$?
2737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2738   (exit $ac_status); }; } &&
2739          { ac_try='test -s conftest.$ac_objext'
2740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2741   (eval $ac_try) 2>&5
2742   ac_status=$?
2743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2744   (exit $ac_status); }; }; then
2745   :
2746 else
2747   echo "$as_me: failed program was:" >&5
2748 sed 's/^/| /' conftest.$ac_ext >&5
2749
2750 continue
2751 fi
2752 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2753   cat >conftest.$ac_ext <<_ACEOF
2754 /* confdefs.h.  */
2755 _ACEOF
2756 cat confdefs.h >>conftest.$ac_ext
2757 cat >>conftest.$ac_ext <<_ACEOF
2758 /* end confdefs.h.  */
2759 $ac_declaration
2760 int
2761 main ()
2762 {
2763 exit (42);
2764   ;
2765   return 0;
2766 }
2767 _ACEOF
2768 rm -f conftest.$ac_objext
2769 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2770   (eval $ac_compile) 2>conftest.er1
2771   ac_status=$?
2772   grep -v '^ *+' conftest.er1 >conftest.err
2773   rm -f conftest.er1
2774   cat conftest.err >&5
2775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2776   (exit $ac_status); } &&
2777          { ac_try='test -z "$ac_c_werror_flag"
2778                          || test ! -s conftest.err'
2779   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2780   (eval $ac_try) 2>&5
2781   ac_status=$?
2782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783   (exit $ac_status); }; } &&
2784          { ac_try='test -s conftest.$ac_objext'
2785   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2786   (eval $ac_try) 2>&5
2787   ac_status=$?
2788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2789   (exit $ac_status); }; }; then
2790   break
2791 else
2792   echo "$as_me: failed program was:" >&5
2793 sed 's/^/| /' conftest.$ac_ext >&5
2794
2795 fi
2796 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2797 done
2798 rm -f conftest*
2799 if test -n "$ac_declaration"; then
2800   echo '#ifdef __cplusplus' >>confdefs.h
2801   echo $ac_declaration      >>confdefs.h
2802   echo '#endif'             >>confdefs.h
2803 fi
2804
2805 else
2806   echo "$as_me: failed program was:" >&5
2807 sed 's/^/| /' conftest.$ac_ext >&5
2808
2809 fi
2810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2811 ac_ext=c
2812 ac_cpp='$CPP $CPPFLAGS'
2813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2816
2817
2818 unset CFLAGS
2819
2820 #
2821 # Read the template
2822 #
2823 . "$srcdir/src/template/$template" || exit
2824
2825 # CFLAGS are selected so:
2826 # If the user specifies something in the environment, that is used.
2827 # else:  If the template file set something, that is used.
2828 # else:  If the compiler is GCC, then we use -O2.
2829 # else:  If the compiler is something else, then we use -0.
2830
2831 if test "$ac_env_CFLAGS_set" = set; then
2832   CFLAGS=$ac_env_CFLAGS_value
2833 elif test "${CFLAGS+set}" = set; then
2834   : # (keep what template set)
2835 elif test "$GCC" = yes; then
2836   CFLAGS="-O2"
2837 else
2838   # if the user selected debug mode, don't use -O
2839   if test "$enable_debug" != yes; then
2840     CFLAGS="-O"
2841   fi
2842 fi
2843
2844 # Some versions of GCC support some additional useful warning flags.
2845 # Check whether they are supported, and add them to CFLAGS if so.
2846
2847 if test "$GCC" = yes; then
2848
2849 # ICC pretends to be GCC but it's lying; it doesn't support these options.
2850 # So we have to check if "GCC" is really ICC.
2851
2852 cat >conftest.$ac_ext <<_ACEOF
2853 /* confdefs.h.  */
2854 _ACEOF
2855 cat confdefs.h >>conftest.$ac_ext
2856 cat >>conftest.$ac_ext <<_ACEOF
2857 /* end confdefs.h.  */
2858
2859 int
2860 main ()
2861 {
2862 #ifndef __INTEL_COMPILER
2863 choke me
2864 #endif
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2871   (eval $ac_compile) 2>conftest.er1
2872   ac_status=$?
2873   grep -v '^ *+' conftest.er1 >conftest.err
2874   rm -f conftest.er1
2875   cat conftest.err >&5
2876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877   (exit $ac_status); } &&
2878          { ac_try='test -z "$ac_c_werror_flag"
2879                          || test ! -s conftest.err'
2880   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2881   (eval $ac_try) 2>&5
2882   ac_status=$?
2883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2884   (exit $ac_status); }; } &&
2885          { ac_try='test -s conftest.$ac_objext'
2886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2887   (eval $ac_try) 2>&5
2888   ac_status=$?
2889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890   (exit $ac_status); }; }; then
2891   ICC=yes
2892 else
2893   echo "$as_me: failed program was:" >&5
2894 sed 's/^/| /' conftest.$ac_ext >&5
2895
2896 ICC=no
2897 fi
2898 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2899
2900   if test "$ICC" = no; then
2901     CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2902
2903     echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2904 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2905 pgac_save_CFLAGS=$CFLAGS
2906 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2907 cat >conftest.$ac_ext <<_ACEOF
2908 /* confdefs.h.  */
2909 _ACEOF
2910 cat confdefs.h >>conftest.$ac_ext
2911 cat >>conftest.$ac_ext <<_ACEOF
2912 /* end confdefs.h.  */
2913
2914 int
2915 main ()
2916 {
2917
2918   ;
2919   return 0;
2920 }
2921 _ACEOF
2922 rm -f conftest.$ac_objext
2923 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2924   (eval $ac_compile) 2>conftest.er1
2925   ac_status=$?
2926   grep -v '^ *+' conftest.er1 >conftest.err
2927   rm -f conftest.er1
2928   cat conftest.err >&5
2929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2930   (exit $ac_status); } &&
2931          { ac_try='test -z "$ac_c_werror_flag"
2932                          || test ! -s conftest.err'
2933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2934   (eval $ac_try) 2>&5
2935   ac_status=$?
2936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2937   (exit $ac_status); }; } &&
2938          { ac_try='test -s conftest.$ac_objext'
2939   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2940   (eval $ac_try) 2>&5
2941   ac_status=$?
2942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2943   (exit $ac_status); }; }; then
2944   echo "$as_me:$LINENO: result: yes" >&5
2945 echo "${ECHO_T}yes" >&6
2946 else
2947   echo "$as_me: failed program was:" >&5
2948 sed 's/^/| /' conftest.$ac_ext >&5
2949
2950 CFLAGS="$pgac_save_CFLAGS"
2951                     echo "$as_me:$LINENO: result: no" >&5
2952 echo "${ECHO_T}no" >&6
2953 fi
2954 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2955
2956     echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2957 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2958 pgac_save_CFLAGS=$CFLAGS
2959 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2960 cat >conftest.$ac_ext <<_ACEOF
2961 /* confdefs.h.  */
2962 _ACEOF
2963 cat confdefs.h >>conftest.$ac_ext
2964 cat >>conftest.$ac_ext <<_ACEOF
2965 /* end confdefs.h.  */
2966
2967 int
2968 main ()
2969 {
2970
2971   ;
2972   return 0;
2973 }
2974 _ACEOF
2975 rm -f conftest.$ac_objext
2976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2977   (eval $ac_compile) 2>conftest.er1
2978   ac_status=$?
2979   grep -v '^ *+' conftest.er1 >conftest.err
2980   rm -f conftest.er1
2981   cat conftest.err >&5
2982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2983   (exit $ac_status); } &&
2984          { ac_try='test -z "$ac_c_werror_flag"
2985                          || test ! -s conftest.err'
2986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2987   (eval $ac_try) 2>&5
2988   ac_status=$?
2989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990   (exit $ac_status); }; } &&
2991          { ac_try='test -s conftest.$ac_objext'
2992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2993   (eval $ac_try) 2>&5
2994   ac_status=$?
2995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2996   (exit $ac_status); }; }; then
2997   echo "$as_me:$LINENO: result: yes" >&5
2998 echo "${ECHO_T}yes" >&6
2999 else
3000   echo "$as_me: failed program was:" >&5
3001 sed 's/^/| /' conftest.$ac_ext >&5
3002
3003 CFLAGS="$pgac_save_CFLAGS"
3004                     echo "$as_me:$LINENO: result: no" >&5
3005 echo "${ECHO_T}no" >&6
3006 fi
3007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3008
3009   else
3010     # Intel compiler has a bug/misoptimization in checking for
3011     # division by NAN (NaN == 0), -mp1 fixes it, so add it to the
3012     # CFLAGS.
3013     echo "$as_me:$LINENO: checking if $CC supports -mp1" >&5
3014 echo $ECHO_N "checking if $CC supports -mp1... $ECHO_C" >&6
3015 pgac_save_CFLAGS=$CFLAGS
3016 CFLAGS="$pgac_save_CFLAGS -mp1"
3017 cat >conftest.$ac_ext <<_ACEOF
3018 /* confdefs.h.  */
3019 _ACEOF
3020 cat confdefs.h >>conftest.$ac_ext
3021 cat >>conftest.$ac_ext <<_ACEOF
3022 /* end confdefs.h.  */
3023
3024 int
3025 main ()
3026 {
3027
3028   ;
3029   return 0;
3030 }
3031 _ACEOF
3032 rm -f conftest.$ac_objext
3033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3034   (eval $ac_compile) 2>conftest.er1
3035   ac_status=$?
3036   grep -v '^ *+' conftest.er1 >conftest.err
3037   rm -f conftest.er1
3038   cat conftest.err >&5
3039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3040   (exit $ac_status); } &&
3041          { ac_try='test -z "$ac_c_werror_flag"
3042                          || test ! -s conftest.err'
3043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3044   (eval $ac_try) 2>&5
3045   ac_status=$?
3046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047   (exit $ac_status); }; } &&
3048          { ac_try='test -s conftest.$ac_objext'
3049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3050   (eval $ac_try) 2>&5
3051   ac_status=$?
3052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3053   (exit $ac_status); }; }; then
3054   echo "$as_me:$LINENO: result: yes" >&5
3055 echo "${ECHO_T}yes" >&6
3056 else
3057   echo "$as_me: failed program was:" >&5
3058 sed 's/^/| /' conftest.$ac_ext >&5
3059
3060 CFLAGS="$pgac_save_CFLAGS"
3061                     echo "$as_me:$LINENO: result: no" >&5
3062 echo "${ECHO_T}no" >&6
3063 fi
3064 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3065
3066   fi
3067
3068   # Disable strict-aliasing rules; needed for gcc 3.3+
3069   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
3070 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
3071 pgac_save_CFLAGS=$CFLAGS
3072 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
3073 cat >conftest.$ac_ext <<_ACEOF
3074 /* confdefs.h.  */
3075 _ACEOF
3076 cat confdefs.h >>conftest.$ac_ext
3077 cat >>conftest.$ac_ext <<_ACEOF
3078 /* end confdefs.h.  */
3079
3080 int
3081 main ()
3082 {
3083
3084   ;
3085   return 0;
3086 }
3087 _ACEOF
3088 rm -f conftest.$ac_objext
3089 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3090   (eval $ac_compile) 2>conftest.er1
3091   ac_status=$?
3092   grep -v '^ *+' conftest.er1 >conftest.err
3093   rm -f conftest.er1
3094   cat conftest.err >&5
3095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3096   (exit $ac_status); } &&
3097          { ac_try='test -z "$ac_c_werror_flag"
3098                          || test ! -s conftest.err'
3099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3100   (eval $ac_try) 2>&5
3101   ac_status=$?
3102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3103   (exit $ac_status); }; } &&
3104          { ac_try='test -s conftest.$ac_objext'
3105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3106   (eval $ac_try) 2>&5
3107   ac_status=$?
3108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3109   (exit $ac_status); }; }; then
3110   echo "$as_me:$LINENO: result: yes" >&5
3111 echo "${ECHO_T}yes" >&6
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 sed 's/^/| /' conftest.$ac_ext >&5
3115
3116 CFLAGS="$pgac_save_CFLAGS"
3117                     echo "$as_me:$LINENO: result: no" >&5
3118 echo "${ECHO_T}no" >&6
3119 fi
3120 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3121
3122 elif test x"${CC}" = x"xlc"; then
3123   # AIX xlc has to have strict aliasing turned off too
3124   echo "$as_me:$LINENO: checking if $CC supports -qnoansialias" >&5
3125 echo $ECHO_N "checking if $CC supports -qnoansialias... $ECHO_C" >&6
3126 pgac_save_CFLAGS=$CFLAGS
3127 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
3128 cat >conftest.$ac_ext <<_ACEOF
3129 /* confdefs.h.  */
3130 _ACEOF
3131 cat confdefs.h >>conftest.$ac_ext
3132 cat >>conftest.$ac_ext <<_ACEOF
3133 /* end confdefs.h.  */
3134
3135 int
3136 main ()
3137 {
3138
3139   ;
3140   return 0;
3141 }
3142 _ACEOF
3143 rm -f conftest.$ac_objext
3144 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3145   (eval $ac_compile) 2>conftest.er1
3146   ac_status=$?
3147   grep -v '^ *+' conftest.er1 >conftest.err
3148   rm -f conftest.er1
3149   cat conftest.err >&5
3150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3151   (exit $ac_status); } &&
3152          { ac_try='test -z "$ac_c_werror_flag"
3153                          || test ! -s conftest.err'
3154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3155   (eval $ac_try) 2>&5
3156   ac_status=$?
3157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3158   (exit $ac_status); }; } &&
3159          { ac_try='test -s conftest.$ac_objext'
3160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3161   (eval $ac_try) 2>&5
3162   ac_status=$?
3163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3164   (exit $ac_status); }; }; then
3165   echo "$as_me:$LINENO: result: yes" >&5
3166 echo "${ECHO_T}yes" >&6
3167 else
3168   echo "$as_me: failed program was:" >&5
3169 sed 's/^/| /' conftest.$ac_ext >&5
3170
3171 CFLAGS="$pgac_save_CFLAGS"
3172                     echo "$as_me:$LINENO: result: no" >&5
3173 echo "${ECHO_T}no" >&6
3174 fi
3175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3176
3177 fi
3178
3179 # supply -g if --enable-debug
3180 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
3181   CFLAGS="$CFLAGS -g"
3182 fi
3183
3184 # enable profiling if --enable-profiling
3185 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
3186   if test "$GCC" = yes; then
3187
3188 cat >>confdefs.h <<\_ACEOF
3189 #define PROFILE_PID_DIR 1
3190 _ACEOF
3191
3192     CFLAGS="$CFLAGS -pg"
3193   else
3194     { { echo "$as_me:$LINENO: error: --enable-profiling is supported only when using GCC" >&5
3195 echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
3196    { (exit 1); exit 1; }; }
3197   fi
3198 fi
3199
3200 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
3201 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
3202
3203 # We already have this in Makefile.win32, but configure needs it too
3204 if test "$PORTNAME" = "win32"; then
3205   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
3206 fi
3207
3208 # Check if the compiler still works with the template settings
3209 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
3210 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
3211 cat >conftest.$ac_ext <<_ACEOF
3212 /* confdefs.h.  */
3213 _ACEOF
3214 cat confdefs.h >>conftest.$ac_ext
3215 cat >>conftest.$ac_ext <<_ACEOF
3216 /* end confdefs.h.  */
3217
3218 int
3219 main ()
3220 {
3221 return 0;
3222   ;
3223   return 0;
3224 }
3225 _ACEOF
3226 rm -f conftest.$ac_objext conftest$ac_exeext
3227 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3228   (eval $ac_link) 2>conftest.er1
3229   ac_status=$?
3230   grep -v '^ *+' conftest.er1 >conftest.err
3231   rm -f conftest.er1
3232   cat conftest.err >&5
3233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3234   (exit $ac_status); } &&
3235          { ac_try='test -z "$ac_c_werror_flag"
3236                          || test ! -s conftest.err'
3237   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3238   (eval $ac_try) 2>&5
3239   ac_status=$?
3240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3241   (exit $ac_status); }; } &&
3242          { ac_try='test -s conftest$ac_exeext'
3243   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3244   (eval $ac_try) 2>&5
3245   ac_status=$?
3246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3247   (exit $ac_status); }; }; then
3248   echo "$as_me:$LINENO: result: yes" >&5
3249 echo "${ECHO_T}yes" >&6
3250 else
3251   echo "$as_me: failed program was:" >&5
3252 sed 's/^/| /' conftest.$ac_ext >&5
3253
3254 echo "$as_me:$LINENO: result: no" >&5
3255 echo "${ECHO_T}no" >&6
3256    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
3257 echo "$as_me: error: cannot proceed" >&2;}
3258    { (exit 1); exit 1; }; }
3259 fi
3260 rm -f conftest.err conftest.$ac_objext \
3261       conftest$ac_exeext conftest.$ac_ext
3262
3263 # Defend against gcc -ffast-math
3264 if test "$GCC" = yes; then
3265 cat >conftest.$ac_ext <<_ACEOF
3266 /* confdefs.h.  */
3267 _ACEOF
3268 cat confdefs.h >>conftest.$ac_ext
3269 cat >>conftest.$ac_ext <<_ACEOF
3270 /* end confdefs.h.  */
3271
3272 int
3273 main ()
3274 {
3275 #ifdef __FAST_MATH__
3276 choke me
3277 #endif
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f conftest.$ac_objext
3283 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>conftest.er1
3285   ac_status=$?
3286   grep -v '^ *+' conftest.er1 >conftest.err
3287   rm -f conftest.er1
3288   cat conftest.err >&5
3289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3290   (exit $ac_status); } &&
3291          { ac_try='test -z "$ac_c_werror_flag"
3292                          || test ! -s conftest.err'
3293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3294   (eval $ac_try) 2>&5
3295   ac_status=$?
3296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3297   (exit $ac_status); }; } &&
3298          { ac_try='test -s conftest.$ac_objext'
3299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3300   (eval $ac_try) 2>&5
3301   ac_status=$?
3302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3303   (exit $ac_status); }; }; then
3304   :
3305 else
3306   echo "$as_me: failed program was:" >&5
3307 sed 's/^/| /' conftest.$ac_ext >&5
3308
3309 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3310 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3311    { (exit 1); exit 1; }; }
3312 fi
3313 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3314 fi
3315
3316 ac_ext=c
3317 ac_cpp='$CPP $CPPFLAGS'
3318 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3319 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3320 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3321 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3322 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3323 # On Suns, sometimes $CPP names a directory.
3324 if test -n "$CPP" && test -d "$CPP"; then
3325   CPP=
3326 fi
3327 if test -z "$CPP"; then
3328   if test "${ac_cv_prog_CPP+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331       # Double quotes because CPP needs to be expanded
3332     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3333     do
3334       ac_preproc_ok=false
3335 for ac_c_preproc_warn_flag in '' yes
3336 do
3337   # Use a header file that comes with gcc, so configuring glibc
3338   # with a fresh cross-compiler works.
3339   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3340   # <limits.h> exists even on freestanding compilers.
3341   # On the NeXT, cc -E runs the code through the compiler's parser,
3342   # not just through cpp. "Syntax error" is here to catch this case.
3343   cat >conftest.$ac_ext <<_ACEOF
3344 /* confdefs.h.  */
3345 _ACEOF
3346 cat confdefs.h >>conftest.$ac_ext
3347 cat >>conftest.$ac_ext <<_ACEOF
3348 /* end confdefs.h.  */
3349 #ifdef __STDC__
3350 # include <limits.h>
3351 #else
3352 # include <assert.h>
3353 #endif
3354                      Syntax error
3355 _ACEOF
3356 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3358   ac_status=$?
3359   grep -v '^ *+' conftest.er1 >conftest.err
3360   rm -f conftest.er1
3361   cat conftest.err >&5
3362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3363   (exit $ac_status); } >/dev/null; then
3364   if test -s conftest.err; then
3365     ac_cpp_err=$ac_c_preproc_warn_flag
3366     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3367   else
3368     ac_cpp_err=
3369   fi
3370 else
3371   ac_cpp_err=yes
3372 fi
3373 if test -z "$ac_cpp_err"; then
3374   :
3375 else
3376   echo "$as_me: failed program was:" >&5
3377 sed 's/^/| /' conftest.$ac_ext >&5
3378
3379   # Broken: fails on valid input.
3380 continue
3381 fi
3382 rm -f conftest.err conftest.$ac_ext
3383
3384   # OK, works on sane cases.  Now check whether non-existent headers
3385   # can be detected and how.
3386   cat >conftest.$ac_ext <<_ACEOF
3387 /* confdefs.h.  */
3388 _ACEOF
3389 cat confdefs.h >>conftest.$ac_ext
3390 cat >>conftest.$ac_ext <<_ACEOF
3391 /* end confdefs.h.  */
3392 #include <ac_nonexistent.h>
3393 _ACEOF
3394 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3395   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3396   ac_status=$?
3397   grep -v '^ *+' conftest.er1 >conftest.err
3398   rm -f conftest.er1
3399   cat conftest.err >&5
3400   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3401   (exit $ac_status); } >/dev/null; then
3402   if test -s conftest.err; then
3403     ac_cpp_err=$ac_c_preproc_warn_flag
3404     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3405   else
3406     ac_cpp_err=
3407   fi
3408 else
3409   ac_cpp_err=yes
3410 fi
3411 if test -z "$ac_cpp_err"; then
3412   # Broken: success on invalid input.
3413 continue
3414 else
3415   echo "$as_me: failed program was:" >&5
3416 sed 's/^/| /' conftest.$ac_ext >&5
3417
3418   # Passes both tests.
3419 ac_preproc_ok=:
3420 break
3421 fi
3422 rm -f conftest.err conftest.$ac_ext
3423
3424 done
3425 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3426 rm -f conftest.err conftest.$ac_ext
3427 if $ac_preproc_ok; then
3428   break
3429 fi
3430
3431     done
3432     ac_cv_prog_CPP=$CPP
3433
3434 fi
3435   CPP=$ac_cv_prog_CPP
3436 else
3437   ac_cv_prog_CPP=$CPP
3438 fi
3439 echo "$as_me:$LINENO: result: $CPP" >&5
3440 echo "${ECHO_T}$CPP" >&6
3441 ac_preproc_ok=false
3442 for ac_c_preproc_warn_flag in '' yes
3443 do
3444   # Use a header file that comes with gcc, so configuring glibc
3445   # with a fresh cross-compiler works.
3446   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3447   # <limits.h> exists even on freestanding compilers.
3448   # On the NeXT, cc -E runs the code through the compiler's parser,
3449   # not just through cpp. "Syntax error" is here to catch this case.
3450   cat >conftest.$ac_ext <<_ACEOF
3451 /* confdefs.h.  */
3452 _ACEOF
3453 cat confdefs.h >>conftest.$ac_ext
3454 cat >>conftest.$ac_ext <<_ACEOF
3455 /* end confdefs.h.  */
3456 #ifdef __STDC__
3457 # include <limits.h>
3458 #else
3459 # include <assert.h>
3460 #endif
3461                      Syntax error
3462 _ACEOF
3463 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3465   ac_status=$?
3466   grep -v '^ *+' conftest.er1 >conftest.err
3467   rm -f conftest.er1
3468   cat conftest.err >&5
3469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470   (exit $ac_status); } >/dev/null; then
3471   if test -s conftest.err; then
3472     ac_cpp_err=$ac_c_preproc_warn_flag
3473     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3474   else
3475     ac_cpp_err=
3476   fi
3477 else
3478   ac_cpp_err=yes
3479 fi
3480 if test -z "$ac_cpp_err"; then
3481   :
3482 else
3483   echo "$as_me: failed program was:" >&5
3484 sed 's/^/| /' conftest.$ac_ext >&5
3485
3486   # Broken: fails on valid input.
3487 continue
3488 fi
3489 rm -f conftest.err conftest.$ac_ext
3490
3491   # OK, works on sane cases.  Now check whether non-existent headers
3492   # can be detected and how.
3493   cat >conftest.$ac_ext <<_ACEOF
3494 /* confdefs.h.  */
3495 _ACEOF
3496 cat confdefs.h >>conftest.$ac_ext
3497 cat >>conftest.$ac_ext <<_ACEOF
3498 /* end confdefs.h.  */
3499 #include <ac_nonexistent.h>
3500 _ACEOF
3501 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3502   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3503   ac_status=$?
3504   grep -v '^ *+' conftest.er1 >conftest.err
3505   rm -f conftest.er1
3506   cat conftest.err >&5
3507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3508   (exit $ac_status); } >/dev/null; then
3509   if test -s conftest.err; then
3510     ac_cpp_err=$ac_c_preproc_warn_flag
3511     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3512   else
3513     ac_cpp_err=
3514   fi
3515 else
3516   ac_cpp_err=yes
3517 fi
3518 if test -z "$ac_cpp_err"; then
3519   # Broken: success on invalid input.
3520 continue
3521 else
3522   echo "$as_me: failed program was:" >&5
3523 sed 's/^/| /' conftest.$ac_ext >&5
3524
3525   # Passes both tests.
3526 ac_preproc_ok=:
3527 break
3528 fi
3529 rm -f conftest.err conftest.$ac_ext
3530
3531 done
3532 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3533 rm -f conftest.err conftest.$ac_ext
3534 if $ac_preproc_ok; then
3535   :
3536 else
3537   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3538 See \`config.log' for more details." >&5
3539 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3540 See \`config.log' for more details." >&2;}
3541    { (exit 1); exit 1; }; }
3542 fi
3543
3544 ac_ext=c
3545 ac_cpp='$CPP $CPPFLAGS'
3546 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3547 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3548 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3549
3550
3551
3552 # Create compiler version string
3553 if test x"$GCC" = x"yes" ; then
3554   cc_string="GCC `${CC} --version | sed q`"
3555 else
3556   cc_string=$CC
3557 fi
3558
3559 cat >>confdefs.h <<_ACEOF
3560 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3561 _ACEOF
3562
3563
3564
3565 #
3566 # Set up TAS assembly code if needed; the template file has now had its
3567 # chance to request this.
3568 #
3569           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3570
3571
3572 if test "$need_tas" = yes ; then
3573   TAS=tas.o
3574 else
3575   TAS=""
3576 fi
3577
3578
3579
3580 #
3581 # Automatic dependency tracking
3582 #
3583
3584 pgac_args="$pgac_args enable_depend"
3585
3586 # Check whether --enable-depend or --disable-depend was given.
3587 if test "${enable_depend+set}" = set; then
3588   enableval="$enable_depend"
3589
3590   case $enableval in
3591     yes)
3592       autodepend=yes
3593       ;;
3594     no)
3595       :
3596       ;;
3597     *)
3598       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3599 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3600    { (exit 1); exit 1; }; }
3601       ;;
3602   esac
3603
3604 else
3605   enable_depend=no
3606
3607 fi;
3608
3609
3610
3611
3612 #
3613 # Enable assert checks
3614 #
3615
3616 pgac_args="$pgac_args enable_cassert"
3617
3618 # Check whether --enable-cassert or --disable-cassert was given.
3619 if test "${enable_cassert+set}" = set; then
3620   enableval="$enable_cassert"
3621
3622   case $enableval in
3623     yes)
3624
3625 cat >>confdefs.h <<\_ACEOF
3626 #define USE_ASSERT_CHECKING 1
3627 _ACEOF
3628
3629       ;;
3630     no)
3631       :
3632       ;;
3633     *)
3634       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3635 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3636    { (exit 1); exit 1; }; }
3637       ;;
3638   esac
3639
3640 else
3641   enable_cassert=no
3642
3643 fi;
3644
3645
3646
3647 #
3648 # Include directories
3649 #
3650 ac_save_IFS=$IFS
3651 IFS="${IFS}${PATH_SEPARATOR}"
3652 # SRCH_INC comes from the template file
3653 for dir in $with_includes $SRCH_INC; do
3654   if test -d "$dir"; then
3655     INCLUDES="$INCLUDES -I$dir"
3656   else
3657     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3658 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3659   fi
3660 done
3661 IFS=$ac_save_IFS
3662
3663
3664
3665 #
3666 # Library directories
3667 #
3668 ac_save_IFS=$IFS
3669 IFS="${IFS}${PATH_SEPARATOR}"
3670 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3671 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3672   if test -d "$dir"; then
3673     LIBDIRS="$LIBDIRS -L$dir"
3674   else
3675     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3676 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3677   fi
3678 done
3679 IFS=$ac_save_IFS
3680
3681 #
3682 # Enable thread-safe client libraries
3683 #
3684 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3685 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3686
3687 pgac_args="$pgac_args enable_thread_safety"
3688
3689 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3690 if test "${enable_thread_safety+set}" = set; then
3691   enableval="$enable_thread_safety"
3692
3693   case $enableval in
3694     yes)
3695       :
3696       ;;
3697     no)
3698       :
3699       ;;
3700     *)
3701       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3702 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3703    { (exit 1); exit 1; }; }
3704       ;;
3705   esac
3706
3707 else
3708   enable_thread_safety=no
3709
3710 fi;
3711
3712
3713 pgac_args="$pgac_args enable_thread_safety_force"
3714
3715 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3716 if test "${enable_thread_safety_force+set}" = set; then
3717   enableval="$enable_thread_safety_force"
3718
3719   case $enableval in
3720     yes)
3721       :
3722       ;;
3723     no)
3724       :
3725       ;;
3726     *)
3727       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3728 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3729    { (exit 1); exit 1; }; }
3730       ;;
3731   esac
3732
3733 else
3734   enable_thread_safety_force=no
3735
3736 fi;
3737
3738 if test "$enable_thread_safety" = yes -o \
3739         "$enable_thread_safety_force" = yes; then
3740   enable_thread_safety="yes"    # for 'force'
3741
3742 cat >>confdefs.h <<\_ACEOF
3743 #define ENABLE_THREAD_SAFETY 1
3744 _ACEOF
3745
3746 fi
3747 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3748 echo "${ECHO_T}$enable_thread_safety" >&6
3749
3750
3751 #
3752 # Optionally build Tcl modules (PL/Tcl)
3753 #
3754 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3755 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3756
3757 pgac_args="$pgac_args with_tcl"
3758
3759
3760 # Check whether --with-tcl or --without-tcl was given.
3761 if test "${with_tcl+set}" = set; then
3762   withval="$with_tcl"
3763
3764   case $withval in
3765     yes)
3766       :
3767       ;;
3768     no)
3769       :
3770       ;;
3771     *)
3772       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3773 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3774    { (exit 1); exit 1; }; }
3775       ;;
3776   esac
3777
3778 else
3779   with_tcl=no
3780
3781 fi;
3782
3783 echo "$as_me:$LINENO: result: $with_tcl" >&5
3784 echo "${ECHO_T}$with_tcl" >&6
3785
3786
3787 # We see if the path to the Tcl/Tk configuration scripts is specified.
3788 # This will override the use of tclsh to find the paths to search.
3789
3790
3791 pgac_args="$pgac_args with_tclconfig"
3792
3793
3794 # Check whether --with-tclconfig or --without-tclconfig was given.
3795 if test "${with_tclconfig+set}" = set; then
3796   withval="$with_tclconfig"
3797
3798   case $withval in
3799     yes)
3800       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3801 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3802    { (exit 1); exit 1; }; }
3803       ;;
3804     no)
3805       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3806 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3807    { (exit 1); exit 1; }; }
3808       ;;
3809     *)
3810
3811       ;;
3812   esac
3813
3814 fi;
3815
3816
3817 #
3818 # Optionally build Perl modules (PL/Perl)
3819 #
3820 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3821 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3822
3823 pgac_args="$pgac_args with_perl"
3824
3825
3826 # Check whether --with-perl or --without-perl was given.
3827 if test "${with_perl+set}" = set; then
3828   withval="$with_perl"
3829
3830   case $withval in
3831     yes)
3832       :
3833       ;;
3834     no)
3835       :
3836       ;;
3837     *)
3838       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3839 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3840    { (exit 1); exit 1; }; }
3841       ;;
3842   esac
3843
3844 else
3845   with_perl=no
3846
3847 fi;
3848
3849 echo "$as_me:$LINENO: result: $with_perl" >&5
3850 echo "${ECHO_T}$with_perl" >&6
3851
3852
3853 #
3854 # Optionally build Python modules (PL/Python)
3855 #
3856 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3857 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3858
3859 pgac_args="$pgac_args with_python"
3860
3861
3862 # Check whether --with-python or --without-python was given.
3863 if test "${with_python+set}" = set; then
3864   withval="$with_python"
3865
3866   case $withval in
3867     yes)
3868       :
3869       ;;
3870     no)
3871       :
3872       ;;
3873     *)
3874       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3875 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3876    { (exit 1); exit 1; }; }
3877       ;;
3878   esac
3879
3880 else
3881   with_python=no
3882
3883 fi;
3884
3885 echo "$as_me:$LINENO: result: $with_python" >&5
3886 echo "${ECHO_T}$with_python" >&6
3887
3888
3889 #
3890 # Kerberos 5
3891 #
3892 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3893 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3894
3895 pgac_args="$pgac_args with_krb5"
3896
3897
3898 # Check whether --with-krb5 or --without-krb5 was given.
3899 if test "${with_krb5+set}" = set; then
3900   withval="$with_krb5"
3901
3902   case $withval in
3903     yes)
3904
3905
3906 cat >>confdefs.h <<\_ACEOF
3907 #define KRB5 1
3908 _ACEOF
3909
3910   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3911
3912       ;;
3913     no)
3914       :
3915       ;;
3916     *)
3917       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3918 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3919    { (exit 1); exit 1; }; }
3920       ;;
3921   esac
3922
3923 else
3924   with_krb5=no
3925
3926 fi;
3927
3928 echo "$as_me:$LINENO: result: $with_krb5" >&5
3929 echo "${ECHO_T}$with_krb5" >&6
3930
3931
3932
3933
3934
3935
3936 #
3937 # Kerberos configuration parameters
3938 #
3939
3940 pgac_args="$pgac_args with_krb_srvnam"
3941
3942
3943 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3944 if test "${with_krb_srvnam+set}" = set; then
3945   withval="$with_krb_srvnam"
3946
3947   case $withval in
3948     yes)
3949       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3950 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3951    { (exit 1); exit 1; }; }
3952       ;;
3953     no)
3954       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3955 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3956    { (exit 1); exit 1; }; }
3957       ;;
3958     *)
3959
3960       ;;
3961   esac
3962
3963 else
3964   with_krb_srvnam="postgres"
3965 fi;
3966
3967
3968 cat >>confdefs.h <<_ACEOF
3969 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3970 _ACEOF
3971
3972
3973
3974 #
3975 # PAM
3976 #
3977 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3978 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3979
3980 pgac_args="$pgac_args with_pam"
3981
3982
3983 # Check whether --with-pam or --without-pam was given.
3984 if test "${with_pam+set}" = set; then
3985   withval="$with_pam"
3986
3987   case $withval in
3988     yes)
3989
3990 cat >>confdefs.h <<\_ACEOF
3991 #define USE_PAM 1
3992 _ACEOF
3993
3994       ;;
3995     no)
3996       :
3997       ;;
3998     *)
3999       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
4000 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
4001    { (exit 1); exit 1; }; }
4002       ;;
4003   esac
4004
4005 else
4006   with_pam=no
4007
4008 fi;
4009
4010 echo "$as_me:$LINENO: result: $with_pam" >&5
4011 echo "${ECHO_T}$with_pam" >&6
4012
4013
4014
4015 #
4016 # LDAP
4017 #
4018 echo "$as_me:$LINENO: checking whether to build with LDAP support" >&5
4019 echo $ECHO_N "checking whether to build with LDAP support... $ECHO_C" >&6
4020
4021 pgac_args="$pgac_args with_ldap"
4022
4023
4024 # Check whether --with-ldap or --without-ldap was given.
4025 if test "${with_ldap+set}" = set; then
4026   withval="$with_ldap"
4027
4028   case $withval in
4029     yes)
4030
4031 cat >>confdefs.h <<\_ACEOF
4032 #define USE_LDAP 1
4033 _ACEOF
4034
4035       ;;
4036     no)
4037       :
4038       ;;
4039     *)
4040       { { echo "$as_me:$LINENO: error: no argument expected for --with-ldap option" >&5
4041 echo "$as_me: error: no argument expected for --with-ldap option" >&2;}
4042    { (exit 1); exit 1; }; }
4043       ;;
4044   esac
4045
4046 else
4047   with_ldap=no
4048
4049 fi;
4050
4051 echo "$as_me:$LINENO: result: $with_ldap" >&5
4052 echo "${ECHO_T}$with_ldap" >&6
4053
4054
4055
4056 #
4057 # Bonjour
4058 #
4059 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
4060 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
4061
4062 pgac_args="$pgac_args with_bonjour"
4063
4064
4065 # Check whether --with-bonjour or --without-bonjour was given.
4066 if test "${with_bonjour+set}" = set; then
4067   withval="$with_bonjour"
4068
4069   case $withval in
4070     yes)
4071
4072 cat >>confdefs.h <<\_ACEOF
4073 #define USE_BONJOUR 1
4074 _ACEOF
4075
4076       ;;
4077     no)
4078       :
4079       ;;
4080     *)
4081       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
4082 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
4083    { (exit 1); exit 1; }; }
4084       ;;
4085   esac
4086
4087 else
4088   with_bonjour=no
4089
4090 fi;
4091
4092 echo "$as_me:$LINENO: result: $with_bonjour" >&5
4093 echo "${ECHO_T}$with_bonjour" >&6
4094
4095
4096
4097 #
4098 # OpenSSL
4099 #
4100 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
4101 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
4102
4103 pgac_args="$pgac_args with_openssl"
4104
4105
4106 # Check whether --with-openssl or --without-openssl was given.
4107 if test "${with_openssl+set}" = set; then
4108   withval="$with_openssl"
4109
4110   case $withval in
4111     yes)
4112
4113 cat >>confdefs.h <<\_ACEOF
4114 #define USE_SSL 1
4115 _ACEOF
4116
4117       ;;
4118     no)
4119       :
4120       ;;
4121     *)
4122       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
4123 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
4124    { (exit 1); exit 1; }; }
4125       ;;
4126   esac
4127
4128 else
4129   with_openssl=no
4130
4131 fi;
4132
4133 echo "$as_me:$LINENO: result: $with_openssl" >&5
4134 echo "${ECHO_T}$with_openssl" >&6
4135
4136
4137
4138 #
4139 # Readline
4140 #
4141
4142 pgac_args="$pgac_args with_readline"
4143
4144
4145 # Check whether --with-readline or --without-readline was given.
4146 if test "${with_readline+set}" = set; then
4147   withval="$with_readline"
4148
4149   case $withval in
4150     yes)
4151       :
4152       ;;
4153     no)
4154       :
4155       ;;
4156     *)
4157       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
4158 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
4159    { (exit 1); exit 1; }; }
4160       ;;
4161   esac
4162
4163 else
4164   with_readline=yes
4165
4166 fi;
4167
4168 # readline on MinGW has problems with backslashes in psql and other bugs.
4169 # This is particularly a problem with non-US code pages.
4170 # Therefore disable its use until we understand the cause. 2004-07-20
4171 if test "$PORTNAME" = "win32"; then
4172   if test "$with_readline" = yes; then
4173     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
4174 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
4175     with_readline=no
4176   fi
4177 fi
4178
4179
4180 #
4181 # Prefer libedit
4182 #
4183
4184 pgac_args="$pgac_args with_libedit_preferred"
4185
4186
4187 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
4188 if test "${with_libedit_preferred+set}" = set; then
4189   withval="$with_libedit_preferred"
4190
4191   case $withval in
4192     yes)
4193       :
4194       ;;
4195     no)
4196       :
4197       ;;
4198     *)
4199       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
4200 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
4201    { (exit 1); exit 1; }; }
4202       ;;
4203   esac
4204
4205 else
4206   with_libedit_preferred=no
4207
4208 fi;
4209
4210
4211
4212 #
4213 # XML
4214 #
4215
4216 pgac_args="$pgac_args with_libxml"
4217
4218
4219 # Check whether --with-libxml or --without-libxml was given.
4220 if test "${with_libxml+set}" = set; then
4221   withval="$with_libxml"
4222
4223   case $withval in
4224     yes)
4225
4226 cat >>confdefs.h <<\_ACEOF
4227 #define USE_LIBXML 1
4228 _ACEOF
4229
4230       ;;
4231     no)
4232       :
4233       ;;
4234     *)
4235       { { echo "$as_me:$LINENO: error: no argument expected for --with-libxml option" >&5
4236 echo "$as_me: error: no argument expected for --with-libxml option" >&2;}
4237    { (exit 1); exit 1; }; }
4238       ;;
4239   esac
4240
4241 else
4242   with_libxml=no
4243
4244 fi;
4245
4246
4247 if test "$with_libxml" = yes ; then
4248   for ac_prog in xml2-config
4249 do
4250   # Extract the first word of "$ac_prog", so it can be a program name with args.
4251 set dummy $ac_prog; ac_word=$2
4252 echo "$as_me:$LINENO: checking for $ac_word" >&5
4253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4254 if test "${ac_cv_prog_XML2_CONFIG+set}" = set; then
4255   echo $ECHO_N "(cached) $ECHO_C" >&6
4256 else
4257   if test -n "$XML2_CONFIG"; then
4258   ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
4259 else
4260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4261 for as_dir in $PATH
4262 do
4263   IFS=$as_save_IFS
4264   test -z "$as_dir" && as_dir=.
4265   for ac_exec_ext in '' $ac_executable_extensions; do
4266   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4267     ac_cv_prog_XML2_CONFIG="$ac_prog"
4268     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4269     break 2
4270   fi
4271 done
4272 done
4273
4274 fi
4275 fi
4276 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
4277 if test -n "$XML2_CONFIG"; then
4278   echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5
4279 echo "${ECHO_T}$XML2_CONFIG" >&6
4280 else
4281   echo "$as_me:$LINENO: result: no" >&5
4282 echo "${ECHO_T}no" >&6
4283 fi
4284
4285   test -n "$XML2_CONFIG" && break
4286 done
4287
4288   if test -n "$XML2_CONFIG"; then
4289     for pgac_option in `$XML2_CONFIG --cflags`; do
4290       case $pgac_option in
4291         -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
4292       esac
4293     done
4294     for pgac_option in `$XML2_CONFIG --libs`; do
4295       case $pgac_option in
4296         -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4297       esac
4298     done
4299   fi
4300 fi
4301
4302
4303 #
4304 # Zlib
4305 #
4306
4307 pgac_args="$pgac_args with_zlib"
4308
4309
4310 # Check whether --with-zlib or --without-zlib was given.
4311 if test "${with_zlib+set}" = set; then
4312   withval="$with_zlib"
4313
4314   case $withval in
4315     yes)
4316       :
4317       ;;
4318     no)
4319       :
4320       ;;
4321     *)
4322       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
4323 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
4324    { (exit 1); exit 1; }; }
4325       ;;
4326   esac
4327
4328 else
4329   with_zlib=yes
4330
4331 fi;
4332
4333
4334
4335 #
4336 # Elf
4337 #
4338
4339 # Assume system is ELF if it predefines __ELF__ as 1,
4340 # otherwise believe host_os based default.
4341 case $host_os in
4342     freebsd1*|freebsd2*) elf=no;;
4343     freebsd3*|freebsd4*) elf=yes;;
4344 esac
4345
4346
4347 echo "$as_me:$LINENO: checking for egrep" >&5
4348 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
4349 if test "${ac_cv_prog_egrep+set}" = set; then
4350   echo $ECHO_N "(cached) $ECHO_C" >&6
4351 else
4352   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4353     then ac_cv_prog_egrep='grep -E'
4354     else ac_cv_prog_egrep='egrep'
4355     fi
4356 fi
4357 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
4358 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
4359  EGREP=$ac_cv_prog_egrep
4360
4361
4362 cat >conftest.$ac_ext <<_ACEOF
4363 /* confdefs.h.  */
4364 _ACEOF
4365 cat confdefs.h >>conftest.$ac_ext
4366 cat >>conftest.$ac_ext <<_ACEOF
4367 /* end confdefs.h.  */
4368 #if __ELF__
4369   yes
4370 #endif
4371
4372 _ACEOF
4373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4374   $EGREP "yes" >/dev/null 2>&1; then
4375   ELF_SYS=true
4376 else
4377   if test "X$elf" = "Xyes" ; then
4378   ELF_SYS=true
4379 else
4380   ELF_SYS=
4381 fi
4382 fi
4383 rm -f conftest*
4384
4385
4386
4387 #
4388 # Assignments
4389 #
4390
4391 CPPFLAGS="$CPPFLAGS $INCLUDES"
4392 LDFLAGS="$LDFLAGS $LIBDIRS"
4393
4394 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4395 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4396 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4397 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4398
4399
4400
4401 for ac_prog in gawk mawk nawk awk
4402 do
4403   # Extract the first word of "$ac_prog", so it can be a program name with args.
4404 set dummy $ac_prog; ac_word=$2
4405 echo "$as_me:$LINENO: checking for $ac_word" >&5
4406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4407 if test "${ac_cv_prog_AWK+set}" = set; then
4408   echo $ECHO_N "(cached) $ECHO_C" >&6
4409 else
4410   if test -n "$AWK"; then
4411   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4412 else
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414 for as_dir in $PATH
4415 do
4416   IFS=$as_save_IFS
4417   test -z "$as_dir" && as_dir=.
4418   for ac_exec_ext in '' $ac_executable_extensions; do
4419   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4420     ac_cv_prog_AWK="$ac_prog"
4421     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4422     break 2
4423   fi
4424 done
4425 done
4426
4427 fi
4428 fi
4429 AWK=$ac_cv_prog_AWK
4430 if test -n "$AWK"; then
4431   echo "$as_me:$LINENO: result: $AWK" >&5
4432 echo "${ECHO_T}$AWK" >&6
4433 else
4434   echo "$as_me:$LINENO: result: no" >&5
4435 echo "${ECHO_T}no" >&6
4436 fi
4437
4438   test -n "$AWK" && break
4439 done
4440
4441 echo "$as_me:$LINENO: checking for flex" >&5
4442 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4443 if test "${pgac_cv_path_flex+set}" = set; then
4444   echo $ECHO_N "(cached) $ECHO_C" >&6
4445 else
4446   # Let the user override the test
4447 if test -n "$FLEX"; then
4448   pgac_cv_path_flex=$FLEX
4449 else
4450   pgac_save_IFS=$IFS
4451   IFS=$PATH_SEPARATOR
4452   for pgac_dir in $PATH; do
4453     IFS=$pgac_save_IFS
4454     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4455       pgac_dir=`pwd`
4456     fi
4457     for pgac_prog in flex lex; do
4458       pgac_candidate="$pgac_dir/$pgac_prog"
4459       if test -f "$pgac_candidate" \
4460         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4461       then
4462         echo '%%'  > conftest.l
4463         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4464           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4465             pgac_broken_flex=$pgac_candidate
4466             continue
4467           fi
4468
4469           pgac_cv_path_flex=$pgac_candidate
4470           break 2
4471         fi
4472       fi
4473     done
4474   done
4475   rm -f conftest.l lex.yy.c
4476   : ${pgac_cv_path_flex=no}
4477 fi
4478
4479 fi
4480 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4481 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4482 if test x"$pgac_cv_path_flex" = x"no"; then
4483   if test -n "$pgac_broken_flex"; then
4484     { echo "$as_me:$LINENO: WARNING:
4485 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4486 *** should get version 2.5.4 or later." >&5
4487 echo "$as_me: WARNING:
4488 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4489 *** should get version 2.5.4 or later." >&2;}
4490   fi
4491
4492   { echo "$as_me:$LINENO: WARNING:
4493 *** Without Flex you will not be able to build PostgreSQL from CVS or
4494 *** change any of the scanner definition files.  You can obtain Flex from
4495 *** a GNU mirror site.  (If you are using the official distribution of
4496 *** PostgreSQL then you do not need to worry about this because the Flex
4497 *** output is pre-generated.)" >&5
4498 echo "$as_me: WARNING:
4499 *** Without Flex you will not be able to build PostgreSQL from CVS or
4500 *** change any of the scanner definition files.  You can obtain Flex from
4501 *** a GNU mirror site.  (If you are using the official distribution of
4502 *** PostgreSQL then you do not need to worry about this because the Flex
4503 *** output is pre-generated.)" >&2;}
4504 fi
4505
4506 if test x"$pgac_cv_path_flex" = x"no"; then
4507   FLEX=
4508 else
4509   FLEX=$pgac_cv_path_flex
4510 fi
4511
4512
4513
4514
4515 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4516 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4517 LN_S=$as_ln_s
4518 if test "$LN_S" = "ln -s"; then
4519   echo "$as_me:$LINENO: result: yes" >&5
4520 echo "${ECHO_T}yes" >&6
4521 else
4522   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4523 echo "${ECHO_T}no, using $LN_S" >&6
4524 fi
4525
4526
4527 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4528 if test "${with_gnu_ld+set}" = set; then
4529   withval="$with_gnu_ld"
4530   test "$withval" = no || with_gnu_ld=yes
4531 else
4532   with_gnu_ld=no
4533 fi;
4534 ac_prog=ld
4535 if test "$GCC" = yes; then
4536   # Check if gcc -print-prog-name=ld gives a path.
4537   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4538 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4539   case $host in
4540   *-*-mingw*)
4541     # gcc leaves a trailing carriage return which upsets mingw
4542     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4543   *)
4544     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4545   esac
4546   case "$ac_prog" in
4547     # Accept absolute paths.
4548     [\\/]* | [A-Za-z]:[\\/]*)
4549       re_direlt='/[^/][^/]*/\.\./'
4550       # Canonicalize the path of ld
4551       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4552       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4553         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4554       done
4555       test -z "$LD" && LD="$ac_prog"
4556       ;;
4557   "")
4558     # If it fails, then pretend we aren't using GCC.
4559     ac_prog=ld
4560     ;;
4561   *)
4562     # If it is relative, then search for the first ld in PATH.
4563     with_gnu_ld=unknown
4564     ;;
4565   esac
4566 elif test "$with_gnu_ld" = yes; then
4567   echo "$as_me:$LINENO: checking for GNU ld" >&5
4568 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4569 else
4570   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4571 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4572 fi
4573 if test "${ac_cv_path_LD+set}" = set; then
4574   echo $ECHO_N "(cached) $ECHO_C" >&6
4575 else
4576   if test -z "$LD"; then
4577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4578   for ac_dir in $PATH; do
4579     test -z "$ac_dir" && ac_dir=.
4580     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4581       ac_cv_path_LD="$ac_dir/$ac_prog"
4582       # Check to see if the program is GNU ld.  I'd rather use --version,
4583       # but apparently some GNU ld's only accept -v.
4584       # Break only if it was the GNU/non-GNU ld that we prefer.
4585       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4586         test "$with_gnu_ld" != no && break
4587       else
4588         test "$with_gnu_ld" != yes && break
4589       fi
4590     fi
4591   done
4592   IFS="$ac_save_ifs"
4593 else
4594   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4595 fi
4596 fi
4597
4598 LD="$ac_cv_path_LD"
4599 if test -n "$LD"; then
4600   echo "$as_me:$LINENO: result: $LD" >&5
4601 echo "${ECHO_T}$LD" >&6
4602 else
4603   echo "$as_me:$LINENO: result: no" >&5
4604 echo "${ECHO_T}no" >&6
4605 fi
4606 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4607 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4608    { (exit 1); exit 1; }; }
4609 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4610 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4611 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4612   echo $ECHO_N "(cached) $ECHO_C" >&6
4613 else
4614   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4615 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4616   ac_cv_prog_gnu_ld=yes
4617 else
4618   ac_cv_prog_gnu_ld=no
4619 fi
4620 fi
4621 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4622 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4623 with_gnu_ld=$ac_cv_prog_gnu_ld
4624
4625
4626
4627
4628 case $host_os in sysv5*)
4629   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4630 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4631 if test "${pgac_cv_prog_ld_R+set}" = set; then
4632   echo $ECHO_N "(cached) $ECHO_C" >&6
4633 else
4634
4635     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4636     cat >conftest.$ac_ext <<_ACEOF
4637 /* confdefs.h.  */
4638 _ACEOF
4639 cat confdefs.h >>conftest.$ac_ext
4640 cat >>conftest.$ac_ext <<_ACEOF
4641 /* end confdefs.h.  */
4642
4643 int
4644 main ()
4645 {
4646
4647   ;
4648   return 0;
4649 }
4650 _ACEOF
4651 rm -f conftest.$ac_objext conftest$ac_exeext
4652 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4653   (eval $ac_link) 2>conftest.er1
4654   ac_status=$?
4655   grep -v '^ *+' conftest.er1 >conftest.err
4656   rm -f conftest.er1
4657   cat conftest.err >&5
4658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4659   (exit $ac_status); } &&
4660          { ac_try='test -z "$ac_c_werror_flag"
4661                          || test ! -s conftest.err'
4662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4663   (eval $ac_try) 2>&5
4664   ac_status=$?
4665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4666   (exit $ac_status); }; } &&
4667          { ac_try='test -s conftest$ac_exeext'
4668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4669   (eval $ac_try) 2>&5
4670   ac_status=$?
4671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672   (exit $ac_status); }; }; then
4673   pgac_cv_prog_ld_R=yes
4674 else
4675   echo "$as_me: failed program was:" >&5
4676 sed 's/^/| /' conftest.$ac_ext >&5
4677
4678 pgac_cv_prog_ld_R=no
4679 fi
4680 rm -f conftest.err conftest.$ac_objext \
4681       conftest$ac_exeext conftest.$ac_ext
4682     LDFLAGS=$pgac_save_LDFLAGS
4683
4684 fi
4685 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4686 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4687   ld_R_works=$pgac_cv_prog_ld_R
4688
4689 esac
4690 if test -n "$ac_tool_prefix"; then
4691   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4692 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4693 echo "$as_me:$LINENO: checking for $ac_word" >&5
4694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4695 if test "${ac_cv_prog_RANLIB+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   if test -n "$RANLIB"; then
4699   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4700 else
4701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702 for as_dir in $PATH
4703 do
4704   IFS=$as_save_IFS
4705   test -z "$as_dir" && as_dir=.
4706   for ac_exec_ext in '' $ac_executable_extensions; do
4707   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4708     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4709     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4710     break 2
4711   fi
4712 done
4713 done
4714
4715 fi
4716 fi
4717 RANLIB=$ac_cv_prog_RANLIB
4718 if test -n "$RANLIB"; then
4719   echo "$as_me:$LINENO: result: $RANLIB" >&5
4720 echo "${ECHO_T}$RANLIB" >&6
4721 else
4722   echo "$as_me:$LINENO: result: no" >&5
4723 echo "${ECHO_T}no" >&6
4724 fi
4725
4726 fi
4727 if test -z "$ac_cv_prog_RANLIB"; then
4728   ac_ct_RANLIB=$RANLIB
4729   # Extract the first word of "ranlib", so it can be a program name with args.
4730 set dummy ranlib; ac_word=$2
4731 echo "$as_me:$LINENO: checking for $ac_word" >&5
4732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4733 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4734   echo $ECHO_N "(cached) $ECHO_C" >&6
4735 else
4736   if test -n "$ac_ct_RANLIB"; then
4737   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4738 else
4739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740 for as_dir in $PATH
4741 do
4742   IFS=$as_save_IFS
4743   test -z "$as_dir" && as_dir=.
4744   for ac_exec_ext in '' $ac_executable_extensions; do
4745   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4746     ac_cv_prog_ac_ct_RANLIB="ranlib"
4747     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4748     break 2
4749   fi
4750 done
4751 done
4752
4753   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4754 fi
4755 fi
4756 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4757 if test -n "$ac_ct_RANLIB"; then
4758   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4759 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4760 else
4761   echo "$as_me:$LINENO: result: no" >&5
4762 echo "${ECHO_T}no" >&6
4763 fi
4764
4765   RANLIB=$ac_ct_RANLIB
4766 else
4767   RANLIB="$ac_cv_prog_RANLIB"
4768 fi
4769
4770 # Extract the first word of "tar", so it can be a program name with args.
4771 set dummy tar; ac_word=$2
4772 echo "$as_me:$LINENO: checking for $ac_word" >&5
4773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4774 if test "${ac_cv_path_TAR+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   case $TAR in
4778   [\\/]* | ?:[\\/]*)
4779   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4780   ;;
4781   *)
4782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783 for as_dir in $PATH
4784 do
4785   IFS=$as_save_IFS
4786   test -z "$as_dir" && as_dir=.
4787   for ac_exec_ext in '' $ac_executable_extensions; do
4788   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4789     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4790     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4791     break 2
4792   fi
4793 done
4794 done
4795
4796   ;;
4797 esac
4798 fi
4799 TAR=$ac_cv_path_TAR
4800
4801 if test -n "$TAR"; then
4802   echo "$as_me:$LINENO: result: $TAR" >&5
4803 echo "${ECHO_T}$TAR" >&6
4804 else
4805   echo "$as_me:$LINENO: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809
4810   if test -n "$ac_tool_prefix"; then
4811   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4812 set dummy ${ac_tool_prefix}strip; ac_word=$2
4813 echo "$as_me:$LINENO: checking for $ac_word" >&5
4814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4815 if test "${ac_cv_prog_STRIP+set}" = set; then
4816   echo $ECHO_N "(cached) $ECHO_C" >&6
4817 else
4818   if test -n "$STRIP"; then
4819   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4820 else
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822 for as_dir in $PATH
4823 do
4824   IFS=$as_save_IFS
4825   test -z "$as_dir" && as_dir=.
4826   for ac_exec_ext in '' $ac_executable_extensions; do
4827   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4828     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4829     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4830     break 2
4831   fi
4832 done
4833 done
4834
4835 fi
4836 fi
4837 STRIP=$ac_cv_prog_STRIP
4838 if test -n "$STRIP"; then
4839   echo "$as_me:$LINENO: result: $STRIP" >&5
4840 echo "${ECHO_T}$STRIP" >&6
4841 else
4842   echo "$as_me:$LINENO: result: no" >&5
4843 echo "${ECHO_T}no" >&6
4844 fi
4845
4846 fi
4847 if test -z "$ac_cv_prog_STRIP"; then
4848   ac_ct_STRIP=$STRIP
4849   # Extract the first word of "strip", so it can be a program name with args.
4850 set dummy strip; ac_word=$2
4851 echo "$as_me:$LINENO: checking for $ac_word" >&5
4852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4853 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   if test -n "$ac_ct_STRIP"; then
4857   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4858 else
4859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860 for as_dir in $PATH
4861 do
4862   IFS=$as_save_IFS
4863   test -z "$as_dir" && as_dir=.
4864   for ac_exec_ext in '' $ac_executable_extensions; do
4865   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4866     ac_cv_prog_ac_ct_STRIP="strip"
4867     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4868     break 2
4869   fi
4870 done
4871 done
4872
4873   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4874 fi
4875 fi
4876 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4877 if test -n "$ac_ct_STRIP"; then
4878   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4879 echo "${ECHO_T}$ac_ct_STRIP" >&6
4880 else
4881   echo "$as_me:$LINENO: result: no" >&5
4882 echo "${ECHO_T}no" >&6
4883 fi
4884
4885   STRIP=$ac_ct_STRIP
4886 else
4887   STRIP="$ac_cv_prog_STRIP"
4888 fi
4889
4890
4891   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4892 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4893   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4894     STRIP_STATIC_LIB="$STRIP -x"
4895     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4896     echo "$as_me:$LINENO: result: yes" >&5
4897 echo "${ECHO_T}yes" >&6
4898   else
4899     STRIP_STATIC_LIB=:
4900     STRIP_SHARED_LIB=:
4901     echo "$as_me:$LINENO: result: no" >&5
4902 echo "${ECHO_T}no" >&6
4903   fi
4904
4905
4906
4907
4908 if test -z "$YACC"; then
4909   for ac_prog in 'bison -y'
4910 do
4911   # Extract the first word of "$ac_prog", so it can be a program name with args.
4912 set dummy $ac_prog; ac_word=$2
4913 echo "$as_me:$LINENO: checking for $ac_word" >&5
4914 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4915 if test "${ac_cv_prog_YACC+set}" = set; then
4916   echo $ECHO_N "(cached) $ECHO_C" >&6
4917 else
4918   if test -n "$YACC"; then
4919   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4920 else
4921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH
4923 do
4924   IFS=$as_save_IFS
4925   test -z "$as_dir" && as_dir=.
4926   for ac_exec_ext in '' $ac_executable_extensions; do
4927   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4928     ac_cv_prog_YACC="$ac_prog"
4929     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4930     break 2
4931   fi
4932 done
4933 done
4934
4935 fi
4936 fi
4937 YACC=$ac_cv_prog_YACC
4938 if test -n "$YACC"; then
4939   echo "$as_me:$LINENO: result: $YACC" >&5
4940 echo "${ECHO_T}$YACC" >&6
4941 else
4942   echo "$as_me:$LINENO: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   test -n "$YACC" && break
4947 done
4948
4949
4950   if test "$YACC"; then
4951     if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4952       { echo "$as_me:$LINENO: WARNING:
4953 *** The installed version of Bison is too old to use with PostgreSQL.
4954 *** Bison version 1.875 or later is required." >&5
4955 echo "$as_me: WARNING:
4956 *** The installed version of Bison is too old to use with PostgreSQL.
4957 *** Bison version 1.875 or later is required." >&2;}
4958       YACC=""
4959     fi
4960   fi
4961
4962   if test -z "$YACC"; then
4963     { echo "$as_me:$LINENO: WARNING:
4964 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4965 *** change any of the parser definition files.  You can obtain Bison from
4966 *** a GNU mirror site.  (If you are using the official distribution of
4967 *** PostgreSQL then you do not need to worry about this, because the Bison
4968 *** output is pre-generated.)  To use a different yacc program (possible,
4969 *** but not recommended), set the environment variable YACC before running
4970 *** 'configure'." >&5
4971 echo "$as_me: WARNING:
4972 *** Without Bison you will not be able to build PostgreSQL from CVS nor
4973 *** change any of the parser definition files.  You can obtain Bison from
4974 *** a GNU mirror site.  (If you are using the official distribution of
4975 *** PostgreSQL then you do not need to worry about this, because the Bison
4976 *** output is pre-generated.)  To use a different yacc program (possible,
4977 *** but not recommended), set the environment variable YACC before running
4978 *** 'configure'." >&2;}
4979   fi
4980 fi
4981
4982
4983 # Extract the first word of "perl", so it can be a program name with args.
4984 set dummy perl; ac_word=$2
4985 echo "$as_me:$LINENO: checking for $ac_word" >&5
4986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4987 if test "${ac_cv_path_PERL+set}" = set; then
4988   echo $ECHO_N "(cached) $ECHO_C" >&6
4989 else
4990   case $PERL in
4991   [\\/]* | ?:[\\/]*)
4992   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4993   ;;
4994   *)
4995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996 for as_dir in $PATH
4997 do
4998   IFS=$as_save_IFS
4999   test -z "$as_dir" && as_dir=.
5000   for ac_exec_ext in '' $ac_executable_extensions; do
5001   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5002     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
5003     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5004     break 2
5005   fi
5006 done
5007 done
5008
5009   ;;
5010 esac
5011 fi
5012 PERL=$ac_cv_path_PERL
5013
5014 if test -n "$PERL"; then
5015   echo "$as_me:$LINENO: result: $PERL" >&5
5016 echo "${ECHO_T}$PERL" >&6
5017 else
5018   echo "$as_me:$LINENO: result: no" >&5
5019 echo "${ECHO_T}no" >&6
5020 fi
5021
5022 if test "$with_perl" = yes; then
5023
5024 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
5025 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
5026 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
5027 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
5028 echo "${ECHO_T}$perl_archlibexp" >&6
5029 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
5030 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
5031 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
5032 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
5033 echo "${ECHO_T}$perl_privlibexp" >&6
5034 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
5035 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
5036 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
5037 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
5038 echo "${ECHO_T}$perl_useshrplib" >&6
5039
5040 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
5041 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
5042 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
5043 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
5044 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
5045 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
5046 echo "${ECHO_T}$perl_embed_ldflags" >&6
5047 fi
5048
5049 if test "$with_python" = yes; then
5050   # Extract the first word of "python", so it can be a program name with args.
5051 set dummy python; ac_word=$2
5052 echo "$as_me:$LINENO: checking for $ac_word" >&5
5053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5054 if test "${ac_cv_path_PYTHON+set}" = set; then
5055   echo $ECHO_N "(cached) $ECHO_C" >&6
5056 else
5057   case $PYTHON in
5058   [\\/]* | ?:[\\/]*)
5059   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
5060   ;;
5061   *)
5062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5063 for as_dir in $PATH
5064 do
5065   IFS=$as_save_IFS
5066   test -z "$as_dir" && as_dir=.
5067   for ac_exec_ext in '' $ac_executable_extensions; do
5068   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5069     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
5070     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5071     break 2
5072   fi
5073 done
5074 done
5075
5076   ;;
5077 esac
5078 fi
5079 PYTHON=$ac_cv_path_PYTHON
5080
5081 if test -n "$PYTHON"; then
5082   echo "$as_me:$LINENO: result: $PYTHON" >&5
5083 echo "${ECHO_T}$PYTHON" >&6
5084 else
5085   echo "$as_me:$LINENO: result: no" >&5
5086 echo "${ECHO_T}no" >&6
5087 fi
5088
5089 if test x"$PYTHON" = x""; then
5090   { { echo "$as_me:$LINENO: error: Python not found" >&5
5091 echo "$as_me: error: Python not found" >&2;}
5092    { (exit 1); exit 1; }; }
5093 fi
5094
5095
5096 echo "$as_me:$LINENO: checking for Python distutils module" >&5
5097 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
5098 if "${PYTHON}" 2>&- -c 'import distutils'
5099 then
5100     echo "$as_me:$LINENO: result: yes" >&5
5101 echo "${ECHO_T}yes" >&6
5102 else
5103     echo "$as_me:$LINENO: result: no" >&5
5104 echo "${ECHO_T}no" >&6
5105     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
5106 echo "$as_me: error: distutils module not found" >&2;}
5107    { (exit 1); exit 1; }; }
5108 fi
5109 echo "$as_me:$LINENO: checking Python configuration directory" >&5
5110 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
5111 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
5112 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')"`
5113 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
5114
5115 # This should be enough of a message.
5116 echo "$as_me:$LINENO: result: $python_configdir" >&5
5117 echo "${ECHO_T}$python_configdir" >&6
5118
5119
5120 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
5121 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
5122
5123 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
5124 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
5125 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
5126 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
5127
5128 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
5129 then
5130         # New way: use the official shared library
5131         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
5132         python_libspec="-L${python_libdir} -l${ldlibrary}"
5133 else
5134         # Old way: use libpython from python_configdir
5135         python_libdir="${python_configdir}"
5136         python_libspec="-L${python_libdir} -lpython${python_version}"
5137 fi
5138
5139 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
5140
5141 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
5142 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
5143
5144
5145 # threaded python is not supported on bsd's
5146 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
5147 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
5148 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
5149 if test "$pythreads" = "1"; then
5150   echo "$as_me:$LINENO: result: yes" >&5
5151 echo "${ECHO_T}yes" >&6
5152   case $host_os in
5153   openbsd*|freebsd*)
5154     { { echo "$as_me:$LINENO: error: threaded Python not supported on this platform" >&5
5155 echo "$as_me: error: threaded Python not supported on this platform" >&2;}
5156    { (exit 1); exit 1; }; }
5157     ;;
5158   esac
5159 else
5160   echo "$as_me:$LINENO: result: no" >&5
5161 echo "${ECHO_T}no" >&6
5162 fi
5163
5164
5165 fi
5166
5167 # Supply a numeric version string for use by 3rd party add-ons
5168 # awk -F is a regex on some platforms, and not on others, so make "." a tab
5169 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/A-Za-z.*$//' |
5170 tr '.' '        ' |
5171 $AWK '{printf \"%d%02d%02d\", $1, $2, (NF >= 3) ? $3 : 0}'`"
5172
5173 cat >>confdefs.h <<_ACEOF
5174 #define PG_VERSION_NUM $PG_VERSION_NUM
5175 _ACEOF
5176
5177
5178 ##
5179 ## Libraries
5180 ##
5181 ## Most libraries are included only if they demonstrably provide a function
5182 ## we need, but libm is an exception: always include it, because there are
5183 ## too many compilers that play cute optimization games that will break
5184 ## probes for standard functions such as pow().
5185 ##
5186
5187
5188 echo "$as_me:$LINENO: checking for main in -lm" >&5
5189 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
5190 if test "${ac_cv_lib_m_main+set}" = set; then
5191   echo $ECHO_N "(cached) $ECHO_C" >&6
5192 else
5193   ac_check_lib_save_LIBS=$LIBS
5194 LIBS="-lm  $LIBS"
5195 cat >conftest.$ac_ext <<_ACEOF
5196 /* confdefs.h.  */
5197 _ACEOF
5198 cat confdefs.h >>conftest.$ac_ext
5199 cat >>conftest.$ac_ext <<_ACEOF
5200 /* end confdefs.h.  */
5201
5202
5203 int
5204 main ()
5205 {
5206 main ();
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5213   (eval $ac_link) 2>conftest.er1
5214   ac_status=$?
5215   grep -v '^ *+' conftest.er1 >conftest.err
5216   rm -f conftest.er1
5217   cat conftest.err >&5
5218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5219   (exit $ac_status); } &&
5220          { ac_try='test -z "$ac_c_werror_flag"
5221                          || test ! -s conftest.err'
5222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5223   (eval $ac_try) 2>&5
5224   ac_status=$?
5225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5226   (exit $ac_status); }; } &&
5227          { ac_try='test -s conftest$ac_exeext'
5228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5229   (eval $ac_try) 2>&5
5230   ac_status=$?
5231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5232   (exit $ac_status); }; }; then
5233   ac_cv_lib_m_main=yes
5234 else
5235   echo "$as_me: failed program was:" >&5
5236 sed 's/^/| /' conftest.$ac_ext >&5
5237
5238 ac_cv_lib_m_main=no
5239 fi
5240 rm -f conftest.err conftest.$ac_objext \
5241       conftest$ac_exeext conftest.$ac_ext
5242 LIBS=$ac_check_lib_save_LIBS
5243 fi
5244 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
5245 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
5246 if test $ac_cv_lib_m_main = yes; then
5247   cat >>confdefs.h <<_ACEOF
5248 #define HAVE_LIBM 1
5249 _ACEOF
5250
5251   LIBS="-lm $LIBS"
5252
5253 fi
5254
5255 echo "$as_me:$LINENO: checking for library containing setproctitle" >&5
5256 echo $ECHO_N "checking for library containing setproctitle... $ECHO_C" >&6
5257 if test "${ac_cv_search_setproctitle+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260   ac_func_search_save_LIBS=$LIBS
5261 ac_cv_search_setproctitle=no
5262 cat >conftest.$ac_ext <<_ACEOF
5263 /* confdefs.h.  */
5264 _ACEOF
5265 cat confdefs.h >>conftest.$ac_ext
5266 cat >>conftest.$ac_ext <<_ACEOF
5267 /* end confdefs.h.  */
5268
5269 /* Override any gcc2 internal prototype to avoid an error.  */
5270 #ifdef __cplusplus
5271 extern "C"
5272 #endif
5273 /* We use char because int might match the return type of a gcc2
5274    builtin and then its argument prototype would still apply.  */
5275 char setproctitle ();
5276 int
5277 main ()
5278 {
5279 setproctitle ();
5280   ;
5281   return 0;
5282 }
5283 _ACEOF
5284 rm -f conftest.$ac_objext conftest$ac_exeext
5285 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5286   (eval $ac_link) 2>conftest.er1
5287   ac_status=$?
5288   grep -v '^ *+' conftest.er1 >conftest.err
5289   rm -f conftest.er1
5290   cat conftest.err >&5
5291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5292   (exit $ac_status); } &&
5293          { ac_try='test -z "$ac_c_werror_flag"
5294                          || test ! -s conftest.err'
5295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5296   (eval $ac_try) 2>&5
5297   ac_status=$?
5298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299   (exit $ac_status); }; } &&
5300          { ac_try='test -s conftest$ac_exeext'
5301   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5302   (eval $ac_try) 2>&5
5303   ac_status=$?
5304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5305   (exit $ac_status); }; }; then
5306   ac_cv_search_setproctitle="none required"
5307 else
5308   echo "$as_me: failed program was:" >&5
5309 sed 's/^/| /' conftest.$ac_ext >&5
5310
5311 fi
5312 rm -f conftest.err conftest.$ac_objext \
5313       conftest$ac_exeext conftest.$ac_ext
5314 if test "$ac_cv_search_setproctitle" = no; then
5315   for ac_lib in util; do
5316     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5317     cat >conftest.$ac_ext <<_ACEOF
5318 /* confdefs.h.  */
5319 _ACEOF
5320 cat confdefs.h >>conftest.$ac_ext
5321 cat >>conftest.$ac_ext <<_ACEOF
5322 /* end confdefs.h.  */
5323
5324 /* Override any gcc2 internal prototype to avoid an error.  */
5325 #ifdef __cplusplus
5326 extern "C"
5327 #endif
5328 /* We use char because int might match the return type of a gcc2
5329    builtin and then its argument prototype would still apply.  */
5330 char setproctitle ();
5331 int
5332 main ()
5333 {
5334 setproctitle ();
5335   ;
5336   return 0;
5337 }
5338 _ACEOF
5339 rm -f conftest.$ac_objext conftest$ac_exeext
5340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5341   (eval $ac_link) 2>conftest.er1
5342   ac_status=$?
5343   grep -v '^ *+' conftest.er1 >conftest.err
5344   rm -f conftest.er1
5345   cat conftest.err >&5
5346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347   (exit $ac_status); } &&
5348          { ac_try='test -z "$ac_c_werror_flag"
5349                          || test ! -s conftest.err'
5350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5351   (eval $ac_try) 2>&5
5352   ac_status=$?
5353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5354   (exit $ac_status); }; } &&
5355          { ac_try='test -s conftest$ac_exeext'
5356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5357   (eval $ac_try) 2>&5
5358   ac_status=$?
5359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5360   (exit $ac_status); }; }; then
5361   ac_cv_search_setproctitle="-l$ac_lib"
5362 break
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 sed 's/^/| /' conftest.$ac_ext >&5
5366
5367 fi
5368 rm -f conftest.err conftest.$ac_objext \
5369       conftest$ac_exeext conftest.$ac_ext
5370   done
5371 fi
5372 LIBS=$ac_func_search_save_LIBS
5373 fi
5374 echo "$as_me:$LINENO: result: $ac_cv_search_setproctitle" >&5
5375 echo "${ECHO_T}$ac_cv_search_setproctitle" >&6
5376 if test "$ac_cv_search_setproctitle" != no; then
5377   test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
5378
5379 fi
5380
5381 echo "$as_me:$LINENO: checking for library containing dlopen" >&5
5382 echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
5383 if test "${ac_cv_search_dlopen+set}" = set; then
5384   echo $ECHO_N "(cached) $ECHO_C" >&6
5385 else
5386   ac_func_search_save_LIBS=$LIBS
5387 ac_cv_search_dlopen=no
5388 cat >conftest.$ac_ext <<_ACEOF
5389 /* confdefs.h.  */
5390 _ACEOF
5391 cat confdefs.h >>conftest.$ac_ext
5392 cat >>conftest.$ac_ext <<_ACEOF
5393 /* end confdefs.h.  */
5394
5395 /* Override any gcc2 internal prototype to avoid an error.  */
5396 #ifdef __cplusplus
5397 extern "C"
5398 #endif
5399 /* We use char because int might match the return type of a gcc2
5400    builtin and then its argument prototype would still apply.  */
5401 char dlopen ();
5402 int
5403 main ()
5404 {
5405 dlopen ();
5406   ;
5407   return 0;
5408 }
5409 _ACEOF
5410 rm -f conftest.$ac_objext conftest$ac_exeext
5411 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5412   (eval $ac_link) 2>conftest.er1
5413   ac_status=$?
5414   grep -v '^ *+' conftest.er1 >conftest.err
5415   rm -f conftest.er1
5416   cat conftest.err >&5
5417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); } &&
5419          { ac_try='test -z "$ac_c_werror_flag"
5420                          || test ! -s conftest.err'
5421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5422   (eval $ac_try) 2>&5
5423   ac_status=$?
5424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5425   (exit $ac_status); }; } &&
5426          { ac_try='test -s conftest$ac_exeext'
5427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5428   (eval $ac_try) 2>&5
5429   ac_status=$?
5430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5431   (exit $ac_status); }; }; then
5432   ac_cv_search_dlopen="none required"
5433 else
5434   echo "$as_me: failed program was:" >&5
5435 sed 's/^/| /' conftest.$ac_ext >&5
5436
5437 fi
5438 rm -f conftest.err conftest.$ac_objext \
5439       conftest$ac_exeext conftest.$ac_ext
5440 if test "$ac_cv_search_dlopen" = no; then
5441   for ac_lib in dl; do
5442     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5443     cat >conftest.$ac_ext <<_ACEOF
5444 /* confdefs.h.  */
5445 _ACEOF
5446 cat confdefs.h >>conftest.$ac_ext
5447 cat >>conftest.$ac_ext <<_ACEOF
5448 /* end confdefs.h.  */
5449
5450 /* Override any gcc2 internal prototype to avoid an error.  */
5451 #ifdef __cplusplus
5452 extern "C"
5453 #endif
5454 /* We use char because int might match the return type of a gcc2
5455    builtin and then its argument prototype would still apply.  */
5456 char dlopen ();
5457 int
5458 main ()
5459 {
5460 dlopen ();
5461   ;
5462   return 0;
5463 }
5464 _ACEOF
5465 rm -f conftest.$ac_objext conftest$ac_exeext
5466 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5467   (eval $ac_link) 2>conftest.er1
5468   ac_status=$?
5469   grep -v '^ *+' conftest.er1 >conftest.err
5470   rm -f conftest.er1
5471   cat conftest.err >&5
5472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5473   (exit $ac_status); } &&
5474          { ac_try='test -z "$ac_c_werror_flag"
5475                          || test ! -s conftest.err'
5476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5477   (eval $ac_try) 2>&5
5478   ac_status=$?
5479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5480   (exit $ac_status); }; } &&
5481          { ac_try='test -s conftest$ac_exeext'
5482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5483   (eval $ac_try) 2>&5
5484   ac_status=$?
5485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5486   (exit $ac_status); }; }; then
5487   ac_cv_search_dlopen="-l$ac_lib"
5488 break
5489 else
5490   echo "$as_me: failed program was:" >&5
5491 sed 's/^/| /' conftest.$ac_ext >&5
5492
5493 fi
5494 rm -f conftest.err conftest.$ac_objext \
5495       conftest$ac_exeext conftest.$ac_ext
5496   done
5497 fi
5498 LIBS=$ac_func_search_save_LIBS
5499 fi
5500 echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
5501 echo "${ECHO_T}$ac_cv_search_dlopen" >&6
5502 if test "$ac_cv_search_dlopen" != no; then
5503   test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
5504
5505 fi
5506
5507 echo "$as_me:$LINENO: checking for library containing socket" >&5
5508 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6
5509 if test "${ac_cv_search_socket+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512   ac_func_search_save_LIBS=$LIBS
5513 ac_cv_search_socket=no
5514 cat >conftest.$ac_ext <<_ACEOF
5515 /* confdefs.h.  */
5516 _ACEOF
5517 cat confdefs.h >>conftest.$ac_ext
5518 cat >>conftest.$ac_ext <<_ACEOF
5519 /* end confdefs.h.  */
5520
5521 /* Override any gcc2 internal prototype to avoid an error.  */
5522 #ifdef __cplusplus
5523 extern "C"
5524 #endif
5525 /* We use char because int might match the return type of a gcc2
5526    builtin and then its argument prototype would still apply.  */
5527 char socket ();
5528 int
5529 main ()
5530 {
5531 socket ();
5532   ;
5533   return 0;
5534 }
5535 _ACEOF
5536 rm -f conftest.$ac_objext conftest$ac_exeext
5537 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5538   (eval $ac_link) 2>conftest.er1
5539   ac_status=$?
5540   grep -v '^ *+' conftest.er1 >conftest.err
5541   rm -f conftest.er1
5542   cat conftest.err >&5
5543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5544   (exit $ac_status); } &&
5545          { ac_try='test -z "$ac_c_werror_flag"
5546                          || test ! -s conftest.err'
5547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5548   (eval $ac_try) 2>&5
5549   ac_status=$?
5550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5551   (exit $ac_status); }; } &&
5552          { ac_try='test -s conftest$ac_exeext'
5553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5554   (eval $ac_try) 2>&5
5555   ac_status=$?
5556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5557   (exit $ac_status); }; }; then
5558   ac_cv_search_socket="none required"
5559 else
5560   echo "$as_me: failed program was:" >&5
5561 sed 's/^/| /' conftest.$ac_ext >&5
5562
5563 fi
5564 rm -f conftest.err conftest.$ac_objext \
5565       conftest$ac_exeext conftest.$ac_ext
5566 if test "$ac_cv_search_socket" = no; then
5567   for ac_lib in socket wsock32; do
5568     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5569     cat >conftest.$ac_ext <<_ACEOF
5570 /* confdefs.h.  */
5571 _ACEOF
5572 cat confdefs.h >>conftest.$ac_ext
5573 cat >>conftest.$ac_ext <<_ACEOF
5574 /* end confdefs.h.  */
5575
5576 /* Override any gcc2 internal prototype to avoid an error.  */
5577 #ifdef __cplusplus
5578 extern "C"
5579 #endif
5580 /* We use char because int might match the return type of a gcc2
5581    builtin and then its argument prototype would still apply.  */
5582 char socket ();
5583 int
5584 main ()
5585 {
5586 socket ();
5587   ;
5588   return 0;
5589 }
5590 _ACEOF
5591 rm -f conftest.$ac_objext conftest$ac_exeext
5592 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5593   (eval $ac_link) 2>conftest.er1
5594   ac_status=$?
5595   grep -v '^ *+' conftest.er1 >conftest.err
5596   rm -f conftest.er1
5597   cat conftest.err >&5
5598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5599   (exit $ac_status); } &&
5600          { ac_try='test -z "$ac_c_werror_flag"
5601                          || test ! -s conftest.err'
5602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5603   (eval $ac_try) 2>&5
5604   ac_status=$?
5605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5606   (exit $ac_status); }; } &&
5607          { ac_try='test -s conftest$ac_exeext'
5608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5609   (eval $ac_try) 2>&5
5610   ac_status=$?
5611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5612   (exit $ac_status); }; }; then
5613   ac_cv_search_socket="-l$ac_lib"
5614 break
5615 else
5616   echo "$as_me: failed program was:" >&5
5617 sed 's/^/| /' conftest.$ac_ext >&5
5618
5619 fi
5620 rm -f conftest.err conftest.$ac_objext \
5621       conftest$ac_exeext conftest.$ac_ext
5622   done
5623 fi
5624 LIBS=$ac_func_search_save_LIBS
5625 fi
5626 echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
5627 echo "${ECHO_T}$ac_cv_search_socket" >&6
5628 if test "$ac_cv_search_socket" != no; then
5629   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
5630
5631 fi
5632
5633 echo "$as_me:$LINENO: checking for library containing shl_load" >&5
5634 echo $ECHO_N "checking for library containing shl_load... $ECHO_C" >&6
5635 if test "${ac_cv_search_shl_load+set}" = set; then
5636   echo $ECHO_N "(cached) $ECHO_C" >&6
5637 else
5638   ac_func_search_save_LIBS=$LIBS
5639 ac_cv_search_shl_load=no
5640 cat >conftest.$ac_ext <<_ACEOF
5641 /* confdefs.h.  */
5642 _ACEOF
5643 cat confdefs.h >>conftest.$ac_ext
5644 cat >>conftest.$ac_ext <<_ACEOF
5645 /* end confdefs.h.  */
5646
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 #ifdef __cplusplus
5649 extern "C"
5650 #endif
5651 /* We use char because int might match the return type of a gcc2
5652    builtin and then its argument prototype would still apply.  */
5653 char shl_load ();
5654 int
5655 main ()
5656 {
5657 shl_load ();
5658   ;
5659   return 0;
5660 }
5661 _ACEOF
5662 rm -f conftest.$ac_objext conftest$ac_exeext
5663 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5664   (eval $ac_link) 2>conftest.er1
5665   ac_status=$?
5666   grep -v '^ *+' conftest.er1 >conftest.err
5667   rm -f conftest.er1
5668   cat conftest.err >&5
5669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670   (exit $ac_status); } &&
5671          { ac_try='test -z "$ac_c_werror_flag"
5672                          || test ! -s conftest.err'
5673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5674   (eval $ac_try) 2>&5
5675   ac_status=$?
5676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); }; } &&
5678          { ac_try='test -s conftest$ac_exeext'
5679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   ac_cv_search_shl_load="none required"
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 sed 's/^/| /' conftest.$ac_ext >&5
5688
5689 fi
5690 rm -f conftest.err conftest.$ac_objext \
5691       conftest$ac_exeext conftest.$ac_ext
5692 if test "$ac_cv_search_shl_load" = no; then
5693   for ac_lib in dld; do
5694     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5695     cat >conftest.$ac_ext <<_ACEOF
5696 /* confdefs.h.  */
5697 _ACEOF
5698 cat confdefs.h >>conftest.$ac_ext
5699 cat >>conftest.$ac_ext <<_ACEOF
5700 /* end confdefs.h.  */
5701
5702 /* Override any gcc2 internal prototype to avoid an error.  */
5703 #ifdef __cplusplus
5704 extern "C"
5705 #endif
5706 /* We use char because int might match the return type of a gcc2
5707    builtin and then its argument prototype would still apply.  */
5708 char shl_load ();
5709 int
5710 main ()
5711 {
5712 shl_load ();
5713   ;
5714   return 0;
5715 }
5716 _ACEOF
5717 rm -f conftest.$ac_objext conftest$ac_exeext
5718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5719   (eval $ac_link) 2>conftest.er1
5720   ac_status=$?
5721   grep -v '^ *+' conftest.er1 >conftest.err
5722   rm -f conftest.er1
5723   cat conftest.err >&5
5724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725   (exit $ac_status); } &&
5726          { ac_try='test -z "$ac_c_werror_flag"
5727                          || test ! -s conftest.err'
5728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729   (eval $ac_try) 2>&5
5730   ac_status=$?
5731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732   (exit $ac_status); }; } &&
5733          { ac_try='test -s conftest$ac_exeext'
5734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5735   (eval $ac_try) 2>&5
5736   ac_status=$?
5737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738   (exit $ac_status); }; }; then
5739   ac_cv_search_shl_load="-l$ac_lib"
5740 break
5741 else
5742   echo "$as_me: failed program was:" >&5
5743 sed 's/^/| /' conftest.$ac_ext >&5
5744
5745 fi
5746 rm -f conftest.err conftest.$ac_objext \
5747       conftest$ac_exeext conftest.$ac_ext
5748   done
5749 fi
5750 LIBS=$ac_func_search_save_LIBS
5751 fi
5752 echo "$as_me:$LINENO: result: $ac_cv_search_shl_load" >&5
5753 echo "${ECHO_T}$ac_cv_search_shl_load" >&6
5754 if test "$ac_cv_search_shl_load" != no; then
5755   test "$ac_cv_search_shl_load" = "none required" || LIBS="$ac_cv_search_shl_load $LIBS"
5756
5757 fi
5758
5759 # We only use libld in port/dynloader/aix.c
5760 case $host_os in
5761      aix*)
5762         echo "$as_me:$LINENO: checking for library containing ldopen" >&5
5763 echo $ECHO_N "checking for library containing ldopen... $ECHO_C" >&6
5764 if test "${ac_cv_search_ldopen+set}" = set; then
5765   echo $ECHO_N "(cached) $ECHO_C" >&6
5766 else
5767   ac_func_search_save_LIBS=$LIBS
5768 ac_cv_search_ldopen=no
5769 cat >conftest.$ac_ext <<_ACEOF
5770 /* confdefs.h.  */
5771 _ACEOF
5772 cat confdefs.h >>conftest.$ac_ext
5773 cat >>conftest.$ac_ext <<_ACEOF
5774 /* end confdefs.h.  */
5775
5776 /* Override any gcc2 internal prototype to avoid an error.  */
5777 #ifdef __cplusplus
5778 extern "C"
5779 #endif
5780 /* We use char because int might match the return type of a gcc2
5781    builtin and then its argument prototype would still apply.  */
5782 char ldopen ();
5783 int
5784 main ()
5785 {
5786 ldopen ();
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 rm -f conftest.$ac_objext conftest$ac_exeext
5792 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5793   (eval $ac_link) 2>conftest.er1
5794   ac_status=$?
5795   grep -v '^ *+' conftest.er1 >conftest.err
5796   rm -f conftest.er1
5797   cat conftest.err >&5
5798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799   (exit $ac_status); } &&
5800          { ac_try='test -z "$ac_c_werror_flag"
5801                          || test ! -s conftest.err'
5802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5803   (eval $ac_try) 2>&5
5804   ac_status=$?
5805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5806   (exit $ac_status); }; } &&
5807          { ac_try='test -s conftest$ac_exeext'
5808   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5809   (eval $ac_try) 2>&5
5810   ac_status=$?
5811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5812   (exit $ac_status); }; }; then
5813   ac_cv_search_ldopen="none required"
5814 else
5815   echo "$as_me: failed program was:" >&5
5816 sed 's/^/| /' conftest.$ac_ext >&5
5817
5818 fi
5819 rm -f conftest.err conftest.$ac_objext \
5820       conftest$ac_exeext conftest.$ac_ext
5821 if test "$ac_cv_search_ldopen" = no; then
5822   for ac_lib in ld; do
5823     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5824     cat >conftest.$ac_ext <<_ACEOF
5825 /* confdefs.h.  */
5826 _ACEOF
5827 cat confdefs.h >>conftest.$ac_ext
5828 cat >>conftest.$ac_ext <<_ACEOF
5829 /* end confdefs.h.  */
5830
5831 /* Override any gcc2 internal prototype to avoid an error.  */
5832 #ifdef __cplusplus
5833 extern "C"
5834 #endif
5835 /* We use char because int might match the return type of a gcc2
5836    builtin and then its argument prototype would still apply.  */
5837 char ldopen ();
5838 int
5839 main ()
5840 {
5841 ldopen ();
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext conftest$ac_exeext
5847 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5848   (eval $ac_link) 2>conftest.er1
5849   ac_status=$?
5850   grep -v '^ *+' conftest.er1 >conftest.err
5851   rm -f conftest.er1
5852   cat conftest.err >&5
5853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5854   (exit $ac_status); } &&
5855          { ac_try='test -z "$ac_c_werror_flag"
5856                          || test ! -s conftest.err'
5857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5858   (eval $ac_try) 2>&5
5859   ac_status=$?
5860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5861   (exit $ac_status); }; } &&
5862          { ac_try='test -s conftest$ac_exeext'
5863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5864   (eval $ac_try) 2>&5
5865   ac_status=$?
5866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867   (exit $ac_status); }; }; then
5868   ac_cv_search_ldopen="-l$ac_lib"
5869 break
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 sed 's/^/| /' conftest.$ac_ext >&5
5873
5874 fi
5875 rm -f conftest.err conftest.$ac_objext \
5876       conftest$ac_exeext conftest.$ac_ext
5877   done
5878 fi
5879 LIBS=$ac_func_search_save_LIBS
5880 fi
5881 echo "$as_me:$LINENO: result: $ac_cv_search_ldopen" >&5
5882 echo "${ECHO_T}$ac_cv_search_ldopen" >&6
5883 if test "$ac_cv_search_ldopen" != no; then
5884   test "$ac_cv_search_ldopen" = "none required" || LIBS="$ac_cv_search_ldopen $LIBS"
5885
5886 fi
5887
5888         ;;
5889 esac
5890 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5891 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5892 if test "${ac_cv_search_getopt_long+set}" = set; then
5893   echo $ECHO_N "(cached) $ECHO_C" >&6
5894 else
5895   ac_func_search_save_LIBS=$LIBS
5896 ac_cv_search_getopt_long=no
5897 cat >conftest.$ac_ext <<_ACEOF
5898 /* confdefs.h.  */
5899 _ACEOF
5900 cat confdefs.h >>conftest.$ac_ext
5901 cat >>conftest.$ac_ext <<_ACEOF
5902 /* end confdefs.h.  */
5903
5904 /* Override any gcc2 internal prototype to avoid an error.  */
5905 #ifdef __cplusplus
5906 extern "C"
5907 #endif
5908 /* We use char because int might match the return type of a gcc2
5909    builtin and then its argument prototype would still apply.  */
5910 char getopt_long ();
5911 int
5912 main ()
5913 {
5914 getopt_long ();
5915   ;
5916   return 0;
5917 }
5918 _ACEOF
5919 rm -f conftest.$ac_objext conftest$ac_exeext
5920 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5921   (eval $ac_link) 2>conftest.er1
5922   ac_status=$?
5923   grep -v '^ *+' conftest.er1 >conftest.err
5924   rm -f conftest.er1
5925   cat conftest.err >&5
5926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5927   (exit $ac_status); } &&
5928          { ac_try='test -z "$ac_c_werror_flag"
5929                          || test ! -s conftest.err'
5930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5931   (eval $ac_try) 2>&5
5932   ac_status=$?
5933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934   (exit $ac_status); }; } &&
5935          { ac_try='test -s conftest$ac_exeext'
5936   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5937   (eval $ac_try) 2>&5
5938   ac_status=$?
5939   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5940   (exit $ac_status); }; }; then
5941   ac_cv_search_getopt_long="none required"
5942 else
5943   echo "$as_me: failed program was:" >&5
5944 sed 's/^/| /' conftest.$ac_ext >&5
5945
5946 fi
5947 rm -f conftest.err conftest.$ac_objext \
5948       conftest$ac_exeext conftest.$ac_ext
5949 if test "$ac_cv_search_getopt_long" = no; then
5950   for ac_lib in getopt gnugetopt; do
5951     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5952     cat >conftest.$ac_ext <<_ACEOF
5953 /* confdefs.h.  */
5954 _ACEOF
5955 cat confdefs.h >>conftest.$ac_ext
5956 cat >>conftest.$ac_ext <<_ACEOF
5957 /* end confdefs.h.  */
5958
5959 /* Override any gcc2 internal prototype to avoid an error.  */
5960 #ifdef __cplusplus
5961 extern "C"
5962 #endif
5963 /* We use char because int might match the return type of a gcc2
5964    builtin and then its argument prototype would still apply.  */
5965 char getopt_long ();
5966 int
5967 main ()
5968 {
5969 getopt_long ();
5970   ;
5971   return 0;
5972 }
5973 _ACEOF
5974 rm -f conftest.$ac_objext conftest$ac_exeext
5975 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5976   (eval $ac_link) 2>conftest.er1
5977   ac_status=$?
5978   grep -v '^ *+' conftest.er1 >conftest.err
5979   rm -f conftest.er1
5980   cat conftest.err >&5
5981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982   (exit $ac_status); } &&
5983          { ac_try='test -z "$ac_c_werror_flag"
5984                          || test ! -s conftest.err'
5985   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5986   (eval $ac_try) 2>&5
5987   ac_status=$?
5988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5989   (exit $ac_status); }; } &&
5990          { ac_try='test -s conftest$ac_exeext'
5991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5992   (eval $ac_try) 2>&5
5993   ac_status=$?
5994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5995   (exit $ac_status); }; }; then
5996   ac_cv_search_getopt_long="-l$ac_lib"
5997 break
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 sed 's/^/| /' conftest.$ac_ext >&5
6001
6002 fi
6003 rm -f conftest.err conftest.$ac_objext \
6004       conftest$ac_exeext conftest.$ac_ext
6005   done
6006 fi
6007 LIBS=$ac_func_search_save_LIBS
6008 fi
6009 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
6010 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
6011 if test "$ac_cv_search_getopt_long" != no; then
6012   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
6013
6014 fi
6015
6016 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6017 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6018 if test "${ac_cv_search_crypt+set}" = set; then
6019   echo $ECHO_N "(cached) $ECHO_C" >&6
6020 else
6021   ac_func_search_save_LIBS=$LIBS
6022 ac_cv_search_crypt=no
6023 cat >conftest.$ac_ext <<_ACEOF
6024 /* confdefs.h.  */
6025 _ACEOF
6026 cat confdefs.h >>conftest.$ac_ext
6027 cat >>conftest.$ac_ext <<_ACEOF
6028 /* end confdefs.h.  */
6029
6030 /* Override any gcc2 internal prototype to avoid an error.  */
6031 #ifdef __cplusplus
6032 extern "C"
6033 #endif
6034 /* We use char because int might match the return type of a gcc2
6035    builtin and then its argument prototype would still apply.  */
6036 char crypt ();
6037 int
6038 main ()
6039 {
6040 crypt ();
6041   ;
6042   return 0;
6043 }
6044 _ACEOF
6045 rm -f conftest.$ac_objext conftest$ac_exeext
6046 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6047   (eval $ac_link) 2>conftest.er1
6048   ac_status=$?
6049   grep -v '^ *+' conftest.er1 >conftest.err
6050   rm -f conftest.er1
6051   cat conftest.err >&5
6052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6053   (exit $ac_status); } &&
6054          { ac_try='test -z "$ac_c_werror_flag"
6055                          || test ! -s conftest.err'
6056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6057   (eval $ac_try) 2>&5
6058   ac_status=$?
6059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060   (exit $ac_status); }; } &&
6061          { ac_try='test -s conftest$ac_exeext'
6062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6063   (eval $ac_try) 2>&5
6064   ac_status=$?
6065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6066   (exit $ac_status); }; }; then
6067   ac_cv_search_crypt="none required"
6068 else
6069   echo "$as_me: failed program was:" >&5
6070 sed 's/^/| /' conftest.$ac_ext >&5
6071
6072 fi
6073 rm -f conftest.err conftest.$ac_objext \
6074       conftest$ac_exeext conftest.$ac_ext
6075 if test "$ac_cv_search_crypt" = no; then
6076   for ac_lib in crypt; do
6077     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6078     cat >conftest.$ac_ext <<_ACEOF
6079 /* confdefs.h.  */
6080 _ACEOF
6081 cat confdefs.h >>conftest.$ac_ext
6082 cat >>conftest.$ac_ext <<_ACEOF
6083 /* end confdefs.h.  */
6084
6085 /* Override any gcc2 internal prototype to avoid an error.  */
6086 #ifdef __cplusplus
6087 extern "C"
6088 #endif
6089 /* We use char because int might match the return type of a gcc2
6090    builtin and then its argument prototype would still apply.  */
6091 char crypt ();
6092 int
6093 main ()
6094 {
6095 crypt ();
6096   ;
6097   return 0;
6098 }
6099 _ACEOF
6100 rm -f conftest.$ac_objext conftest$ac_exeext
6101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6102   (eval $ac_link) 2>conftest.er1
6103   ac_status=$?
6104   grep -v '^ *+' conftest.er1 >conftest.err
6105   rm -f conftest.er1
6106   cat conftest.err >&5
6107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108   (exit $ac_status); } &&
6109          { ac_try='test -z "$ac_c_werror_flag"
6110                          || test ! -s conftest.err'
6111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6112   (eval $ac_try) 2>&5
6113   ac_status=$?
6114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6115   (exit $ac_status); }; } &&
6116          { ac_try='test -s conftest$ac_exeext'
6117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6118   (eval $ac_try) 2>&5
6119   ac_status=$?
6120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6121   (exit $ac_status); }; }; then
6122   ac_cv_search_crypt="-l$ac_lib"
6123 break
6124 else
6125   echo "$as_me: failed program was:" >&5
6126 sed 's/^/| /' conftest.$ac_ext >&5
6127
6128 fi
6129 rm -f conftest.err conftest.$ac_objext \
6130       conftest$ac_exeext conftest.$ac_ext
6131   done
6132 fi
6133 LIBS=$ac_func_search_save_LIBS
6134 fi
6135 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6136 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6137 if test "$ac_cv_search_crypt" != no; then
6138   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6139
6140 fi
6141
6142 # Solaris:
6143 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6144 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6145 if test "${ac_cv_search_fdatasync+set}" = set; then
6146   echo $ECHO_N "(cached) $ECHO_C" >&6
6147 else
6148   ac_func_search_save_LIBS=$LIBS
6149 ac_cv_search_fdatasync=no
6150 cat >conftest.$ac_ext <<_ACEOF
6151 /* confdefs.h.  */
6152 _ACEOF
6153 cat confdefs.h >>conftest.$ac_ext
6154 cat >>conftest.$ac_ext <<_ACEOF
6155 /* end confdefs.h.  */
6156
6157 /* Override any gcc2 internal prototype to avoid an error.  */
6158 #ifdef __cplusplus
6159 extern "C"
6160 #endif
6161 /* We use char because int might match the return type of a gcc2
6162    builtin and then its argument prototype would still apply.  */
6163 char fdatasync ();
6164 int
6165 main ()
6166 {
6167 fdatasync ();
6168   ;
6169   return 0;
6170 }
6171 _ACEOF
6172 rm -f conftest.$ac_objext conftest$ac_exeext
6173 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6174   (eval $ac_link) 2>conftest.er1
6175   ac_status=$?
6176   grep -v '^ *+' conftest.er1 >conftest.err
6177   rm -f conftest.er1
6178   cat conftest.err >&5
6179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180   (exit $ac_status); } &&
6181          { ac_try='test -z "$ac_c_werror_flag"
6182                          || test ! -s conftest.err'
6183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6184   (eval $ac_try) 2>&5
6185   ac_status=$?
6186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6187   (exit $ac_status); }; } &&
6188          { ac_try='test -s conftest$ac_exeext'
6189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6190   (eval $ac_try) 2>&5
6191   ac_status=$?
6192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193   (exit $ac_status); }; }; then
6194   ac_cv_search_fdatasync="none required"
6195 else
6196   echo "$as_me: failed program was:" >&5
6197 sed 's/^/| /' conftest.$ac_ext >&5
6198
6199 fi
6200 rm -f conftest.err conftest.$ac_objext \
6201       conftest$ac_exeext conftest.$ac_ext
6202 if test "$ac_cv_search_fdatasync" = no; then
6203   for ac_lib in rt posix4; do
6204     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6205     cat >conftest.$ac_ext <<_ACEOF
6206 /* confdefs.h.  */
6207 _ACEOF
6208 cat confdefs.h >>conftest.$ac_ext
6209 cat >>conftest.$ac_ext <<_ACEOF
6210 /* end confdefs.h.  */
6211
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 #ifdef __cplusplus
6214 extern "C"
6215 #endif
6216 /* We use char because int might match the return type of a gcc2
6217    builtin and then its argument prototype would still apply.  */
6218 char fdatasync ();
6219 int
6220 main ()
6221 {
6222 fdatasync ();
6223   ;
6224   return 0;
6225 }
6226 _ACEOF
6227 rm -f conftest.$ac_objext conftest$ac_exeext
6228 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6229   (eval $ac_link) 2>conftest.er1
6230   ac_status=$?
6231   grep -v '^ *+' conftest.er1 >conftest.err
6232   rm -f conftest.er1
6233   cat conftest.err >&5
6234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235   (exit $ac_status); } &&
6236          { ac_try='test -z "$ac_c_werror_flag"
6237                          || test ! -s conftest.err'
6238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239   (eval $ac_try) 2>&5
6240   ac_status=$?
6241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242   (exit $ac_status); }; } &&
6243          { ac_try='test -s conftest$ac_exeext'
6244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6245   (eval $ac_try) 2>&5
6246   ac_status=$?
6247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248   (exit $ac_status); }; }; then
6249   ac_cv_search_fdatasync="-l$ac_lib"
6250 break
6251 else
6252   echo "$as_me: failed program was:" >&5
6253 sed 's/^/| /' conftest.$ac_ext >&5
6254
6255 fi
6256 rm -f conftest.err conftest.$ac_objext \
6257       conftest$ac_exeext conftest.$ac_ext
6258   done
6259 fi
6260 LIBS=$ac_func_search_save_LIBS
6261 fi
6262 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6263 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6264 if test "$ac_cv_search_fdatasync" != no; then
6265   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6266
6267 fi
6268
6269 # Cygwin:
6270 echo "$as_me:$LINENO: checking for library containing shmget" >&5
6271 echo $ECHO_N "checking for library containing shmget... $ECHO_C" >&6
6272 if test "${ac_cv_search_shmget+set}" = set; then
6273   echo $ECHO_N "(cached) $ECHO_C" >&6
6274 else
6275   ac_func_search_save_LIBS=$LIBS
6276 ac_cv_search_shmget=no
6277 cat >conftest.$ac_ext <<_ACEOF
6278 /* confdefs.h.  */
6279 _ACEOF
6280 cat confdefs.h >>conftest.$ac_ext
6281 cat >>conftest.$ac_ext <<_ACEOF
6282 /* end confdefs.h.  */
6283
6284 /* Override any gcc2 internal prototype to avoid an error.  */
6285 #ifdef __cplusplus
6286 extern "C"
6287 #endif
6288 /* We use char because int might match the return type of a gcc2
6289    builtin and then its argument prototype would still apply.  */
6290 char shmget ();
6291 int
6292 main ()
6293 {
6294 shmget ();
6295   ;
6296   return 0;
6297 }
6298 _ACEOF
6299 rm -f conftest.$ac_objext conftest$ac_exeext
6300 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6301   (eval $ac_link) 2>conftest.er1
6302   ac_status=$?
6303   grep -v '^ *+' conftest.er1 >conftest.err
6304   rm -f conftest.er1
6305   cat conftest.err >&5
6306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6307   (exit $ac_status); } &&
6308          { ac_try='test -z "$ac_c_werror_flag"
6309                          || test ! -s conftest.err'
6310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6311   (eval $ac_try) 2>&5
6312   ac_status=$?
6313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314   (exit $ac_status); }; } &&
6315          { ac_try='test -s conftest$ac_exeext'
6316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6317   (eval $ac_try) 2>&5
6318   ac_status=$?
6319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6320   (exit $ac_status); }; }; then
6321   ac_cv_search_shmget="none required"
6322 else
6323   echo "$as_me: failed program was:" >&5
6324 sed 's/^/| /' conftest.$ac_ext >&5
6325
6326 fi
6327 rm -f conftest.err conftest.$ac_objext \
6328       conftest$ac_exeext conftest.$ac_ext
6329 if test "$ac_cv_search_shmget" = no; then
6330   for ac_lib in cygipc; do
6331     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6332     cat >conftest.$ac_ext <<_ACEOF
6333 /* confdefs.h.  */
6334 _ACEOF
6335 cat confdefs.h >>conftest.$ac_ext
6336 cat >>conftest.$ac_ext <<_ACEOF
6337 /* end confdefs.h.  */
6338
6339 /* Override any gcc2 internal prototype to avoid an error.  */
6340 #ifdef __cplusplus
6341 extern "C"
6342 #endif
6343 /* We use char because int might match the return type of a gcc2
6344    builtin and then its argument prototype would still apply.  */
6345 char shmget ();
6346 int
6347 main ()
6348 {
6349 shmget ();
6350   ;
6351   return 0;
6352 }
6353 _ACEOF
6354 rm -f conftest.$ac_objext conftest$ac_exeext
6355 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6356   (eval $ac_link) 2>conftest.er1
6357   ac_status=$?
6358   grep -v '^ *+' conftest.er1 >conftest.err
6359   rm -f conftest.er1
6360   cat conftest.err >&5
6361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -z "$ac_c_werror_flag"
6364                          || test ! -s conftest.err'
6365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6369   (exit $ac_status); }; } &&
6370          { ac_try='test -s conftest$ac_exeext'
6371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6372   (eval $ac_try) 2>&5
6373   ac_status=$?
6374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6375   (exit $ac_status); }; }; then
6376   ac_cv_search_shmget="-l$ac_lib"
6377 break
6378 else
6379   echo "$as_me: failed program was:" >&5
6380 sed 's/^/| /' conftest.$ac_ext >&5
6381
6382 fi
6383 rm -f conftest.err conftest.$ac_objext \
6384       conftest$ac_exeext conftest.$ac_ext
6385   done
6386 fi
6387 LIBS=$ac_func_search_save_LIBS
6388 fi
6389 echo "$as_me:$LINENO: result: $ac_cv_search_shmget" >&5
6390 echo "${ECHO_T}$ac_cv_search_shmget" >&6
6391 if test "$ac_cv_search_shmget" != no; then
6392   test "$ac_cv_search_shmget" = "none required" || LIBS="$ac_cv_search_shmget $LIBS"
6393
6394 fi
6395
6396
6397 if test "$with_readline" = yes; then
6398
6399
6400 if test "${pgac_cv_check_readline+set}" = set; then
6401   echo $ECHO_N "(cached) $ECHO_C" >&6
6402 else
6403   pgac_cv_check_readline=no
6404 pgac_save_LIBS=$LIBS
6405 if test x"$with_libedit_preferred" != x"yes"
6406 then    READLINE_ORDER="-lreadline -ledit"
6407 else    READLINE_ORDER="-ledit -lreadline"
6408 fi
6409 for pgac_rllib in $READLINE_ORDER ; do
6410   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6411 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6412   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6413     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6414     cat >conftest.$ac_ext <<_ACEOF
6415 /* confdefs.h.  */
6416 _ACEOF
6417 cat confdefs.h >>conftest.$ac_ext
6418 cat >>conftest.$ac_ext <<_ACEOF
6419 /* end confdefs.h.  */
6420
6421 /* Override any gcc2 internal prototype to avoid an error.  */
6422 #ifdef __cplusplus
6423 extern "C"
6424 #endif
6425 /* We use char because int might match the return type of a gcc2
6426    builtin and then its argument prototype would still apply.  */
6427 char readline ();
6428 int
6429 main ()
6430 {
6431 readline ();
6432   ;
6433   return 0;
6434 }
6435 _ACEOF
6436 rm -f conftest.$ac_objext conftest$ac_exeext
6437 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6438   (eval $ac_link) 2>conftest.er1
6439   ac_status=$?
6440   grep -v '^ *+' conftest.er1 >conftest.err
6441   rm -f conftest.er1
6442   cat conftest.err >&5
6443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6444   (exit $ac_status); } &&
6445          { ac_try='test -z "$ac_c_werror_flag"
6446                          || test ! -s conftest.err'
6447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6448   (eval $ac_try) 2>&5
6449   ac_status=$?
6450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451   (exit $ac_status); }; } &&
6452          { ac_try='test -s conftest$ac_exeext'
6453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6454   (eval $ac_try) 2>&5
6455   ac_status=$?
6456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6457   (exit $ac_status); }; }; then
6458
6459       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6460       # recognize dependent libraries; assume curses is needed if we didn't
6461       # find any dependency.
6462       case $host_os in
6463         netbsd* | openbsd* | irix*)
6464           if test x"$pgac_lib" = x"" ; then
6465             pgac_lib=" -lcurses"
6466           fi ;;
6467       esac
6468
6469       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6470       break
6471
6472 else
6473   echo "$as_me: failed program was:" >&5
6474 sed 's/^/| /' conftest.$ac_ext >&5
6475
6476 fi
6477 rm -f conftest.err conftest.$ac_objext \
6478       conftest$ac_exeext conftest.$ac_ext
6479   done
6480   if test "$pgac_cv_check_readline" != no ; then
6481     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6482 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6483     break
6484   else
6485     echo "$as_me:$LINENO: result: no" >&5
6486 echo "${ECHO_T}no" >&6
6487   fi
6488 done
6489 LIBS=$pgac_save_LIBS
6490
6491 fi
6492
6493 if test "$pgac_cv_check_readline" != no ; then
6494   LIBS="$pgac_cv_check_readline $LIBS"
6495
6496 cat >>confdefs.h <<\_ACEOF
6497 #define HAVE_LIBREADLINE 1
6498 _ACEOF
6499
6500 fi
6501
6502
6503   if test x"$pgac_cv_check_readline" = x"no"; then
6504     { { echo "$as_me:$LINENO: error: readline library not found
6505 If you have readline already installed, see config.log for details on the
6506 failure.  It is possible the compiler isn't looking in the proper directory.
6507 Use --without-readline to disable readline support." >&5
6508 echo "$as_me: error: readline library not found
6509 If you have readline already installed, see config.log for details on the
6510 failure.  It is possible the compiler isn't looking in the proper directory.
6511 Use --without-readline to disable readline support." >&2;}
6512    { (exit 1); exit 1; }; }
6513   fi
6514 fi
6515
6516 if test "$with_zlib" = yes; then
6517
6518 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6519 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6520 if test "${ac_cv_lib_z_inflate+set}" = set; then
6521   echo $ECHO_N "(cached) $ECHO_C" >&6
6522 else
6523   ac_check_lib_save_LIBS=$LIBS
6524 LIBS="-lz  $LIBS"
6525 cat >conftest.$ac_ext <<_ACEOF
6526 /* confdefs.h.  */
6527 _ACEOF
6528 cat confdefs.h >>conftest.$ac_ext
6529 cat >>conftest.$ac_ext <<_ACEOF
6530 /* end confdefs.h.  */
6531
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 #ifdef __cplusplus
6534 extern "C"
6535 #endif
6536 /* We use char because int might match the return type of a gcc2
6537    builtin and then its argument prototype would still apply.  */
6538 char inflate ();
6539 int
6540 main ()
6541 {
6542 inflate ();
6543   ;
6544   return 0;
6545 }
6546 _ACEOF
6547 rm -f conftest.$ac_objext conftest$ac_exeext
6548 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6549   (eval $ac_link) 2>conftest.er1
6550   ac_status=$?
6551   grep -v '^ *+' conftest.er1 >conftest.err
6552   rm -f conftest.er1
6553   cat conftest.err >&5
6554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555   (exit $ac_status); } &&
6556          { ac_try='test -z "$ac_c_werror_flag"
6557                          || test ! -s conftest.err'
6558   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6559   (eval $ac_try) 2>&5
6560   ac_status=$?
6561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562   (exit $ac_status); }; } &&
6563          { ac_try='test -s conftest$ac_exeext'
6564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6565   (eval $ac_try) 2>&5
6566   ac_status=$?
6567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568   (exit $ac_status); }; }; then
6569   ac_cv_lib_z_inflate=yes
6570 else
6571   echo "$as_me: failed program was:" >&5
6572 sed 's/^/| /' conftest.$ac_ext >&5
6573
6574 ac_cv_lib_z_inflate=no
6575 fi
6576 rm -f conftest.err conftest.$ac_objext \
6577       conftest$ac_exeext conftest.$ac_ext
6578 LIBS=$ac_check_lib_save_LIBS
6579 fi
6580 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6581 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6582 if test $ac_cv_lib_z_inflate = yes; then
6583   cat >>confdefs.h <<_ACEOF
6584 #define HAVE_LIBZ 1
6585 _ACEOF
6586
6587   LIBS="-lz $LIBS"
6588
6589 else
6590   { { echo "$as_me:$LINENO: error: zlib library not found
6591 If you have zlib already installed, see config.log for details on the
6592 failure.  It is possible the compiler isn't looking in the proper directory.
6593 Use --without-zlib to disable zlib support." >&5
6594 echo "$as_me: error: zlib library not found
6595 If you have zlib already installed, see config.log for details on the
6596 failure.  It is possible the compiler isn't looking in the proper directory.
6597 Use --without-zlib to disable zlib support." >&2;}
6598    { (exit 1); exit 1; }; }
6599 fi
6600
6601 fi
6602
6603 if test "$enable_spinlocks" = yes; then
6604
6605 cat >>confdefs.h <<\_ACEOF
6606 #define HAVE_SPINLOCKS 1
6607 _ACEOF
6608
6609 else
6610   { echo "$as_me:$LINENO: WARNING:
6611 *** Not using spinlocks will cause poor performance." >&5
6612 echo "$as_me: WARNING:
6613 *** Not using spinlocks will cause poor performance." >&2;}
6614 fi
6615
6616 if test "$with_krb5" = yes ; then
6617   if test "$PORTNAME" != "win32"; then
6618      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6619 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6620 if test "${ac_cv_search_com_err+set}" = set; then
6621   echo $ECHO_N "(cached) $ECHO_C" >&6
6622 else
6623   ac_func_search_save_LIBS=$LIBS
6624 ac_cv_search_com_err=no
6625 cat >conftest.$ac_ext <<_ACEOF
6626 /* confdefs.h.  */
6627 _ACEOF
6628 cat confdefs.h >>conftest.$ac_ext
6629 cat >>conftest.$ac_ext <<_ACEOF
6630 /* end confdefs.h.  */
6631
6632 /* Override any gcc2 internal prototype to avoid an error.  */
6633 #ifdef __cplusplus
6634 extern "C"
6635 #endif
6636 /* We use char because int might match the return type of a gcc2
6637    builtin and then its argument prototype would still apply.  */
6638 char com_err ();
6639 int
6640 main ()
6641 {
6642 com_err ();
6643   ;
6644   return 0;
6645 }
6646 _ACEOF
6647 rm -f conftest.$ac_objext conftest$ac_exeext
6648 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6649   (eval $ac_link) 2>conftest.er1
6650   ac_status=$?
6651   grep -v '^ *+' conftest.er1 >conftest.err
6652   rm -f conftest.er1
6653   cat conftest.err >&5
6654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6655   (exit $ac_status); } &&
6656          { ac_try='test -z "$ac_c_werror_flag"
6657                          || test ! -s conftest.err'
6658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6659   (eval $ac_try) 2>&5
6660   ac_status=$?
6661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6662   (exit $ac_status); }; } &&
6663          { ac_try='test -s conftest$ac_exeext'
6664   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668   (exit $ac_status); }; }; then
6669   ac_cv_search_com_err="none required"
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 sed 's/^/| /' conftest.$ac_ext >&5
6673
6674 fi
6675 rm -f conftest.err conftest.$ac_objext \
6676       conftest$ac_exeext conftest.$ac_ext
6677 if test "$ac_cv_search_com_err" = no; then
6678   for ac_lib in krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err; do
6679     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6680     cat >conftest.$ac_ext <<_ACEOF
6681 /* confdefs.h.  */
6682 _ACEOF
6683 cat confdefs.h >>conftest.$ac_ext
6684 cat >>conftest.$ac_ext <<_ACEOF
6685 /* end confdefs.h.  */
6686
6687 /* Override any gcc2 internal prototype to avoid an error.  */
6688 #ifdef __cplusplus
6689 extern "C"
6690 #endif
6691 /* We use char because int might match the return type of a gcc2
6692    builtin and then its argument prototype would still apply.  */
6693 char com_err ();
6694 int
6695 main ()
6696 {
6697 com_err ();
6698   ;
6699   return 0;
6700 }
6701 _ACEOF
6702 rm -f conftest.$ac_objext conftest$ac_exeext
6703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6704   (eval $ac_link) 2>conftest.er1
6705   ac_status=$?
6706   grep -v '^ *+' conftest.er1 >conftest.err
6707   rm -f conftest.er1
6708   cat conftest.err >&5
6709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710   (exit $ac_status); } &&
6711          { ac_try='test -z "$ac_c_werror_flag"
6712                          || test ! -s conftest.err'
6713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6714   (eval $ac_try) 2>&5
6715   ac_status=$?
6716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6717   (exit $ac_status); }; } &&
6718          { ac_try='test -s conftest$ac_exeext'
6719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6720   (eval $ac_try) 2>&5
6721   ac_status=$?
6722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6723   (exit $ac_status); }; }; then
6724   ac_cv_search_com_err="-l$ac_lib"
6725 break
6726 else
6727   echo "$as_me: failed program was:" >&5
6728 sed 's/^/| /' conftest.$ac_ext >&5
6729
6730 fi
6731 rm -f conftest.err conftest.$ac_objext \
6732       conftest$ac_exeext conftest.$ac_ext
6733   done
6734 fi
6735 LIBS=$ac_func_search_save_LIBS
6736 fi
6737 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6738 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6739 if test "$ac_cv_search_com_err" != no; then
6740   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6741
6742 else
6743   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6744 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6745    { (exit 1); exit 1; }; }
6746 fi
6747
6748      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6749 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6750 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6751   echo $ECHO_N "(cached) $ECHO_C" >&6
6752 else
6753   ac_func_search_save_LIBS=$LIBS
6754 ac_cv_search_krb5_sendauth=no
6755 cat >conftest.$ac_ext <<_ACEOF
6756 /* confdefs.h.  */
6757 _ACEOF
6758 cat confdefs.h >>conftest.$ac_ext
6759 cat >>conftest.$ac_ext <<_ACEOF
6760 /* end confdefs.h.  */
6761
6762 /* Override any gcc2 internal prototype to avoid an error.  */
6763 #ifdef __cplusplus
6764 extern "C"
6765 #endif
6766 /* We use char because int might match the return type of a gcc2
6767    builtin and then its argument prototype would still apply.  */
6768 char krb5_sendauth ();
6769 int
6770 main ()
6771 {
6772 krb5_sendauth ();
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext conftest$ac_exeext
6778 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6779   (eval $ac_link) 2>conftest.er1
6780   ac_status=$?
6781   grep -v '^ *+' conftest.er1 >conftest.err
6782   rm -f conftest.er1
6783   cat conftest.err >&5
6784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6785   (exit $ac_status); } &&
6786          { ac_try='test -z "$ac_c_werror_flag"
6787                          || test ! -s conftest.err'
6788   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6789   (eval $ac_try) 2>&5
6790   ac_status=$?
6791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6792   (exit $ac_status); }; } &&
6793          { ac_try='test -s conftest$ac_exeext'
6794   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6795   (eval $ac_try) 2>&5
6796   ac_status=$?
6797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6798   (exit $ac_status); }; }; then
6799   ac_cv_search_krb5_sendauth="none required"
6800 else
6801   echo "$as_me: failed program was:" >&5
6802 sed 's/^/| /' conftest.$ac_ext >&5
6803
6804 fi
6805 rm -f conftest.err conftest.$ac_objext \
6806       conftest$ac_exeext conftest.$ac_ext
6807 if test "$ac_cv_search_krb5_sendauth" = no; then
6808   for ac_lib in krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'; do
6809     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6810     cat >conftest.$ac_ext <<_ACEOF
6811 /* confdefs.h.  */
6812 _ACEOF
6813 cat confdefs.h >>conftest.$ac_ext
6814 cat >>conftest.$ac_ext <<_ACEOF
6815 /* end confdefs.h.  */
6816
6817 /* Override any gcc2 internal prototype to avoid an error.  */
6818 #ifdef __cplusplus
6819 extern "C"
6820 #endif
6821 /* We use char because int might match the return type of a gcc2
6822    builtin and then its argument prototype would still apply.  */
6823 char krb5_sendauth ();
6824 int
6825 main ()
6826 {
6827 krb5_sendauth ();
6828   ;
6829   return 0;
6830 }
6831 _ACEOF
6832 rm -f conftest.$ac_objext conftest$ac_exeext
6833 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6834   (eval $ac_link) 2>conftest.er1
6835   ac_status=$?
6836   grep -v '^ *+' conftest.er1 >conftest.err
6837   rm -f conftest.er1
6838   cat conftest.err >&5
6839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6840   (exit $ac_status); } &&
6841          { ac_try='test -z "$ac_c_werror_flag"
6842                          || test ! -s conftest.err'
6843   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6844   (eval $ac_try) 2>&5
6845   ac_status=$?
6846   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6847   (exit $ac_status); }; } &&
6848          { ac_try='test -s conftest$ac_exeext'
6849   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6850   (eval $ac_try) 2>&5
6851   ac_status=$?
6852   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853   (exit $ac_status); }; }; then
6854   ac_cv_search_krb5_sendauth="-l$ac_lib"
6855 break
6856 else
6857   echo "$as_me: failed program was:" >&5
6858 sed 's/^/| /' conftest.$ac_ext >&5
6859
6860 fi
6861 rm -f conftest.err conftest.$ac_objext \
6862       conftest$ac_exeext conftest.$ac_ext
6863   done
6864 fi
6865 LIBS=$ac_func_search_save_LIBS
6866 fi
6867 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6868 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6869 if test "$ac_cv_search_krb5_sendauth" != no; then
6870   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6871
6872 else
6873   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6874 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6875    { (exit 1); exit 1; }; }
6876 fi
6877
6878   else
6879      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6880 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6881 if test "${ac_cv_search_com_err+set}" = set; then
6882   echo $ECHO_N "(cached) $ECHO_C" >&6
6883 else
6884   ac_func_search_save_LIBS=$LIBS
6885 ac_cv_search_com_err=no
6886 cat >conftest.$ac_ext <<_ACEOF
6887 /* confdefs.h.  */
6888 _ACEOF
6889 cat confdefs.h >>conftest.$ac_ext
6890 cat >>conftest.$ac_ext <<_ACEOF
6891 /* end confdefs.h.  */
6892
6893 /* Override any gcc2 internal prototype to avoid an error.  */
6894 #ifdef __cplusplus
6895 extern "C"
6896 #endif
6897 /* We use char because int might match the return type of a gcc2
6898    builtin and then its argument prototype would still apply.  */
6899 char com_err ();
6900 int
6901 main ()
6902 {
6903 com_err ();
6904   ;
6905   return 0;
6906 }
6907 _ACEOF
6908 rm -f conftest.$ac_objext conftest$ac_exeext
6909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6910   (eval $ac_link) 2>conftest.er1
6911   ac_status=$?
6912   grep -v '^ *+' conftest.er1 >conftest.err
6913   rm -f conftest.er1
6914   cat conftest.err >&5
6915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916   (exit $ac_status); } &&
6917          { ac_try='test -z "$ac_c_werror_flag"
6918                          || test ! -s conftest.err'
6919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6920   (eval $ac_try) 2>&5
6921   ac_status=$?
6922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6923   (exit $ac_status); }; } &&
6924          { ac_try='test -s conftest$ac_exeext'
6925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6926   (eval $ac_try) 2>&5
6927   ac_status=$?
6928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6929   (exit $ac_status); }; }; then
6930   ac_cv_search_com_err="none required"
6931 else
6932   echo "$as_me: failed program was:" >&5
6933 sed 's/^/| /' conftest.$ac_ext >&5
6934
6935 fi
6936 rm -f conftest.err conftest.$ac_objext \
6937       conftest$ac_exeext conftest.$ac_ext
6938 if test "$ac_cv_search_com_err" = no; then
6939   for ac_lib in 'comerr32 -lkrb5_32'; do
6940     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6941     cat >conftest.$ac_ext <<_ACEOF
6942 /* confdefs.h.  */
6943 _ACEOF
6944 cat confdefs.h >>conftest.$ac_ext
6945 cat >>conftest.$ac_ext <<_ACEOF
6946 /* end confdefs.h.  */
6947
6948 /* Override any gcc2 internal prototype to avoid an error.  */
6949 #ifdef __cplusplus
6950 extern "C"
6951 #endif
6952 /* We use char because int might match the return type of a gcc2
6953    builtin and then its argument prototype would still apply.  */
6954 char com_err ();
6955 int
6956 main ()
6957 {
6958 com_err ();
6959   ;
6960   return 0;
6961 }
6962 _ACEOF
6963 rm -f conftest.$ac_objext conftest$ac_exeext
6964 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6965   (eval $ac_link) 2>conftest.er1
6966   ac_status=$?
6967   grep -v '^ *+' conftest.er1 >conftest.err
6968   rm -f conftest.er1
6969   cat conftest.err >&5
6970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6971   (exit $ac_status); } &&
6972          { ac_try='test -z "$ac_c_werror_flag"
6973                          || test ! -s conftest.err'
6974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6975   (eval $ac_try) 2>&5
6976   ac_status=$?
6977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6978   (exit $ac_status); }; } &&
6979          { ac_try='test -s conftest$ac_exeext'
6980   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6981   (eval $ac_try) 2>&5
6982   ac_status=$?
6983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984   (exit $ac_status); }; }; then
6985   ac_cv_search_com_err="-l$ac_lib"
6986 break
6987 else
6988   echo "$as_me: failed program was:" >&5
6989 sed 's/^/| /' conftest.$ac_ext >&5
6990
6991 fi
6992 rm -f conftest.err conftest.$ac_objext \
6993       conftest$ac_exeext conftest.$ac_ext
6994   done
6995 fi
6996 LIBS=$ac_func_search_save_LIBS
6997 fi
6998 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6999 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7000 if test "$ac_cv_search_com_err" != no; then
7001   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7002
7003 else
7004   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7005 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7006    { (exit 1); exit 1; }; }
7007 fi
7008
7009   fi
7010 fi
7011
7012 if test "$with_openssl" = yes ; then
7013     if test "$PORTNAME" != "win32"; then
7014
7015 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7016 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7017 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7018   echo $ECHO_N "(cached) $ECHO_C" >&6
7019 else
7020   ac_check_lib_save_LIBS=$LIBS
7021 LIBS="-lcrypto  $LIBS"
7022 cat >conftest.$ac_ext <<_ACEOF
7023 /* confdefs.h.  */
7024 _ACEOF
7025 cat confdefs.h >>conftest.$ac_ext
7026 cat >>conftest.$ac_ext <<_ACEOF
7027 /* end confdefs.h.  */
7028
7029 /* Override any gcc2 internal prototype to avoid an error.  */
7030 #ifdef __cplusplus
7031 extern "C"
7032 #endif
7033 /* We use char because int might match the return type of a gcc2
7034    builtin and then its argument prototype would still apply.  */
7035 char CRYPTO_new_ex_data ();
7036 int
7037 main ()
7038 {
7039 CRYPTO_new_ex_data ();
7040   ;
7041   return 0;
7042 }
7043 _ACEOF
7044 rm -f conftest.$ac_objext conftest$ac_exeext
7045 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7046   (eval $ac_link) 2>conftest.er1
7047   ac_status=$?
7048   grep -v '^ *+' conftest.er1 >conftest.err
7049   rm -f conftest.er1
7050   cat conftest.err >&5
7051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7052   (exit $ac_status); } &&
7053          { ac_try='test -z "$ac_c_werror_flag"
7054                          || test ! -s conftest.err'
7055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7056   (eval $ac_try) 2>&5
7057   ac_status=$?
7058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059   (exit $ac_status); }; } &&
7060          { ac_try='test -s conftest$ac_exeext'
7061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7062   (eval $ac_try) 2>&5
7063   ac_status=$?
7064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7065   (exit $ac_status); }; }; then
7066   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7067 else
7068   echo "$as_me: failed program was:" >&5
7069 sed 's/^/| /' conftest.$ac_ext >&5
7070
7071 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7072 fi
7073 rm -f conftest.err conftest.$ac_objext \
7074       conftest$ac_exeext conftest.$ac_ext
7075 LIBS=$ac_check_lib_save_LIBS
7076 fi
7077 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7078 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7079 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7080   cat >>confdefs.h <<_ACEOF
7081 #define HAVE_LIBCRYPTO 1
7082 _ACEOF
7083
7084   LIBS="-lcrypto $LIBS"
7085
7086 else
7087   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7088 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7089    { (exit 1); exit 1; }; }
7090 fi
7091
7092
7093 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7094 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7095 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7096   echo $ECHO_N "(cached) $ECHO_C" >&6
7097 else
7098   ac_check_lib_save_LIBS=$LIBS
7099 LIBS="-lssl  $LIBS"
7100 cat >conftest.$ac_ext <<_ACEOF
7101 /* confdefs.h.  */
7102 _ACEOF
7103 cat confdefs.h >>conftest.$ac_ext
7104 cat >>conftest.$ac_ext <<_ACEOF
7105 /* end confdefs.h.  */
7106
7107 /* Override any gcc2 internal prototype to avoid an error.  */
7108 #ifdef __cplusplus
7109 extern "C"
7110 #endif
7111 /* We use char because int might match the return type of a gcc2
7112    builtin and then its argument prototype would still apply.  */
7113 char SSL_library_init ();
7114 int
7115 main ()
7116 {
7117 SSL_library_init ();
7118   ;
7119   return 0;
7120 }
7121 _ACEOF
7122 rm -f conftest.$ac_objext conftest$ac_exeext
7123 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7124   (eval $ac_link) 2>conftest.er1
7125   ac_status=$?
7126   grep -v '^ *+' conftest.er1 >conftest.err
7127   rm -f conftest.er1
7128   cat conftest.err >&5
7129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130   (exit $ac_status); } &&
7131          { ac_try='test -z "$ac_c_werror_flag"
7132                          || test ! -s conftest.err'
7133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7134   (eval $ac_try) 2>&5
7135   ac_status=$?
7136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7137   (exit $ac_status); }; } &&
7138          { ac_try='test -s conftest$ac_exeext'
7139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7140   (eval $ac_try) 2>&5
7141   ac_status=$?
7142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7143   (exit $ac_status); }; }; then
7144   ac_cv_lib_ssl_SSL_library_init=yes
7145 else
7146   echo "$as_me: failed program was:" >&5
7147 sed 's/^/| /' conftest.$ac_ext >&5
7148
7149 ac_cv_lib_ssl_SSL_library_init=no
7150 fi
7151 rm -f conftest.err conftest.$ac_objext \
7152       conftest$ac_exeext conftest.$ac_ext
7153 LIBS=$ac_check_lib_save_LIBS
7154 fi
7155 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7156 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7157 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7158   cat >>confdefs.h <<_ACEOF
7159 #define HAVE_LIBSSL 1
7160 _ACEOF
7161
7162   LIBS="-lssl $LIBS"
7163
7164 else
7165   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7166 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7167    { (exit 1); exit 1; }; }
7168 fi
7169
7170   else
7171
7172 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7173 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7174 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7175   echo $ECHO_N "(cached) $ECHO_C" >&6
7176 else
7177   ac_check_lib_save_LIBS=$LIBS
7178 LIBS="-leay32  $LIBS"
7179 cat >conftest.$ac_ext <<_ACEOF
7180 /* confdefs.h.  */
7181 _ACEOF
7182 cat confdefs.h >>conftest.$ac_ext
7183 cat >>conftest.$ac_ext <<_ACEOF
7184 /* end confdefs.h.  */
7185
7186 /* Override any gcc2 internal prototype to avoid an error.  */
7187 #ifdef __cplusplus
7188 extern "C"
7189 #endif
7190 /* We use char because int might match the return type of a gcc2
7191    builtin and then its argument prototype would still apply.  */
7192 char CRYPTO_new_ex_data ();
7193 int
7194 main ()
7195 {
7196 CRYPTO_new_ex_data ();
7197   ;
7198   return 0;
7199 }
7200 _ACEOF
7201 rm -f conftest.$ac_objext conftest$ac_exeext
7202 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7203   (eval $ac_link) 2>conftest.er1
7204   ac_status=$?
7205   grep -v '^ *+' conftest.er1 >conftest.err
7206   rm -f conftest.er1
7207   cat conftest.err >&5
7208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7209   (exit $ac_status); } &&
7210          { ac_try='test -z "$ac_c_werror_flag"
7211                          || test ! -s conftest.err'
7212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213   (eval $ac_try) 2>&5
7214   ac_status=$?
7215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216   (exit $ac_status); }; } &&
7217          { ac_try='test -s conftest$ac_exeext'
7218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7219   (eval $ac_try) 2>&5
7220   ac_status=$?
7221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7222   (exit $ac_status); }; }; then
7223   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7224 else
7225   echo "$as_me: failed program was:" >&5
7226 sed 's/^/| /' conftest.$ac_ext >&5
7227
7228 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7229 fi
7230 rm -f conftest.err conftest.$ac_objext \
7231       conftest$ac_exeext conftest.$ac_ext
7232 LIBS=$ac_check_lib_save_LIBS
7233 fi
7234 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7235 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7236 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7237   cat >>confdefs.h <<_ACEOF
7238 #define HAVE_LIBEAY32 1
7239 _ACEOF
7240
7241   LIBS="-leay32 $LIBS"
7242
7243 else
7244   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7245 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7246    { (exit 1); exit 1; }; }
7247 fi
7248
7249
7250 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7251 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7252 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7253   echo $ECHO_N "(cached) $ECHO_C" >&6
7254 else
7255   ac_check_lib_save_LIBS=$LIBS
7256 LIBS="-lssleay32  $LIBS"
7257 cat >conftest.$ac_ext <<_ACEOF
7258 /* confdefs.h.  */
7259 _ACEOF
7260 cat confdefs.h >>conftest.$ac_ext
7261 cat >>conftest.$ac_ext <<_ACEOF
7262 /* end confdefs.h.  */
7263
7264 /* Override any gcc2 internal prototype to avoid an error.  */
7265 #ifdef __cplusplus
7266 extern "C"
7267 #endif
7268 /* We use char because int might match the return type of a gcc2
7269    builtin and then its argument prototype would still apply.  */
7270 char SSL_library_init ();
7271 int
7272 main ()
7273 {
7274 SSL_library_init ();
7275   ;
7276   return 0;
7277 }
7278 _ACEOF
7279 rm -f conftest.$ac_objext conftest$ac_exeext
7280 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7281   (eval $ac_link) 2>conftest.er1
7282   ac_status=$?
7283   grep -v '^ *+' conftest.er1 >conftest.err
7284   rm -f conftest.er1
7285   cat conftest.err >&5
7286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7287   (exit $ac_status); } &&
7288          { ac_try='test -z "$ac_c_werror_flag"
7289                          || test ! -s conftest.err'
7290   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7291   (eval $ac_try) 2>&5
7292   ac_status=$?
7293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7294   (exit $ac_status); }; } &&
7295          { ac_try='test -s conftest$ac_exeext'
7296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7297   (eval $ac_try) 2>&5
7298   ac_status=$?
7299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7300   (exit $ac_status); }; }; then
7301   ac_cv_lib_ssleay32_SSL_library_init=yes
7302 else
7303   echo "$as_me: failed program was:" >&5
7304 sed 's/^/| /' conftest.$ac_ext >&5
7305
7306 ac_cv_lib_ssleay32_SSL_library_init=no
7307 fi
7308 rm -f conftest.err conftest.$ac_objext \
7309       conftest$ac_exeext conftest.$ac_ext
7310 LIBS=$ac_check_lib_save_LIBS
7311 fi
7312 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7313 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7314 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7315   cat >>confdefs.h <<_ACEOF
7316 #define HAVE_LIBSSLEAY32 1
7317 _ACEOF
7318
7319   LIBS="-lssleay32 $LIBS"
7320
7321 else
7322   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7323 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7324    { (exit 1); exit 1; }; }
7325 fi
7326
7327   fi
7328 fi
7329
7330 if test "$with_pam" = yes ; then
7331
7332 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7333 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7334 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7335   echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337   ac_check_lib_save_LIBS=$LIBS
7338 LIBS="-lpam  $LIBS"
7339 cat >conftest.$ac_ext <<_ACEOF
7340 /* confdefs.h.  */
7341 _ACEOF
7342 cat confdefs.h >>conftest.$ac_ext
7343 cat >>conftest.$ac_ext <<_ACEOF
7344 /* end confdefs.h.  */
7345
7346 /* Override any gcc2 internal prototype to avoid an error.  */
7347 #ifdef __cplusplus
7348 extern "C"
7349 #endif
7350 /* We use char because int might match the return type of a gcc2
7351    builtin and then its argument prototype would still apply.  */
7352 char pam_start ();
7353 int
7354 main ()
7355 {
7356 pam_start ();
7357   ;
7358   return 0;
7359 }
7360 _ACEOF
7361 rm -f conftest.$ac_objext conftest$ac_exeext
7362 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7363   (eval $ac_link) 2>conftest.er1
7364   ac_status=$?
7365   grep -v '^ *+' conftest.er1 >conftest.err
7366   rm -f conftest.er1
7367   cat conftest.err >&5
7368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369   (exit $ac_status); } &&
7370          { ac_try='test -z "$ac_c_werror_flag"
7371                          || test ! -s conftest.err'
7372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7373   (eval $ac_try) 2>&5
7374   ac_status=$?
7375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7376   (exit $ac_status); }; } &&
7377          { ac_try='test -s conftest$ac_exeext'
7378   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7379   (eval $ac_try) 2>&5
7380   ac_status=$?
7381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7382   (exit $ac_status); }; }; then
7383   ac_cv_lib_pam_pam_start=yes
7384 else
7385   echo "$as_me: failed program was:" >&5
7386 sed 's/^/| /' conftest.$ac_ext >&5
7387
7388 ac_cv_lib_pam_pam_start=no
7389 fi
7390 rm -f conftest.err conftest.$ac_objext \
7391       conftest$ac_exeext conftest.$ac_ext
7392 LIBS=$ac_check_lib_save_LIBS
7393 fi
7394 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7395 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7396 if test $ac_cv_lib_pam_pam_start = yes; then
7397   cat >>confdefs.h <<_ACEOF
7398 #define HAVE_LIBPAM 1
7399 _ACEOF
7400
7401   LIBS="-lpam $LIBS"
7402
7403 else
7404   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7405 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7406    { (exit 1); exit 1; }; }
7407 fi
7408
7409 fi
7410
7411 if test "$with_libxml" = yes ; then
7412
7413 echo "$as_me:$LINENO: checking for xmlSaveToBuffer in -lxml2" >&5
7414 echo $ECHO_N "checking for xmlSaveToBuffer in -lxml2... $ECHO_C" >&6
7415 if test "${ac_cv_lib_xml2_xmlSaveToBuffer+set}" = set; then
7416   echo $ECHO_N "(cached) $ECHO_C" >&6
7417 else
7418   ac_check_lib_save_LIBS=$LIBS
7419 LIBS="-lxml2  $LIBS"
7420 cat >conftest.$ac_ext <<_ACEOF
7421 /* confdefs.h.  */
7422 _ACEOF
7423 cat confdefs.h >>conftest.$ac_ext
7424 cat >>conftest.$ac_ext <<_ACEOF
7425 /* end confdefs.h.  */
7426
7427 /* Override any gcc2 internal prototype to avoid an error.  */
7428 #ifdef __cplusplus
7429 extern "C"
7430 #endif
7431 /* We use char because int might match the return type of a gcc2
7432    builtin and then its argument prototype would still apply.  */
7433 char xmlSaveToBuffer ();
7434 int
7435 main ()
7436 {
7437 xmlSaveToBuffer ();
7438   ;
7439   return 0;
7440 }
7441 _ACEOF
7442 rm -f conftest.$ac_objext conftest$ac_exeext
7443 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7444   (eval $ac_link) 2>conftest.er1
7445   ac_status=$?
7446   grep -v '^ *+' conftest.er1 >conftest.err
7447   rm -f conftest.er1
7448   cat conftest.err >&5
7449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7450   (exit $ac_status); } &&
7451          { ac_try='test -z "$ac_c_werror_flag"
7452                          || test ! -s conftest.err'
7453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7454   (eval $ac_try) 2>&5
7455   ac_status=$?
7456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7457   (exit $ac_status); }; } &&
7458          { ac_try='test -s conftest$ac_exeext'
7459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7460   (eval $ac_try) 2>&5
7461   ac_status=$?
7462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7463   (exit $ac_status); }; }; then
7464   ac_cv_lib_xml2_xmlSaveToBuffer=yes
7465 else
7466   echo "$as_me: failed program was:" >&5
7467 sed 's/^/| /' conftest.$ac_ext >&5
7468
7469 ac_cv_lib_xml2_xmlSaveToBuffer=no
7470 fi
7471 rm -f conftest.err conftest.$ac_objext \
7472       conftest$ac_exeext conftest.$ac_ext
7473 LIBS=$ac_check_lib_save_LIBS
7474 fi
7475 echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
7476 echo "${ECHO_T}$ac_cv_lib_xml2_xmlSaveToBuffer" >&6
7477 if test $ac_cv_lib_xml2_xmlSaveToBuffer = yes; then
7478   cat >>confdefs.h <<_ACEOF
7479 #define HAVE_LIBXML2 1
7480 _ACEOF
7481
7482   LIBS="-lxml2 $LIBS"
7483
7484 else
7485   { { echo "$as_me:$LINENO: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&5
7486 echo "$as_me: error: library 'xml2' (version >= 2.6.23) is required for XML support" >&2;}
7487    { (exit 1); exit 1; }; }
7488 fi
7489
7490 fi
7491
7492
7493 ##
7494 ## Header files
7495 ##
7496
7497 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7498 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7499 if test "${ac_cv_header_stdc+set}" = set; then
7500   echo $ECHO_N "(cached) $ECHO_C" >&6
7501 else
7502   cat >conftest.$ac_ext <<_ACEOF
7503 /* confdefs.h.  */
7504 _ACEOF
7505 cat confdefs.h >>conftest.$ac_ext
7506 cat >>conftest.$ac_ext <<_ACEOF
7507 /* end confdefs.h.  */
7508 #include <stdlib.h>
7509 #include <stdarg.h>
7510 #include <string.h>
7511 #include <float.h>
7512
7513 int
7514 main ()
7515 {
7516
7517   ;
7518   return 0;
7519 }
7520 _ACEOF
7521 rm -f conftest.$ac_objext
7522 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7523   (eval $ac_compile) 2>conftest.er1
7524   ac_status=$?
7525   grep -v '^ *+' conftest.er1 >conftest.err
7526   rm -f conftest.er1
7527   cat conftest.err >&5
7528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529   (exit $ac_status); } &&
7530          { ac_try='test -z "$ac_c_werror_flag"
7531                          || test ! -s conftest.err'
7532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7533   (eval $ac_try) 2>&5
7534   ac_status=$?
7535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7536   (exit $ac_status); }; } &&
7537          { ac_try='test -s conftest.$ac_objext'
7538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7539   (eval $ac_try) 2>&5
7540   ac_status=$?
7541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7542   (exit $ac_status); }; }; then
7543   ac_cv_header_stdc=yes
7544 else
7545   echo "$as_me: failed program was:" >&5
7546 sed 's/^/| /' conftest.$ac_ext >&5
7547
7548 ac_cv_header_stdc=no
7549 fi
7550 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7551
7552 if test $ac_cv_header_stdc = yes; then
7553   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7554   cat >conftest.$ac_ext <<_ACEOF
7555 /* confdefs.h.  */
7556 _ACEOF
7557 cat confdefs.h >>conftest.$ac_ext
7558 cat >>conftest.$ac_ext <<_ACEOF
7559 /* end confdefs.h.  */
7560 #include <string.h>
7561
7562 _ACEOF
7563 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7564   $EGREP "memchr" >/dev/null 2>&1; then
7565   :
7566 else
7567   ac_cv_header_stdc=no
7568 fi
7569 rm -f conftest*
7570
7571 fi
7572
7573 if test $ac_cv_header_stdc = yes; then
7574   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7575   cat >conftest.$ac_ext <<_ACEOF
7576 /* confdefs.h.  */
7577 _ACEOF
7578 cat confdefs.h >>conftest.$ac_ext
7579 cat >>conftest.$ac_ext <<_ACEOF
7580 /* end confdefs.h.  */
7581 #include <stdlib.h>
7582
7583 _ACEOF
7584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7585   $EGREP "free" >/dev/null 2>&1; then
7586   :
7587 else
7588   ac_cv_header_stdc=no
7589 fi
7590 rm -f conftest*
7591
7592 fi
7593
7594 if test $ac_cv_header_stdc = yes; then
7595   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7596   if test "$cross_compiling" = yes; then
7597   :
7598 else
7599   cat >conftest.$ac_ext <<_ACEOF
7600 /* confdefs.h.  */
7601 _ACEOF
7602 cat confdefs.h >>conftest.$ac_ext
7603 cat >>conftest.$ac_ext <<_ACEOF
7604 /* end confdefs.h.  */
7605 #include <ctype.h>
7606 #if ((' ' & 0x0FF) == 0x020)
7607 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7608 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7609 #else
7610 # define ISLOWER(c) \
7611                    (('a' <= (c) && (c) <= 'i') \
7612                      || ('j' <= (c) && (c) <= 'r') \
7613                      || ('s' <= (c) && (c) <= 'z'))
7614 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7615 #endif
7616
7617 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7618 int
7619 main ()
7620 {
7621   int i;
7622   for (i = 0; i < 256; i++)
7623     if (XOR (islower (i), ISLOWER (i))
7624         || toupper (i) != TOUPPER (i))
7625       exit(2);
7626   exit (0);
7627 }
7628 _ACEOF
7629 rm -f conftest$ac_exeext
7630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>&5
7632   ac_status=$?
7633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7636   (eval $ac_try) 2>&5
7637   ac_status=$?
7638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639   (exit $ac_status); }; }; then
7640   :
7641 else
7642   echo "$as_me: program exited with status $ac_status" >&5
7643 echo "$as_me: failed program was:" >&5
7644 sed 's/^/| /' conftest.$ac_ext >&5
7645
7646 ( exit $ac_status )
7647 ac_cv_header_stdc=no
7648 fi
7649 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7650 fi
7651 fi
7652 fi
7653 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7654 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7655 if test $ac_cv_header_stdc = yes; then
7656
7657 cat >>confdefs.h <<\_ACEOF
7658 #define STDC_HEADERS 1
7659 _ACEOF
7660
7661 fi
7662
7663 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7674                   inttypes.h stdint.h unistd.h
7675 do
7676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7677 echo "$as_me:$LINENO: checking for $ac_header" >&5
7678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7680   echo $ECHO_N "(cached) $ECHO_C" >&6
7681 else
7682   cat >conftest.$ac_ext <<_ACEOF
7683 /* confdefs.h.  */
7684 _ACEOF
7685 cat confdefs.h >>conftest.$ac_ext
7686 cat >>conftest.$ac_ext <<_ACEOF
7687 /* end confdefs.h.  */
7688 $ac_includes_default
7689
7690 #include <$ac_header>
7691 _ACEOF
7692 rm -f conftest.$ac_objext
7693 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7694   (eval $ac_compile) 2>conftest.er1
7695   ac_status=$?
7696   grep -v '^ *+' conftest.er1 >conftest.err
7697   rm -f conftest.er1
7698   cat conftest.err >&5
7699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7700   (exit $ac_status); } &&
7701          { ac_try='test -z "$ac_c_werror_flag"
7702                          || test ! -s conftest.err'
7703   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7704   (eval $ac_try) 2>&5
7705   ac_status=$?
7706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7707   (exit $ac_status); }; } &&
7708          { ac_try='test -s conftest.$ac_objext'
7709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7713   (exit $ac_status); }; }; then
7714   eval "$as_ac_Header=yes"
7715 else
7716   echo "$as_me: failed program was:" >&5
7717 sed 's/^/| /' conftest.$ac_ext >&5
7718
7719 eval "$as_ac_Header=no"
7720 fi
7721 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7722 fi
7723 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7724 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7725 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7726   cat >>confdefs.h <<_ACEOF
7727 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7728 _ACEOF
7729
7730 fi
7731
7732 done
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761 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
7762 do
7763 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7765   echo "$as_me:$LINENO: checking for $ac_header" >&5
7766 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7768   echo $ECHO_N "(cached) $ECHO_C" >&6
7769 fi
7770 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7771 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7772 else
7773   # Is the header compilable?
7774 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7775 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7776 cat >conftest.$ac_ext <<_ACEOF
7777 /* confdefs.h.  */
7778 _ACEOF
7779 cat confdefs.h >>conftest.$ac_ext
7780 cat >>conftest.$ac_ext <<_ACEOF
7781 /* end confdefs.h.  */
7782 $ac_includes_default
7783 #include <$ac_header>
7784 _ACEOF
7785 rm -f conftest.$ac_objext
7786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7787   (eval $ac_compile) 2>conftest.er1
7788   ac_status=$?
7789   grep -v '^ *+' conftest.er1 >conftest.err
7790   rm -f conftest.er1
7791   cat conftest.err >&5
7792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793   (exit $ac_status); } &&
7794          { ac_try='test -z "$ac_c_werror_flag"
7795                          || test ! -s conftest.err'
7796   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7797   (eval $ac_try) 2>&5
7798   ac_status=$?
7799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800   (exit $ac_status); }; } &&
7801          { ac_try='test -s conftest.$ac_objext'
7802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7806   (exit $ac_status); }; }; then
7807   ac_header_compiler=yes
7808 else
7809   echo "$as_me: failed program was:" >&5
7810 sed 's/^/| /' conftest.$ac_ext >&5
7811
7812 ac_header_compiler=no
7813 fi
7814 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7815 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7816 echo "${ECHO_T}$ac_header_compiler" >&6
7817
7818 # Is the header present?
7819 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7820 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7821 cat >conftest.$ac_ext <<_ACEOF
7822 /* confdefs.h.  */
7823 _ACEOF
7824 cat confdefs.h >>conftest.$ac_ext
7825 cat >>conftest.$ac_ext <<_ACEOF
7826 /* end confdefs.h.  */
7827 #include <$ac_header>
7828 _ACEOF
7829 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7830   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7831   ac_status=$?
7832   grep -v '^ *+' conftest.er1 >conftest.err
7833   rm -f conftest.er1
7834   cat conftest.err >&5
7835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836   (exit $ac_status); } >/dev/null; then
7837   if test -s conftest.err; then
7838     ac_cpp_err=$ac_c_preproc_warn_flag
7839     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7840   else
7841     ac_cpp_err=
7842   fi
7843 else
7844   ac_cpp_err=yes
7845 fi
7846 if test -z "$ac_cpp_err"; then
7847   ac_header_preproc=yes
7848 else
7849   echo "$as_me: failed program was:" >&5
7850 sed 's/^/| /' conftest.$ac_ext >&5
7851
7852   ac_header_preproc=no
7853 fi
7854 rm -f conftest.err conftest.$ac_ext
7855 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7856 echo "${ECHO_T}$ac_header_preproc" >&6
7857
7858 # So?  What about this header?
7859 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7860   yes:no: )
7861     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7862 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7863     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7864 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7865     ac_header_preproc=yes
7866     ;;
7867   no:yes:* )
7868     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7869 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7870     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7871 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7872     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7873 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7874     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7875 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7876     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7877 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7878     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7879 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7880     (
7881       cat <<\_ASBOX
7882 ## ---------------------------------------- ##
7883 ## Report this to pgsql-bugs@postgresql.org ##
7884 ## ---------------------------------------- ##
7885 _ASBOX
7886     ) |
7887       sed "s/^/$as_me: WARNING:     /" >&2
7888     ;;
7889 esac
7890 echo "$as_me:$LINENO: checking for $ac_header" >&5
7891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7893   echo $ECHO_N "(cached) $ECHO_C" >&6
7894 else
7895   eval "$as_ac_Header=\$ac_header_preproc"
7896 fi
7897 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7898 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7899
7900 fi
7901 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7902   cat >>confdefs.h <<_ACEOF
7903 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7904 _ACEOF
7905
7906 fi
7907
7908 done
7909
7910
7911 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7912 # netinet/in.h is included first.
7913
7914 for ac_header in netinet/in.h
7915 do
7916 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7918   echo "$as_me:$LINENO: checking for $ac_header" >&5
7919 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7920 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7921   echo $ECHO_N "(cached) $ECHO_C" >&6
7922 fi
7923 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7925 else
7926   # Is the header compilable?
7927 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7928 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7929 cat >conftest.$ac_ext <<_ACEOF
7930 /* confdefs.h.  */
7931 _ACEOF
7932 cat confdefs.h >>conftest.$ac_ext
7933 cat >>conftest.$ac_ext <<_ACEOF
7934 /* end confdefs.h.  */
7935 $ac_includes_default
7936 #include <$ac_header>
7937 _ACEOF
7938 rm -f conftest.$ac_objext
7939 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7940   (eval $ac_compile) 2>conftest.er1
7941   ac_status=$?
7942   grep -v '^ *+' conftest.er1 >conftest.err
7943   rm -f conftest.er1
7944   cat conftest.err >&5
7945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7946   (exit $ac_status); } &&
7947          { ac_try='test -z "$ac_c_werror_flag"
7948                          || test ! -s conftest.err'
7949   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7950   (eval $ac_try) 2>&5
7951   ac_status=$?
7952   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953   (exit $ac_status); }; } &&
7954          { ac_try='test -s conftest.$ac_objext'
7955   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7956   (eval $ac_try) 2>&5
7957   ac_status=$?
7958   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959   (exit $ac_status); }; }; then
7960   ac_header_compiler=yes
7961 else
7962   echo "$as_me: failed program was:" >&5
7963 sed 's/^/| /' conftest.$ac_ext >&5
7964
7965 ac_header_compiler=no
7966 fi
7967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7968 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7969 echo "${ECHO_T}$ac_header_compiler" >&6
7970
7971 # Is the header present?
7972 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7973 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7974 cat >conftest.$ac_ext <<_ACEOF
7975 /* confdefs.h.  */
7976 _ACEOF
7977 cat confdefs.h >>conftest.$ac_ext
7978 cat >>conftest.$ac_ext <<_ACEOF
7979 /* end confdefs.h.  */
7980 #include <$ac_header>
7981 _ACEOF
7982 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7983   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7984   ac_status=$?
7985   grep -v '^ *+' conftest.er1 >conftest.err
7986   rm -f conftest.er1
7987   cat conftest.err >&5
7988   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7989   (exit $ac_status); } >/dev/null; then
7990   if test -s conftest.err; then
7991     ac_cpp_err=$ac_c_preproc_warn_flag
7992     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
7993   else
7994     ac_cpp_err=
7995   fi
7996 else
7997   ac_cpp_err=yes
7998 fi
7999 if test -z "$ac_cpp_err"; then
8000   ac_header_preproc=yes
8001 else
8002   echo "$as_me: failed program was:" >&5
8003 sed 's/^/| /' conftest.$ac_ext >&5
8004
8005   ac_header_preproc=no
8006 fi
8007 rm -f conftest.err conftest.$ac_ext
8008 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8009 echo "${ECHO_T}$ac_header_preproc" >&6
8010
8011 # So?  What about this header?
8012 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8013   yes:no: )
8014     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8015 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8016     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8017 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8018     ac_header_preproc=yes
8019     ;;
8020   no:yes:* )
8021     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8022 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8023     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8024 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8025     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8026 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8027     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8028 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8029     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8030 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8031     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8032 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8033     (
8034       cat <<\_ASBOX
8035 ## ---------------------------------------- ##
8036 ## Report this to pgsql-bugs@postgresql.org ##
8037 ## ---------------------------------------- ##
8038 _ASBOX
8039     ) |
8040       sed "s/^/$as_me: WARNING:     /" >&2
8041     ;;
8042 esac
8043 echo "$as_me:$LINENO: checking for $ac_header" >&5
8044 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8045 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8046   echo $ECHO_N "(cached) $ECHO_C" >&6
8047 else
8048   eval "$as_ac_Header=\$ac_header_preproc"
8049 fi
8050 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8051 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8052
8053 fi
8054 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8055   cat >>confdefs.h <<_ACEOF
8056 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8057 _ACEOF
8058
8059 fi
8060
8061 done
8062
8063
8064 for ac_header in netinet/tcp.h
8065 do
8066 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8067 echo "$as_me:$LINENO: checking for $ac_header" >&5
8068 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8069 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8070   echo $ECHO_N "(cached) $ECHO_C" >&6
8071 else
8072   cat >conftest.$ac_ext <<_ACEOF
8073 /* confdefs.h.  */
8074 _ACEOF
8075 cat confdefs.h >>conftest.$ac_ext
8076 cat >>conftest.$ac_ext <<_ACEOF
8077 /* end confdefs.h.  */
8078 $ac_includes_default
8079 #ifdef HAVE_NETINET_IN_H
8080 #include <netinet/in.h>
8081 #endif
8082
8083
8084 #include <$ac_header>
8085 _ACEOF
8086 rm -f conftest.$ac_objext
8087 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8088   (eval $ac_compile) 2>conftest.er1
8089   ac_status=$?
8090   grep -v '^ *+' conftest.er1 >conftest.err
8091   rm -f conftest.er1
8092   cat conftest.err >&5
8093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8094   (exit $ac_status); } &&
8095          { ac_try='test -z "$ac_c_werror_flag"
8096                          || test ! -s conftest.err'
8097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8098   (eval $ac_try) 2>&5
8099   ac_status=$?
8100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101   (exit $ac_status); }; } &&
8102          { ac_try='test -s conftest.$ac_objext'
8103   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8104   (eval $ac_try) 2>&5
8105   ac_status=$?
8106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8107   (exit $ac_status); }; }; then
8108   eval "$as_ac_Header=yes"
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 sed 's/^/| /' conftest.$ac_ext >&5
8112
8113 eval "$as_ac_Header=no"
8114 fi
8115 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8116 fi
8117 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8118 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8119 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8120   cat >>confdefs.h <<_ACEOF
8121 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8122 _ACEOF
8123
8124 fi
8125
8126 done
8127
8128
8129 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8130
8131 for ac_header in readline/readline.h
8132 do
8133 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8134 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8135   echo "$as_me:$LINENO: checking for $ac_header" >&5
8136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8138   echo $ECHO_N "(cached) $ECHO_C" >&6
8139 fi
8140 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8142 else
8143   # Is the header compilable?
8144 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8145 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8146 cat >conftest.$ac_ext <<_ACEOF
8147 /* confdefs.h.  */
8148 _ACEOF
8149 cat confdefs.h >>conftest.$ac_ext
8150 cat >>conftest.$ac_ext <<_ACEOF
8151 /* end confdefs.h.  */
8152 $ac_includes_default
8153 #include <$ac_header>
8154 _ACEOF
8155 rm -f conftest.$ac_objext
8156 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8157   (eval $ac_compile) 2>conftest.er1
8158   ac_status=$?
8159   grep -v '^ *+' conftest.er1 >conftest.err
8160   rm -f conftest.er1
8161   cat conftest.err >&5
8162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8163   (exit $ac_status); } &&
8164          { ac_try='test -z "$ac_c_werror_flag"
8165                          || test ! -s conftest.err'
8166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8167   (eval $ac_try) 2>&5
8168   ac_status=$?
8169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170   (exit $ac_status); }; } &&
8171          { ac_try='test -s conftest.$ac_objext'
8172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8173   (eval $ac_try) 2>&5
8174   ac_status=$?
8175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176   (exit $ac_status); }; }; then
8177   ac_header_compiler=yes
8178 else
8179   echo "$as_me: failed program was:" >&5
8180 sed 's/^/| /' conftest.$ac_ext >&5
8181
8182 ac_header_compiler=no
8183 fi
8184 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8185 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8186 echo "${ECHO_T}$ac_header_compiler" >&6
8187
8188 # Is the header present?
8189 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8190 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8191 cat >conftest.$ac_ext <<_ACEOF
8192 /* confdefs.h.  */
8193 _ACEOF
8194 cat confdefs.h >>conftest.$ac_ext
8195 cat >>conftest.$ac_ext <<_ACEOF
8196 /* end confdefs.h.  */
8197 #include <$ac_header>
8198 _ACEOF
8199 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8201   ac_status=$?
8202   grep -v '^ *+' conftest.er1 >conftest.err
8203   rm -f conftest.er1
8204   cat conftest.err >&5
8205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8206   (exit $ac_status); } >/dev/null; then
8207   if test -s conftest.err; then
8208     ac_cpp_err=$ac_c_preproc_warn_flag
8209     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8210   else
8211     ac_cpp_err=
8212   fi
8213 else
8214   ac_cpp_err=yes
8215 fi
8216 if test -z "$ac_cpp_err"; then
8217   ac_header_preproc=yes
8218 else
8219   echo "$as_me: failed program was:" >&5
8220 sed 's/^/| /' conftest.$ac_ext >&5
8221
8222   ac_header_preproc=no
8223 fi
8224 rm -f conftest.err conftest.$ac_ext
8225 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8226 echo "${ECHO_T}$ac_header_preproc" >&6
8227
8228 # So?  What about this header?
8229 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8230   yes:no: )
8231     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8232 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8233     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8234 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8235     ac_header_preproc=yes
8236     ;;
8237   no:yes:* )
8238     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8239 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8240     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8241 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8242     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8243 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8244     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8245 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8246     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8247 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8248     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8249 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8250     (
8251       cat <<\_ASBOX
8252 ## ---------------------------------------- ##
8253 ## Report this to pgsql-bugs@postgresql.org ##
8254 ## ---------------------------------------- ##
8255 _ASBOX
8256     ) |
8257       sed "s/^/$as_me: WARNING:     /" >&2
8258     ;;
8259 esac
8260 echo "$as_me:$LINENO: checking for $ac_header" >&5
8261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8263   echo $ECHO_N "(cached) $ECHO_C" >&6
8264 else
8265   eval "$as_ac_Header=\$ac_header_preproc"
8266 fi
8267 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8268 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8269
8270 fi
8271 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8272   cat >>confdefs.h <<_ACEOF
8273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8274 _ACEOF
8275
8276 else
8277
8278 for ac_header in readline.h
8279 do
8280 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8281 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8282   echo "$as_me:$LINENO: checking for $ac_header" >&5
8283 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8284 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8285   echo $ECHO_N "(cached) $ECHO_C" >&6
8286 fi
8287 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8288 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8289 else
8290   # Is the header compilable?
8291 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8292 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8293 cat >conftest.$ac_ext <<_ACEOF
8294 /* confdefs.h.  */
8295 _ACEOF
8296 cat confdefs.h >>conftest.$ac_ext
8297 cat >>conftest.$ac_ext <<_ACEOF
8298 /* end confdefs.h.  */
8299 $ac_includes_default
8300 #include <$ac_header>
8301 _ACEOF
8302 rm -f conftest.$ac_objext
8303 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8304   (eval $ac_compile) 2>conftest.er1
8305   ac_status=$?
8306   grep -v '^ *+' conftest.er1 >conftest.err
8307   rm -f conftest.er1
8308   cat conftest.err >&5
8309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8310   (exit $ac_status); } &&
8311          { ac_try='test -z "$ac_c_werror_flag"
8312                          || test ! -s conftest.err'
8313   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317   (exit $ac_status); }; } &&
8318          { ac_try='test -s conftest.$ac_objext'
8319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320   (eval $ac_try) 2>&5
8321   ac_status=$?
8322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323   (exit $ac_status); }; }; then
8324   ac_header_compiler=yes
8325 else
8326   echo "$as_me: failed program was:" >&5
8327 sed 's/^/| /' conftest.$ac_ext >&5
8328
8329 ac_header_compiler=no
8330 fi
8331 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8332 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8333 echo "${ECHO_T}$ac_header_compiler" >&6
8334
8335 # Is the header present?
8336 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8337 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8338 cat >conftest.$ac_ext <<_ACEOF
8339 /* confdefs.h.  */
8340 _ACEOF
8341 cat confdefs.h >>conftest.$ac_ext
8342 cat >>conftest.$ac_ext <<_ACEOF
8343 /* end confdefs.h.  */
8344 #include <$ac_header>
8345 _ACEOF
8346 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8347   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8348   ac_status=$?
8349   grep -v '^ *+' conftest.er1 >conftest.err
8350   rm -f conftest.er1
8351   cat conftest.err >&5
8352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8353   (exit $ac_status); } >/dev/null; then
8354   if test -s conftest.err; then
8355     ac_cpp_err=$ac_c_preproc_warn_flag
8356     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8357   else
8358     ac_cpp_err=
8359   fi
8360 else
8361   ac_cpp_err=yes
8362 fi
8363 if test -z "$ac_cpp_err"; then
8364   ac_header_preproc=yes
8365 else
8366   echo "$as_me: failed program was:" >&5
8367 sed 's/^/| /' conftest.$ac_ext >&5
8368
8369   ac_header_preproc=no
8370 fi
8371 rm -f conftest.err conftest.$ac_ext
8372 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8373 echo "${ECHO_T}$ac_header_preproc" >&6
8374
8375 # So?  What about this header?
8376 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8377   yes:no: )
8378     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8379 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8380     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8381 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8382     ac_header_preproc=yes
8383     ;;
8384   no:yes:* )
8385     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8386 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8387     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8388 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8389     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8390 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8391     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8392 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8393     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8394 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8395     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8396 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8397     (
8398       cat <<\_ASBOX
8399 ## ---------------------------------------- ##
8400 ## Report this to pgsql-bugs@postgresql.org ##
8401 ## ---------------------------------------- ##
8402 _ASBOX
8403     ) |
8404       sed "s/^/$as_me: WARNING:     /" >&2
8405     ;;
8406 esac
8407 echo "$as_me:$LINENO: checking for $ac_header" >&5
8408 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8409 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8410   echo $ECHO_N "(cached) $ECHO_C" >&6
8411 else
8412   eval "$as_ac_Header=\$ac_header_preproc"
8413 fi
8414 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8416
8417 fi
8418 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8419   cat >>confdefs.h <<_ACEOF
8420 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8421 _ACEOF
8422
8423 else
8424   { { echo "$as_me:$LINENO: error: readline header not found
8425 If you have readline already installed, see config.log for details on the
8426 failure.  It is possible the compiler isn't looking in the proper directory.
8427 Use --without-readline to disable readline support." >&5
8428 echo "$as_me: error: readline header not found
8429 If you have readline already installed, see config.log for details on the
8430 failure.  It is possible the compiler isn't looking in the proper directory.
8431 Use --without-readline to disable readline support." >&2;}
8432    { (exit 1); exit 1; }; }
8433 fi
8434
8435 done
8436
8437 fi
8438
8439 done
8440
8441
8442 for ac_header in readline/history.h
8443 do
8444 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8445 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8446   echo "$as_me:$LINENO: checking for $ac_header" >&5
8447 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8449   echo $ECHO_N "(cached) $ECHO_C" >&6
8450 fi
8451 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8452 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8453 else
8454   # Is the header compilable?
8455 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8456 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8457 cat >conftest.$ac_ext <<_ACEOF
8458 /* confdefs.h.  */
8459 _ACEOF
8460 cat confdefs.h >>conftest.$ac_ext
8461 cat >>conftest.$ac_ext <<_ACEOF
8462 /* end confdefs.h.  */
8463 $ac_includes_default
8464 #include <$ac_header>
8465 _ACEOF
8466 rm -f conftest.$ac_objext
8467 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8468   (eval $ac_compile) 2>conftest.er1
8469   ac_status=$?
8470   grep -v '^ *+' conftest.er1 >conftest.err
8471   rm -f conftest.er1
8472   cat conftest.err >&5
8473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8474   (exit $ac_status); } &&
8475          { ac_try='test -z "$ac_c_werror_flag"
8476                          || test ! -s conftest.err'
8477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8478   (eval $ac_try) 2>&5
8479   ac_status=$?
8480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481   (exit $ac_status); }; } &&
8482          { ac_try='test -s conftest.$ac_objext'
8483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8484   (eval $ac_try) 2>&5
8485   ac_status=$?
8486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8487   (exit $ac_status); }; }; then
8488   ac_header_compiler=yes
8489 else
8490   echo "$as_me: failed program was:" >&5
8491 sed 's/^/| /' conftest.$ac_ext >&5
8492
8493 ac_header_compiler=no
8494 fi
8495 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8496 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8497 echo "${ECHO_T}$ac_header_compiler" >&6
8498
8499 # Is the header present?
8500 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8501 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8502 cat >conftest.$ac_ext <<_ACEOF
8503 /* confdefs.h.  */
8504 _ACEOF
8505 cat confdefs.h >>conftest.$ac_ext
8506 cat >>conftest.$ac_ext <<_ACEOF
8507 /* end confdefs.h.  */
8508 #include <$ac_header>
8509 _ACEOF
8510 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8511   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8512   ac_status=$?
8513   grep -v '^ *+' conftest.er1 >conftest.err
8514   rm -f conftest.er1
8515   cat conftest.err >&5
8516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8517   (exit $ac_status); } >/dev/null; then
8518   if test -s conftest.err; then
8519     ac_cpp_err=$ac_c_preproc_warn_flag
8520     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8521   else
8522     ac_cpp_err=
8523   fi
8524 else
8525   ac_cpp_err=yes
8526 fi
8527 if test -z "$ac_cpp_err"; then
8528   ac_header_preproc=yes
8529 else
8530   echo "$as_me: failed program was:" >&5
8531 sed 's/^/| /' conftest.$ac_ext >&5
8532
8533   ac_header_preproc=no
8534 fi
8535 rm -f conftest.err conftest.$ac_ext
8536 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8537 echo "${ECHO_T}$ac_header_preproc" >&6
8538
8539 # So?  What about this header?
8540 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8541   yes:no: )
8542     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8543 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8544     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8545 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8546     ac_header_preproc=yes
8547     ;;
8548   no:yes:* )
8549     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8550 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8551     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8552 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8553     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8554 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8555     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8556 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8557     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8558 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8559     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8560 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8561     (
8562       cat <<\_ASBOX
8563 ## ---------------------------------------- ##
8564 ## Report this to pgsql-bugs@postgresql.org ##
8565 ## ---------------------------------------- ##
8566 _ASBOX
8567     ) |
8568       sed "s/^/$as_me: WARNING:     /" >&2
8569     ;;
8570 esac
8571 echo "$as_me:$LINENO: checking for $ac_header" >&5
8572 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8573 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8574   echo $ECHO_N "(cached) $ECHO_C" >&6
8575 else
8576   eval "$as_ac_Header=\$ac_header_preproc"
8577 fi
8578 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8579 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8580
8581 fi
8582 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8583   cat >>confdefs.h <<_ACEOF
8584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8585 _ACEOF
8586
8587 else
8588
8589 for ac_header in history.h
8590 do
8591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8592 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8593   echo "$as_me:$LINENO: checking for $ac_header" >&5
8594 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8596   echo $ECHO_N "(cached) $ECHO_C" >&6
8597 fi
8598 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8599 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8600 else
8601   # Is the header compilable?
8602 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8603 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8604 cat >conftest.$ac_ext <<_ACEOF
8605 /* confdefs.h.  */
8606 _ACEOF
8607 cat confdefs.h >>conftest.$ac_ext
8608 cat >>conftest.$ac_ext <<_ACEOF
8609 /* end confdefs.h.  */
8610 $ac_includes_default
8611 #include <$ac_header>
8612 _ACEOF
8613 rm -f conftest.$ac_objext
8614 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8615   (eval $ac_compile) 2>conftest.er1
8616   ac_status=$?
8617   grep -v '^ *+' conftest.er1 >conftest.err
8618   rm -f conftest.er1
8619   cat conftest.err >&5
8620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -z "$ac_c_werror_flag"
8623                          || test ! -s conftest.err'
8624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8625   (eval $ac_try) 2>&5
8626   ac_status=$?
8627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8628   (exit $ac_status); }; } &&
8629          { ac_try='test -s conftest.$ac_objext'
8630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8631   (eval $ac_try) 2>&5
8632   ac_status=$?
8633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8634   (exit $ac_status); }; }; then
8635   ac_header_compiler=yes
8636 else
8637   echo "$as_me: failed program was:" >&5
8638 sed 's/^/| /' conftest.$ac_ext >&5
8639
8640 ac_header_compiler=no
8641 fi
8642 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8643 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8644 echo "${ECHO_T}$ac_header_compiler" >&6
8645
8646 # Is the header present?
8647 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8648 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8649 cat >conftest.$ac_ext <<_ACEOF
8650 /* confdefs.h.  */
8651 _ACEOF
8652 cat confdefs.h >>conftest.$ac_ext
8653 cat >>conftest.$ac_ext <<_ACEOF
8654 /* end confdefs.h.  */
8655 #include <$ac_header>
8656 _ACEOF
8657 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8658   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8659   ac_status=$?
8660   grep -v '^ *+' conftest.er1 >conftest.err
8661   rm -f conftest.er1
8662   cat conftest.err >&5
8663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8664   (exit $ac_status); } >/dev/null; then
8665   if test -s conftest.err; then
8666     ac_cpp_err=$ac_c_preproc_warn_flag
8667     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8668   else
8669     ac_cpp_err=
8670   fi
8671 else
8672   ac_cpp_err=yes
8673 fi
8674 if test -z "$ac_cpp_err"; then
8675   ac_header_preproc=yes
8676 else
8677   echo "$as_me: failed program was:" >&5
8678 sed 's/^/| /' conftest.$ac_ext >&5
8679
8680   ac_header_preproc=no
8681 fi
8682 rm -f conftest.err conftest.$ac_ext
8683 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8684 echo "${ECHO_T}$ac_header_preproc" >&6
8685
8686 # So?  What about this header?
8687 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8688   yes:no: )
8689     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8690 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8691     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8692 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8693     ac_header_preproc=yes
8694     ;;
8695   no:yes:* )
8696     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8697 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8698     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8699 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8700     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8701 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8702     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8703 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8704     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8705 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8706     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8707 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8708     (
8709       cat <<\_ASBOX
8710 ## ---------------------------------------- ##
8711 ## Report this to pgsql-bugs@postgresql.org ##
8712 ## ---------------------------------------- ##
8713 _ASBOX
8714     ) |
8715       sed "s/^/$as_me: WARNING:     /" >&2
8716     ;;
8717 esac
8718 echo "$as_me:$LINENO: checking for $ac_header" >&5
8719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8721   echo $ECHO_N "(cached) $ECHO_C" >&6
8722 else
8723   eval "$as_ac_Header=\$ac_header_preproc"
8724 fi
8725 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8726 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8727
8728 fi
8729 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8730   cat >>confdefs.h <<_ACEOF
8731 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8732 _ACEOF
8733
8734 else
8735   { { echo "$as_me:$LINENO: error: history header not found
8736 If you have readline already installed, see config.log for details on the
8737 failure.  It is possible the compiler isn't looking in the proper directory.
8738 Use --without-readline to disable readline support." >&5
8739 echo "$as_me: error: history header not found
8740 If you have readline already installed, see config.log for details on the
8741 failure.  It is possible the compiler isn't looking in the proper directory.
8742 Use --without-readline to disable readline support." >&2;}
8743    { (exit 1); exit 1; }; }
8744 fi
8745
8746 done
8747
8748 fi
8749
8750 done
8751
8752 fi
8753
8754 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8755 # Some installations of libedit usurp /usr/include/readline/, which seems
8756 # bad practice, since in combined installations readline will have its headers
8757 # there.  We might have to resort to AC_EGREP checks to make sure we found
8758 # the proper header...
8759
8760 for ac_header in editline/readline.h
8761 do
8762 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8764   echo "$as_me:$LINENO: checking for $ac_header" >&5
8765 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8766 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8767   echo $ECHO_N "(cached) $ECHO_C" >&6
8768 fi
8769 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8770 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8771 else
8772   # Is the header compilable?
8773 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8774 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8775 cat >conftest.$ac_ext <<_ACEOF
8776 /* confdefs.h.  */
8777 _ACEOF
8778 cat confdefs.h >>conftest.$ac_ext
8779 cat >>conftest.$ac_ext <<_ACEOF
8780 /* end confdefs.h.  */
8781 $ac_includes_default
8782 #include <$ac_header>
8783 _ACEOF
8784 rm -f conftest.$ac_objext
8785 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8786   (eval $ac_compile) 2>conftest.er1
8787   ac_status=$?
8788   grep -v '^ *+' conftest.er1 >conftest.err
8789   rm -f conftest.er1
8790   cat conftest.err >&5
8791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792   (exit $ac_status); } &&
8793          { ac_try='test -z "$ac_c_werror_flag"
8794                          || test ! -s conftest.err'
8795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8796   (eval $ac_try) 2>&5
8797   ac_status=$?
8798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8799   (exit $ac_status); }; } &&
8800          { ac_try='test -s conftest.$ac_objext'
8801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8802   (eval $ac_try) 2>&5
8803   ac_status=$?
8804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8805   (exit $ac_status); }; }; then
8806   ac_header_compiler=yes
8807 else
8808   echo "$as_me: failed program was:" >&5
8809 sed 's/^/| /' conftest.$ac_ext >&5
8810
8811 ac_header_compiler=no
8812 fi
8813 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8814 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8815 echo "${ECHO_T}$ac_header_compiler" >&6
8816
8817 # Is the header present?
8818 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8819 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8820 cat >conftest.$ac_ext <<_ACEOF
8821 /* confdefs.h.  */
8822 _ACEOF
8823 cat confdefs.h >>conftest.$ac_ext
8824 cat >>conftest.$ac_ext <<_ACEOF
8825 /* end confdefs.h.  */
8826 #include <$ac_header>
8827 _ACEOF
8828 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8830   ac_status=$?
8831   grep -v '^ *+' conftest.er1 >conftest.err
8832   rm -f conftest.er1
8833   cat conftest.err >&5
8834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8835   (exit $ac_status); } >/dev/null; then
8836   if test -s conftest.err; then
8837     ac_cpp_err=$ac_c_preproc_warn_flag
8838     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8839   else
8840     ac_cpp_err=
8841   fi
8842 else
8843   ac_cpp_err=yes
8844 fi
8845 if test -z "$ac_cpp_err"; then
8846   ac_header_preproc=yes
8847 else
8848   echo "$as_me: failed program was:" >&5
8849 sed 's/^/| /' conftest.$ac_ext >&5
8850
8851   ac_header_preproc=no
8852 fi
8853 rm -f conftest.err conftest.$ac_ext
8854 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8855 echo "${ECHO_T}$ac_header_preproc" >&6
8856
8857 # So?  What about this header?
8858 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8859   yes:no: )
8860     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8861 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8862     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8863 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8864     ac_header_preproc=yes
8865     ;;
8866   no:yes:* )
8867     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8868 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8869     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8870 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8871     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8872 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8873     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8874 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8875     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8876 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8877     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8878 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8879     (
8880       cat <<\_ASBOX
8881 ## ---------------------------------------- ##
8882 ## Report this to pgsql-bugs@postgresql.org ##
8883 ## ---------------------------------------- ##
8884 _ASBOX
8885     ) |
8886       sed "s/^/$as_me: WARNING:     /" >&2
8887     ;;
8888 esac
8889 echo "$as_me:$LINENO: checking for $ac_header" >&5
8890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8891 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 else
8894   eval "$as_ac_Header=\$ac_header_preproc"
8895 fi
8896 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8897 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8898
8899 fi
8900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8901   cat >>confdefs.h <<_ACEOF
8902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8903 _ACEOF
8904
8905 else
8906
8907 for ac_header in readline.h
8908 do
8909 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8911   echo "$as_me:$LINENO: checking for $ac_header" >&5
8912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8914   echo $ECHO_N "(cached) $ECHO_C" >&6
8915 fi
8916 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8918 else
8919   # Is the header compilable?
8920 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8921 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8922 cat >conftest.$ac_ext <<_ACEOF
8923 /* confdefs.h.  */
8924 _ACEOF
8925 cat confdefs.h >>conftest.$ac_ext
8926 cat >>conftest.$ac_ext <<_ACEOF
8927 /* end confdefs.h.  */
8928 $ac_includes_default
8929 #include <$ac_header>
8930 _ACEOF
8931 rm -f conftest.$ac_objext
8932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8933   (eval $ac_compile) 2>conftest.er1
8934   ac_status=$?
8935   grep -v '^ *+' conftest.er1 >conftest.err
8936   rm -f conftest.er1
8937   cat conftest.err >&5
8938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8939   (exit $ac_status); } &&
8940          { ac_try='test -z "$ac_c_werror_flag"
8941                          || test ! -s conftest.err'
8942   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8943   (eval $ac_try) 2>&5
8944   ac_status=$?
8945   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8946   (exit $ac_status); }; } &&
8947          { ac_try='test -s conftest.$ac_objext'
8948   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8949   (eval $ac_try) 2>&5
8950   ac_status=$?
8951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8952   (exit $ac_status); }; }; then
8953   ac_header_compiler=yes
8954 else
8955   echo "$as_me: failed program was:" >&5
8956 sed 's/^/| /' conftest.$ac_ext >&5
8957
8958 ac_header_compiler=no
8959 fi
8960 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8961 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8962 echo "${ECHO_T}$ac_header_compiler" >&6
8963
8964 # Is the header present?
8965 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8966 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8967 cat >conftest.$ac_ext <<_ACEOF
8968 /* confdefs.h.  */
8969 _ACEOF
8970 cat confdefs.h >>conftest.$ac_ext
8971 cat >>conftest.$ac_ext <<_ACEOF
8972 /* end confdefs.h.  */
8973 #include <$ac_header>
8974 _ACEOF
8975 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8977   ac_status=$?
8978   grep -v '^ *+' conftest.er1 >conftest.err
8979   rm -f conftest.er1
8980   cat conftest.err >&5
8981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8982   (exit $ac_status); } >/dev/null; then
8983   if test -s conftest.err; then
8984     ac_cpp_err=$ac_c_preproc_warn_flag
8985     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8986   else
8987     ac_cpp_err=
8988   fi
8989 else
8990   ac_cpp_err=yes
8991 fi
8992 if test -z "$ac_cpp_err"; then
8993   ac_header_preproc=yes
8994 else
8995   echo "$as_me: failed program was:" >&5
8996 sed 's/^/| /' conftest.$ac_ext >&5
8997
8998   ac_header_preproc=no
8999 fi
9000 rm -f conftest.err conftest.$ac_ext
9001 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9002 echo "${ECHO_T}$ac_header_preproc" >&6
9003
9004 # So?  What about this header?
9005 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9006   yes:no: )
9007     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9008 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9009     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9010 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9011     ac_header_preproc=yes
9012     ;;
9013   no:yes:* )
9014     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9015 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9016     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9017 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9018     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9019 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9020     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9021 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9022     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9023 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9024     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9025 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9026     (
9027       cat <<\_ASBOX
9028 ## ---------------------------------------- ##
9029 ## Report this to pgsql-bugs@postgresql.org ##
9030 ## ---------------------------------------- ##
9031 _ASBOX
9032     ) |
9033       sed "s/^/$as_me: WARNING:     /" >&2
9034     ;;
9035 esac
9036 echo "$as_me:$LINENO: checking for $ac_header" >&5
9037 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9038 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9039   echo $ECHO_N "(cached) $ECHO_C" >&6
9040 else
9041   eval "$as_ac_Header=\$ac_header_preproc"
9042 fi
9043 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9044 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9045
9046 fi
9047 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9048   cat >>confdefs.h <<_ACEOF
9049 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9050 _ACEOF
9051
9052 else
9053
9054 for ac_header in readline/readline.h
9055 do
9056 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9058   echo "$as_me:$LINENO: checking for $ac_header" >&5
9059 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9060 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9061   echo $ECHO_N "(cached) $ECHO_C" >&6
9062 fi
9063 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9064 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9065 else
9066   # Is the header compilable?
9067 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9068 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9069 cat >conftest.$ac_ext <<_ACEOF
9070 /* confdefs.h.  */
9071 _ACEOF
9072 cat confdefs.h >>conftest.$ac_ext
9073 cat >>conftest.$ac_ext <<_ACEOF
9074 /* end confdefs.h.  */
9075 $ac_includes_default
9076 #include <$ac_header>
9077 _ACEOF
9078 rm -f conftest.$ac_objext
9079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9080   (eval $ac_compile) 2>conftest.er1
9081   ac_status=$?
9082   grep -v '^ *+' conftest.er1 >conftest.err
9083   rm -f conftest.er1
9084   cat conftest.err >&5
9085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -z "$ac_c_werror_flag"
9088                          || test ! -s conftest.err'
9089   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9090   (eval $ac_try) 2>&5
9091   ac_status=$?
9092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093   (exit $ac_status); }; } &&
9094          { ac_try='test -s conftest.$ac_objext'
9095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9096   (eval $ac_try) 2>&5
9097   ac_status=$?
9098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099   (exit $ac_status); }; }; then
9100   ac_header_compiler=yes
9101 else
9102   echo "$as_me: failed program was:" >&5
9103 sed 's/^/| /' conftest.$ac_ext >&5
9104
9105 ac_header_compiler=no
9106 fi
9107 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9108 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9109 echo "${ECHO_T}$ac_header_compiler" >&6
9110
9111 # Is the header present?
9112 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9113 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9114 cat >conftest.$ac_ext <<_ACEOF
9115 /* confdefs.h.  */
9116 _ACEOF
9117 cat confdefs.h >>conftest.$ac_ext
9118 cat >>conftest.$ac_ext <<_ACEOF
9119 /* end confdefs.h.  */
9120 #include <$ac_header>
9121 _ACEOF
9122 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9123   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9124   ac_status=$?
9125   grep -v '^ *+' conftest.er1 >conftest.err
9126   rm -f conftest.er1
9127   cat conftest.err >&5
9128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9129   (exit $ac_status); } >/dev/null; then
9130   if test -s conftest.err; then
9131     ac_cpp_err=$ac_c_preproc_warn_flag
9132     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9133   else
9134     ac_cpp_err=
9135   fi
9136 else
9137   ac_cpp_err=yes
9138 fi
9139 if test -z "$ac_cpp_err"; then
9140   ac_header_preproc=yes
9141 else
9142   echo "$as_me: failed program was:" >&5
9143 sed 's/^/| /' conftest.$ac_ext >&5
9144
9145   ac_header_preproc=no
9146 fi
9147 rm -f conftest.err conftest.$ac_ext
9148 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9149 echo "${ECHO_T}$ac_header_preproc" >&6
9150
9151 # So?  What about this header?
9152 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9153   yes:no: )
9154     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9155 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9156     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9157 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9158     ac_header_preproc=yes
9159     ;;
9160   no:yes:* )
9161     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9162 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9163     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9164 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9165     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9166 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9167     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9168 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9169     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9170 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9171     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9172 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9173     (
9174       cat <<\_ASBOX
9175 ## ---------------------------------------- ##
9176 ## Report this to pgsql-bugs@postgresql.org ##
9177 ## ---------------------------------------- ##
9178 _ASBOX
9179     ) |
9180       sed "s/^/$as_me: WARNING:     /" >&2
9181     ;;
9182 esac
9183 echo "$as_me:$LINENO: checking for $ac_header" >&5
9184 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9185 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9186   echo $ECHO_N "(cached) $ECHO_C" >&6
9187 else
9188   eval "$as_ac_Header=\$ac_header_preproc"
9189 fi
9190 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9191 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9192
9193 fi
9194 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9195   cat >>confdefs.h <<_ACEOF
9196 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9197 _ACEOF
9198
9199 else
9200   { { echo "$as_me:$LINENO: error: readline header not found
9201 If you have libedit already installed, see config.log for details on the
9202 failure.  It is possible the compiler isn't looking in the proper directory.
9203 Use --without-readline to disable libedit support." >&5
9204 echo "$as_me: error: readline header not found
9205 If you have libedit already installed, see config.log for details on the
9206 failure.  It is possible the compiler isn't looking in the proper directory.
9207 Use --without-readline to disable libedit support." >&2;}
9208    { (exit 1); exit 1; }; }
9209 fi
9210
9211 done
9212
9213 fi
9214
9215 done
9216
9217 fi
9218
9219 done
9220
9221 # Note: in a libedit installation, history.h is sometimes a dummy, and may
9222 # not be there at all.  Hence, don't complain if not found.  We must check
9223 # though, since in yet other versions it is an independent header.
9224
9225 for ac_header in editline/history.h
9226 do
9227 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9228 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9229   echo "$as_me:$LINENO: checking for $ac_header" >&5
9230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9232   echo $ECHO_N "(cached) $ECHO_C" >&6
9233 fi
9234 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9235 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9236 else
9237   # Is the header compilable?
9238 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9239 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9240 cat >conftest.$ac_ext <<_ACEOF
9241 /* confdefs.h.  */
9242 _ACEOF
9243 cat confdefs.h >>conftest.$ac_ext
9244 cat >>conftest.$ac_ext <<_ACEOF
9245 /* end confdefs.h.  */
9246 $ac_includes_default
9247 #include <$ac_header>
9248 _ACEOF
9249 rm -f conftest.$ac_objext
9250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9251   (eval $ac_compile) 2>conftest.er1
9252   ac_status=$?
9253   grep -v '^ *+' conftest.er1 >conftest.err
9254   rm -f conftest.er1
9255   cat conftest.err >&5
9256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9257   (exit $ac_status); } &&
9258          { ac_try='test -z "$ac_c_werror_flag"
9259                          || test ! -s conftest.err'
9260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9264   (exit $ac_status); }; } &&
9265          { ac_try='test -s conftest.$ac_objext'
9266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9267   (eval $ac_try) 2>&5
9268   ac_status=$?
9269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9270   (exit $ac_status); }; }; then
9271   ac_header_compiler=yes
9272 else
9273   echo "$as_me: failed program was:" >&5
9274 sed 's/^/| /' conftest.$ac_ext >&5
9275
9276 ac_header_compiler=no
9277 fi
9278 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9279 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9280 echo "${ECHO_T}$ac_header_compiler" >&6
9281
9282 # Is the header present?
9283 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9284 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9285 cat >conftest.$ac_ext <<_ACEOF
9286 /* confdefs.h.  */
9287 _ACEOF
9288 cat confdefs.h >>conftest.$ac_ext
9289 cat >>conftest.$ac_ext <<_ACEOF
9290 /* end confdefs.h.  */
9291 #include <$ac_header>
9292 _ACEOF
9293 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9295   ac_status=$?
9296   grep -v '^ *+' conftest.er1 >conftest.err
9297   rm -f conftest.er1
9298   cat conftest.err >&5
9299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9300   (exit $ac_status); } >/dev/null; then
9301   if test -s conftest.err; then
9302     ac_cpp_err=$ac_c_preproc_warn_flag
9303     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9304   else
9305     ac_cpp_err=
9306   fi
9307 else
9308   ac_cpp_err=yes
9309 fi
9310 if test -z "$ac_cpp_err"; then
9311   ac_header_preproc=yes
9312 else
9313   echo "$as_me: failed program was:" >&5
9314 sed 's/^/| /' conftest.$ac_ext >&5
9315
9316   ac_header_preproc=no
9317 fi
9318 rm -f conftest.err conftest.$ac_ext
9319 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9320 echo "${ECHO_T}$ac_header_preproc" >&6
9321
9322 # So?  What about this header?
9323 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9324   yes:no: )
9325     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9326 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9327     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9328 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9329     ac_header_preproc=yes
9330     ;;
9331   no:yes:* )
9332     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9333 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9334     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9335 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9336     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9337 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9338     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9339 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9340     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9341 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9342     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9343 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9344     (
9345       cat <<\_ASBOX
9346 ## ---------------------------------------- ##
9347 ## Report this to pgsql-bugs@postgresql.org ##
9348 ## ---------------------------------------- ##
9349 _ASBOX
9350     ) |
9351       sed "s/^/$as_me: WARNING:     /" >&2
9352     ;;
9353 esac
9354 echo "$as_me:$LINENO: checking for $ac_header" >&5
9355 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9356 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9357   echo $ECHO_N "(cached) $ECHO_C" >&6
9358 else
9359   eval "$as_ac_Header=\$ac_header_preproc"
9360 fi
9361 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9362 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9363
9364 fi
9365 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9366   cat >>confdefs.h <<_ACEOF
9367 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9368 _ACEOF
9369
9370 else
9371
9372 for ac_header in history.h
9373 do
9374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9376   echo "$as_me:$LINENO: checking for $ac_header" >&5
9377 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9378 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9379   echo $ECHO_N "(cached) $ECHO_C" >&6
9380 fi
9381 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9382 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9383 else
9384   # Is the header compilable?
9385 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9386 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9387 cat >conftest.$ac_ext <<_ACEOF
9388 /* confdefs.h.  */
9389 _ACEOF
9390 cat confdefs.h >>conftest.$ac_ext
9391 cat >>conftest.$ac_ext <<_ACEOF
9392 /* end confdefs.h.  */
9393 $ac_includes_default
9394 #include <$ac_header>
9395 _ACEOF
9396 rm -f conftest.$ac_objext
9397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9398   (eval $ac_compile) 2>conftest.er1
9399   ac_status=$?
9400   grep -v '^ *+' conftest.er1 >conftest.err
9401   rm -f conftest.er1
9402   cat conftest.err >&5
9403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -z "$ac_c_werror_flag"
9406                          || test ! -s conftest.err'
9407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9408   (eval $ac_try) 2>&5
9409   ac_status=$?
9410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9411   (exit $ac_status); }; } &&
9412          { ac_try='test -s conftest.$ac_objext'
9413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9414   (eval $ac_try) 2>&5
9415   ac_status=$?
9416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9417   (exit $ac_status); }; }; then
9418   ac_header_compiler=yes
9419 else
9420   echo "$as_me: failed program was:" >&5
9421 sed 's/^/| /' conftest.$ac_ext >&5
9422
9423 ac_header_compiler=no
9424 fi
9425 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9426 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9427 echo "${ECHO_T}$ac_header_compiler" >&6
9428
9429 # Is the header present?
9430 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9431 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9432 cat >conftest.$ac_ext <<_ACEOF
9433 /* confdefs.h.  */
9434 _ACEOF
9435 cat confdefs.h >>conftest.$ac_ext
9436 cat >>conftest.$ac_ext <<_ACEOF
9437 /* end confdefs.h.  */
9438 #include <$ac_header>
9439 _ACEOF
9440 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9441   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9442   ac_status=$?
9443   grep -v '^ *+' conftest.er1 >conftest.err
9444   rm -f conftest.er1
9445   cat conftest.err >&5
9446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447   (exit $ac_status); } >/dev/null; then
9448   if test -s conftest.err; then
9449     ac_cpp_err=$ac_c_preproc_warn_flag
9450     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9451   else
9452     ac_cpp_err=
9453   fi
9454 else
9455   ac_cpp_err=yes
9456 fi
9457 if test -z "$ac_cpp_err"; then
9458   ac_header_preproc=yes
9459 else
9460   echo "$as_me: failed program was:" >&5
9461 sed 's/^/| /' conftest.$ac_ext >&5
9462
9463   ac_header_preproc=no
9464 fi
9465 rm -f conftest.err conftest.$ac_ext
9466 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9467 echo "${ECHO_T}$ac_header_preproc" >&6
9468
9469 # So?  What about this header?
9470 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9471   yes:no: )
9472     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9473 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9474     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9475 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9476     ac_header_preproc=yes
9477     ;;
9478   no:yes:* )
9479     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9480 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9481     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9482 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9483     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9484 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9485     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9486 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9487     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9488 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9489     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9490 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9491     (
9492       cat <<\_ASBOX
9493 ## ---------------------------------------- ##
9494 ## Report this to pgsql-bugs@postgresql.org ##
9495 ## ---------------------------------------- ##
9496 _ASBOX
9497     ) |
9498       sed "s/^/$as_me: WARNING:     /" >&2
9499     ;;
9500 esac
9501 echo "$as_me:$LINENO: checking for $ac_header" >&5
9502 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9503 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9504   echo $ECHO_N "(cached) $ECHO_C" >&6
9505 else
9506   eval "$as_ac_Header=\$ac_header_preproc"
9507 fi
9508 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9509 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9510
9511 fi
9512 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9513   cat >>confdefs.h <<_ACEOF
9514 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9515 _ACEOF
9516
9517 else
9518
9519 for ac_header in readline/history.h
9520 do
9521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9523   echo "$as_me:$LINENO: checking for $ac_header" >&5
9524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9526   echo $ECHO_N "(cached) $ECHO_C" >&6
9527 fi
9528 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9529 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9530 else
9531   # Is the header compilable?
9532 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9533 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9534 cat >conftest.$ac_ext <<_ACEOF
9535 /* confdefs.h.  */
9536 _ACEOF
9537 cat confdefs.h >>conftest.$ac_ext
9538 cat >>conftest.$ac_ext <<_ACEOF
9539 /* end confdefs.h.  */
9540 $ac_includes_default
9541 #include <$ac_header>
9542 _ACEOF
9543 rm -f conftest.$ac_objext
9544 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9545   (eval $ac_compile) 2>conftest.er1
9546   ac_status=$?
9547   grep -v '^ *+' conftest.er1 >conftest.err
9548   rm -f conftest.er1
9549   cat conftest.err >&5
9550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551   (exit $ac_status); } &&
9552          { ac_try='test -z "$ac_c_werror_flag"
9553                          || test ! -s conftest.err'
9554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9555   (eval $ac_try) 2>&5
9556   ac_status=$?
9557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9558   (exit $ac_status); }; } &&
9559          { ac_try='test -s conftest.$ac_objext'
9560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9561   (eval $ac_try) 2>&5
9562   ac_status=$?
9563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9564   (exit $ac_status); }; }; then
9565   ac_header_compiler=yes
9566 else
9567   echo "$as_me: failed program was:" >&5
9568 sed 's/^/| /' conftest.$ac_ext >&5
9569
9570 ac_header_compiler=no
9571 fi
9572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9573 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9574 echo "${ECHO_T}$ac_header_compiler" >&6
9575
9576 # Is the header present?
9577 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9578 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9579 cat >conftest.$ac_ext <<_ACEOF
9580 /* confdefs.h.  */
9581 _ACEOF
9582 cat confdefs.h >>conftest.$ac_ext
9583 cat >>conftest.$ac_ext <<_ACEOF
9584 /* end confdefs.h.  */
9585 #include <$ac_header>
9586 _ACEOF
9587 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9589   ac_status=$?
9590   grep -v '^ *+' conftest.er1 >conftest.err
9591   rm -f conftest.er1
9592   cat conftest.err >&5
9593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9594   (exit $ac_status); } >/dev/null; then
9595   if test -s conftest.err; then
9596     ac_cpp_err=$ac_c_preproc_warn_flag
9597     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9598   else
9599     ac_cpp_err=
9600   fi
9601 else
9602   ac_cpp_err=yes
9603 fi
9604 if test -z "$ac_cpp_err"; then
9605   ac_header_preproc=yes
9606 else
9607   echo "$as_me: failed program was:" >&5
9608 sed 's/^/| /' conftest.$ac_ext >&5
9609
9610   ac_header_preproc=no
9611 fi
9612 rm -f conftest.err conftest.$ac_ext
9613 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9614 echo "${ECHO_T}$ac_header_preproc" >&6
9615
9616 # So?  What about this header?
9617 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9618   yes:no: )
9619     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9620 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9621     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9622 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9623     ac_header_preproc=yes
9624     ;;
9625   no:yes:* )
9626     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9627 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9628     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9629 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9630     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9631 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9632     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9633 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9634     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9635 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9636     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9637 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9638     (
9639       cat <<\_ASBOX
9640 ## ---------------------------------------- ##
9641 ## Report this to pgsql-bugs@postgresql.org ##
9642 ## ---------------------------------------- ##
9643 _ASBOX
9644     ) |
9645       sed "s/^/$as_me: WARNING:     /" >&2
9646     ;;
9647 esac
9648 echo "$as_me:$LINENO: checking for $ac_header" >&5
9649 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9650 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653   eval "$as_ac_Header=\$ac_header_preproc"
9654 fi
9655 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9656 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9657
9658 fi
9659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9660   cat >>confdefs.h <<_ACEOF
9661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9662 _ACEOF
9663
9664 fi
9665
9666 done
9667
9668 fi
9669
9670 done
9671
9672 fi
9673
9674 done
9675
9676 fi
9677
9678 if test "$with_zlib" = yes; then
9679   if test "${ac_cv_header_zlib_h+set}" = set; then
9680   echo "$as_me:$LINENO: checking for zlib.h" >&5
9681 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9682 if test "${ac_cv_header_zlib_h+set}" = set; then
9683   echo $ECHO_N "(cached) $ECHO_C" >&6
9684 fi
9685 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9686 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9687 else
9688   # Is the header compilable?
9689 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9690 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9691 cat >conftest.$ac_ext <<_ACEOF
9692 /* confdefs.h.  */
9693 _ACEOF
9694 cat confdefs.h >>conftest.$ac_ext
9695 cat >>conftest.$ac_ext <<_ACEOF
9696 /* end confdefs.h.  */
9697 $ac_includes_default
9698 #include <zlib.h>
9699 _ACEOF
9700 rm -f conftest.$ac_objext
9701 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9702   (eval $ac_compile) 2>conftest.er1
9703   ac_status=$?
9704   grep -v '^ *+' conftest.er1 >conftest.err
9705   rm -f conftest.er1
9706   cat conftest.err >&5
9707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9708   (exit $ac_status); } &&
9709          { ac_try='test -z "$ac_c_werror_flag"
9710                          || test ! -s conftest.err'
9711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712   (eval $ac_try) 2>&5
9713   ac_status=$?
9714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715   (exit $ac_status); }; } &&
9716          { ac_try='test -s conftest.$ac_objext'
9717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718   (eval $ac_try) 2>&5
9719   ac_status=$?
9720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721   (exit $ac_status); }; }; then
9722   ac_header_compiler=yes
9723 else
9724   echo "$as_me: failed program was:" >&5
9725 sed 's/^/| /' conftest.$ac_ext >&5
9726
9727 ac_header_compiler=no
9728 fi
9729 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9730 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9731 echo "${ECHO_T}$ac_header_compiler" >&6
9732
9733 # Is the header present?
9734 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9735 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9736 cat >conftest.$ac_ext <<_ACEOF
9737 /* confdefs.h.  */
9738 _ACEOF
9739 cat confdefs.h >>conftest.$ac_ext
9740 cat >>conftest.$ac_ext <<_ACEOF
9741 /* end confdefs.h.  */
9742 #include <zlib.h>
9743 _ACEOF
9744 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9745   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9746   ac_status=$?
9747   grep -v '^ *+' conftest.er1 >conftest.err
9748   rm -f conftest.er1
9749   cat conftest.err >&5
9750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751   (exit $ac_status); } >/dev/null; then
9752   if test -s conftest.err; then
9753     ac_cpp_err=$ac_c_preproc_warn_flag
9754     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9755   else
9756     ac_cpp_err=
9757   fi
9758 else
9759   ac_cpp_err=yes
9760 fi
9761 if test -z "$ac_cpp_err"; then
9762   ac_header_preproc=yes
9763 else
9764   echo "$as_me: failed program was:" >&5
9765 sed 's/^/| /' conftest.$ac_ext >&5
9766
9767   ac_header_preproc=no
9768 fi
9769 rm -f conftest.err conftest.$ac_ext
9770 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9771 echo "${ECHO_T}$ac_header_preproc" >&6
9772
9773 # So?  What about this header?
9774 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9775   yes:no: )
9776     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9777 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9778     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9779 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9780     ac_header_preproc=yes
9781     ;;
9782   no:yes:* )
9783     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9784 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9785     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9786 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9787     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9788 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9789     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9790 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9791     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9792 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9793     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9794 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9795     (
9796       cat <<\_ASBOX
9797 ## ---------------------------------------- ##
9798 ## Report this to pgsql-bugs@postgresql.org ##
9799 ## ---------------------------------------- ##
9800 _ASBOX
9801     ) |
9802       sed "s/^/$as_me: WARNING:     /" >&2
9803     ;;
9804 esac
9805 echo "$as_me:$LINENO: checking for zlib.h" >&5
9806 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9807 if test "${ac_cv_header_zlib_h+set}" = set; then
9808   echo $ECHO_N "(cached) $ECHO_C" >&6
9809 else
9810   ac_cv_header_zlib_h=$ac_header_preproc
9811 fi
9812 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9813 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9814
9815 fi
9816 if test $ac_cv_header_zlib_h = yes; then
9817   :
9818 else
9819   { { echo "$as_me:$LINENO: error: zlib header not found
9820 If you have zlib already installed, see config.log for details on the
9821 failure.  It is possible the compiler isn't looking in the proper directory.
9822 Use --without-zlib to disable zlib support." >&5
9823 echo "$as_me: error: zlib header not found
9824 If you have zlib already installed, see config.log for details on the
9825 failure.  It is possible the compiler isn't looking in the proper directory.
9826 Use --without-zlib to disable zlib support." >&2;}
9827    { (exit 1); exit 1; }; }
9828 fi
9829
9830
9831 fi
9832
9833 if test "$with_krb5" = yes ; then
9834   if test "${ac_cv_header_krb5_h+set}" = set; then
9835   echo "$as_me:$LINENO: checking for krb5.h" >&5
9836 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9837 if test "${ac_cv_header_krb5_h+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 fi
9840 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9841 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9842 else
9843   # Is the header compilable?
9844 echo "$as_me:$LINENO: checking krb5.h usability" >&5
9845 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
9846 cat >conftest.$ac_ext <<_ACEOF
9847 /* confdefs.h.  */
9848 _ACEOF
9849 cat confdefs.h >>conftest.$ac_ext
9850 cat >>conftest.$ac_ext <<_ACEOF
9851 /* end confdefs.h.  */
9852 $ac_includes_default
9853 #include <krb5.h>
9854 _ACEOF
9855 rm -f conftest.$ac_objext
9856 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9857   (eval $ac_compile) 2>conftest.er1
9858   ac_status=$?
9859   grep -v '^ *+' conftest.er1 >conftest.err
9860   rm -f conftest.er1
9861   cat conftest.err >&5
9862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9863   (exit $ac_status); } &&
9864          { ac_try='test -z "$ac_c_werror_flag"
9865                          || test ! -s conftest.err'
9866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9867   (eval $ac_try) 2>&5
9868   ac_status=$?
9869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9870   (exit $ac_status); }; } &&
9871          { ac_try='test -s conftest.$ac_objext'
9872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873   (eval $ac_try) 2>&5
9874   ac_status=$?
9875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876   (exit $ac_status); }; }; then
9877   ac_header_compiler=yes
9878 else
9879   echo "$as_me: failed program was:" >&5
9880 sed 's/^/| /' conftest.$ac_ext >&5
9881
9882 ac_header_compiler=no
9883 fi
9884 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9885 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9886 echo "${ECHO_T}$ac_header_compiler" >&6
9887
9888 # Is the header present?
9889 echo "$as_me:$LINENO: checking krb5.h presence" >&5
9890 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
9891 cat >conftest.$ac_ext <<_ACEOF
9892 /* confdefs.h.  */
9893 _ACEOF
9894 cat confdefs.h >>conftest.$ac_ext
9895 cat >>conftest.$ac_ext <<_ACEOF
9896 /* end confdefs.h.  */
9897 #include <krb5.h>
9898 _ACEOF
9899 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9900   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9901   ac_status=$?
9902   grep -v '^ *+' conftest.er1 >conftest.err
9903   rm -f conftest.er1
9904   cat conftest.err >&5
9905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906   (exit $ac_status); } >/dev/null; then
9907   if test -s conftest.err; then
9908     ac_cpp_err=$ac_c_preproc_warn_flag
9909     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9910   else
9911     ac_cpp_err=
9912   fi
9913 else
9914   ac_cpp_err=yes
9915 fi
9916 if test -z "$ac_cpp_err"; then
9917   ac_header_preproc=yes
9918 else
9919   echo "$as_me: failed program was:" >&5
9920 sed 's/^/| /' conftest.$ac_ext >&5
9921
9922   ac_header_preproc=no
9923 fi
9924 rm -f conftest.err conftest.$ac_ext
9925 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9926 echo "${ECHO_T}$ac_header_preproc" >&6
9927
9928 # So?  What about this header?
9929 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9930   yes:no: )
9931     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
9932 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9933     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
9934 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
9935     ac_header_preproc=yes
9936     ;;
9937   no:yes:* )
9938     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
9939 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
9940     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
9941 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
9942     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
9943 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
9944     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
9945 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9946     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
9947 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
9948     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
9949 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
9950     (
9951       cat <<\_ASBOX
9952 ## ---------------------------------------- ##
9953 ## Report this to pgsql-bugs@postgresql.org ##
9954 ## ---------------------------------------- ##
9955 _ASBOX
9956     ) |
9957       sed "s/^/$as_me: WARNING:     /" >&2
9958     ;;
9959 esac
9960 echo "$as_me:$LINENO: checking for krb5.h" >&5
9961 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
9962 if test "${ac_cv_header_krb5_h+set}" = set; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   ac_cv_header_krb5_h=$ac_header_preproc
9966 fi
9967 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
9968 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
9969
9970 fi
9971 if test $ac_cv_header_krb5_h = yes; then
9972   :
9973 else
9974   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
9975 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
9976    { (exit 1); exit 1; }; }
9977 fi
9978
9979
9980 fi
9981
9982 if test "$with_openssl" = yes ; then
9983   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9984   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
9985 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
9986 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
9987   echo $ECHO_N "(cached) $ECHO_C" >&6
9988 fi
9989 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
9990 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
9991 else
9992   # Is the header compilable?
9993 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
9994 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
9995 cat >conftest.$ac_ext <<_ACEOF
9996 /* confdefs.h.  */
9997 _ACEOF
9998 cat confdefs.h >>conftest.$ac_ext
9999 cat >>conftest.$ac_ext <<_ACEOF
10000 /* end confdefs.h.  */
10001 $ac_includes_default
10002 #include <openssl/ssl.h>
10003 _ACEOF
10004 rm -f conftest.$ac_objext
10005 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10006   (eval $ac_compile) 2>conftest.er1
10007   ac_status=$?
10008   grep -v '^ *+' conftest.er1 >conftest.err
10009   rm -f conftest.er1
10010   cat conftest.err >&5
10011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012   (exit $ac_status); } &&
10013          { ac_try='test -z "$ac_c_werror_flag"
10014                          || test ! -s conftest.err'
10015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10016   (eval $ac_try) 2>&5
10017   ac_status=$?
10018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019   (exit $ac_status); }; } &&
10020          { ac_try='test -s conftest.$ac_objext'
10021   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10022   (eval $ac_try) 2>&5
10023   ac_status=$?
10024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10025   (exit $ac_status); }; }; then
10026   ac_header_compiler=yes
10027 else
10028   echo "$as_me: failed program was:" >&5
10029 sed 's/^/| /' conftest.$ac_ext >&5
10030
10031 ac_header_compiler=no
10032 fi
10033 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10034 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10035 echo "${ECHO_T}$ac_header_compiler" >&6
10036
10037 # Is the header present?
10038 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10039 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10040 cat >conftest.$ac_ext <<_ACEOF
10041 /* confdefs.h.  */
10042 _ACEOF
10043 cat confdefs.h >>conftest.$ac_ext
10044 cat >>conftest.$ac_ext <<_ACEOF
10045 /* end confdefs.h.  */
10046 #include <openssl/ssl.h>
10047 _ACEOF
10048 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10049   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10050   ac_status=$?
10051   grep -v '^ *+' conftest.er1 >conftest.err
10052   rm -f conftest.er1
10053   cat conftest.err >&5
10054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10055   (exit $ac_status); } >/dev/null; then
10056   if test -s conftest.err; then
10057     ac_cpp_err=$ac_c_preproc_warn_flag
10058     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10059   else
10060     ac_cpp_err=
10061   fi
10062 else
10063   ac_cpp_err=yes
10064 fi
10065 if test -z "$ac_cpp_err"; then
10066   ac_header_preproc=yes
10067 else
10068   echo "$as_me: failed program was:" >&5
10069 sed 's/^/| /' conftest.$ac_ext >&5
10070
10071   ac_header_preproc=no
10072 fi
10073 rm -f conftest.err conftest.$ac_ext
10074 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10075 echo "${ECHO_T}$ac_header_preproc" >&6
10076
10077 # So?  What about this header?
10078 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10079   yes:no: )
10080     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10081 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10082     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10083 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10084     ac_header_preproc=yes
10085     ;;
10086   no:yes:* )
10087     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10088 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10089     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10090 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10091     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10092 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10093     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10094 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10095     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10096 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10097     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10098 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10099     (
10100       cat <<\_ASBOX
10101 ## ---------------------------------------- ##
10102 ## Report this to pgsql-bugs@postgresql.org ##
10103 ## ---------------------------------------- ##
10104 _ASBOX
10105     ) |
10106       sed "s/^/$as_me: WARNING:     /" >&2
10107     ;;
10108 esac
10109 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10110 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10111 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10112   echo $ECHO_N "(cached) $ECHO_C" >&6
10113 else
10114   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10115 fi
10116 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10117 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10118
10119 fi
10120 if test $ac_cv_header_openssl_ssl_h = yes; then
10121   :
10122 else
10123   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10124 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10125    { (exit 1); exit 1; }; }
10126 fi
10127
10128
10129   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10130   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10131 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10132 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10133   echo $ECHO_N "(cached) $ECHO_C" >&6
10134 fi
10135 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10136 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10137 else
10138   # Is the header compilable?
10139 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10140 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10141 cat >conftest.$ac_ext <<_ACEOF
10142 /* confdefs.h.  */
10143 _ACEOF
10144 cat confdefs.h >>conftest.$ac_ext
10145 cat >>conftest.$ac_ext <<_ACEOF
10146 /* end confdefs.h.  */
10147 $ac_includes_default
10148 #include <openssl/err.h>
10149 _ACEOF
10150 rm -f conftest.$ac_objext
10151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10152   (eval $ac_compile) 2>conftest.er1
10153   ac_status=$?
10154   grep -v '^ *+' conftest.er1 >conftest.err
10155   rm -f conftest.er1
10156   cat conftest.err >&5
10157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10158   (exit $ac_status); } &&
10159          { ac_try='test -z "$ac_c_werror_flag"
10160                          || test ! -s conftest.err'
10161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10162   (eval $ac_try) 2>&5
10163   ac_status=$?
10164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165   (exit $ac_status); }; } &&
10166          { ac_try='test -s conftest.$ac_objext'
10167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10168   (eval $ac_try) 2>&5
10169   ac_status=$?
10170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10171   (exit $ac_status); }; }; then
10172   ac_header_compiler=yes
10173 else
10174   echo "$as_me: failed program was:" >&5
10175 sed 's/^/| /' conftest.$ac_ext >&5
10176
10177 ac_header_compiler=no
10178 fi
10179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10180 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10181 echo "${ECHO_T}$ac_header_compiler" >&6
10182
10183 # Is the header present?
10184 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10185 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10186 cat >conftest.$ac_ext <<_ACEOF
10187 /* confdefs.h.  */
10188 _ACEOF
10189 cat confdefs.h >>conftest.$ac_ext
10190 cat >>conftest.$ac_ext <<_ACEOF
10191 /* end confdefs.h.  */
10192 #include <openssl/err.h>
10193 _ACEOF
10194 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10195   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10196   ac_status=$?
10197   grep -v '^ *+' conftest.er1 >conftest.err
10198   rm -f conftest.er1
10199   cat conftest.err >&5
10200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10201   (exit $ac_status); } >/dev/null; then
10202   if test -s conftest.err; then
10203     ac_cpp_err=$ac_c_preproc_warn_flag
10204     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10205   else
10206     ac_cpp_err=
10207   fi
10208 else
10209   ac_cpp_err=yes
10210 fi
10211 if test -z "$ac_cpp_err"; then
10212   ac_header_preproc=yes
10213 else
10214   echo "$as_me: failed program was:" >&5
10215 sed 's/^/| /' conftest.$ac_ext >&5
10216
10217   ac_header_preproc=no
10218 fi
10219 rm -f conftest.err conftest.$ac_ext
10220 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10221 echo "${ECHO_T}$ac_header_preproc" >&6
10222
10223 # So?  What about this header?
10224 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10225   yes:no: )
10226     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10227 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10228     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10229 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10230     ac_header_preproc=yes
10231     ;;
10232   no:yes:* )
10233     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10234 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10235     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10236 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10237     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10238 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10239     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10240 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10241     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10242 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10243     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10244 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10245     (
10246       cat <<\_ASBOX
10247 ## ---------------------------------------- ##
10248 ## Report this to pgsql-bugs@postgresql.org ##
10249 ## ---------------------------------------- ##
10250 _ASBOX
10251     ) |
10252       sed "s/^/$as_me: WARNING:     /" >&2
10253     ;;
10254 esac
10255 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10256 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10257 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10258   echo $ECHO_N "(cached) $ECHO_C" >&6
10259 else
10260   ac_cv_header_openssl_err_h=$ac_header_preproc
10261 fi
10262 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10263 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10264
10265 fi
10266 if test $ac_cv_header_openssl_err_h = yes; then
10267   :
10268 else
10269   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10270 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10271    { (exit 1); exit 1; }; }
10272 fi
10273
10274
10275 fi
10276
10277 if test "$with_pam" = yes ; then
10278
10279 for ac_header in security/pam_appl.h
10280 do
10281 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10282 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10283   echo "$as_me:$LINENO: checking for $ac_header" >&5
10284 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10286   echo $ECHO_N "(cached) $ECHO_C" >&6
10287 fi
10288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10290 else
10291   # Is the header compilable?
10292 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10293 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10294 cat >conftest.$ac_ext <<_ACEOF
10295 /* confdefs.h.  */
10296 _ACEOF
10297 cat confdefs.h >>conftest.$ac_ext
10298 cat >>conftest.$ac_ext <<_ACEOF
10299 /* end confdefs.h.  */
10300 $ac_includes_default
10301 #include <$ac_header>
10302 _ACEOF
10303 rm -f conftest.$ac_objext
10304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10305   (eval $ac_compile) 2>conftest.er1
10306   ac_status=$?
10307   grep -v '^ *+' conftest.er1 >conftest.err
10308   rm -f conftest.er1
10309   cat conftest.err >&5
10310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10311   (exit $ac_status); } &&
10312          { ac_try='test -z "$ac_c_werror_flag"
10313                          || test ! -s conftest.err'
10314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10315   (eval $ac_try) 2>&5
10316   ac_status=$?
10317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10318   (exit $ac_status); }; } &&
10319          { ac_try='test -s conftest.$ac_objext'
10320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10321   (eval $ac_try) 2>&5
10322   ac_status=$?
10323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10324   (exit $ac_status); }; }; then
10325   ac_header_compiler=yes
10326 else
10327   echo "$as_me: failed program was:" >&5
10328 sed 's/^/| /' conftest.$ac_ext >&5
10329
10330 ac_header_compiler=no
10331 fi
10332 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10333 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10334 echo "${ECHO_T}$ac_header_compiler" >&6
10335
10336 # Is the header present?
10337 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10338 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10339 cat >conftest.$ac_ext <<_ACEOF
10340 /* confdefs.h.  */
10341 _ACEOF
10342 cat confdefs.h >>conftest.$ac_ext
10343 cat >>conftest.$ac_ext <<_ACEOF
10344 /* end confdefs.h.  */
10345 #include <$ac_header>
10346 _ACEOF
10347 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10349   ac_status=$?
10350   grep -v '^ *+' conftest.er1 >conftest.err
10351   rm -f conftest.er1
10352   cat conftest.err >&5
10353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10354   (exit $ac_status); } >/dev/null; then
10355   if test -s conftest.err; then
10356     ac_cpp_err=$ac_c_preproc_warn_flag
10357     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10358   else
10359     ac_cpp_err=
10360   fi
10361 else
10362   ac_cpp_err=yes
10363 fi
10364 if test -z "$ac_cpp_err"; then
10365   ac_header_preproc=yes
10366 else
10367   echo "$as_me: failed program was:" >&5
10368 sed 's/^/| /' conftest.$ac_ext >&5
10369
10370   ac_header_preproc=no
10371 fi
10372 rm -f conftest.err conftest.$ac_ext
10373 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10374 echo "${ECHO_T}$ac_header_preproc" >&6
10375
10376 # So?  What about this header?
10377 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10378   yes:no: )
10379     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10380 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10381     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10382 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10383     ac_header_preproc=yes
10384     ;;
10385   no:yes:* )
10386     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10387 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10388     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10389 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10390     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10391 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10392     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10393 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10394     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10395 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10396     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10397 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10398     (
10399       cat <<\_ASBOX
10400 ## ---------------------------------------- ##
10401 ## Report this to pgsql-bugs@postgresql.org ##
10402 ## ---------------------------------------- ##
10403 _ASBOX
10404     ) |
10405       sed "s/^/$as_me: WARNING:     /" >&2
10406     ;;
10407 esac
10408 echo "$as_me:$LINENO: checking for $ac_header" >&5
10409 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10410 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10411   echo $ECHO_N "(cached) $ECHO_C" >&6
10412 else
10413   eval "$as_ac_Header=\$ac_header_preproc"
10414 fi
10415 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10417
10418 fi
10419 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10420   cat >>confdefs.h <<_ACEOF
10421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10422 _ACEOF
10423
10424 else
10425
10426 for ac_header in pam/pam_appl.h
10427 do
10428 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10429 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10430   echo "$as_me:$LINENO: checking for $ac_header" >&5
10431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10433   echo $ECHO_N "(cached) $ECHO_C" >&6
10434 fi
10435 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10436 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10437 else
10438   # Is the header compilable?
10439 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10440 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10441 cat >conftest.$ac_ext <<_ACEOF
10442 /* confdefs.h.  */
10443 _ACEOF
10444 cat confdefs.h >>conftest.$ac_ext
10445 cat >>conftest.$ac_ext <<_ACEOF
10446 /* end confdefs.h.  */
10447 $ac_includes_default
10448 #include <$ac_header>
10449 _ACEOF
10450 rm -f conftest.$ac_objext
10451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10452   (eval $ac_compile) 2>conftest.er1
10453   ac_status=$?
10454   grep -v '^ *+' conftest.er1 >conftest.err
10455   rm -f conftest.er1
10456   cat conftest.err >&5
10457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458   (exit $ac_status); } &&
10459          { ac_try='test -z "$ac_c_werror_flag"
10460                          || test ! -s conftest.err'
10461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465   (exit $ac_status); }; } &&
10466          { ac_try='test -s conftest.$ac_objext'
10467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10468   (eval $ac_try) 2>&5
10469   ac_status=$?
10470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10471   (exit $ac_status); }; }; then
10472   ac_header_compiler=yes
10473 else
10474   echo "$as_me: failed program was:" >&5
10475 sed 's/^/| /' conftest.$ac_ext >&5
10476
10477 ac_header_compiler=no
10478 fi
10479 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10480 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10481 echo "${ECHO_T}$ac_header_compiler" >&6
10482
10483 # Is the header present?
10484 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10485 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10486 cat >conftest.$ac_ext <<_ACEOF
10487 /* confdefs.h.  */
10488 _ACEOF
10489 cat confdefs.h >>conftest.$ac_ext
10490 cat >>conftest.$ac_ext <<_ACEOF
10491 /* end confdefs.h.  */
10492 #include <$ac_header>
10493 _ACEOF
10494 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10495   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10496   ac_status=$?
10497   grep -v '^ *+' conftest.er1 >conftest.err
10498   rm -f conftest.er1
10499   cat conftest.err >&5
10500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10501   (exit $ac_status); } >/dev/null; then
10502   if test -s conftest.err; then
10503     ac_cpp_err=$ac_c_preproc_warn_flag
10504     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10505   else
10506     ac_cpp_err=
10507   fi
10508 else
10509   ac_cpp_err=yes
10510 fi
10511 if test -z "$ac_cpp_err"; then
10512   ac_header_preproc=yes
10513 else
10514   echo "$as_me: failed program was:" >&5
10515 sed 's/^/| /' conftest.$ac_ext >&5
10516
10517   ac_header_preproc=no
10518 fi
10519 rm -f conftest.err conftest.$ac_ext
10520 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10521 echo "${ECHO_T}$ac_header_preproc" >&6
10522
10523 # So?  What about this header?
10524 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10525   yes:no: )
10526     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10527 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10528     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10529 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10530     ac_header_preproc=yes
10531     ;;
10532   no:yes:* )
10533     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10534 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10535     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10536 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10537     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10538 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10539     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10540 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10541     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10542 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10543     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10544 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10545     (
10546       cat <<\_ASBOX
10547 ## ---------------------------------------- ##
10548 ## Report this to pgsql-bugs@postgresql.org ##
10549 ## ---------------------------------------- ##
10550 _ASBOX
10551     ) |
10552       sed "s/^/$as_me: WARNING:     /" >&2
10553     ;;
10554 esac
10555 echo "$as_me:$LINENO: checking for $ac_header" >&5
10556 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10557 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10558   echo $ECHO_N "(cached) $ECHO_C" >&6
10559 else
10560   eval "$as_ac_Header=\$ac_header_preproc"
10561 fi
10562 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10564
10565 fi
10566 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10567   cat >>confdefs.h <<_ACEOF
10568 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10569 _ACEOF
10570
10571 else
10572   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10573 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10574    { (exit 1); exit 1; }; }
10575 fi
10576
10577 done
10578
10579 fi
10580
10581 done
10582
10583 fi
10584
10585 if test "$with_libxml" = yes ; then
10586   if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10587   echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10588 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10589 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10590   echo $ECHO_N "(cached) $ECHO_C" >&6
10591 fi
10592 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10593 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10594 else
10595   # Is the header compilable?
10596 echo "$as_me:$LINENO: checking libxml/parser.h usability" >&5
10597 echo $ECHO_N "checking libxml/parser.h usability... $ECHO_C" >&6
10598 cat >conftest.$ac_ext <<_ACEOF
10599 /* confdefs.h.  */
10600 _ACEOF
10601 cat confdefs.h >>conftest.$ac_ext
10602 cat >>conftest.$ac_ext <<_ACEOF
10603 /* end confdefs.h.  */
10604 $ac_includes_default
10605 #include <libxml/parser.h>
10606 _ACEOF
10607 rm -f conftest.$ac_objext
10608 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10609   (eval $ac_compile) 2>conftest.er1
10610   ac_status=$?
10611   grep -v '^ *+' conftest.er1 >conftest.err
10612   rm -f conftest.er1
10613   cat conftest.err >&5
10614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10615   (exit $ac_status); } &&
10616          { ac_try='test -z "$ac_c_werror_flag"
10617                          || test ! -s conftest.err'
10618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10619   (eval $ac_try) 2>&5
10620   ac_status=$?
10621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622   (exit $ac_status); }; } &&
10623          { ac_try='test -s conftest.$ac_objext'
10624   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10625   (eval $ac_try) 2>&5
10626   ac_status=$?
10627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628   (exit $ac_status); }; }; then
10629   ac_header_compiler=yes
10630 else
10631   echo "$as_me: failed program was:" >&5
10632 sed 's/^/| /' conftest.$ac_ext >&5
10633
10634 ac_header_compiler=no
10635 fi
10636 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10637 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10638 echo "${ECHO_T}$ac_header_compiler" >&6
10639
10640 # Is the header present?
10641 echo "$as_me:$LINENO: checking libxml/parser.h presence" >&5
10642 echo $ECHO_N "checking libxml/parser.h presence... $ECHO_C" >&6
10643 cat >conftest.$ac_ext <<_ACEOF
10644 /* confdefs.h.  */
10645 _ACEOF
10646 cat confdefs.h >>conftest.$ac_ext
10647 cat >>conftest.$ac_ext <<_ACEOF
10648 /* end confdefs.h.  */
10649 #include <libxml/parser.h>
10650 _ACEOF
10651 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10652   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10653   ac_status=$?
10654   grep -v '^ *+' conftest.er1 >conftest.err
10655   rm -f conftest.er1
10656   cat conftest.err >&5
10657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10658   (exit $ac_status); } >/dev/null; then
10659   if test -s conftest.err; then
10660     ac_cpp_err=$ac_c_preproc_warn_flag
10661     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10662   else
10663     ac_cpp_err=
10664   fi
10665 else
10666   ac_cpp_err=yes
10667 fi
10668 if test -z "$ac_cpp_err"; then
10669   ac_header_preproc=yes
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 sed 's/^/| /' conftest.$ac_ext >&5
10673
10674   ac_header_preproc=no
10675 fi
10676 rm -f conftest.err conftest.$ac_ext
10677 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10678 echo "${ECHO_T}$ac_header_preproc" >&6
10679
10680 # So?  What about this header?
10681 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10682   yes:no: )
10683     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&5
10684 echo "$as_me: WARNING: libxml/parser.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10685     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the compiler's result" >&5
10686 echo "$as_me: WARNING: libxml/parser.h: proceeding with the compiler's result" >&2;}
10687     ac_header_preproc=yes
10688     ;;
10689   no:yes:* )
10690     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: present but cannot be compiled" >&5
10691 echo "$as_me: WARNING: libxml/parser.h: present but cannot be compiled" >&2;}
10692     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&5
10693 echo "$as_me: WARNING: libxml/parser.h:     check for missing prerequisite headers?" >&2;}
10694     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: see the Autoconf documentation" >&5
10695 echo "$as_me: WARNING: libxml/parser.h: see the Autoconf documentation" >&2;}
10696     { echo "$as_me:$LINENO: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&5
10697 echo "$as_me: WARNING: libxml/parser.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10698     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&5
10699 echo "$as_me: WARNING: libxml/parser.h: proceeding with the preprocessor's result" >&2;}
10700     { echo "$as_me:$LINENO: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&5
10701 echo "$as_me: WARNING: libxml/parser.h: in the future, the compiler will take precedence" >&2;}
10702     (
10703       cat <<\_ASBOX
10704 ## ---------------------------------------- ##
10705 ## Report this to pgsql-bugs@postgresql.org ##
10706 ## ---------------------------------------- ##
10707 _ASBOX
10708     ) |
10709       sed "s/^/$as_me: WARNING:     /" >&2
10710     ;;
10711 esac
10712 echo "$as_me:$LINENO: checking for libxml/parser.h" >&5
10713 echo $ECHO_N "checking for libxml/parser.h... $ECHO_C" >&6
10714 if test "${ac_cv_header_libxml_parser_h+set}" = set; then
10715   echo $ECHO_N "(cached) $ECHO_C" >&6
10716 else
10717   ac_cv_header_libxml_parser_h=$ac_header_preproc
10718 fi
10719 echo "$as_me:$LINENO: result: $ac_cv_header_libxml_parser_h" >&5
10720 echo "${ECHO_T}$ac_cv_header_libxml_parser_h" >&6
10721
10722 fi
10723 if test $ac_cv_header_libxml_parser_h = yes; then
10724   :
10725 else
10726   { { echo "$as_me:$LINENO: error: header file <libxml/parser.h> is required for XML support" >&5
10727 echo "$as_me: error: header file <libxml/parser.h> is required for XML support" >&2;}
10728    { (exit 1); exit 1; }; }
10729 fi
10730
10731
10732 fi
10733
10734 if test "$with_ldap" = yes ; then
10735   if test "$PORTNAME" != "win32"; then
10736
10737 for ac_header in ldap.h
10738 do
10739 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10740 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10741   echo "$as_me:$LINENO: checking for $ac_header" >&5
10742 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10744   echo $ECHO_N "(cached) $ECHO_C" >&6
10745 fi
10746 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10747 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10748 else
10749   # Is the header compilable?
10750 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10751 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10752 cat >conftest.$ac_ext <<_ACEOF
10753 /* confdefs.h.  */
10754 _ACEOF
10755 cat confdefs.h >>conftest.$ac_ext
10756 cat >>conftest.$ac_ext <<_ACEOF
10757 /* end confdefs.h.  */
10758 $ac_includes_default
10759 #include <$ac_header>
10760 _ACEOF
10761 rm -f conftest.$ac_objext
10762 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10763   (eval $ac_compile) 2>conftest.er1
10764   ac_status=$?
10765   grep -v '^ *+' conftest.er1 >conftest.err
10766   rm -f conftest.er1
10767   cat conftest.err >&5
10768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10769   (exit $ac_status); } &&
10770          { ac_try='test -z "$ac_c_werror_flag"
10771                          || test ! -s conftest.err'
10772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10773   (eval $ac_try) 2>&5
10774   ac_status=$?
10775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10776   (exit $ac_status); }; } &&
10777          { ac_try='test -s conftest.$ac_objext'
10778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10779   (eval $ac_try) 2>&5
10780   ac_status=$?
10781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10782   (exit $ac_status); }; }; then
10783   ac_header_compiler=yes
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 sed 's/^/| /' conftest.$ac_ext >&5
10787
10788 ac_header_compiler=no
10789 fi
10790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10791 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10792 echo "${ECHO_T}$ac_header_compiler" >&6
10793
10794 # Is the header present?
10795 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10796 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10797 cat >conftest.$ac_ext <<_ACEOF
10798 /* confdefs.h.  */
10799 _ACEOF
10800 cat confdefs.h >>conftest.$ac_ext
10801 cat >>conftest.$ac_ext <<_ACEOF
10802 /* end confdefs.h.  */
10803 #include <$ac_header>
10804 _ACEOF
10805 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10806   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10807   ac_status=$?
10808   grep -v '^ *+' conftest.er1 >conftest.err
10809   rm -f conftest.er1
10810   cat conftest.err >&5
10811   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812   (exit $ac_status); } >/dev/null; then
10813   if test -s conftest.err; then
10814     ac_cpp_err=$ac_c_preproc_warn_flag
10815     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10816   else
10817     ac_cpp_err=
10818   fi
10819 else
10820   ac_cpp_err=yes
10821 fi
10822 if test -z "$ac_cpp_err"; then
10823   ac_header_preproc=yes
10824 else
10825   echo "$as_me: failed program was:" >&5
10826 sed 's/^/| /' conftest.$ac_ext >&5
10827
10828   ac_header_preproc=no
10829 fi
10830 rm -f conftest.err conftest.$ac_ext
10831 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10832 echo "${ECHO_T}$ac_header_preproc" >&6
10833
10834 # So?  What about this header?
10835 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10836   yes:no: )
10837     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10838 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10839     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10840 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10841     ac_header_preproc=yes
10842     ;;
10843   no:yes:* )
10844     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10845 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10846     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10847 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10848     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10849 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10850     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10851 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10852     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10853 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10854     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10855 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10856     (
10857       cat <<\_ASBOX
10858 ## ---------------------------------------- ##
10859 ## Report this to pgsql-bugs@postgresql.org ##
10860 ## ---------------------------------------- ##
10861 _ASBOX
10862     ) |
10863       sed "s/^/$as_me: WARNING:     /" >&2
10864     ;;
10865 esac
10866 echo "$as_me:$LINENO: checking for $ac_header" >&5
10867 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10868 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10869   echo $ECHO_N "(cached) $ECHO_C" >&6
10870 else
10871   eval "$as_ac_Header=\$ac_header_preproc"
10872 fi
10873 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10874 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10875
10876 fi
10877 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10878   cat >>confdefs.h <<_ACEOF
10879 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10880 _ACEOF
10881
10882 else
10883   { { echo "$as_me:$LINENO: error: header file <ldap.h> is required for LDAP" >&5
10884 echo "$as_me: error: header file <ldap.h> is required for LDAP" >&2;}
10885    { (exit 1); exit 1; }; }
10886 fi
10887
10888 done
10889
10890   else
10891
10892 for ac_header in winldap.h
10893 do
10894 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10895 echo "$as_me:$LINENO: checking for $ac_header" >&5
10896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10898   echo $ECHO_N "(cached) $ECHO_C" >&6
10899 else
10900   cat >conftest.$ac_ext <<_ACEOF
10901 /* confdefs.h.  */
10902 _ACEOF
10903 cat confdefs.h >>conftest.$ac_ext
10904 cat >>conftest.$ac_ext <<_ACEOF
10905 /* end confdefs.h.  */
10906 $ac_includes_default
10907 #include <windows.h>
10908
10909
10910 #include <$ac_header>
10911 _ACEOF
10912 rm -f conftest.$ac_objext
10913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10914   (eval $ac_compile) 2>conftest.er1
10915   ac_status=$?
10916   grep -v '^ *+' conftest.er1 >conftest.err
10917   rm -f conftest.er1
10918   cat conftest.err >&5
10919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10920   (exit $ac_status); } &&
10921          { ac_try='test -z "$ac_c_werror_flag"
10922                          || test ! -s conftest.err'
10923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10924   (eval $ac_try) 2>&5
10925   ac_status=$?
10926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10927   (exit $ac_status); }; } &&
10928          { ac_try='test -s conftest.$ac_objext'
10929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10930   (eval $ac_try) 2>&5
10931   ac_status=$?
10932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10933   (exit $ac_status); }; }; then
10934   eval "$as_ac_Header=yes"
10935 else
10936   echo "$as_me: failed program was:" >&5
10937 sed 's/^/| /' conftest.$ac_ext >&5
10938
10939 eval "$as_ac_Header=no"
10940 fi
10941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10942 fi
10943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10946   cat >>confdefs.h <<_ACEOF
10947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10948 _ACEOF
10949
10950 else
10951   { { echo "$as_me:$LINENO: error: header file <winldap.h> is required for LDAP" >&5
10952 echo "$as_me: error: header file <winldap.h> is required for LDAP" >&2;}
10953    { (exit 1); exit 1; }; }
10954 fi
10955
10956 done
10957
10958   fi
10959 fi
10960
10961 if test "$with_bonjour" = yes ; then
10962   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10963   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10964 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10965 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10966   echo $ECHO_N "(cached) $ECHO_C" >&6
10967 fi
10968 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10969 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10970 else
10971   # Is the header compilable?
10972 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10973 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10974 cat >conftest.$ac_ext <<_ACEOF
10975 /* confdefs.h.  */
10976 _ACEOF
10977 cat confdefs.h >>conftest.$ac_ext
10978 cat >>conftest.$ac_ext <<_ACEOF
10979 /* end confdefs.h.  */
10980 $ac_includes_default
10981 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10982 _ACEOF
10983 rm -f conftest.$ac_objext
10984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10985   (eval $ac_compile) 2>conftest.er1
10986   ac_status=$?
10987   grep -v '^ *+' conftest.er1 >conftest.err
10988   rm -f conftest.er1
10989   cat conftest.err >&5
10990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10991   (exit $ac_status); } &&
10992          { ac_try='test -z "$ac_c_werror_flag"
10993                          || test ! -s conftest.err'
10994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995   (eval $ac_try) 2>&5
10996   ac_status=$?
10997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998   (exit $ac_status); }; } &&
10999          { ac_try='test -s conftest.$ac_objext'
11000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11001   (eval $ac_try) 2>&5
11002   ac_status=$?
11003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11004   (exit $ac_status); }; }; then
11005   ac_header_compiler=yes
11006 else
11007   echo "$as_me: failed program was:" >&5
11008 sed 's/^/| /' conftest.$ac_ext >&5
11009
11010 ac_header_compiler=no
11011 fi
11012 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11013 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11014 echo "${ECHO_T}$ac_header_compiler" >&6
11015
11016 # Is the header present?
11017 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
11018 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
11019 cat >conftest.$ac_ext <<_ACEOF
11020 /* confdefs.h.  */
11021 _ACEOF
11022 cat confdefs.h >>conftest.$ac_ext
11023 cat >>conftest.$ac_ext <<_ACEOF
11024 /* end confdefs.h.  */
11025 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
11026 _ACEOF
11027 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11028   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11029   ac_status=$?
11030   grep -v '^ *+' conftest.er1 >conftest.err
11031   rm -f conftest.er1
11032   cat conftest.err >&5
11033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11034   (exit $ac_status); } >/dev/null; then
11035   if test -s conftest.err; then
11036     ac_cpp_err=$ac_c_preproc_warn_flag
11037     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11038   else
11039     ac_cpp_err=
11040   fi
11041 else
11042   ac_cpp_err=yes
11043 fi
11044 if test -z "$ac_cpp_err"; then
11045   ac_header_preproc=yes
11046 else
11047   echo "$as_me: failed program was:" >&5
11048 sed 's/^/| /' conftest.$ac_ext >&5
11049
11050   ac_header_preproc=no
11051 fi
11052 rm -f conftest.err conftest.$ac_ext
11053 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11054 echo "${ECHO_T}$ac_header_preproc" >&6
11055
11056 # So?  What about this header?
11057 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11058   yes:no: )
11059     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
11060 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11061     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
11062 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
11063     ac_header_preproc=yes
11064     ;;
11065   no:yes:* )
11066     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
11067 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
11068     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
11069 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
11070     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
11071 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
11072     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
11073 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11074     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
11075 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
11076     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
11077 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
11078     (
11079       cat <<\_ASBOX
11080 ## ---------------------------------------- ##
11081 ## Report this to pgsql-bugs@postgresql.org ##
11082 ## ---------------------------------------- ##
11083 _ASBOX
11084     ) |
11085       sed "s/^/$as_me: WARNING:     /" >&2
11086     ;;
11087 esac
11088 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
11089 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
11090 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
11091   echo $ECHO_N "(cached) $ECHO_C" >&6
11092 else
11093   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
11094 fi
11095 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
11096 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
11097
11098 fi
11099 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
11100   :
11101 else
11102   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
11103 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
11104    { (exit 1); exit 1; }; }
11105 fi
11106
11107
11108 fi
11109
11110
11111 ##
11112 ## Types, structures, compiler characteristics
11113 ##
11114
11115  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
11116 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11117 if test "${ac_cv_c_const+set}" = set; then
11118   echo $ECHO_N "(cached) $ECHO_C" >&6
11119 else
11120   cat >conftest.$ac_ext <<_ACEOF
11121 /* confdefs.h.  */
11122 _ACEOF
11123 cat confdefs.h >>conftest.$ac_ext
11124 cat >>conftest.$ac_ext <<_ACEOF
11125 /* end confdefs.h.  */
11126
11127 int
11128 main ()
11129 {
11130 /* FIXME: Include the comments suggested by Paul. */
11131 #ifndef __cplusplus
11132   /* Ultrix mips cc rejects this.  */
11133   typedef int charset[2];
11134   const charset x;
11135   /* SunOS 4.1.1 cc rejects this.  */
11136   char const *const *ccp;
11137   char **p;
11138   /* NEC SVR4.0.2 mips cc rejects this.  */
11139   struct point {int x, y;};
11140   static struct point const zero = {0,0};
11141   /* AIX XL C 1.02.0.0 rejects this.
11142      It does not let you subtract one const X* pointer from another in
11143      an arm of an if-expression whose if-part is not a constant
11144      expression */
11145   const char *g = "string";
11146   ccp = &g + (g ? g-g : 0);
11147   /* HPUX 7.0 cc rejects these. */
11148   ++ccp;
11149   p = (char**) ccp;
11150   ccp = (char const *const *) p;
11151   { /* SCO 3.2v4 cc rejects this.  */
11152     char *t;
11153     char const *s = 0 ? (char *) 0 : (char const *) 0;
11154
11155     *t++ = 0;
11156   }
11157   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11158     int x[] = {25, 17};
11159     const int *foo = &x[0];
11160     ++foo;
11161   }
11162   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11163     typedef const int *iptr;
11164     iptr p = 0;
11165     ++p;
11166   }
11167   { /* AIX XL C 1.02.0.0 rejects this saying
11168        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11169     struct s { int j; const int *ap[3]; };
11170     struct s *b; b->j = 5;
11171   }
11172   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11173     const int foo = 10;
11174   }
11175 #endif
11176
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext
11182 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11183   (eval $ac_compile) 2>conftest.er1
11184   ac_status=$?
11185   grep -v '^ *+' conftest.er1 >conftest.err
11186   rm -f conftest.er1
11187   cat conftest.err >&5
11188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189   (exit $ac_status); } &&
11190          { ac_try='test -z "$ac_c_werror_flag"
11191                          || test ! -s conftest.err'
11192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11193   (eval $ac_try) 2>&5
11194   ac_status=$?
11195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11196   (exit $ac_status); }; } &&
11197          { ac_try='test -s conftest.$ac_objext'
11198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11199   (eval $ac_try) 2>&5
11200   ac_status=$?
11201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11202   (exit $ac_status); }; }; then
11203   ac_cv_c_const=yes
11204 else
11205   echo "$as_me: failed program was:" >&5
11206 sed 's/^/| /' conftest.$ac_ext >&5
11207
11208 ac_cv_c_const=no
11209 fi
11210 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11211 fi
11212 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11213 echo "${ECHO_T}$ac_cv_c_const" >&6
11214 if test $ac_cv_c_const = no; then
11215
11216 cat >>confdefs.h <<\_ACEOF
11217 #define const
11218 _ACEOF
11219
11220 fi
11221
11222
11223 echo "$as_me:$LINENO: checking for inline" >&5
11224 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11225 if test "${ac_cv_c_inline+set}" = set; then
11226   echo $ECHO_N "(cached) $ECHO_C" >&6
11227 else
11228   ac_cv_c_inline=no
11229 for ac_kw in inline __inline__ __inline; do
11230   cat >conftest.$ac_ext <<_ACEOF
11231 /* confdefs.h.  */
11232 _ACEOF
11233 cat confdefs.h >>conftest.$ac_ext
11234 cat >>conftest.$ac_ext <<_ACEOF
11235 /* end confdefs.h.  */
11236 #ifndef __cplusplus
11237 typedef int foo_t;
11238 static $ac_kw foo_t static_foo () {return 0; }
11239 $ac_kw int foo () {return 0; }
11240 #endif
11241
11242 _ACEOF
11243 rm -f conftest.$ac_objext
11244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11245   (eval $ac_compile) 2>conftest.er1
11246   ac_status=$?
11247   grep -v '^ *+' conftest.er1 >conftest.err
11248   rm -f conftest.er1
11249   cat conftest.err >&5
11250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11251   (exit $ac_status); } &&
11252          { ac_try='test -z "$ac_c_werror_flag"
11253                          || test ! -s conftest.err'
11254   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11255   (eval $ac_try) 2>&5
11256   ac_status=$?
11257   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11258   (exit $ac_status); }; } &&
11259          { ac_try='test -s conftest.$ac_objext'
11260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11261   (eval $ac_try) 2>&5
11262   ac_status=$?
11263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264   (exit $ac_status); }; }; then
11265   ac_cv_c_inline=$ac_kw; break
11266 else
11267   echo "$as_me: failed program was:" >&5
11268 sed 's/^/| /' conftest.$ac_ext >&5
11269
11270 fi
11271 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11272 done
11273
11274 fi
11275 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11276 echo "${ECHO_T}$ac_cv_c_inline" >&6
11277 case $ac_cv_c_inline in
11278   inline | yes) ;;
11279   no)
11280 cat >>confdefs.h <<\_ACEOF
11281 #define inline
11282 _ACEOF
11283  ;;
11284   *)  cat >>confdefs.h <<_ACEOF
11285 #define inline $ac_cv_c_inline
11286 _ACEOF
11287  ;;
11288 esac
11289
11290 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11291 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11292 if test "${ac_cv_c_stringize+set}" = set; then
11293   echo $ECHO_N "(cached) $ECHO_C" >&6
11294 else
11295   cat >conftest.$ac_ext <<_ACEOF
11296 /* confdefs.h.  */
11297 _ACEOF
11298 cat confdefs.h >>conftest.$ac_ext
11299 cat >>conftest.$ac_ext <<_ACEOF
11300 /* end confdefs.h.  */
11301 #define x(y) #y
11302
11303 char *s = x(teststring);
11304 _ACEOF
11305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11306   $EGREP "#teststring" >/dev/null 2>&1; then
11307   ac_cv_c_stringize=no
11308 else
11309   ac_cv_c_stringize=yes
11310 fi
11311 rm -f conftest*
11312
11313 fi
11314 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11315 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11316 if test $ac_cv_c_stringize = yes; then
11317
11318 cat >>confdefs.h <<\_ACEOF
11319 #define HAVE_STRINGIZE 1
11320 _ACEOF
11321
11322 fi
11323
11324 echo "$as_me:$LINENO: checking for signed types" >&5
11325 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11326 if test "${pgac_cv_c_signed+set}" = set; then
11327   echo $ECHO_N "(cached) $ECHO_C" >&6
11328 else
11329   cat >conftest.$ac_ext <<_ACEOF
11330 /* confdefs.h.  */
11331 _ACEOF
11332 cat confdefs.h >>conftest.$ac_ext
11333 cat >>conftest.$ac_ext <<_ACEOF
11334 /* end confdefs.h.  */
11335
11336 int
11337 main ()
11338 {
11339 signed char c; signed short s; signed int i;
11340   ;
11341   return 0;
11342 }
11343 _ACEOF
11344 rm -f conftest.$ac_objext
11345 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11346   (eval $ac_compile) 2>conftest.er1
11347   ac_status=$?
11348   grep -v '^ *+' conftest.er1 >conftest.err
11349   rm -f conftest.er1
11350   cat conftest.err >&5
11351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352   (exit $ac_status); } &&
11353          { ac_try='test -z "$ac_c_werror_flag"
11354                          || test ! -s conftest.err'
11355   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11356   (eval $ac_try) 2>&5
11357   ac_status=$?
11358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11359   (exit $ac_status); }; } &&
11360          { ac_try='test -s conftest.$ac_objext'
11361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11362   (eval $ac_try) 2>&5
11363   ac_status=$?
11364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11365   (exit $ac_status); }; }; then
11366   pgac_cv_c_signed=yes
11367 else
11368   echo "$as_me: failed program was:" >&5
11369 sed 's/^/| /' conftest.$ac_ext >&5
11370
11371 pgac_cv_c_signed=no
11372 fi
11373 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11374 fi
11375 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11376 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11377 if test x"$pgac_cv_c_signed" = xno ; then
11378
11379 cat >>confdefs.h <<\_ACEOF
11380 #define signed
11381 _ACEOF
11382
11383 fi
11384 echo "$as_me:$LINENO: checking for working volatile" >&5
11385 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11386 if test "${ac_cv_c_volatile+set}" = set; then
11387   echo $ECHO_N "(cached) $ECHO_C" >&6
11388 else
11389   cat >conftest.$ac_ext <<_ACEOF
11390 /* confdefs.h.  */
11391 _ACEOF
11392 cat confdefs.h >>conftest.$ac_ext
11393 cat >>conftest.$ac_ext <<_ACEOF
11394 /* end confdefs.h.  */
11395
11396 int
11397 main ()
11398 {
11399
11400 volatile int x;
11401 int * volatile y;
11402   ;
11403   return 0;
11404 }
11405 _ACEOF
11406 rm -f conftest.$ac_objext
11407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11408   (eval $ac_compile) 2>conftest.er1
11409   ac_status=$?
11410   grep -v '^ *+' conftest.er1 >conftest.err
11411   rm -f conftest.er1
11412   cat conftest.err >&5
11413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11414   (exit $ac_status); } &&
11415          { ac_try='test -z "$ac_c_werror_flag"
11416                          || test ! -s conftest.err'
11417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11418   (eval $ac_try) 2>&5
11419   ac_status=$?
11420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421   (exit $ac_status); }; } &&
11422          { ac_try='test -s conftest.$ac_objext'
11423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11424   (eval $ac_try) 2>&5
11425   ac_status=$?
11426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427   (exit $ac_status); }; }; then
11428   ac_cv_c_volatile=yes
11429 else
11430   echo "$as_me: failed program was:" >&5
11431 sed 's/^/| /' conftest.$ac_ext >&5
11432
11433 ac_cv_c_volatile=no
11434 fi
11435 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11436 fi
11437 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11438 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11439 if test $ac_cv_c_volatile = no; then
11440
11441 cat >>confdefs.h <<\_ACEOF
11442 #define volatile
11443 _ACEOF
11444
11445 fi
11446
11447 echo "$as_me:$LINENO: checking for __func__" >&5
11448 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11449 if test "${pgac_cv_funcname_func_support+set}" = set; then
11450   echo $ECHO_N "(cached) $ECHO_C" >&6
11451 else
11452   cat >conftest.$ac_ext <<_ACEOF
11453 /* confdefs.h.  */
11454 _ACEOF
11455 cat confdefs.h >>conftest.$ac_ext
11456 cat >>conftest.$ac_ext <<_ACEOF
11457 /* end confdefs.h.  */
11458 #include <stdio.h>
11459 int
11460 main ()
11461 {
11462 printf("%s\n", __func__);
11463   ;
11464   return 0;
11465 }
11466 _ACEOF
11467 rm -f conftest.$ac_objext
11468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11469   (eval $ac_compile) 2>conftest.er1
11470   ac_status=$?
11471   grep -v '^ *+' conftest.er1 >conftest.err
11472   rm -f conftest.er1
11473   cat conftest.err >&5
11474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11475   (exit $ac_status); } &&
11476          { ac_try='test -z "$ac_c_werror_flag"
11477                          || test ! -s conftest.err'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; } &&
11483          { ac_try='test -s conftest.$ac_objext'
11484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11485   (eval $ac_try) 2>&5
11486   ac_status=$?
11487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11488   (exit $ac_status); }; }; then
11489   pgac_cv_funcname_func_support=yes
11490 else
11491   echo "$as_me: failed program was:" >&5
11492 sed 's/^/| /' conftest.$ac_ext >&5
11493
11494 pgac_cv_funcname_func_support=no
11495 fi
11496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11497 fi
11498 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11499 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11500 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11501
11502 cat >>confdefs.h <<\_ACEOF
11503 #define HAVE_FUNCNAME__FUNC 1
11504 _ACEOF
11505
11506 else
11507 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11508 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11509 if test "${pgac_cv_funcname_function_support+set}" = set; then
11510   echo $ECHO_N "(cached) $ECHO_C" >&6
11511 else
11512   cat >conftest.$ac_ext <<_ACEOF
11513 /* confdefs.h.  */
11514 _ACEOF
11515 cat confdefs.h >>conftest.$ac_ext
11516 cat >>conftest.$ac_ext <<_ACEOF
11517 /* end confdefs.h.  */
11518 #include <stdio.h>
11519 int
11520 main ()
11521 {
11522 printf("%s\n", __FUNCTION__);
11523   ;
11524   return 0;
11525 }
11526 _ACEOF
11527 rm -f conftest.$ac_objext
11528 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11529   (eval $ac_compile) 2>conftest.er1
11530   ac_status=$?
11531   grep -v '^ *+' conftest.er1 >conftest.err
11532   rm -f conftest.er1
11533   cat conftest.err >&5
11534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11535   (exit $ac_status); } &&
11536          { ac_try='test -z "$ac_c_werror_flag"
11537                          || test ! -s conftest.err'
11538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11539   (eval $ac_try) 2>&5
11540   ac_status=$?
11541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11542   (exit $ac_status); }; } &&
11543          { ac_try='test -s conftest.$ac_objext'
11544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11545   (eval $ac_try) 2>&5
11546   ac_status=$?
11547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11548   (exit $ac_status); }; }; then
11549   pgac_cv_funcname_function_support=yes
11550 else
11551   echo "$as_me: failed program was:" >&5
11552 sed 's/^/| /' conftest.$ac_ext >&5
11553
11554 pgac_cv_funcname_function_support=no
11555 fi
11556 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11557 fi
11558 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11559 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11560 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11561
11562 cat >>confdefs.h <<\_ACEOF
11563 #define HAVE_FUNCNAME__FUNCTION 1
11564 _ACEOF
11565
11566 fi
11567 fi
11568 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11569 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11570 if test "${ac_cv_struct_tm+set}" = set; then
11571   echo $ECHO_N "(cached) $ECHO_C" >&6
11572 else
11573   cat >conftest.$ac_ext <<_ACEOF
11574 /* confdefs.h.  */
11575 _ACEOF
11576 cat confdefs.h >>conftest.$ac_ext
11577 cat >>conftest.$ac_ext <<_ACEOF
11578 /* end confdefs.h.  */
11579 #include <sys/types.h>
11580 #include <time.h>
11581
11582 int
11583 main ()
11584 {
11585 struct tm *tp; tp->tm_sec;
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext
11591 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11592   (eval $ac_compile) 2>conftest.er1
11593   ac_status=$?
11594   grep -v '^ *+' conftest.er1 >conftest.err
11595   rm -f conftest.er1
11596   cat conftest.err >&5
11597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598   (exit $ac_status); } &&
11599          { ac_try='test -z "$ac_c_werror_flag"
11600                          || test ! -s conftest.err'
11601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11602   (eval $ac_try) 2>&5
11603   ac_status=$?
11604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11605   (exit $ac_status); }; } &&
11606          { ac_try='test -s conftest.$ac_objext'
11607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11608   (eval $ac_try) 2>&5
11609   ac_status=$?
11610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611   (exit $ac_status); }; }; then
11612   ac_cv_struct_tm=time.h
11613 else
11614   echo "$as_me: failed program was:" >&5
11615 sed 's/^/| /' conftest.$ac_ext >&5
11616
11617 ac_cv_struct_tm=sys/time.h
11618 fi
11619 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11620 fi
11621 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11622 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11623 if test $ac_cv_struct_tm = sys/time.h; then
11624
11625 cat >>confdefs.h <<\_ACEOF
11626 #define TM_IN_SYS_TIME 1
11627 _ACEOF
11628
11629 fi
11630
11631 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11632 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11633 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11634   echo $ECHO_N "(cached) $ECHO_C" >&6
11635 else
11636   cat >conftest.$ac_ext <<_ACEOF
11637 /* confdefs.h.  */
11638 _ACEOF
11639 cat confdefs.h >>conftest.$ac_ext
11640 cat >>conftest.$ac_ext <<_ACEOF
11641 /* end confdefs.h.  */
11642 #include <sys/types.h>
11643 #include <$ac_cv_struct_tm>
11644
11645
11646 int
11647 main ()
11648 {
11649 static struct tm ac_aggr;
11650 if (ac_aggr.tm_zone)
11651 return 0;
11652   ;
11653   return 0;
11654 }
11655 _ACEOF
11656 rm -f conftest.$ac_objext
11657 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11658   (eval $ac_compile) 2>conftest.er1
11659   ac_status=$?
11660   grep -v '^ *+' conftest.er1 >conftest.err
11661   rm -f conftest.er1
11662   cat conftest.err >&5
11663   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11664   (exit $ac_status); } &&
11665          { ac_try='test -z "$ac_c_werror_flag"
11666                          || test ! -s conftest.err'
11667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11668   (eval $ac_try) 2>&5
11669   ac_status=$?
11670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11671   (exit $ac_status); }; } &&
11672          { ac_try='test -s conftest.$ac_objext'
11673   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11674   (eval $ac_try) 2>&5
11675   ac_status=$?
11676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11677   (exit $ac_status); }; }; then
11678   ac_cv_member_struct_tm_tm_zone=yes
11679 else
11680   echo "$as_me: failed program was:" >&5
11681 sed 's/^/| /' conftest.$ac_ext >&5
11682
11683 cat >conftest.$ac_ext <<_ACEOF
11684 /* confdefs.h.  */
11685 _ACEOF
11686 cat confdefs.h >>conftest.$ac_ext
11687 cat >>conftest.$ac_ext <<_ACEOF
11688 /* end confdefs.h.  */
11689 #include <sys/types.h>
11690 #include <$ac_cv_struct_tm>
11691
11692
11693 int
11694 main ()
11695 {
11696 static struct tm ac_aggr;
11697 if (sizeof ac_aggr.tm_zone)
11698 return 0;
11699   ;
11700   return 0;
11701 }
11702 _ACEOF
11703 rm -f conftest.$ac_objext
11704 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11705   (eval $ac_compile) 2>conftest.er1
11706   ac_status=$?
11707   grep -v '^ *+' conftest.er1 >conftest.err
11708   rm -f conftest.er1
11709   cat conftest.err >&5
11710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711   (exit $ac_status); } &&
11712          { ac_try='test -z "$ac_c_werror_flag"
11713                          || test ! -s conftest.err'
11714   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11715   (eval $ac_try) 2>&5
11716   ac_status=$?
11717   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11718   (exit $ac_status); }; } &&
11719          { ac_try='test -s conftest.$ac_objext'
11720   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11721   (eval $ac_try) 2>&5
11722   ac_status=$?
11723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11724   (exit $ac_status); }; }; then
11725   ac_cv_member_struct_tm_tm_zone=yes
11726 else
11727   echo "$as_me: failed program was:" >&5
11728 sed 's/^/| /' conftest.$ac_ext >&5
11729
11730 ac_cv_member_struct_tm_tm_zone=no
11731 fi
11732 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11733 fi
11734 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11735 fi
11736 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11737 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11738 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11739
11740 cat >>confdefs.h <<_ACEOF
11741 #define HAVE_STRUCT_TM_TM_ZONE 1
11742 _ACEOF
11743
11744
11745 fi
11746
11747 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11748
11749 cat >>confdefs.h <<\_ACEOF
11750 #define HAVE_TM_ZONE 1
11751 _ACEOF
11752
11753 fi
11754 echo "$as_me:$LINENO: checking for tzname" >&5
11755 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11756 if test "${ac_cv_var_tzname+set}" = set; then
11757   echo $ECHO_N "(cached) $ECHO_C" >&6
11758 else
11759   cat >conftest.$ac_ext <<_ACEOF
11760 /* confdefs.h.  */
11761 _ACEOF
11762 cat confdefs.h >>conftest.$ac_ext
11763 cat >>conftest.$ac_ext <<_ACEOF
11764 /* end confdefs.h.  */
11765 #include <time.h>
11766 #ifndef tzname /* For SGI.  */
11767 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11768 #endif
11769
11770 int
11771 main ()
11772 {
11773 atoi(*tzname);
11774   ;
11775   return 0;
11776 }
11777 _ACEOF
11778 rm -f conftest.$ac_objext conftest$ac_exeext
11779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11780   (eval $ac_link) 2>conftest.er1
11781   ac_status=$?
11782   grep -v '^ *+' conftest.er1 >conftest.err
11783   rm -f conftest.er1
11784   cat conftest.err >&5
11785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11786   (exit $ac_status); } &&
11787          { ac_try='test -z "$ac_c_werror_flag"
11788                          || test ! -s conftest.err'
11789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11790   (eval $ac_try) 2>&5
11791   ac_status=$?
11792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11793   (exit $ac_status); }; } &&
11794          { ac_try='test -s conftest$ac_exeext'
11795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11796   (eval $ac_try) 2>&5
11797   ac_status=$?
11798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11799   (exit $ac_status); }; }; then
11800   ac_cv_var_tzname=yes
11801 else
11802   echo "$as_me: failed program was:" >&5
11803 sed 's/^/| /' conftest.$ac_ext >&5
11804
11805 ac_cv_var_tzname=no
11806 fi
11807 rm -f conftest.err conftest.$ac_objext \
11808       conftest$ac_exeext conftest.$ac_ext
11809 fi
11810 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11811 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11812 if test $ac_cv_var_tzname = yes; then
11813
11814 cat >>confdefs.h <<\_ACEOF
11815 #define HAVE_TZNAME 1
11816 _ACEOF
11817
11818 fi
11819
11820 echo "$as_me:$LINENO: checking for union semun" >&5
11821 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11822 if test "${ac_cv_type_union_semun+set}" = set; then
11823   echo $ECHO_N "(cached) $ECHO_C" >&6
11824 else
11825   cat >conftest.$ac_ext <<_ACEOF
11826 /* confdefs.h.  */
11827 _ACEOF
11828 cat confdefs.h >>conftest.$ac_ext
11829 cat >>conftest.$ac_ext <<_ACEOF
11830 /* end confdefs.h.  */
11831 #include <sys/types.h>
11832 #include <sys/ipc.h>
11833 #include <sys/sem.h>
11834
11835 int
11836 main ()
11837 {
11838 if ((union semun *) 0)
11839   return 0;
11840 if (sizeof (union semun))
11841   return 0;
11842   ;
11843   return 0;
11844 }
11845 _ACEOF
11846 rm -f conftest.$ac_objext
11847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11848   (eval $ac_compile) 2>conftest.er1
11849   ac_status=$?
11850   grep -v '^ *+' conftest.er1 >conftest.err
11851   rm -f conftest.er1
11852   cat conftest.err >&5
11853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11854   (exit $ac_status); } &&
11855          { ac_try='test -z "$ac_c_werror_flag"
11856                          || test ! -s conftest.err'
11857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11858   (eval $ac_try) 2>&5
11859   ac_status=$?
11860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11861   (exit $ac_status); }; } &&
11862          { ac_try='test -s conftest.$ac_objext'
11863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11864   (eval $ac_try) 2>&5
11865   ac_status=$?
11866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11867   (exit $ac_status); }; }; then
11868   ac_cv_type_union_semun=yes
11869 else
11870   echo "$as_me: failed program was:" >&5
11871 sed 's/^/| /' conftest.$ac_ext >&5
11872
11873 ac_cv_type_union_semun=no
11874 fi
11875 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11876 fi
11877 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11878 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11879 if test $ac_cv_type_union_semun = yes; then
11880
11881 cat >>confdefs.h <<_ACEOF
11882 #define HAVE_UNION_SEMUN 1
11883 _ACEOF
11884
11885
11886 fi
11887
11888 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11889 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11890 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11891   echo $ECHO_N "(cached) $ECHO_C" >&6
11892 else
11893   cat >conftest.$ac_ext <<_ACEOF
11894 /* confdefs.h.  */
11895 _ACEOF
11896 cat confdefs.h >>conftest.$ac_ext
11897 cat >>conftest.$ac_ext <<_ACEOF
11898 /* end confdefs.h.  */
11899 #include <sys/types.h>
11900 #ifdef HAVE_SYS_UN_H
11901 #include <sys/un.h>
11902 #endif
11903
11904
11905 int
11906 main ()
11907 {
11908 if ((struct sockaddr_un *) 0)
11909   return 0;
11910 if (sizeof (struct sockaddr_un))
11911   return 0;
11912   ;
11913   return 0;
11914 }
11915 _ACEOF
11916 rm -f conftest.$ac_objext
11917 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11918   (eval $ac_compile) 2>conftest.er1
11919   ac_status=$?
11920   grep -v '^ *+' conftest.er1 >conftest.err
11921   rm -f conftest.er1
11922   cat conftest.err >&5
11923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924   (exit $ac_status); } &&
11925          { ac_try='test -z "$ac_c_werror_flag"
11926                          || test ! -s conftest.err'
11927   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11928   (eval $ac_try) 2>&5
11929   ac_status=$?
11930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11931   (exit $ac_status); }; } &&
11932          { ac_try='test -s conftest.$ac_objext'
11933   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   ac_cv_type_struct_sockaddr_un=yes
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 sed 's/^/| /' conftest.$ac_ext >&5
11942
11943 ac_cv_type_struct_sockaddr_un=no
11944 fi
11945 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11946 fi
11947 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11948 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11949 if test $ac_cv_type_struct_sockaddr_un = yes; then
11950
11951 cat >>confdefs.h <<_ACEOF
11952 #define HAVE_STRUCT_SOCKADDR_UN 1
11953 _ACEOF
11954
11955
11956 cat >>confdefs.h <<\_ACEOF
11957 #define HAVE_UNIX_SOCKETS 1
11958 _ACEOF
11959
11960 fi
11961
11962 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11963 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11964 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11965   echo $ECHO_N "(cached) $ECHO_C" >&6
11966 else
11967   cat >conftest.$ac_ext <<_ACEOF
11968 /* confdefs.h.  */
11969 _ACEOF
11970 cat confdefs.h >>conftest.$ac_ext
11971 cat >>conftest.$ac_ext <<_ACEOF
11972 /* end confdefs.h.  */
11973 #include <sys/types.h>
11974 #ifdef HAVE_SYS_SOCKET_H
11975 #include <sys/socket.h>
11976 #endif
11977
11978
11979 int
11980 main ()
11981 {
11982 if ((struct sockaddr_storage *) 0)
11983   return 0;
11984 if (sizeof (struct sockaddr_storage))
11985   return 0;
11986   ;
11987   return 0;
11988 }
11989 _ACEOF
11990 rm -f conftest.$ac_objext
11991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11992   (eval $ac_compile) 2>conftest.er1
11993   ac_status=$?
11994   grep -v '^ *+' conftest.er1 >conftest.err
11995   rm -f conftest.er1
11996   cat conftest.err >&5
11997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11998   (exit $ac_status); } &&
11999          { ac_try='test -z "$ac_c_werror_flag"
12000                          || test ! -s conftest.err'
12001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12002   (eval $ac_try) 2>&5
12003   ac_status=$?
12004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12005   (exit $ac_status); }; } &&
12006          { ac_try='test -s conftest.$ac_objext'
12007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12008   (eval $ac_try) 2>&5
12009   ac_status=$?
12010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12011   (exit $ac_status); }; }; then
12012   ac_cv_type_struct_sockaddr_storage=yes
12013 else
12014   echo "$as_me: failed program was:" >&5
12015 sed 's/^/| /' conftest.$ac_ext >&5
12016
12017 ac_cv_type_struct_sockaddr_storage=no
12018 fi
12019 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12020 fi
12021 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
12022 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
12023 if test $ac_cv_type_struct_sockaddr_storage = yes; then
12024
12025 cat >>confdefs.h <<_ACEOF
12026 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12027 _ACEOF
12028
12029
12030 fi
12031
12032 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
12033 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
12034 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
12035   echo $ECHO_N "(cached) $ECHO_C" >&6
12036 else
12037   cat >conftest.$ac_ext <<_ACEOF
12038 /* confdefs.h.  */
12039 _ACEOF
12040 cat confdefs.h >>conftest.$ac_ext
12041 cat >>conftest.$ac_ext <<_ACEOF
12042 /* end confdefs.h.  */
12043 #include <sys/types.h>
12044 #ifdef HAVE_SYS_SOCKET_H
12045 #include <sys/socket.h>
12046 #endif
12047
12048
12049 int
12050 main ()
12051 {
12052 static struct sockaddr_storage ac_aggr;
12053 if (ac_aggr.ss_family)
12054 return 0;
12055   ;
12056   return 0;
12057 }
12058 _ACEOF
12059 rm -f conftest.$ac_objext
12060 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12061   (eval $ac_compile) 2>conftest.er1
12062   ac_status=$?
12063   grep -v '^ *+' conftest.er1 >conftest.err
12064   rm -f conftest.er1
12065   cat conftest.err >&5
12066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12067   (exit $ac_status); } &&
12068          { ac_try='test -z "$ac_c_werror_flag"
12069                          || test ! -s conftest.err'
12070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12071   (eval $ac_try) 2>&5
12072   ac_status=$?
12073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12074   (exit $ac_status); }; } &&
12075          { ac_try='test -s conftest.$ac_objext'
12076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12077   (eval $ac_try) 2>&5
12078   ac_status=$?
12079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12080   (exit $ac_status); }; }; then
12081   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12082 else
12083   echo "$as_me: failed program was:" >&5
12084 sed 's/^/| /' conftest.$ac_ext >&5
12085
12086 cat >conftest.$ac_ext <<_ACEOF
12087 /* confdefs.h.  */
12088 _ACEOF
12089 cat confdefs.h >>conftest.$ac_ext
12090 cat >>conftest.$ac_ext <<_ACEOF
12091 /* end confdefs.h.  */
12092 #include <sys/types.h>
12093 #ifdef HAVE_SYS_SOCKET_H
12094 #include <sys/socket.h>
12095 #endif
12096
12097
12098 int
12099 main ()
12100 {
12101 static struct sockaddr_storage ac_aggr;
12102 if (sizeof ac_aggr.ss_family)
12103 return 0;
12104   ;
12105   return 0;
12106 }
12107 _ACEOF
12108 rm -f conftest.$ac_objext
12109 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12110   (eval $ac_compile) 2>conftest.er1
12111   ac_status=$?
12112   grep -v '^ *+' conftest.er1 >conftest.err
12113   rm -f conftest.er1
12114   cat conftest.err >&5
12115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12116   (exit $ac_status); } &&
12117          { ac_try='test -z "$ac_c_werror_flag"
12118                          || test ! -s conftest.err'
12119   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12120   (eval $ac_try) 2>&5
12121   ac_status=$?
12122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12123   (exit $ac_status); }; } &&
12124          { ac_try='test -s conftest.$ac_objext'
12125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12126   (eval $ac_try) 2>&5
12127   ac_status=$?
12128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12129   (exit $ac_status); }; }; then
12130   ac_cv_member_struct_sockaddr_storage_ss_family=yes
12131 else
12132   echo "$as_me: failed program was:" >&5
12133 sed 's/^/| /' conftest.$ac_ext >&5
12134
12135 ac_cv_member_struct_sockaddr_storage_ss_family=no
12136 fi
12137 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12138 fi
12139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12140 fi
12141 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
12142 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
12143 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
12144
12145 cat >>confdefs.h <<_ACEOF
12146 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12147 _ACEOF
12148
12149
12150 fi
12151 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
12152 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
12153 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
12154   echo $ECHO_N "(cached) $ECHO_C" >&6
12155 else
12156   cat >conftest.$ac_ext <<_ACEOF
12157 /* confdefs.h.  */
12158 _ACEOF
12159 cat confdefs.h >>conftest.$ac_ext
12160 cat >>conftest.$ac_ext <<_ACEOF
12161 /* end confdefs.h.  */
12162 #include <sys/types.h>
12163 #ifdef HAVE_SYS_SOCKET_H
12164 #include <sys/socket.h>
12165 #endif
12166
12167
12168 int
12169 main ()
12170 {
12171 static struct sockaddr_storage ac_aggr;
12172 if (ac_aggr.__ss_family)
12173 return 0;
12174   ;
12175   return 0;
12176 }
12177 _ACEOF
12178 rm -f conftest.$ac_objext
12179 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12180   (eval $ac_compile) 2>conftest.er1
12181   ac_status=$?
12182   grep -v '^ *+' conftest.er1 >conftest.err
12183   rm -f conftest.er1
12184   cat conftest.err >&5
12185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186   (exit $ac_status); } &&
12187          { ac_try='test -z "$ac_c_werror_flag"
12188                          || test ! -s conftest.err'
12189   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12190   (eval $ac_try) 2>&5
12191   ac_status=$?
12192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193   (exit $ac_status); }; } &&
12194          { ac_try='test -s conftest.$ac_objext'
12195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199   (exit $ac_status); }; }; then
12200   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12201 else
12202   echo "$as_me: failed program was:" >&5
12203 sed 's/^/| /' conftest.$ac_ext >&5
12204
12205 cat >conftest.$ac_ext <<_ACEOF
12206 /* confdefs.h.  */
12207 _ACEOF
12208 cat confdefs.h >>conftest.$ac_ext
12209 cat >>conftest.$ac_ext <<_ACEOF
12210 /* end confdefs.h.  */
12211 #include <sys/types.h>
12212 #ifdef HAVE_SYS_SOCKET_H
12213 #include <sys/socket.h>
12214 #endif
12215
12216
12217 int
12218 main ()
12219 {
12220 static struct sockaddr_storage ac_aggr;
12221 if (sizeof ac_aggr.__ss_family)
12222 return 0;
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext
12228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>conftest.er1
12230   ac_status=$?
12231   grep -v '^ *+' conftest.er1 >conftest.err
12232   rm -f conftest.er1
12233   cat conftest.err >&5
12234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12235   (exit $ac_status); } &&
12236          { ac_try='test -z "$ac_c_werror_flag"
12237                          || test ! -s conftest.err'
12238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12239   (eval $ac_try) 2>&5
12240   ac_status=$?
12241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12242   (exit $ac_status); }; } &&
12243          { ac_try='test -s conftest.$ac_objext'
12244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12245   (eval $ac_try) 2>&5
12246   ac_status=$?
12247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12248   (exit $ac_status); }; }; then
12249   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12250 else
12251   echo "$as_me: failed program was:" >&5
12252 sed 's/^/| /' conftest.$ac_ext >&5
12253
12254 ac_cv_member_struct_sockaddr_storage___ss_family=no
12255 fi
12256 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12257 fi
12258 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12259 fi
12260 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12261 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12262 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12263
12264 cat >>confdefs.h <<_ACEOF
12265 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12266 _ACEOF
12267
12268
12269 fi
12270 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12271 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12272 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   cat >conftest.$ac_ext <<_ACEOF
12276 /* confdefs.h.  */
12277 _ACEOF
12278 cat confdefs.h >>conftest.$ac_ext
12279 cat >>conftest.$ac_ext <<_ACEOF
12280 /* end confdefs.h.  */
12281 #include <sys/types.h>
12282 #ifdef HAVE_SYS_SOCKET_H
12283 #include <sys/socket.h>
12284 #endif
12285
12286
12287 int
12288 main ()
12289 {
12290 static struct sockaddr_storage ac_aggr;
12291 if (ac_aggr.ss_len)
12292 return 0;
12293   ;
12294   return 0;
12295 }
12296 _ACEOF
12297 rm -f conftest.$ac_objext
12298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12299   (eval $ac_compile) 2>conftest.er1
12300   ac_status=$?
12301   grep -v '^ *+' conftest.er1 >conftest.err
12302   rm -f conftest.er1
12303   cat conftest.err >&5
12304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12305   (exit $ac_status); } &&
12306          { ac_try='test -z "$ac_c_werror_flag"
12307                          || test ! -s conftest.err'
12308   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12309   (eval $ac_try) 2>&5
12310   ac_status=$?
12311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12312   (exit $ac_status); }; } &&
12313          { ac_try='test -s conftest.$ac_objext'
12314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12318   (exit $ac_status); }; }; then
12319   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 sed 's/^/| /' conftest.$ac_ext >&5
12323
12324 cat >conftest.$ac_ext <<_ACEOF
12325 /* confdefs.h.  */
12326 _ACEOF
12327 cat confdefs.h >>conftest.$ac_ext
12328 cat >>conftest.$ac_ext <<_ACEOF
12329 /* end confdefs.h.  */
12330 #include <sys/types.h>
12331 #ifdef HAVE_SYS_SOCKET_H
12332 #include <sys/socket.h>
12333 #endif
12334
12335
12336 int
12337 main ()
12338 {
12339 static struct sockaddr_storage ac_aggr;
12340 if (sizeof ac_aggr.ss_len)
12341 return 0;
12342   ;
12343   return 0;
12344 }
12345 _ACEOF
12346 rm -f conftest.$ac_objext
12347 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12348   (eval $ac_compile) 2>conftest.er1
12349   ac_status=$?
12350   grep -v '^ *+' conftest.er1 >conftest.err
12351   rm -f conftest.er1
12352   cat conftest.err >&5
12353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -z "$ac_c_werror_flag"
12356                          || test ! -s conftest.err'
12357   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12358   (eval $ac_try) 2>&5
12359   ac_status=$?
12360   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12361   (exit $ac_status); }; } &&
12362          { ac_try='test -s conftest.$ac_objext'
12363   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12369 else
12370   echo "$as_me: failed program was:" >&5
12371 sed 's/^/| /' conftest.$ac_ext >&5
12372
12373 ac_cv_member_struct_sockaddr_storage_ss_len=no
12374 fi
12375 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12376 fi
12377 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12378 fi
12379 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12380 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12381 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12382
12383 cat >>confdefs.h <<_ACEOF
12384 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12385 _ACEOF
12386
12387
12388 fi
12389 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12390 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12391 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12392   echo $ECHO_N "(cached) $ECHO_C" >&6
12393 else
12394   cat >conftest.$ac_ext <<_ACEOF
12395 /* confdefs.h.  */
12396 _ACEOF
12397 cat confdefs.h >>conftest.$ac_ext
12398 cat >>conftest.$ac_ext <<_ACEOF
12399 /* end confdefs.h.  */
12400 #include <sys/types.h>
12401 #ifdef HAVE_SYS_SOCKET_H
12402 #include <sys/socket.h>
12403 #endif
12404
12405
12406 int
12407 main ()
12408 {
12409 static struct sockaddr_storage ac_aggr;
12410 if (ac_aggr.__ss_len)
12411 return 0;
12412   ;
12413   return 0;
12414 }
12415 _ACEOF
12416 rm -f conftest.$ac_objext
12417 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12418   (eval $ac_compile) 2>conftest.er1
12419   ac_status=$?
12420   grep -v '^ *+' conftest.er1 >conftest.err
12421   rm -f conftest.er1
12422   cat conftest.err >&5
12423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424   (exit $ac_status); } &&
12425          { ac_try='test -z "$ac_c_werror_flag"
12426                          || test ! -s conftest.err'
12427   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12431   (exit $ac_status); }; } &&
12432          { ac_try='test -s conftest.$ac_objext'
12433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12434   (eval $ac_try) 2>&5
12435   ac_status=$?
12436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12437   (exit $ac_status); }; }; then
12438   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12439 else
12440   echo "$as_me: failed program was:" >&5
12441 sed 's/^/| /' conftest.$ac_ext >&5
12442
12443 cat >conftest.$ac_ext <<_ACEOF
12444 /* confdefs.h.  */
12445 _ACEOF
12446 cat confdefs.h >>conftest.$ac_ext
12447 cat >>conftest.$ac_ext <<_ACEOF
12448 /* end confdefs.h.  */
12449 #include <sys/types.h>
12450 #ifdef HAVE_SYS_SOCKET_H
12451 #include <sys/socket.h>
12452 #endif
12453
12454
12455 int
12456 main ()
12457 {
12458 static struct sockaddr_storage ac_aggr;
12459 if (sizeof ac_aggr.__ss_len)
12460 return 0;
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -f conftest.$ac_objext
12466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12467   (eval $ac_compile) 2>conftest.er1
12468   ac_status=$?
12469   grep -v '^ *+' conftest.er1 >conftest.err
12470   rm -f conftest.er1
12471   cat conftest.err >&5
12472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12473   (exit $ac_status); } &&
12474          { ac_try='test -z "$ac_c_werror_flag"
12475                          || test ! -s conftest.err'
12476   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12477   (eval $ac_try) 2>&5
12478   ac_status=$?
12479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12480   (exit $ac_status); }; } &&
12481          { ac_try='test -s conftest.$ac_objext'
12482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12483   (eval $ac_try) 2>&5
12484   ac_status=$?
12485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12486   (exit $ac_status); }; }; then
12487   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12488 else
12489   echo "$as_me: failed program was:" >&5
12490 sed 's/^/| /' conftest.$ac_ext >&5
12491
12492 ac_cv_member_struct_sockaddr_storage___ss_len=no
12493 fi
12494 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12495 fi
12496 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12497 fi
12498 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12499 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12500 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12501
12502 cat >>confdefs.h <<_ACEOF
12503 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12504 _ACEOF
12505
12506
12507 fi
12508 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12509 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12510 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12511   echo $ECHO_N "(cached) $ECHO_C" >&6
12512 else
12513   cat >conftest.$ac_ext <<_ACEOF
12514 /* confdefs.h.  */
12515 _ACEOF
12516 cat confdefs.h >>conftest.$ac_ext
12517 cat >>conftest.$ac_ext <<_ACEOF
12518 /* end confdefs.h.  */
12519 #include <sys/types.h>
12520 #ifdef HAVE_SYS_SOCKET_H
12521 #include <sys/socket.h>
12522 #endif
12523
12524
12525 int
12526 main ()
12527 {
12528 static struct sockaddr ac_aggr;
12529 if (ac_aggr.sa_len)
12530 return 0;
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12537   (eval $ac_compile) 2>conftest.er1
12538   ac_status=$?
12539   grep -v '^ *+' conftest.er1 >conftest.err
12540   rm -f conftest.er1
12541   cat conftest.err >&5
12542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12543   (exit $ac_status); } &&
12544          { ac_try='test -z "$ac_c_werror_flag"
12545                          || test ! -s conftest.err'
12546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12547   (eval $ac_try) 2>&5
12548   ac_status=$?
12549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12550   (exit $ac_status); }; } &&
12551          { ac_try='test -s conftest.$ac_objext'
12552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12553   (eval $ac_try) 2>&5
12554   ac_status=$?
12555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12556   (exit $ac_status); }; }; then
12557   ac_cv_member_struct_sockaddr_sa_len=yes
12558 else
12559   echo "$as_me: failed program was:" >&5
12560 sed 's/^/| /' conftest.$ac_ext >&5
12561
12562 cat >conftest.$ac_ext <<_ACEOF
12563 /* confdefs.h.  */
12564 _ACEOF
12565 cat confdefs.h >>conftest.$ac_ext
12566 cat >>conftest.$ac_ext <<_ACEOF
12567 /* end confdefs.h.  */
12568 #include <sys/types.h>
12569 #ifdef HAVE_SYS_SOCKET_H
12570 #include <sys/socket.h>
12571 #endif
12572
12573
12574 int
12575 main ()
12576 {
12577 static struct sockaddr ac_aggr;
12578 if (sizeof ac_aggr.sa_len)
12579 return 0;
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 rm -f conftest.$ac_objext
12585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12586   (eval $ac_compile) 2>conftest.er1
12587   ac_status=$?
12588   grep -v '^ *+' conftest.er1 >conftest.err
12589   rm -f conftest.er1
12590   cat conftest.err >&5
12591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12592   (exit $ac_status); } &&
12593          { ac_try='test -z "$ac_c_werror_flag"
12594                          || test ! -s conftest.err'
12595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12596   (eval $ac_try) 2>&5
12597   ac_status=$?
12598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599   (exit $ac_status); }; } &&
12600          { ac_try='test -s conftest.$ac_objext'
12601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12602   (eval $ac_try) 2>&5
12603   ac_status=$?
12604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12605   (exit $ac_status); }; }; then
12606   ac_cv_member_struct_sockaddr_sa_len=yes
12607 else
12608   echo "$as_me: failed program was:" >&5
12609 sed 's/^/| /' conftest.$ac_ext >&5
12610
12611 ac_cv_member_struct_sockaddr_sa_len=no
12612 fi
12613 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12614 fi
12615 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12616 fi
12617 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12618 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12619 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12620
12621 cat >>confdefs.h <<_ACEOF
12622 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12623 _ACEOF
12624
12625
12626 fi
12627
12628 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12629 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12630 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12631   echo $ECHO_N "(cached) $ECHO_C" >&6
12632 else
12633   cat >conftest.$ac_ext <<_ACEOF
12634 /* confdefs.h.  */
12635 _ACEOF
12636 cat confdefs.h >>conftest.$ac_ext
12637 cat >>conftest.$ac_ext <<_ACEOF
12638 /* end confdefs.h.  */
12639 #include <sys/types.h>
12640 #include <sys/socket.h>
12641 #include <netdb.h>
12642
12643
12644 int
12645 main ()
12646 {
12647 if ((struct addrinfo *) 0)
12648   return 0;
12649 if (sizeof (struct addrinfo))
12650   return 0;
12651   ;
12652   return 0;
12653 }
12654 _ACEOF
12655 rm -f conftest.$ac_objext
12656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12657   (eval $ac_compile) 2>conftest.er1
12658   ac_status=$?
12659   grep -v '^ *+' conftest.er1 >conftest.err
12660   rm -f conftest.er1
12661   cat conftest.err >&5
12662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12663   (exit $ac_status); } &&
12664          { ac_try='test -z "$ac_c_werror_flag"
12665                          || test ! -s conftest.err'
12666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12667   (eval $ac_try) 2>&5
12668   ac_status=$?
12669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12670   (exit $ac_status); }; } &&
12671          { ac_try='test -s conftest.$ac_objext'
12672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12673   (eval $ac_try) 2>&5
12674   ac_status=$?
12675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12676   (exit $ac_status); }; }; then
12677   ac_cv_type_struct_addrinfo=yes
12678 else
12679   echo "$as_me: failed program was:" >&5
12680 sed 's/^/| /' conftest.$ac_ext >&5
12681
12682 ac_cv_type_struct_addrinfo=no
12683 fi
12684 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12685 fi
12686 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12687 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12688 if test $ac_cv_type_struct_addrinfo = yes; then
12689
12690 cat >>confdefs.h <<_ACEOF
12691 #define HAVE_STRUCT_ADDRINFO 1
12692 _ACEOF
12693
12694
12695 fi
12696
12697
12698 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12699 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12700 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12701   echo $ECHO_N "(cached) $ECHO_C" >&6
12702 else
12703   cat >conftest.$ac_ext <<_ACEOF
12704 /* confdefs.h.  */
12705 _ACEOF
12706 cat confdefs.h >>conftest.$ac_ext
12707 cat >>conftest.$ac_ext <<_ACEOF
12708 /* end confdefs.h.  */
12709 #include <sys/param.h>
12710 #include <sys/types.h>
12711 #include <sys/socket.h>
12712 #include <sys/ucred.h>
12713
12714 int
12715 main ()
12716 {
12717 if ((struct cmsgcred *) 0)
12718   return 0;
12719 if (sizeof (struct cmsgcred))
12720   return 0;
12721   ;
12722   return 0;
12723 }
12724 _ACEOF
12725 rm -f conftest.$ac_objext
12726 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12727   (eval $ac_compile) 2>conftest.er1
12728   ac_status=$?
12729   grep -v '^ *+' conftest.er1 >conftest.err
12730   rm -f conftest.er1
12731   cat conftest.err >&5
12732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12733   (exit $ac_status); } &&
12734          { ac_try='test -z "$ac_c_werror_flag"
12735                          || test ! -s conftest.err'
12736   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12737   (eval $ac_try) 2>&5
12738   ac_status=$?
12739   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12740   (exit $ac_status); }; } &&
12741          { ac_try='test -s conftest.$ac_objext'
12742   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12743   (eval $ac_try) 2>&5
12744   ac_status=$?
12745   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12746   (exit $ac_status); }; }; then
12747   ac_cv_type_struct_cmsgcred=yes
12748 else
12749   echo "$as_me: failed program was:" >&5
12750 sed 's/^/| /' conftest.$ac_ext >&5
12751
12752 ac_cv_type_struct_cmsgcred=no
12753 fi
12754 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12755 fi
12756 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12757 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12758 if test $ac_cv_type_struct_cmsgcred = yes; then
12759
12760 cat >>confdefs.h <<_ACEOF
12761 #define HAVE_STRUCT_CMSGCRED 1
12762 _ACEOF
12763
12764
12765 fi
12766 echo "$as_me:$LINENO: checking for struct fcred" >&5
12767 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12768 if test "${ac_cv_type_struct_fcred+set}" = set; then
12769   echo $ECHO_N "(cached) $ECHO_C" >&6
12770 else
12771   cat >conftest.$ac_ext <<_ACEOF
12772 /* confdefs.h.  */
12773 _ACEOF
12774 cat confdefs.h >>conftest.$ac_ext
12775 cat >>conftest.$ac_ext <<_ACEOF
12776 /* end confdefs.h.  */
12777 #include <sys/param.h>
12778 #include <sys/types.h>
12779 #include <sys/socket.h>
12780 #include <sys/ucred.h>
12781
12782 int
12783 main ()
12784 {
12785 if ((struct fcred *) 0)
12786   return 0;
12787 if (sizeof (struct fcred))
12788   return 0;
12789   ;
12790   return 0;
12791 }
12792 _ACEOF
12793 rm -f conftest.$ac_objext
12794 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12795   (eval $ac_compile) 2>conftest.er1
12796   ac_status=$?
12797   grep -v '^ *+' conftest.er1 >conftest.err
12798   rm -f conftest.er1
12799   cat conftest.err >&5
12800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12801   (exit $ac_status); } &&
12802          { ac_try='test -z "$ac_c_werror_flag"
12803                          || test ! -s conftest.err'
12804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12805   (eval $ac_try) 2>&5
12806   ac_status=$?
12807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12808   (exit $ac_status); }; } &&
12809          { ac_try='test -s conftest.$ac_objext'
12810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); }; }; then
12815   ac_cv_type_struct_fcred=yes
12816 else
12817   echo "$as_me: failed program was:" >&5
12818 sed 's/^/| /' conftest.$ac_ext >&5
12819
12820 ac_cv_type_struct_fcred=no
12821 fi
12822 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12823 fi
12824 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12825 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12826 if test $ac_cv_type_struct_fcred = yes; then
12827
12828 cat >>confdefs.h <<_ACEOF
12829 #define HAVE_STRUCT_FCRED 1
12830 _ACEOF
12831
12832
12833 fi
12834 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12835 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12836 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12837   echo $ECHO_N "(cached) $ECHO_C" >&6
12838 else
12839   cat >conftest.$ac_ext <<_ACEOF
12840 /* confdefs.h.  */
12841 _ACEOF
12842 cat confdefs.h >>conftest.$ac_ext
12843 cat >>conftest.$ac_ext <<_ACEOF
12844 /* end confdefs.h.  */
12845 #include <sys/param.h>
12846 #include <sys/types.h>
12847 #include <sys/socket.h>
12848 #include <sys/ucred.h>
12849
12850 int
12851 main ()
12852 {
12853 if ((struct sockcred *) 0)
12854   return 0;
12855 if (sizeof (struct sockcred))
12856   return 0;
12857   ;
12858   return 0;
12859 }
12860 _ACEOF
12861 rm -f conftest.$ac_objext
12862 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12863   (eval $ac_compile) 2>conftest.er1
12864   ac_status=$?
12865   grep -v '^ *+' conftest.er1 >conftest.err
12866   rm -f conftest.er1
12867   cat conftest.err >&5
12868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869   (exit $ac_status); } &&
12870          { ac_try='test -z "$ac_c_werror_flag"
12871                          || test ! -s conftest.err'
12872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12873   (eval $ac_try) 2>&5
12874   ac_status=$?
12875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12876   (exit $ac_status); }; } &&
12877          { ac_try='test -s conftest.$ac_objext'
12878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   ac_cv_type_struct_sockcred=yes
12884 else
12885   echo "$as_me: failed program was:" >&5
12886 sed 's/^/| /' conftest.$ac_ext >&5
12887
12888 ac_cv_type_struct_sockcred=no
12889 fi
12890 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12891 fi
12892 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12893 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12894 if test $ac_cv_type_struct_sockcred = yes; then
12895
12896 cat >>confdefs.h <<_ACEOF
12897 #define HAVE_STRUCT_SOCKCRED 1
12898 _ACEOF
12899
12900
12901 fi
12902
12903
12904 echo "$as_me:$LINENO: checking for struct option" >&5
12905 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12906 if test "${ac_cv_type_struct_option+set}" = set; then
12907   echo $ECHO_N "(cached) $ECHO_C" >&6
12908 else
12909   cat >conftest.$ac_ext <<_ACEOF
12910 /* confdefs.h.  */
12911 _ACEOF
12912 cat confdefs.h >>conftest.$ac_ext
12913 cat >>conftest.$ac_ext <<_ACEOF
12914 /* end confdefs.h.  */
12915 #ifdef HAVE_GETOPT_H
12916 #include <getopt.h>
12917 #endif
12918
12919 int
12920 main ()
12921 {
12922 if ((struct option *) 0)
12923   return 0;
12924 if (sizeof (struct option))
12925   return 0;
12926   ;
12927   return 0;
12928 }
12929 _ACEOF
12930 rm -f conftest.$ac_objext
12931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12932   (eval $ac_compile) 2>conftest.er1
12933   ac_status=$?
12934   grep -v '^ *+' conftest.er1 >conftest.err
12935   rm -f conftest.er1
12936   cat conftest.err >&5
12937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12938   (exit $ac_status); } &&
12939          { ac_try='test -z "$ac_c_werror_flag"
12940                          || test ! -s conftest.err'
12941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12942   (eval $ac_try) 2>&5
12943   ac_status=$?
12944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12945   (exit $ac_status); }; } &&
12946          { ac_try='test -s conftest.$ac_objext'
12947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12948   (eval $ac_try) 2>&5
12949   ac_status=$?
12950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951   (exit $ac_status); }; }; then
12952   ac_cv_type_struct_option=yes
12953 else
12954   echo "$as_me: failed program was:" >&5
12955 sed 's/^/| /' conftest.$ac_ext >&5
12956
12957 ac_cv_type_struct_option=no
12958 fi
12959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12960 fi
12961 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12962 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12963 if test $ac_cv_type_struct_option = yes; then
12964
12965 cat >>confdefs.h <<_ACEOF
12966 #define HAVE_STRUCT_OPTION 1
12967 _ACEOF
12968
12969
12970 fi
12971
12972
12973 if test "$with_zlib" = yes; then
12974   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12975   # did not).  While we could work around the lack of z_streamp, it
12976   # seems unwise to encourage people to use such old zlib versions...
12977   echo "$as_me:$LINENO: checking for z_streamp" >&5
12978 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12979 if test "${ac_cv_type_z_streamp+set}" = set; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 /* confdefs.h.  */
12984 _ACEOF
12985 cat confdefs.h >>conftest.$ac_ext
12986 cat >>conftest.$ac_ext <<_ACEOF
12987 /* end confdefs.h.  */
12988 #include <zlib.h>
12989
12990 int
12991 main ()
12992 {
12993 if ((z_streamp *) 0)
12994   return 0;
12995 if (sizeof (z_streamp))
12996   return 0;
12997   ;
12998   return 0;
12999 }
13000 _ACEOF
13001 rm -f conftest.$ac_objext
13002 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13003   (eval $ac_compile) 2>conftest.er1
13004   ac_status=$?
13005   grep -v '^ *+' conftest.er1 >conftest.err
13006   rm -f conftest.er1
13007   cat conftest.err >&5
13008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009   (exit $ac_status); } &&
13010          { ac_try='test -z "$ac_c_werror_flag"
13011                          || test ! -s conftest.err'
13012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13013   (eval $ac_try) 2>&5
13014   ac_status=$?
13015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13016   (exit $ac_status); }; } &&
13017          { ac_try='test -s conftest.$ac_objext'
13018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   ac_cv_type_z_streamp=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 sed 's/^/| /' conftest.$ac_ext >&5
13027
13028 ac_cv_type_z_streamp=no
13029 fi
13030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13031 fi
13032 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
13033 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
13034 if test $ac_cv_type_z_streamp = yes; then
13035   :
13036 else
13037   { { echo "$as_me:$LINENO: error: zlib version is too old
13038 Use --without-zlib to disable zlib support." >&5
13039 echo "$as_me: error: zlib version is too old
13040 Use --without-zlib to disable zlib support." >&2;}
13041    { (exit 1); exit 1; }; }
13042 fi
13043
13044 fi
13045
13046 if test "$with_krb5" = yes; then
13047 # Check for differences between MIT and Heimdal (KTH) releases
13048   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
13049 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
13050 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
13051   echo $ECHO_N "(cached) $ECHO_C" >&6
13052 else
13053   cat >conftest.$ac_ext <<_ACEOF
13054 /* confdefs.h.  */
13055 _ACEOF
13056 cat confdefs.h >>conftest.$ac_ext
13057 cat >>conftest.$ac_ext <<_ACEOF
13058 /* end confdefs.h.  */
13059 #include <krb5.h>
13060
13061 int
13062 main ()
13063 {
13064 static krb5_ticket ac_aggr;
13065 if (ac_aggr.enc_part2)
13066 return 0;
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 rm -f conftest.$ac_objext
13072 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13073   (eval $ac_compile) 2>conftest.er1
13074   ac_status=$?
13075   grep -v '^ *+' conftest.er1 >conftest.err
13076   rm -f conftest.er1
13077   cat conftest.err >&5
13078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079   (exit $ac_status); } &&
13080          { ac_try='test -z "$ac_c_werror_flag"
13081                          || test ! -s conftest.err'
13082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13086   (exit $ac_status); }; } &&
13087          { ac_try='test -s conftest.$ac_objext'
13088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13089   (eval $ac_try) 2>&5
13090   ac_status=$?
13091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13092   (exit $ac_status); }; }; then
13093   ac_cv_member_krb5_ticket_enc_part2=yes
13094 else
13095   echo "$as_me: failed program was:" >&5
13096 sed 's/^/| /' conftest.$ac_ext >&5
13097
13098 cat >conftest.$ac_ext <<_ACEOF
13099 /* confdefs.h.  */
13100 _ACEOF
13101 cat confdefs.h >>conftest.$ac_ext
13102 cat >>conftest.$ac_ext <<_ACEOF
13103 /* end confdefs.h.  */
13104 #include <krb5.h>
13105
13106 int
13107 main ()
13108 {
13109 static krb5_ticket ac_aggr;
13110 if (sizeof ac_aggr.enc_part2)
13111 return 0;
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext
13117 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13118   (eval $ac_compile) 2>conftest.er1
13119   ac_status=$?
13120   grep -v '^ *+' conftest.er1 >conftest.err
13121   rm -f conftest.er1
13122   cat conftest.err >&5
13123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124   (exit $ac_status); } &&
13125          { ac_try='test -z "$ac_c_werror_flag"
13126                          || test ! -s conftest.err'
13127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13128   (eval $ac_try) 2>&5
13129   ac_status=$?
13130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131   (exit $ac_status); }; } &&
13132          { ac_try='test -s conftest.$ac_objext'
13133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134   (eval $ac_try) 2>&5
13135   ac_status=$?
13136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137   (exit $ac_status); }; }; then
13138   ac_cv_member_krb5_ticket_enc_part2=yes
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 sed 's/^/| /' conftest.$ac_ext >&5
13142
13143 ac_cv_member_krb5_ticket_enc_part2=no
13144 fi
13145 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13146 fi
13147 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13148 fi
13149 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
13150 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
13151 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
13152
13153 cat >>confdefs.h <<_ACEOF
13154 #define HAVE_KRB5_TICKET_ENC_PART2 1
13155 _ACEOF
13156
13157
13158 else
13159   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
13160 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
13161 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
13162   echo $ECHO_N "(cached) $ECHO_C" >&6
13163 else
13164   cat >conftest.$ac_ext <<_ACEOF
13165 /* confdefs.h.  */
13166 _ACEOF
13167 cat confdefs.h >>conftest.$ac_ext
13168 cat >>conftest.$ac_ext <<_ACEOF
13169 /* end confdefs.h.  */
13170 #include <krb5.h>
13171
13172 int
13173 main ()
13174 {
13175 static krb5_ticket ac_aggr;
13176 if (ac_aggr.client)
13177 return 0;
13178   ;
13179   return 0;
13180 }
13181 _ACEOF
13182 rm -f conftest.$ac_objext
13183 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13184   (eval $ac_compile) 2>conftest.er1
13185   ac_status=$?
13186   grep -v '^ *+' conftest.er1 >conftest.err
13187   rm -f conftest.er1
13188   cat conftest.err >&5
13189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13190   (exit $ac_status); } &&
13191          { ac_try='test -z "$ac_c_werror_flag"
13192                          || test ! -s conftest.err'
13193   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13194   (eval $ac_try) 2>&5
13195   ac_status=$?
13196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13197   (exit $ac_status); }; } &&
13198          { ac_try='test -s conftest.$ac_objext'
13199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203   (exit $ac_status); }; }; then
13204   ac_cv_member_krb5_ticket_client=yes
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 sed 's/^/| /' conftest.$ac_ext >&5
13208
13209 cat >conftest.$ac_ext <<_ACEOF
13210 /* confdefs.h.  */
13211 _ACEOF
13212 cat confdefs.h >>conftest.$ac_ext
13213 cat >>conftest.$ac_ext <<_ACEOF
13214 /* end confdefs.h.  */
13215 #include <krb5.h>
13216
13217 int
13218 main ()
13219 {
13220 static krb5_ticket ac_aggr;
13221 if (sizeof ac_aggr.client)
13222 return 0;
13223   ;
13224   return 0;
13225 }
13226 _ACEOF
13227 rm -f conftest.$ac_objext
13228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13229   (eval $ac_compile) 2>conftest.er1
13230   ac_status=$?
13231   grep -v '^ *+' conftest.er1 >conftest.err
13232   rm -f conftest.er1
13233   cat conftest.err >&5
13234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13235   (exit $ac_status); } &&
13236          { ac_try='test -z "$ac_c_werror_flag"
13237                          || test ! -s conftest.err'
13238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13239   (eval $ac_try) 2>&5
13240   ac_status=$?
13241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242   (exit $ac_status); }; } &&
13243          { ac_try='test -s conftest.$ac_objext'
13244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13245   (eval $ac_try) 2>&5
13246   ac_status=$?
13247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13248   (exit $ac_status); }; }; then
13249   ac_cv_member_krb5_ticket_client=yes
13250 else
13251   echo "$as_me: failed program was:" >&5
13252 sed 's/^/| /' conftest.$ac_ext >&5
13253
13254 ac_cv_member_krb5_ticket_client=no
13255 fi
13256 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13257 fi
13258 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13259 fi
13260 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13261 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13262 if test $ac_cv_member_krb5_ticket_client = yes; then
13263
13264 cat >>confdefs.h <<_ACEOF
13265 #define HAVE_KRB5_TICKET_CLIENT 1
13266 _ACEOF
13267
13268
13269 else
13270   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13271 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13272    { (exit 1); exit 1; }; }
13273 fi
13274
13275 fi
13276
13277   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13278 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13279 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13280   echo $ECHO_N "(cached) $ECHO_C" >&6
13281 else
13282   cat >conftest.$ac_ext <<_ACEOF
13283 /* confdefs.h.  */
13284 _ACEOF
13285 cat confdefs.h >>conftest.$ac_ext
13286 cat >>conftest.$ac_ext <<_ACEOF
13287 /* end confdefs.h.  */
13288 #include <krb5.h>
13289
13290 int
13291 main ()
13292 {
13293 static krb5_error ac_aggr;
13294 if (ac_aggr.text.data)
13295 return 0;
13296   ;
13297   return 0;
13298 }
13299 _ACEOF
13300 rm -f conftest.$ac_objext
13301 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13302   (eval $ac_compile) 2>conftest.er1
13303   ac_status=$?
13304   grep -v '^ *+' conftest.er1 >conftest.err
13305   rm -f conftest.er1
13306   cat conftest.err >&5
13307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13308   (exit $ac_status); } &&
13309          { ac_try='test -z "$ac_c_werror_flag"
13310                          || test ! -s conftest.err'
13311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13312   (eval $ac_try) 2>&5
13313   ac_status=$?
13314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13315   (exit $ac_status); }; } &&
13316          { ac_try='test -s conftest.$ac_objext'
13317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13318   (eval $ac_try) 2>&5
13319   ac_status=$?
13320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13321   (exit $ac_status); }; }; then
13322   ac_cv_member_krb5_error_text_data=yes
13323 else
13324   echo "$as_me: failed program was:" >&5
13325 sed 's/^/| /' conftest.$ac_ext >&5
13326
13327 cat >conftest.$ac_ext <<_ACEOF
13328 /* confdefs.h.  */
13329 _ACEOF
13330 cat confdefs.h >>conftest.$ac_ext
13331 cat >>conftest.$ac_ext <<_ACEOF
13332 /* end confdefs.h.  */
13333 #include <krb5.h>
13334
13335 int
13336 main ()
13337 {
13338 static krb5_error ac_aggr;
13339 if (sizeof ac_aggr.text.data)
13340 return 0;
13341   ;
13342   return 0;
13343 }
13344 _ACEOF
13345 rm -f conftest.$ac_objext
13346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13347   (eval $ac_compile) 2>conftest.er1
13348   ac_status=$?
13349   grep -v '^ *+' conftest.er1 >conftest.err
13350   rm -f conftest.er1
13351   cat conftest.err >&5
13352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353   (exit $ac_status); } &&
13354          { ac_try='test -z "$ac_c_werror_flag"
13355                          || test ! -s conftest.err'
13356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13357   (eval $ac_try) 2>&5
13358   ac_status=$?
13359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13360   (exit $ac_status); }; } &&
13361          { ac_try='test -s conftest.$ac_objext'
13362   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13366   (exit $ac_status); }; }; then
13367   ac_cv_member_krb5_error_text_data=yes
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 sed 's/^/| /' conftest.$ac_ext >&5
13371
13372 ac_cv_member_krb5_error_text_data=no
13373 fi
13374 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13375 fi
13376 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13377 fi
13378 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13379 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13380 if test $ac_cv_member_krb5_error_text_data = yes; then
13381
13382 cat >>confdefs.h <<_ACEOF
13383 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13384 _ACEOF
13385
13386
13387 else
13388   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13389 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13390 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393   cat >conftest.$ac_ext <<_ACEOF
13394 /* confdefs.h.  */
13395 _ACEOF
13396 cat confdefs.h >>conftest.$ac_ext
13397 cat >>conftest.$ac_ext <<_ACEOF
13398 /* end confdefs.h.  */
13399 #include <krb5.h>
13400
13401 int
13402 main ()
13403 {
13404 static krb5_error ac_aggr;
13405 if (ac_aggr.e_data)
13406 return 0;
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 rm -f conftest.$ac_objext
13412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13413   (eval $ac_compile) 2>conftest.er1
13414   ac_status=$?
13415   grep -v '^ *+' conftest.er1 >conftest.err
13416   rm -f conftest.er1
13417   cat conftest.err >&5
13418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13419   (exit $ac_status); } &&
13420          { ac_try='test -z "$ac_c_werror_flag"
13421                          || test ! -s conftest.err'
13422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13423   (eval $ac_try) 2>&5
13424   ac_status=$?
13425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426   (exit $ac_status); }; } &&
13427          { ac_try='test -s conftest.$ac_objext'
13428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13432   (exit $ac_status); }; }; then
13433   ac_cv_member_krb5_error_e_data=yes
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 sed 's/^/| /' conftest.$ac_ext >&5
13437
13438 cat >conftest.$ac_ext <<_ACEOF
13439 /* confdefs.h.  */
13440 _ACEOF
13441 cat confdefs.h >>conftest.$ac_ext
13442 cat >>conftest.$ac_ext <<_ACEOF
13443 /* end confdefs.h.  */
13444 #include <krb5.h>
13445
13446 int
13447 main ()
13448 {
13449 static krb5_error ac_aggr;
13450 if (sizeof ac_aggr.e_data)
13451 return 0;
13452   ;
13453   return 0;
13454 }
13455 _ACEOF
13456 rm -f conftest.$ac_objext
13457 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13458   (eval $ac_compile) 2>conftest.er1
13459   ac_status=$?
13460   grep -v '^ *+' conftest.er1 >conftest.err
13461   rm -f conftest.er1
13462   cat conftest.err >&5
13463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13464   (exit $ac_status); } &&
13465          { ac_try='test -z "$ac_c_werror_flag"
13466                          || test ! -s conftest.err'
13467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13471   (exit $ac_status); }; } &&
13472          { ac_try='test -s conftest.$ac_objext'
13473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13474   (eval $ac_try) 2>&5
13475   ac_status=$?
13476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13477   (exit $ac_status); }; }; then
13478   ac_cv_member_krb5_error_e_data=yes
13479 else
13480   echo "$as_me: failed program was:" >&5
13481 sed 's/^/| /' conftest.$ac_ext >&5
13482
13483 ac_cv_member_krb5_error_e_data=no
13484 fi
13485 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13486 fi
13487 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13488 fi
13489 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13490 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13491 if test $ac_cv_member_krb5_error_e_data = yes; then
13492
13493 cat >>confdefs.h <<_ACEOF
13494 #define HAVE_KRB5_ERROR_E_DATA 1
13495 _ACEOF
13496
13497
13498 else
13499   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13500 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13501    { (exit 1); exit 1; }; }
13502 fi
13503
13504 fi
13505
13506 fi
13507
13508
13509 ##
13510 ## Functions, global variables
13511 ##
13512
13513 echo "$as_me:$LINENO: checking for int timezone" >&5
13514 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13515 if test "${pgac_cv_var_int_timezone+set}" = set; then
13516   echo $ECHO_N "(cached) $ECHO_C" >&6
13517 else
13518   cat >conftest.$ac_ext <<_ACEOF
13519 /* confdefs.h.  */
13520 _ACEOF
13521 cat confdefs.h >>conftest.$ac_ext
13522 cat >>conftest.$ac_ext <<_ACEOF
13523 /* end confdefs.h.  */
13524 #include <time.h>
13525 int res;
13526 int
13527 main ()
13528 {
13529 #ifndef __CYGWIN__
13530 res = timezone / 60;
13531 #else
13532 res = _timezone / 60;
13533 #endif
13534   ;
13535   return 0;
13536 }
13537 _ACEOF
13538 rm -f conftest.$ac_objext conftest$ac_exeext
13539 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13540   (eval $ac_link) 2>conftest.er1
13541   ac_status=$?
13542   grep -v '^ *+' conftest.er1 >conftest.err
13543   rm -f conftest.er1
13544   cat conftest.err >&5
13545   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546   (exit $ac_status); } &&
13547          { ac_try='test -z "$ac_c_werror_flag"
13548                          || test ! -s conftest.err'
13549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13553   (exit $ac_status); }; } &&
13554          { ac_try='test -s conftest$ac_exeext'
13555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13556   (eval $ac_try) 2>&5
13557   ac_status=$?
13558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13559   (exit $ac_status); }; }; then
13560   pgac_cv_var_int_timezone=yes
13561 else
13562   echo "$as_me: failed program was:" >&5
13563 sed 's/^/| /' conftest.$ac_ext >&5
13564
13565 pgac_cv_var_int_timezone=no
13566 fi
13567 rm -f conftest.err conftest.$ac_objext \
13568       conftest$ac_exeext conftest.$ac_ext
13569 fi
13570 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13571 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13572 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13573
13574 cat >>confdefs.h <<\_ACEOF
13575 #define HAVE_INT_TIMEZONE
13576 _ACEOF
13577
13578 fi
13579 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13580 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13581  if test "${ac_cv_func_accept_return+set}" = set; then
13582   echo $ECHO_N "(cached) $ECHO_C" >&6
13583 else
13584    if test "${ac_cv_func_accept_arg1+set}" = set; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587     if test "${ac_cv_func_accept_arg2+set}" = set; then
13588   echo $ECHO_N "(cached) $ECHO_C" >&6
13589 else
13590      if test "${ac_cv_func_accept_arg3+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13594       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13595        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13596         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13597          cat >conftest.$ac_ext <<_ACEOF
13598 /* confdefs.h.  */
13599 _ACEOF
13600 cat confdefs.h >>conftest.$ac_ext
13601 cat >>conftest.$ac_ext <<_ACEOF
13602 /* end confdefs.h.  */
13603 #ifdef HAVE_SYS_TYPES_H
13604 #include <sys/types.h>
13605 #endif
13606 #ifdef HAVE_SYS_SOCKET_H
13607 #include <sys/socket.h>
13608 #endif
13609 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13610 int
13611 main ()
13612 {
13613
13614   ;
13615   return 0;
13616 }
13617 _ACEOF
13618 rm -f conftest.$ac_objext
13619 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13620   (eval $ac_compile) 2>conftest.er1
13621   ac_status=$?
13622   grep -v '^ *+' conftest.er1 >conftest.err
13623   rm -f conftest.er1
13624   cat conftest.err >&5
13625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13626   (exit $ac_status); } &&
13627          { ac_try='test -z "$ac_c_werror_flag"
13628                          || test ! -s conftest.err'
13629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13630   (eval $ac_try) 2>&5
13631   ac_status=$?
13632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633   (exit $ac_status); }; } &&
13634          { ac_try='test -s conftest.$ac_objext'
13635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13636   (eval $ac_try) 2>&5
13637   ac_status=$?
13638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13639   (exit $ac_status); }; }; then
13640   ac_not_found=no; break 4
13641 else
13642   echo "$as_me: failed program was:" >&5
13643 sed 's/^/| /' conftest.$ac_ext >&5
13644
13645 ac_not_found=yes
13646 fi
13647 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13648        done
13649       done
13650      done
13651     done
13652     if test "$ac_not_found" = yes; then
13653       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13654 echo "$as_me: error: could not determine argument types" >&2;}
13655    { (exit 1); exit 1; }; }
13656     fi
13657     if test "$ac_cv_func_accept_arg3" = "void"; then
13658       ac_cv_func_accept_arg3=int
13659     fi
13660
13661 fi
13662
13663 fi
13664
13665 fi
13666
13667 fi
13668  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
13669 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13670
13671 cat >>confdefs.h <<_ACEOF
13672 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13673 _ACEOF
13674
13675
13676 cat >>confdefs.h <<_ACEOF
13677 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13678 _ACEOF
13679
13680
13681 cat >>confdefs.h <<_ACEOF
13682 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13683 _ACEOF
13684
13685
13686 cat >>confdefs.h <<_ACEOF
13687 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13688 _ACEOF
13689
13690
13691 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13692 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13693 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13694   echo $ECHO_N "(cached) $ECHO_C" >&6
13695 else
13696   cat >conftest.$ac_ext <<_ACEOF
13697 /* confdefs.h.  */
13698 _ACEOF
13699 cat confdefs.h >>conftest.$ac_ext
13700 cat >>conftest.$ac_ext <<_ACEOF
13701 /* end confdefs.h.  */
13702 #include <sys/time.h>
13703 int
13704 main ()
13705 {
13706 struct timeval *tp;
13707 struct timezone *tzp;
13708 gettimeofday(tp,tzp);
13709   ;
13710   return 0;
13711 }
13712 _ACEOF
13713 rm -f conftest.$ac_objext
13714 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13715   (eval $ac_compile) 2>conftest.er1
13716   ac_status=$?
13717   grep -v '^ *+' conftest.er1 >conftest.err
13718   rm -f conftest.er1
13719   cat conftest.err >&5
13720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13721   (exit $ac_status); } &&
13722          { ac_try='test -z "$ac_c_werror_flag"
13723                          || test ! -s conftest.err'
13724   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13725   (eval $ac_try) 2>&5
13726   ac_status=$?
13727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728   (exit $ac_status); }; } &&
13729          { ac_try='test -s conftest.$ac_objext'
13730   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13731   (eval $ac_try) 2>&5
13732   ac_status=$?
13733   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734   (exit $ac_status); }; }; then
13735   pgac_cv_func_gettimeofday_1arg=no
13736 else
13737   echo "$as_me: failed program was:" >&5
13738 sed 's/^/| /' conftest.$ac_ext >&5
13739
13740 pgac_cv_func_gettimeofday_1arg=yes
13741 fi
13742 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13743 fi
13744 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13745 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13746 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13747
13748 cat >>confdefs.h <<\_ACEOF
13749 #define GETTIMEOFDAY_1ARG
13750 _ACEOF
13751
13752 fi
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776 for ac_func in cbrt dlopen fcvt fdatasync getpeereid getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13777 do
13778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13779 echo "$as_me:$LINENO: checking for $ac_func" >&5
13780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13781 if eval "test \"\${$as_ac_var+set}\" = set"; then
13782   echo $ECHO_N "(cached) $ECHO_C" >&6
13783 else
13784   cat >conftest.$ac_ext <<_ACEOF
13785 /* confdefs.h.  */
13786 _ACEOF
13787 cat confdefs.h >>conftest.$ac_ext
13788 cat >>conftest.$ac_ext <<_ACEOF
13789 /* end confdefs.h.  */
13790 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13791    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13792 #define $ac_func innocuous_$ac_func
13793
13794 /* System header to define __stub macros and hopefully few prototypes,
13795     which can conflict with char $ac_func (); below.
13796     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13797     <limits.h> exists even on freestanding compilers.  */
13798
13799 #ifdef __STDC__
13800 # include <limits.h>
13801 #else
13802 # include <assert.h>
13803 #endif
13804
13805 #undef $ac_func
13806
13807 /* Override any gcc2 internal prototype to avoid an error.  */
13808 #ifdef __cplusplus
13809 extern "C"
13810 {
13811 #endif
13812 /* We use char because int might match the return type of a gcc2
13813    builtin and then its argument prototype would still apply.  */
13814 char $ac_func ();
13815 /* The GNU C library defines this for functions which it implements
13816     to always fail with ENOSYS.  Some functions are actually named
13817     something starting with __ and the normal name is an alias.  */
13818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13819 choke me
13820 #else
13821 char (*f) () = $ac_func;
13822 #endif
13823 #ifdef __cplusplus
13824 }
13825 #endif
13826
13827 int
13828 main ()
13829 {
13830 return f != $ac_func;
13831   ;
13832   return 0;
13833 }
13834 _ACEOF
13835 rm -f conftest.$ac_objext conftest$ac_exeext
13836 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13837   (eval $ac_link) 2>conftest.er1
13838   ac_status=$?
13839   grep -v '^ *+' conftest.er1 >conftest.err
13840   rm -f conftest.er1
13841   cat conftest.err >&5
13842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843   (exit $ac_status); } &&
13844          { ac_try='test -z "$ac_c_werror_flag"
13845                          || test ! -s conftest.err'
13846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13847   (eval $ac_try) 2>&5
13848   ac_status=$?
13849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850   (exit $ac_status); }; } &&
13851          { ac_try='test -s conftest$ac_exeext'
13852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856   (exit $ac_status); }; }; then
13857   eval "$as_ac_var=yes"
13858 else
13859   echo "$as_me: failed program was:" >&5
13860 sed 's/^/| /' conftest.$ac_ext >&5
13861
13862 eval "$as_ac_var=no"
13863 fi
13864 rm -f conftest.err conftest.$ac_objext \
13865       conftest$ac_exeext conftest.$ac_ext
13866 fi
13867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13868 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13869 if test `eval echo '${'$as_ac_var'}'` = yes; then
13870   cat >>confdefs.h <<_ACEOF
13871 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13872 _ACEOF
13873
13874 fi
13875 done
13876
13877
13878 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13879 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13880 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13881   echo $ECHO_N "(cached) $ECHO_C" >&6
13882 else
13883   cat >conftest.$ac_ext <<_ACEOF
13884 /* confdefs.h.  */
13885 _ACEOF
13886 cat confdefs.h >>conftest.$ac_ext
13887 cat >>conftest.$ac_ext <<_ACEOF
13888 /* end confdefs.h.  */
13889 #include <unistd.h>
13890
13891 int
13892 main ()
13893 {
13894 #ifndef fdatasync
13895   char *p = (char *) fdatasync;
13896 #endif
13897
13898   ;
13899   return 0;
13900 }
13901 _ACEOF
13902 rm -f conftest.$ac_objext
13903 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13904   (eval $ac_compile) 2>conftest.er1
13905   ac_status=$?
13906   grep -v '^ *+' conftest.er1 >conftest.err
13907   rm -f conftest.er1
13908   cat conftest.err >&5
13909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13910   (exit $ac_status); } &&
13911          { ac_try='test -z "$ac_c_werror_flag"
13912                          || test ! -s conftest.err'
13913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13914   (eval $ac_try) 2>&5
13915   ac_status=$?
13916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13917   (exit $ac_status); }; } &&
13918          { ac_try='test -s conftest.$ac_objext'
13919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13920   (eval $ac_try) 2>&5
13921   ac_status=$?
13922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923   (exit $ac_status); }; }; then
13924   ac_cv_have_decl_fdatasync=yes
13925 else
13926   echo "$as_me: failed program was:" >&5
13927 sed 's/^/| /' conftest.$ac_ext >&5
13928
13929 ac_cv_have_decl_fdatasync=no
13930 fi
13931 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13932 fi
13933 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13934 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13935 if test $ac_cv_have_decl_fdatasync = yes; then
13936
13937 cat >>confdefs.h <<_ACEOF
13938 #define HAVE_DECL_FDATASYNC 1
13939 _ACEOF
13940
13941
13942 else
13943   cat >>confdefs.h <<_ACEOF
13944 #define HAVE_DECL_FDATASYNC 0
13945 _ACEOF
13946
13947
13948 fi
13949
13950
13951 echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
13952 echo $ECHO_N "checking whether posix_fadvise is declared... $ECHO_C" >&6
13953 if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
13954   echo $ECHO_N "(cached) $ECHO_C" >&6
13955 else
13956   cat >conftest.$ac_ext <<_ACEOF
13957 /* confdefs.h.  */
13958 _ACEOF
13959 cat confdefs.h >>conftest.$ac_ext
13960 cat >>conftest.$ac_ext <<_ACEOF
13961 /* end confdefs.h.  */
13962 #include <fcntl.h>
13963
13964 int
13965 main ()
13966 {
13967 #ifndef posix_fadvise
13968   char *p = (char *) posix_fadvise;
13969 #endif
13970
13971   ;
13972   return 0;
13973 }
13974 _ACEOF
13975 rm -f conftest.$ac_objext
13976 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13977   (eval $ac_compile) 2>conftest.er1
13978   ac_status=$?
13979   grep -v '^ *+' conftest.er1 >conftest.err
13980   rm -f conftest.er1
13981   cat conftest.err >&5
13982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13983   (exit $ac_status); } &&
13984          { ac_try='test -z "$ac_c_werror_flag"
13985                          || test ! -s conftest.err'
13986   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13990   (exit $ac_status); }; } &&
13991          { ac_try='test -s conftest.$ac_objext'
13992   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13993   (eval $ac_try) 2>&5
13994   ac_status=$?
13995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996   (exit $ac_status); }; }; then
13997   ac_cv_have_decl_posix_fadvise=yes
13998 else
13999   echo "$as_me: failed program was:" >&5
14000 sed 's/^/| /' conftest.$ac_ext >&5
14001
14002 ac_cv_have_decl_posix_fadvise=no
14003 fi
14004 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14005 fi
14006 echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
14007 echo "${ECHO_T}$ac_cv_have_decl_posix_fadvise" >&6
14008 if test $ac_cv_have_decl_posix_fadvise = yes; then
14009
14010 cat >>confdefs.h <<_ACEOF
14011 #define HAVE_DECL_POSIX_FADVISE 1
14012 _ACEOF
14013
14014
14015 else
14016   cat >>confdefs.h <<_ACEOF
14017 #define HAVE_DECL_POSIX_FADVISE 0
14018 _ACEOF
14019
14020
14021 fi
14022
14023
14024 echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
14025 echo $ECHO_N "checking whether strlcat is declared... $ECHO_C" >&6
14026 if test "${ac_cv_have_decl_strlcat+set}" = set; then
14027   echo $ECHO_N "(cached) $ECHO_C" >&6
14028 else
14029   cat >conftest.$ac_ext <<_ACEOF
14030 /* confdefs.h.  */
14031 _ACEOF
14032 cat confdefs.h >>conftest.$ac_ext
14033 cat >>conftest.$ac_ext <<_ACEOF
14034 /* end confdefs.h.  */
14035 $ac_includes_default
14036 int
14037 main ()
14038 {
14039 #ifndef strlcat
14040   char *p = (char *) strlcat;
14041 #endif
14042
14043   ;
14044   return 0;
14045 }
14046 _ACEOF
14047 rm -f conftest.$ac_objext
14048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14049   (eval $ac_compile) 2>conftest.er1
14050   ac_status=$?
14051   grep -v '^ *+' conftest.er1 >conftest.err
14052   rm -f conftest.er1
14053   cat conftest.err >&5
14054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14055   (exit $ac_status); } &&
14056          { ac_try='test -z "$ac_c_werror_flag"
14057                          || test ! -s conftest.err'
14058   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14059   (eval $ac_try) 2>&5
14060   ac_status=$?
14061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14062   (exit $ac_status); }; } &&
14063          { ac_try='test -s conftest.$ac_objext'
14064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14065   (eval $ac_try) 2>&5
14066   ac_status=$?
14067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068   (exit $ac_status); }; }; then
14069   ac_cv_have_decl_strlcat=yes
14070 else
14071   echo "$as_me: failed program was:" >&5
14072 sed 's/^/| /' conftest.$ac_ext >&5
14073
14074 ac_cv_have_decl_strlcat=no
14075 fi
14076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14077 fi
14078 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
14079 echo "${ECHO_T}$ac_cv_have_decl_strlcat" >&6
14080 if test $ac_cv_have_decl_strlcat = yes; then
14081
14082 cat >>confdefs.h <<_ACEOF
14083 #define HAVE_DECL_STRLCAT 1
14084 _ACEOF
14085
14086
14087 else
14088   cat >>confdefs.h <<_ACEOF
14089 #define HAVE_DECL_STRLCAT 0
14090 _ACEOF
14091
14092
14093 fi
14094 echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
14095 echo $ECHO_N "checking whether strlcpy is declared... $ECHO_C" >&6
14096 if test "${ac_cv_have_decl_strlcpy+set}" = set; then
14097   echo $ECHO_N "(cached) $ECHO_C" >&6
14098 else
14099   cat >conftest.$ac_ext <<_ACEOF
14100 /* confdefs.h.  */
14101 _ACEOF
14102 cat confdefs.h >>conftest.$ac_ext
14103 cat >>conftest.$ac_ext <<_ACEOF
14104 /* end confdefs.h.  */
14105 $ac_includes_default
14106 int
14107 main ()
14108 {
14109 #ifndef strlcpy
14110   char *p = (char *) strlcpy;
14111 #endif
14112
14113   ;
14114   return 0;
14115 }
14116 _ACEOF
14117 rm -f conftest.$ac_objext
14118 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14119   (eval $ac_compile) 2>conftest.er1
14120   ac_status=$?
14121   grep -v '^ *+' conftest.er1 >conftest.err
14122   rm -f conftest.er1
14123   cat conftest.err >&5
14124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125   (exit $ac_status); } &&
14126          { ac_try='test -z "$ac_c_werror_flag"
14127                          || test ! -s conftest.err'
14128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14132   (exit $ac_status); }; } &&
14133          { ac_try='test -s conftest.$ac_objext'
14134   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14138   (exit $ac_status); }; }; then
14139   ac_cv_have_decl_strlcpy=yes
14140 else
14141   echo "$as_me: failed program was:" >&5
14142 sed 's/^/| /' conftest.$ac_ext >&5
14143
14144 ac_cv_have_decl_strlcpy=no
14145 fi
14146 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14147 fi
14148 echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
14149 echo "${ECHO_T}$ac_cv_have_decl_strlcpy" >&6
14150 if test $ac_cv_have_decl_strlcpy = yes; then
14151
14152 cat >>confdefs.h <<_ACEOF
14153 #define HAVE_DECL_STRLCPY 1
14154 _ACEOF
14155
14156
14157 else
14158   cat >>confdefs.h <<_ACEOF
14159 #define HAVE_DECL_STRLCPY 0
14160 _ACEOF
14161
14162
14163 fi
14164
14165
14166 # This is probably only present on Darwin, but may as well check always
14167 echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
14168 echo $ECHO_N "checking whether F_FULLFSYNC is declared... $ECHO_C" >&6
14169 if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
14170   echo $ECHO_N "(cached) $ECHO_C" >&6
14171 else
14172   cat >conftest.$ac_ext <<_ACEOF
14173 /* confdefs.h.  */
14174 _ACEOF
14175 cat confdefs.h >>conftest.$ac_ext
14176 cat >>conftest.$ac_ext <<_ACEOF
14177 /* end confdefs.h.  */
14178 #include <fcntl.h>
14179
14180 int
14181 main ()
14182 {
14183 #ifndef F_FULLFSYNC
14184   char *p = (char *) F_FULLFSYNC;
14185 #endif
14186
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f conftest.$ac_objext
14192 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14193   (eval $ac_compile) 2>conftest.er1
14194   ac_status=$?
14195   grep -v '^ *+' conftest.er1 >conftest.err
14196   rm -f conftest.er1
14197   cat conftest.err >&5
14198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14199   (exit $ac_status); } &&
14200          { ac_try='test -z "$ac_c_werror_flag"
14201                          || test ! -s conftest.err'
14202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14203   (eval $ac_try) 2>&5
14204   ac_status=$?
14205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14206   (exit $ac_status); }; } &&
14207          { ac_try='test -s conftest.$ac_objext'
14208   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212   (exit $ac_status); }; }; then
14213   ac_cv_have_decl_F_FULLFSYNC=yes
14214 else
14215   echo "$as_me: failed program was:" >&5
14216 sed 's/^/| /' conftest.$ac_ext >&5
14217
14218 ac_cv_have_decl_F_FULLFSYNC=no
14219 fi
14220 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14221 fi
14222 echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
14223 echo "${ECHO_T}$ac_cv_have_decl_F_FULLFSYNC" >&6
14224 if test $ac_cv_have_decl_F_FULLFSYNC = yes; then
14225
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_DECL_F_FULLFSYNC 1
14228 _ACEOF
14229
14230
14231 else
14232   cat >>confdefs.h <<_ACEOF
14233 #define HAVE_DECL_F_FULLFSYNC 0
14234 _ACEOF
14235
14236
14237 fi
14238
14239
14240
14241 HAVE_IPV6=no
14242 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
14243 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
14244 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
14245   echo $ECHO_N "(cached) $ECHO_C" >&6
14246 else
14247   cat >conftest.$ac_ext <<_ACEOF
14248 /* confdefs.h.  */
14249 _ACEOF
14250 cat confdefs.h >>conftest.$ac_ext
14251 cat >>conftest.$ac_ext <<_ACEOF
14252 /* end confdefs.h.  */
14253 $ac_includes_default
14254 #include <netinet/in.h>
14255
14256 int
14257 main ()
14258 {
14259 if ((struct sockaddr_in6 *) 0)
14260   return 0;
14261 if (sizeof (struct sockaddr_in6))
14262   return 0;
14263   ;
14264   return 0;
14265 }
14266 _ACEOF
14267 rm -f conftest.$ac_objext
14268 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14269   (eval $ac_compile) 2>conftest.er1
14270   ac_status=$?
14271   grep -v '^ *+' conftest.er1 >conftest.err
14272   rm -f conftest.er1
14273   cat conftest.err >&5
14274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275   (exit $ac_status); } &&
14276          { ac_try='test -z "$ac_c_werror_flag"
14277                          || test ! -s conftest.err'
14278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14279   (eval $ac_try) 2>&5
14280   ac_status=$?
14281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14282   (exit $ac_status); }; } &&
14283          { ac_try='test -s conftest.$ac_objext'
14284   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14285   (eval $ac_try) 2>&5
14286   ac_status=$?
14287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14288   (exit $ac_status); }; }; then
14289   ac_cv_type_struct_sockaddr_in6=yes
14290 else
14291   echo "$as_me: failed program was:" >&5
14292 sed 's/^/| /' conftest.$ac_ext >&5
14293
14294 ac_cv_type_struct_sockaddr_in6=no
14295 fi
14296 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14297 fi
14298 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
14299 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
14300 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
14301
14302 cat >>confdefs.h <<\_ACEOF
14303 #define HAVE_IPV6 1
14304 _ACEOF
14305
14306          HAVE_IPV6=yes
14307 fi
14308
14309
14310
14311 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
14312 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
14313 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
14314   echo $ECHO_N "(cached) $ECHO_C" >&6
14315 else
14316   cat >conftest.$ac_ext <<_ACEOF
14317 /* confdefs.h.  */
14318 _ACEOF
14319 cat confdefs.h >>conftest.$ac_ext
14320 cat >>conftest.$ac_ext <<_ACEOF
14321 /* end confdefs.h.  */
14322 #include <machine/vmparam.h>
14323 #include <sys/exec.h>
14324
14325 int
14326 main ()
14327 {
14328 PS_STRINGS->ps_nargvstr = 1;
14329 PS_STRINGS->ps_argvstr = "foo";
14330   ;
14331   return 0;
14332 }
14333 _ACEOF
14334 rm -f conftest.$ac_objext conftest$ac_exeext
14335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14336   (eval $ac_link) 2>conftest.er1
14337   ac_status=$?
14338   grep -v '^ *+' conftest.er1 >conftest.err
14339   rm -f conftest.er1
14340   cat conftest.err >&5
14341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342   (exit $ac_status); } &&
14343          { ac_try='test -z "$ac_c_werror_flag"
14344                          || test ! -s conftest.err'
14345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14346   (eval $ac_try) 2>&5
14347   ac_status=$?
14348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14349   (exit $ac_status); }; } &&
14350          { ac_try='test -s conftest$ac_exeext'
14351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14352   (eval $ac_try) 2>&5
14353   ac_status=$?
14354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355   (exit $ac_status); }; }; then
14356   pgac_cv_var_PS_STRINGS=yes
14357 else
14358   echo "$as_me: failed program was:" >&5
14359 sed 's/^/| /' conftest.$ac_ext >&5
14360
14361 pgac_cv_var_PS_STRINGS=no
14362 fi
14363 rm -f conftest.err conftest.$ac_objext \
14364       conftest$ac_exeext conftest.$ac_ext
14365 fi
14366 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
14367 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
14368 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
14369
14370 cat >>confdefs.h <<\_ACEOF
14371 #define HAVE_PS_STRINGS
14372 _ACEOF
14373
14374 fi
14375
14376
14377 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
14378 # is missing.  Yes, there are machines that have only one.  We may
14379 # also decide to use snprintf.c if snprintf() is present but does not
14380 # have all the features we need --- see below.
14381
14382 if test "$PORTNAME" = "win32"; then
14383   # Win32 gets snprintf.c built unconditionally.
14384   #
14385   # To properly translate all NLS languages strings, we must support the
14386   # *printf() %$ format, which allows *printf() arguments to be selected
14387   # by position in the translated string.
14388   #
14389   # libintl versions < 0.13 use the native *printf() functions, and Win32
14390   # *printf() doesn't understand %$, so we must use our /port versions,
14391   # which do understand %$. libintl versions >= 0.13 include their own
14392   # *printf versions on Win32.  The libintl 0.13 release note text is:
14393   #
14394   #   C format strings with positions, as they arise when a translator
14395   #   needs to reorder a sentence, are now supported on all platforms.
14396   #   On those few platforms (NetBSD and Woe32) for which the native
14397   #   printf()/fprintf()/... functions don't support such format
14398   #   strings, replacements are provided through <libintl.h>.
14399   #
14400   # We could use libintl >= 0.13's *printf() if we were sure that we had
14401   # a litint >= 0.13 at runtime, but seeing that there is no clean way
14402   # to guarantee that, it is best to just use our own, so we are sure to
14403   # get %$ support. In include/port.h we disable the *printf() macros
14404   # that might have been defined by libintl.
14405   #
14406   # We do this unconditionally whether NLS is used or not so we are sure
14407   # that all Win32 libraries and binaries behave the same.
14408   pgac_need_repl_snprintf=yes
14409 else
14410   pgac_need_repl_snprintf=no
14411
14412 for ac_func in snprintf
14413 do
14414 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14415 echo "$as_me:$LINENO: checking for $ac_func" >&5
14416 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14417 if eval "test \"\${$as_ac_var+set}\" = set"; then
14418   echo $ECHO_N "(cached) $ECHO_C" >&6
14419 else
14420   cat >conftest.$ac_ext <<_ACEOF
14421 /* confdefs.h.  */
14422 _ACEOF
14423 cat confdefs.h >>conftest.$ac_ext
14424 cat >>conftest.$ac_ext <<_ACEOF
14425 /* end confdefs.h.  */
14426 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14427    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14428 #define $ac_func innocuous_$ac_func
14429
14430 /* System header to define __stub macros and hopefully few prototypes,
14431     which can conflict with char $ac_func (); below.
14432     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14433     <limits.h> exists even on freestanding compilers.  */
14434
14435 #ifdef __STDC__
14436 # include <limits.h>
14437 #else
14438 # include <assert.h>
14439 #endif
14440
14441 #undef $ac_func
14442
14443 /* Override any gcc2 internal prototype to avoid an error.  */
14444 #ifdef __cplusplus
14445 extern "C"
14446 {
14447 #endif
14448 /* We use char because int might match the return type of a gcc2
14449    builtin and then its argument prototype would still apply.  */
14450 char $ac_func ();
14451 /* The GNU C library defines this for functions which it implements
14452     to always fail with ENOSYS.  Some functions are actually named
14453     something starting with __ and the normal name is an alias.  */
14454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14455 choke me
14456 #else
14457 char (*f) () = $ac_func;
14458 #endif
14459 #ifdef __cplusplus
14460 }
14461 #endif
14462
14463 int
14464 main ()
14465 {
14466 return f != $ac_func;
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 rm -f conftest.$ac_objext conftest$ac_exeext
14472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14473   (eval $ac_link) 2>conftest.er1
14474   ac_status=$?
14475   grep -v '^ *+' conftest.er1 >conftest.err
14476   rm -f conftest.er1
14477   cat conftest.err >&5
14478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14479   (exit $ac_status); } &&
14480          { ac_try='test -z "$ac_c_werror_flag"
14481                          || test ! -s conftest.err'
14482   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14483   (eval $ac_try) 2>&5
14484   ac_status=$?
14485   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14486   (exit $ac_status); }; } &&
14487          { ac_try='test -s conftest$ac_exeext'
14488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14489   (eval $ac_try) 2>&5
14490   ac_status=$?
14491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14492   (exit $ac_status); }; }; then
14493   eval "$as_ac_var=yes"
14494 else
14495   echo "$as_me: failed program was:" >&5
14496 sed 's/^/| /' conftest.$ac_ext >&5
14497
14498 eval "$as_ac_var=no"
14499 fi
14500 rm -f conftest.err conftest.$ac_objext \
14501       conftest$ac_exeext conftest.$ac_ext
14502 fi
14503 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14504 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14505 if test `eval echo '${'$as_ac_var'}'` = yes; then
14506   cat >>confdefs.h <<_ACEOF
14507 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14508 _ACEOF
14509
14510 else
14511   pgac_need_repl_snprintf=yes
14512 fi
14513 done
14514
14515
14516 for ac_func in vsnprintf
14517 do
14518 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14519 echo "$as_me:$LINENO: checking for $ac_func" >&5
14520 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14521 if eval "test \"\${$as_ac_var+set}\" = set"; then
14522   echo $ECHO_N "(cached) $ECHO_C" >&6
14523 else
14524   cat >conftest.$ac_ext <<_ACEOF
14525 /* confdefs.h.  */
14526 _ACEOF
14527 cat confdefs.h >>conftest.$ac_ext
14528 cat >>conftest.$ac_ext <<_ACEOF
14529 /* end confdefs.h.  */
14530 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14531    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14532 #define $ac_func innocuous_$ac_func
14533
14534 /* System header to define __stub macros and hopefully few prototypes,
14535     which can conflict with char $ac_func (); below.
14536     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14537     <limits.h> exists even on freestanding compilers.  */
14538
14539 #ifdef __STDC__
14540 # include <limits.h>
14541 #else
14542 # include <assert.h>
14543 #endif
14544
14545 #undef $ac_func
14546
14547 /* Override any gcc2 internal prototype to avoid an error.  */
14548 #ifdef __cplusplus
14549 extern "C"
14550 {
14551 #endif
14552 /* We use char because int might match the return type of a gcc2
14553    builtin and then its argument prototype would still apply.  */
14554 char $ac_func ();
14555 /* The GNU C library defines this for functions which it implements
14556     to always fail with ENOSYS.  Some functions are actually named
14557     something starting with __ and the normal name is an alias.  */
14558 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14559 choke me
14560 #else
14561 char (*f) () = $ac_func;
14562 #endif
14563 #ifdef __cplusplus
14564 }
14565 #endif
14566
14567 int
14568 main ()
14569 {
14570 return f != $ac_func;
14571   ;
14572   return 0;
14573 }
14574 _ACEOF
14575 rm -f conftest.$ac_objext conftest$ac_exeext
14576 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14577   (eval $ac_link) 2>conftest.er1
14578   ac_status=$?
14579   grep -v '^ *+' conftest.er1 >conftest.err
14580   rm -f conftest.er1
14581   cat conftest.err >&5
14582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583   (exit $ac_status); } &&
14584          { ac_try='test -z "$ac_c_werror_flag"
14585                          || test ! -s conftest.err'
14586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14587   (eval $ac_try) 2>&5
14588   ac_status=$?
14589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14590   (exit $ac_status); }; } &&
14591          { ac_try='test -s conftest$ac_exeext'
14592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14593   (eval $ac_try) 2>&5
14594   ac_status=$?
14595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14596   (exit $ac_status); }; }; then
14597   eval "$as_ac_var=yes"
14598 else
14599   echo "$as_me: failed program was:" >&5
14600 sed 's/^/| /' conftest.$ac_ext >&5
14601
14602 eval "$as_ac_var=no"
14603 fi
14604 rm -f conftest.err conftest.$ac_objext \
14605       conftest$ac_exeext conftest.$ac_ext
14606 fi
14607 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14608 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14609 if test `eval echo '${'$as_ac_var'}'` = yes; then
14610   cat >>confdefs.h <<_ACEOF
14611 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14612 _ACEOF
14613
14614 else
14615   pgac_need_repl_snprintf=yes
14616 fi
14617 done
14618
14619 fi
14620
14621
14622 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14623 # include/c.h will provide declarations.  Note this is a separate test
14624 # from whether the functions exist in the C library --- there are
14625 # systems that have the functions but don't bother to declare them :-(
14626
14627 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14628 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14629 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14630   echo $ECHO_N "(cached) $ECHO_C" >&6
14631 else
14632   cat >conftest.$ac_ext <<_ACEOF
14633 /* confdefs.h.  */
14634 _ACEOF
14635 cat confdefs.h >>conftest.$ac_ext
14636 cat >>conftest.$ac_ext <<_ACEOF
14637 /* end confdefs.h.  */
14638 $ac_includes_default
14639 int
14640 main ()
14641 {
14642 #ifndef snprintf
14643   char *p = (char *) snprintf;
14644 #endif
14645
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 rm -f conftest.$ac_objext
14651 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14652   (eval $ac_compile) 2>conftest.er1
14653   ac_status=$?
14654   grep -v '^ *+' conftest.er1 >conftest.err
14655   rm -f conftest.er1
14656   cat conftest.err >&5
14657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658   (exit $ac_status); } &&
14659          { ac_try='test -z "$ac_c_werror_flag"
14660                          || test ! -s conftest.err'
14661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14662   (eval $ac_try) 2>&5
14663   ac_status=$?
14664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14665   (exit $ac_status); }; } &&
14666          { ac_try='test -s conftest.$ac_objext'
14667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   ac_cv_have_decl_snprintf=yes
14673 else
14674   echo "$as_me: failed program was:" >&5
14675 sed 's/^/| /' conftest.$ac_ext >&5
14676
14677 ac_cv_have_decl_snprintf=no
14678 fi
14679 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14680 fi
14681 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14682 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14683 if test $ac_cv_have_decl_snprintf = yes; then
14684
14685 cat >>confdefs.h <<_ACEOF
14686 #define HAVE_DECL_SNPRINTF 1
14687 _ACEOF
14688
14689
14690 else
14691   cat >>confdefs.h <<_ACEOF
14692 #define HAVE_DECL_SNPRINTF 0
14693 _ACEOF
14694
14695
14696 fi
14697 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14698 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14699 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14700   echo $ECHO_N "(cached) $ECHO_C" >&6
14701 else
14702   cat >conftest.$ac_ext <<_ACEOF
14703 /* confdefs.h.  */
14704 _ACEOF
14705 cat confdefs.h >>conftest.$ac_ext
14706 cat >>conftest.$ac_ext <<_ACEOF
14707 /* end confdefs.h.  */
14708 $ac_includes_default
14709 int
14710 main ()
14711 {
14712 #ifndef vsnprintf
14713   char *p = (char *) vsnprintf;
14714 #endif
14715
14716   ;
14717   return 0;
14718 }
14719 _ACEOF
14720 rm -f conftest.$ac_objext
14721 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14722   (eval $ac_compile) 2>conftest.er1
14723   ac_status=$?
14724   grep -v '^ *+' conftest.er1 >conftest.err
14725   rm -f conftest.er1
14726   cat conftest.err >&5
14727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14728   (exit $ac_status); } &&
14729          { ac_try='test -z "$ac_c_werror_flag"
14730                          || test ! -s conftest.err'
14731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735   (exit $ac_status); }; } &&
14736          { ac_try='test -s conftest.$ac_objext'
14737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14738   (eval $ac_try) 2>&5
14739   ac_status=$?
14740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14741   (exit $ac_status); }; }; then
14742   ac_cv_have_decl_vsnprintf=yes
14743 else
14744   echo "$as_me: failed program was:" >&5
14745 sed 's/^/| /' conftest.$ac_ext >&5
14746
14747 ac_cv_have_decl_vsnprintf=no
14748 fi
14749 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14750 fi
14751 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14752 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14753 if test $ac_cv_have_decl_vsnprintf = yes; then
14754
14755 cat >>confdefs.h <<_ACEOF
14756 #define HAVE_DECL_VSNPRINTF 1
14757 _ACEOF
14758
14759
14760 else
14761   cat >>confdefs.h <<_ACEOF
14762 #define HAVE_DECL_VSNPRINTF 0
14763 _ACEOF
14764
14765
14766 fi
14767
14768
14769
14770
14771 echo "$as_me:$LINENO: checking for isinf" >&5
14772 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14773 if test "${ac_cv_func_isinf+set}" = set; then
14774   echo $ECHO_N "(cached) $ECHO_C" >&6
14775 else
14776   cat >conftest.$ac_ext <<_ACEOF
14777 /* confdefs.h.  */
14778 _ACEOF
14779 cat confdefs.h >>conftest.$ac_ext
14780 cat >>conftest.$ac_ext <<_ACEOF
14781 /* end confdefs.h.  */
14782
14783 #include <math.h>
14784 double glob_double;
14785
14786 int
14787 main ()
14788 {
14789 return isinf(glob_double) ? 0 : 1;
14790   ;
14791   return 0;
14792 }
14793 _ACEOF
14794 rm -f conftest.$ac_objext conftest$ac_exeext
14795 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14796   (eval $ac_link) 2>conftest.er1
14797   ac_status=$?
14798   grep -v '^ *+' conftest.er1 >conftest.err
14799   rm -f conftest.er1
14800   cat conftest.err >&5
14801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802   (exit $ac_status); } &&
14803          { ac_try='test -z "$ac_c_werror_flag"
14804                          || test ! -s conftest.err'
14805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14806   (eval $ac_try) 2>&5
14807   ac_status=$?
14808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14809   (exit $ac_status); }; } &&
14810          { ac_try='test -s conftest$ac_exeext'
14811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14812   (eval $ac_try) 2>&5
14813   ac_status=$?
14814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14815   (exit $ac_status); }; }; then
14816   ac_cv_func_isinf=yes
14817 else
14818   echo "$as_me: failed program was:" >&5
14819 sed 's/^/| /' conftest.$ac_ext >&5
14820
14821 ac_cv_func_isinf=no
14822 fi
14823 rm -f conftest.err conftest.$ac_objext \
14824       conftest$ac_exeext conftest.$ac_ext
14825 fi
14826 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14827 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14828
14829 if test $ac_cv_func_isinf = yes ; then
14830
14831 cat >>confdefs.h <<\_ACEOF
14832 #define HAVE_ISINF 1
14833 _ACEOF
14834
14835 else
14836   case $LIBOBJS in
14837     "isinf.$ac_objext"   | \
14838   *" isinf.$ac_objext"   | \
14839     "isinf.$ac_objext "* | \
14840   *" isinf.$ac_objext "* ) ;;
14841   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14842 esac
14843
14844   # Look for a way to implement a substitute for isinf()
14845
14846
14847
14848
14849 for ac_func in fpclass fp_class fp_class_d class
14850 do
14851 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14852 echo "$as_me:$LINENO: checking for $ac_func" >&5
14853 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14854 if eval "test \"\${$as_ac_var+set}\" = set"; then
14855   echo $ECHO_N "(cached) $ECHO_C" >&6
14856 else
14857   cat >conftest.$ac_ext <<_ACEOF
14858 /* confdefs.h.  */
14859 _ACEOF
14860 cat confdefs.h >>conftest.$ac_ext
14861 cat >>conftest.$ac_ext <<_ACEOF
14862 /* end confdefs.h.  */
14863 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14864    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14865 #define $ac_func innocuous_$ac_func
14866
14867 /* System header to define __stub macros and hopefully few prototypes,
14868     which can conflict with char $ac_func (); below.
14869     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14870     <limits.h> exists even on freestanding compilers.  */
14871
14872 #ifdef __STDC__
14873 # include <limits.h>
14874 #else
14875 # include <assert.h>
14876 #endif
14877
14878 #undef $ac_func
14879
14880 /* Override any gcc2 internal prototype to avoid an error.  */
14881 #ifdef __cplusplus
14882 extern "C"
14883 {
14884 #endif
14885 /* We use char because int might match the return type of a gcc2
14886    builtin and then its argument prototype would still apply.  */
14887 char $ac_func ();
14888 /* The GNU C library defines this for functions which it implements
14889     to always fail with ENOSYS.  Some functions are actually named
14890     something starting with __ and the normal name is an alias.  */
14891 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14892 choke me
14893 #else
14894 char (*f) () = $ac_func;
14895 #endif
14896 #ifdef __cplusplus
14897 }
14898 #endif
14899
14900 int
14901 main ()
14902 {
14903 return f != $ac_func;
14904   ;
14905   return 0;
14906 }
14907 _ACEOF
14908 rm -f conftest.$ac_objext conftest$ac_exeext
14909 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14910   (eval $ac_link) 2>conftest.er1
14911   ac_status=$?
14912   grep -v '^ *+' conftest.er1 >conftest.err
14913   rm -f conftest.er1
14914   cat conftest.err >&5
14915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14916   (exit $ac_status); } &&
14917          { ac_try='test -z "$ac_c_werror_flag"
14918                          || test ! -s conftest.err'
14919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14920   (eval $ac_try) 2>&5
14921   ac_status=$?
14922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14923   (exit $ac_status); }; } &&
14924          { ac_try='test -s conftest$ac_exeext'
14925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14926   (eval $ac_try) 2>&5
14927   ac_status=$?
14928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14929   (exit $ac_status); }; }; then
14930   eval "$as_ac_var=yes"
14931 else
14932   echo "$as_me: failed program was:" >&5
14933 sed 's/^/| /' conftest.$ac_ext >&5
14934
14935 eval "$as_ac_var=no"
14936 fi
14937 rm -f conftest.err conftest.$ac_objext \
14938       conftest$ac_exeext conftest.$ac_ext
14939 fi
14940 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14941 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14942 if test `eval echo '${'$as_ac_var'}'` = yes; then
14943   cat >>confdefs.h <<_ACEOF
14944 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14945 _ACEOF
14946  break
14947 fi
14948 done
14949
14950 fi
14951
14952 # Some versions of libedit contain strlcpy(); so disregard that library while
14953 # checking for these standard libc functions.
14954 pgac_save_LIBS="$LIBS"
14955 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul unsetenv
14973 do
14974 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14975 echo "$as_me:$LINENO: checking for $ac_func" >&5
14976 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14977 if eval "test \"\${$as_ac_var+set}\" = set"; then
14978   echo $ECHO_N "(cached) $ECHO_C" >&6
14979 else
14980   cat >conftest.$ac_ext <<_ACEOF
14981 /* confdefs.h.  */
14982 _ACEOF
14983 cat confdefs.h >>conftest.$ac_ext
14984 cat >>conftest.$ac_ext <<_ACEOF
14985 /* end confdefs.h.  */
14986 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14987    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14988 #define $ac_func innocuous_$ac_func
14989
14990 /* System header to define __stub macros and hopefully few prototypes,
14991     which can conflict with char $ac_func (); below.
14992     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14993     <limits.h> exists even on freestanding compilers.  */
14994
14995 #ifdef __STDC__
14996 # include <limits.h>
14997 #else
14998 # include <assert.h>
14999 #endif
15000
15001 #undef $ac_func
15002
15003 /* Override any gcc2 internal prototype to avoid an error.  */
15004 #ifdef __cplusplus
15005 extern "C"
15006 {
15007 #endif
15008 /* We use char because int might match the return type of a gcc2
15009    builtin and then its argument prototype would still apply.  */
15010 char $ac_func ();
15011 /* The GNU C library defines this for functions which it implements
15012     to always fail with ENOSYS.  Some functions are actually named
15013     something starting with __ and the normal name is an alias.  */
15014 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15015 choke me
15016 #else
15017 char (*f) () = $ac_func;
15018 #endif
15019 #ifdef __cplusplus
15020 }
15021 #endif
15022
15023 int
15024 main ()
15025 {
15026 return f != $ac_func;
15027   ;
15028   return 0;
15029 }
15030 _ACEOF
15031 rm -f conftest.$ac_objext conftest$ac_exeext
15032 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15033   (eval $ac_link) 2>conftest.er1
15034   ac_status=$?
15035   grep -v '^ *+' conftest.er1 >conftest.err
15036   rm -f conftest.er1
15037   cat conftest.err >&5
15038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15039   (exit $ac_status); } &&
15040          { ac_try='test -z "$ac_c_werror_flag"
15041                          || test ! -s conftest.err'
15042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15043   (eval $ac_try) 2>&5
15044   ac_status=$?
15045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15046   (exit $ac_status); }; } &&
15047          { ac_try='test -s conftest$ac_exeext'
15048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15049   (eval $ac_try) 2>&5
15050   ac_status=$?
15051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052   (exit $ac_status); }; }; then
15053   eval "$as_ac_var=yes"
15054 else
15055   echo "$as_me: failed program was:" >&5
15056 sed 's/^/| /' conftest.$ac_ext >&5
15057
15058 eval "$as_ac_var=no"
15059 fi
15060 rm -f conftest.err conftest.$ac_objext \
15061       conftest$ac_exeext conftest.$ac_ext
15062 fi
15063 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15064 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15065 if test `eval echo '${'$as_ac_var'}'` = yes; then
15066   cat >>confdefs.h <<_ACEOF
15067 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15068 _ACEOF
15069
15070 else
15071   case $LIBOBJS in
15072     "$ac_func.$ac_objext"   | \
15073   *" $ac_func.$ac_objext"   | \
15074     "$ac_func.$ac_objext "* | \
15075   *" $ac_func.$ac_objext "* ) ;;
15076   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15077 esac
15078
15079 fi
15080 done
15081
15082
15083
15084 LIBS="$pgac_save_LIBS"
15085
15086 # System's version of getaddrinfo(), if any, may be used only if we found
15087 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15088 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
15089 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
15090 # because we want to use our own getaddrinfo.c on Windows anyway.)
15091 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
15092
15093 for ac_func in getaddrinfo
15094 do
15095 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15096 echo "$as_me:$LINENO: checking for $ac_func" >&5
15097 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15098 if eval "test \"\${$as_ac_var+set}\" = set"; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101   cat >conftest.$ac_ext <<_ACEOF
15102 /* confdefs.h.  */
15103 _ACEOF
15104 cat confdefs.h >>conftest.$ac_ext
15105 cat >>conftest.$ac_ext <<_ACEOF
15106 /* end confdefs.h.  */
15107 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15108    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15109 #define $ac_func innocuous_$ac_func
15110
15111 /* System header to define __stub macros and hopefully few prototypes,
15112     which can conflict with char $ac_func (); below.
15113     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15114     <limits.h> exists even on freestanding compilers.  */
15115
15116 #ifdef __STDC__
15117 # include <limits.h>
15118 #else
15119 # include <assert.h>
15120 #endif
15121
15122 #undef $ac_func
15123
15124 /* Override any gcc2 internal prototype to avoid an error.  */
15125 #ifdef __cplusplus
15126 extern "C"
15127 {
15128 #endif
15129 /* We use char because int might match the return type of a gcc2
15130    builtin and then its argument prototype would still apply.  */
15131 char $ac_func ();
15132 /* The GNU C library defines this for functions which it implements
15133     to always fail with ENOSYS.  Some functions are actually named
15134     something starting with __ and the normal name is an alias.  */
15135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15136 choke me
15137 #else
15138 char (*f) () = $ac_func;
15139 #endif
15140 #ifdef __cplusplus
15141 }
15142 #endif
15143
15144 int
15145 main ()
15146 {
15147 return f != $ac_func;
15148   ;
15149   return 0;
15150 }
15151 _ACEOF
15152 rm -f conftest.$ac_objext conftest$ac_exeext
15153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>conftest.er1
15155   ac_status=$?
15156   grep -v '^ *+' conftest.er1 >conftest.err
15157   rm -f conftest.er1
15158   cat conftest.err >&5
15159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160   (exit $ac_status); } &&
15161          { ac_try='test -z "$ac_c_werror_flag"
15162                          || test ! -s conftest.err'
15163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15164   (eval $ac_try) 2>&5
15165   ac_status=$?
15166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167   (exit $ac_status); }; } &&
15168          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
15174   eval "$as_ac_var=yes"
15175 else
15176   echo "$as_me: failed program was:" >&5
15177 sed 's/^/| /' conftest.$ac_ext >&5
15178
15179 eval "$as_ac_var=no"
15180 fi
15181 rm -f conftest.err conftest.$ac_objext \
15182       conftest$ac_exeext conftest.$ac_ext
15183 fi
15184 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15185 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15186 if test `eval echo '${'$as_ac_var'}'` = yes; then
15187   cat >>confdefs.h <<_ACEOF
15188 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15189 _ACEOF
15190
15191 else
15192   case $LIBOBJS in
15193     "$ac_func.$ac_objext"   | \
15194   *" $ac_func.$ac_objext"   | \
15195     "$ac_func.$ac_objext "* | \
15196   *" $ac_func.$ac_objext "* ) ;;
15197   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15198 esac
15199
15200 fi
15201 done
15202
15203
15204 else
15205   case $LIBOBJS in
15206     "getaddrinfo.$ac_objext"   | \
15207   *" getaddrinfo.$ac_objext"   | \
15208     "getaddrinfo.$ac_objext "* | \
15209   *" getaddrinfo.$ac_objext "* ) ;;
15210   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
15211 esac
15212
15213 fi
15214
15215 # similarly, use system's getopt_long() only if system provides struct option.
15216 if test x"$ac_cv_type_struct_option" = xyes ; then
15217
15218 for ac_func in getopt_long
15219 do
15220 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15221 echo "$as_me:$LINENO: checking for $ac_func" >&5
15222 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15223 if eval "test \"\${$as_ac_var+set}\" = set"; then
15224   echo $ECHO_N "(cached) $ECHO_C" >&6
15225 else
15226   cat >conftest.$ac_ext <<_ACEOF
15227 /* confdefs.h.  */
15228 _ACEOF
15229 cat confdefs.h >>conftest.$ac_ext
15230 cat >>conftest.$ac_ext <<_ACEOF
15231 /* end confdefs.h.  */
15232 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15233    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15234 #define $ac_func innocuous_$ac_func
15235
15236 /* System header to define __stub macros and hopefully few prototypes,
15237     which can conflict with char $ac_func (); below.
15238     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15239     <limits.h> exists even on freestanding compilers.  */
15240
15241 #ifdef __STDC__
15242 # include <limits.h>
15243 #else
15244 # include <assert.h>
15245 #endif
15246
15247 #undef $ac_func
15248
15249 /* Override any gcc2 internal prototype to avoid an error.  */
15250 #ifdef __cplusplus
15251 extern "C"
15252 {
15253 #endif
15254 /* We use char because int might match the return type of a gcc2
15255    builtin and then its argument prototype would still apply.  */
15256 char $ac_func ();
15257 /* The GNU C library defines this for functions which it implements
15258     to always fail with ENOSYS.  Some functions are actually named
15259     something starting with __ and the normal name is an alias.  */
15260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15261 choke me
15262 #else
15263 char (*f) () = $ac_func;
15264 #endif
15265 #ifdef __cplusplus
15266 }
15267 #endif
15268
15269 int
15270 main ()
15271 {
15272 return f != $ac_func;
15273   ;
15274   return 0;
15275 }
15276 _ACEOF
15277 rm -f conftest.$ac_objext conftest$ac_exeext
15278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15279   (eval $ac_link) 2>conftest.er1
15280   ac_status=$?
15281   grep -v '^ *+' conftest.er1 >conftest.err
15282   rm -f conftest.er1
15283   cat conftest.err >&5
15284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285   (exit $ac_status); } &&
15286          { ac_try='test -z "$ac_c_werror_flag"
15287                          || test ! -s conftest.err'
15288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15289   (eval $ac_try) 2>&5
15290   ac_status=$?
15291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15292   (exit $ac_status); }; } &&
15293          { ac_try='test -s conftest$ac_exeext'
15294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15295   (eval $ac_try) 2>&5
15296   ac_status=$?
15297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15298   (exit $ac_status); }; }; then
15299   eval "$as_ac_var=yes"
15300 else
15301   echo "$as_me: failed program was:" >&5
15302 sed 's/^/| /' conftest.$ac_ext >&5
15303
15304 eval "$as_ac_var=no"
15305 fi
15306 rm -f conftest.err conftest.$ac_objext \
15307       conftest$ac_exeext conftest.$ac_ext
15308 fi
15309 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15310 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15311 if test `eval echo '${'$as_ac_var'}'` = yes; then
15312   cat >>confdefs.h <<_ACEOF
15313 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15314 _ACEOF
15315
15316 else
15317   case $LIBOBJS in
15318     "$ac_func.$ac_objext"   | \
15319   *" $ac_func.$ac_objext"   | \
15320     "$ac_func.$ac_objext "* | \
15321   *" $ac_func.$ac_objext "* ) ;;
15322   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15323 esac
15324
15325 fi
15326 done
15327
15328
15329 else
15330   case $LIBOBJS in
15331     "getopt_long.$ac_objext"   | \
15332   *" getopt_long.$ac_objext"   | \
15333     "getopt_long.$ac_objext "* | \
15334   *" getopt_long.$ac_objext "* ) ;;
15335   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
15336 esac
15337
15338 fi
15339
15340 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
15341 # We override the previous test that said fseeko/ftello didn't exist
15342 # OS tests are also done in include/c.h and port/fseeko.c
15343 case $host_os in bsdi*|netbsd*)
15344 ac_cv_func_fseeko=yes
15345 esac
15346
15347 # Win32 support
15348 if test "$PORTNAME" = "win32"; then
15349 case $LIBOBJS in
15350     "gettimeofday.$ac_objext"   | \
15351   *" gettimeofday.$ac_objext"   | \
15352     "gettimeofday.$ac_objext "* | \
15353   *" gettimeofday.$ac_objext "* ) ;;
15354   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
15355 esac
15356
15357 case $LIBOBJS in
15358     "kill.$ac_objext"   | \
15359   *" kill.$ac_objext"   | \
15360     "kill.$ac_objext "* | \
15361   *" kill.$ac_objext "* ) ;;
15362   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
15363 esac
15364
15365 case $LIBOBJS in
15366     "open.$ac_objext"   | \
15367   *" open.$ac_objext"   | \
15368     "open.$ac_objext "* | \
15369   *" open.$ac_objext "* ) ;;
15370   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
15371 esac
15372
15373 case $LIBOBJS in
15374     "rand.$ac_objext"   | \
15375   *" rand.$ac_objext"   | \
15376     "rand.$ac_objext "* | \
15377   *" rand.$ac_objext "* ) ;;
15378   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
15379 esac
15380
15381 case $LIBOBJS in
15382     "win32error.$ac_objext"   | \
15383   *" win32error.$ac_objext"   | \
15384     "win32error.$ac_objext "* | \
15385   *" win32error.$ac_objext "* ) ;;
15386   *) LIBOBJS="$LIBOBJS win32error.$ac_objext" ;;
15387 esac
15388
15389
15390 cat >>confdefs.h <<\_ACEOF
15391 #define HAVE_SYMLINK 1
15392 _ACEOF
15393
15394 fi
15395
15396 if test "$with_readline" = yes; then
15397   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
15398 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
15399 cat >conftest.$ac_ext <<_ACEOF
15400 /* confdefs.h.  */
15401 _ACEOF
15402 cat confdefs.h >>conftest.$ac_ext
15403 cat >>conftest.$ac_ext <<_ACEOF
15404 /* end confdefs.h.  */
15405 #include <stdio.h>
15406 #ifdef HAVE_READLINE_READLINE_H
15407 # include <readline/readline.h>
15408 #elif defined(HAVE_READLINE_H)
15409 # include <readline.h>
15410 #endif
15411
15412 int
15413 main ()
15414 {
15415 rl_completion_append_character = 'x';
15416   ;
15417   return 0;
15418 }
15419 _ACEOF
15420 rm -f conftest.$ac_objext conftest$ac_exeext
15421 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15422   (eval $ac_link) 2>conftest.er1
15423   ac_status=$?
15424   grep -v '^ *+' conftest.er1 >conftest.err
15425   rm -f conftest.er1
15426   cat conftest.err >&5
15427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15428   (exit $ac_status); } &&
15429          { ac_try='test -z "$ac_c_werror_flag"
15430                          || test ! -s conftest.err'
15431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15432   (eval $ac_try) 2>&5
15433   ac_status=$?
15434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15435   (exit $ac_status); }; } &&
15436          { ac_try='test -s conftest$ac_exeext'
15437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15438   (eval $ac_try) 2>&5
15439   ac_status=$?
15440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15441   (exit $ac_status); }; }; then
15442   echo "$as_me:$LINENO: result: yes" >&5
15443 echo "${ECHO_T}yes" >&6
15444
15445 cat >>confdefs.h <<\_ACEOF
15446 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
15447 _ACEOF
15448
15449 else
15450   echo "$as_me: failed program was:" >&5
15451 sed 's/^/| /' conftest.$ac_ext >&5
15452
15453 echo "$as_me:$LINENO: result: no" >&5
15454 echo "${ECHO_T}no" >&6
15455 fi
15456 rm -f conftest.err conftest.$ac_objext \
15457       conftest$ac_exeext conftest.$ac_ext
15458
15459
15460 for ac_func in rl_completion_matches rl_filename_completion_function
15461 do
15462 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15463 echo "$as_me:$LINENO: checking for $ac_func" >&5
15464 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15465 if eval "test \"\${$as_ac_var+set}\" = set"; then
15466   echo $ECHO_N "(cached) $ECHO_C" >&6
15467 else
15468   cat >conftest.$ac_ext <<_ACEOF
15469 /* confdefs.h.  */
15470 _ACEOF
15471 cat confdefs.h >>conftest.$ac_ext
15472 cat >>conftest.$ac_ext <<_ACEOF
15473 /* end confdefs.h.  */
15474 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15475    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15476 #define $ac_func innocuous_$ac_func
15477
15478 /* System header to define __stub macros and hopefully few prototypes,
15479     which can conflict with char $ac_func (); below.
15480     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15481     <limits.h> exists even on freestanding compilers.  */
15482
15483 #ifdef __STDC__
15484 # include <limits.h>
15485 #else
15486 # include <assert.h>
15487 #endif
15488
15489 #undef $ac_func
15490
15491 /* Override any gcc2 internal prototype to avoid an error.  */
15492 #ifdef __cplusplus
15493 extern "C"
15494 {
15495 #endif
15496 /* We use char because int might match the return type of a gcc2
15497    builtin and then its argument prototype would still apply.  */
15498 char $ac_func ();
15499 /* The GNU C library defines this for functions which it implements
15500     to always fail with ENOSYS.  Some functions are actually named
15501     something starting with __ and the normal name is an alias.  */
15502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15503 choke me
15504 #else
15505 char (*f) () = $ac_func;
15506 #endif
15507 #ifdef __cplusplus
15508 }
15509 #endif
15510
15511 int
15512 main ()
15513 {
15514 return f != $ac_func;
15515   ;
15516   return 0;
15517 }
15518 _ACEOF
15519 rm -f conftest.$ac_objext conftest$ac_exeext
15520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15521   (eval $ac_link) 2>conftest.er1
15522   ac_status=$?
15523   grep -v '^ *+' conftest.er1 >conftest.err
15524   rm -f conftest.er1
15525   cat conftest.err >&5
15526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527   (exit $ac_status); } &&
15528          { ac_try='test -z "$ac_c_werror_flag"
15529                          || test ! -s conftest.err'
15530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15531   (eval $ac_try) 2>&5
15532   ac_status=$?
15533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15534   (exit $ac_status); }; } &&
15535          { ac_try='test -s conftest$ac_exeext'
15536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537   (eval $ac_try) 2>&5
15538   ac_status=$?
15539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540   (exit $ac_status); }; }; then
15541   eval "$as_ac_var=yes"
15542 else
15543   echo "$as_me: failed program was:" >&5
15544 sed 's/^/| /' conftest.$ac_ext >&5
15545
15546 eval "$as_ac_var=no"
15547 fi
15548 rm -f conftest.err conftest.$ac_objext \
15549       conftest$ac_exeext conftest.$ac_ext
15550 fi
15551 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15552 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15553 if test `eval echo '${'$as_ac_var'}'` = yes; then
15554   cat >>confdefs.h <<_ACEOF
15555 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15556 _ACEOF
15557
15558 fi
15559 done
15560
15561
15562 for ac_func in replace_history_entry
15563 do
15564 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15565 echo "$as_me:$LINENO: checking for $ac_func" >&5
15566 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15567 if eval "test \"\${$as_ac_var+set}\" = set"; then
15568   echo $ECHO_N "(cached) $ECHO_C" >&6
15569 else
15570   cat >conftest.$ac_ext <<_ACEOF
15571 /* confdefs.h.  */
15572 _ACEOF
15573 cat confdefs.h >>conftest.$ac_ext
15574 cat >>conftest.$ac_ext <<_ACEOF
15575 /* end confdefs.h.  */
15576 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15577    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15578 #define $ac_func innocuous_$ac_func
15579
15580 /* System header to define __stub macros and hopefully few prototypes,
15581     which can conflict with char $ac_func (); below.
15582     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15583     <limits.h> exists even on freestanding compilers.  */
15584
15585 #ifdef __STDC__
15586 # include <limits.h>
15587 #else
15588 # include <assert.h>
15589 #endif
15590
15591 #undef $ac_func
15592
15593 /* Override any gcc2 internal prototype to avoid an error.  */
15594 #ifdef __cplusplus
15595 extern "C"
15596 {
15597 #endif
15598 /* We use char because int might match the return type of a gcc2
15599    builtin and then its argument prototype would still apply.  */
15600 char $ac_func ();
15601 /* The GNU C library defines this for functions which it implements
15602     to always fail with ENOSYS.  Some functions are actually named
15603     something starting with __ and the normal name is an alias.  */
15604 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15605 choke me
15606 #else
15607 char (*f) () = $ac_func;
15608 #endif
15609 #ifdef __cplusplus
15610 }
15611 #endif
15612
15613 int
15614 main ()
15615 {
15616 return f != $ac_func;
15617   ;
15618   return 0;
15619 }
15620 _ACEOF
15621 rm -f conftest.$ac_objext conftest$ac_exeext
15622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15623   (eval $ac_link) 2>conftest.er1
15624   ac_status=$?
15625   grep -v '^ *+' conftest.er1 >conftest.err
15626   rm -f conftest.er1
15627   cat conftest.err >&5
15628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15629   (exit $ac_status); } &&
15630          { ac_try='test -z "$ac_c_werror_flag"
15631                          || test ! -s conftest.err'
15632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15633   (eval $ac_try) 2>&5
15634   ac_status=$?
15635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636   (exit $ac_status); }; } &&
15637          { ac_try='test -s conftest$ac_exeext'
15638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15639   (eval $ac_try) 2>&5
15640   ac_status=$?
15641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15642   (exit $ac_status); }; }; then
15643   eval "$as_ac_var=yes"
15644 else
15645   echo "$as_me: failed program was:" >&5
15646 sed 's/^/| /' conftest.$ac_ext >&5
15647
15648 eval "$as_ac_var=no"
15649 fi
15650 rm -f conftest.err conftest.$ac_objext \
15651       conftest$ac_exeext conftest.$ac_ext
15652 fi
15653 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15654 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15655 if test `eval echo '${'$as_ac_var'}'` = yes; then
15656   cat >>confdefs.h <<_ACEOF
15657 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15658 _ACEOF
15659
15660 fi
15661 done
15662
15663 fi
15664
15665
15666 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15667 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15668 cat >conftest.$ac_ext <<_ACEOF
15669 /* confdefs.h.  */
15670 _ACEOF
15671 cat confdefs.h >>conftest.$ac_ext
15672 cat >>conftest.$ac_ext <<_ACEOF
15673 /* end confdefs.h.  */
15674 #include <setjmp.h>
15675 int
15676 main ()
15677 {
15678 sigjmp_buf x; sigsetjmp(x, 1);
15679   ;
15680   return 0;
15681 }
15682 _ACEOF
15683 rm -f conftest.$ac_objext conftest$ac_exeext
15684 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15685   (eval $ac_link) 2>conftest.er1
15686   ac_status=$?
15687   grep -v '^ *+' conftest.er1 >conftest.err
15688   rm -f conftest.er1
15689   cat conftest.err >&5
15690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691   (exit $ac_status); } &&
15692          { ac_try='test -z "$ac_c_werror_flag"
15693                          || test ! -s conftest.err'
15694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15695   (eval $ac_try) 2>&5
15696   ac_status=$?
15697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15698   (exit $ac_status); }; } &&
15699          { ac_try='test -s conftest$ac_exeext'
15700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15701   (eval $ac_try) 2>&5
15702   ac_status=$?
15703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704   (exit $ac_status); }; }; then
15705
15706 cat >>confdefs.h <<\_ACEOF
15707 #define HAVE_SIGSETJMP 1
15708 _ACEOF
15709
15710 echo "$as_me:$LINENO: result: yes" >&5
15711 echo "${ECHO_T}yes" >&6
15712 else
15713   echo "$as_me: failed program was:" >&5
15714 sed 's/^/| /' conftest.$ac_ext >&5
15715
15716 echo "$as_me:$LINENO: result: no" >&5
15717 echo "${ECHO_T}no" >&6
15718 fi
15719 rm -f conftest.err conftest.$ac_objext \
15720       conftest$ac_exeext conftest.$ac_ext
15721
15722 echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
15723 echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
15724 if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
15725   echo $ECHO_N "(cached) $ECHO_C" >&6
15726 else
15727   cat >conftest.$ac_ext <<_ACEOF
15728 /* confdefs.h.  */
15729 _ACEOF
15730 cat confdefs.h >>conftest.$ac_ext
15731 cat >>conftest.$ac_ext <<_ACEOF
15732 /* end confdefs.h.  */
15733 #include <signal.h>
15734 /* NetBSD declares sys_siglist in unistd.h.  */
15735 #if HAVE_UNISTD_H
15736 # include <unistd.h>
15737 #endif
15738
15739
15740 int
15741 main ()
15742 {
15743 #ifndef sys_siglist
15744   char *p = (char *) sys_siglist;
15745 #endif
15746
15747   ;
15748   return 0;
15749 }
15750 _ACEOF
15751 rm -f conftest.$ac_objext
15752 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15753   (eval $ac_compile) 2>conftest.er1
15754   ac_status=$?
15755   grep -v '^ *+' conftest.er1 >conftest.err
15756   rm -f conftest.er1
15757   cat conftest.err >&5
15758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759   (exit $ac_status); } &&
15760          { ac_try='test -z "$ac_c_werror_flag"
15761                          || test ! -s conftest.err'
15762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15763   (eval $ac_try) 2>&5
15764   ac_status=$?
15765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15766   (exit $ac_status); }; } &&
15767          { ac_try='test -s conftest.$ac_objext'
15768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15769   (eval $ac_try) 2>&5
15770   ac_status=$?
15771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772   (exit $ac_status); }; }; then
15773   ac_cv_have_decl_sys_siglist=yes
15774 else
15775   echo "$as_me: failed program was:" >&5
15776 sed 's/^/| /' conftest.$ac_ext >&5
15777
15778 ac_cv_have_decl_sys_siglist=no
15779 fi
15780 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15781 fi
15782 echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
15783 echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
15784 if test $ac_cv_have_decl_sys_siglist = yes; then
15785
15786 cat >>confdefs.h <<_ACEOF
15787 #define HAVE_DECL_SYS_SIGLIST 1
15788 _ACEOF
15789
15790
15791 else
15792   cat >>confdefs.h <<_ACEOF
15793 #define HAVE_DECL_SYS_SIGLIST 0
15794 _ACEOF
15795
15796
15797 fi
15798
15799
15800
15801
15802 echo "$as_me:$LINENO: checking for syslog" >&5
15803 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15804 if test "${ac_cv_func_syslog+set}" = set; then
15805   echo $ECHO_N "(cached) $ECHO_C" >&6
15806 else
15807   cat >conftest.$ac_ext <<_ACEOF
15808 /* confdefs.h.  */
15809 _ACEOF
15810 cat confdefs.h >>conftest.$ac_ext
15811 cat >>conftest.$ac_ext <<_ACEOF
15812 /* end confdefs.h.  */
15813 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15814    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15815 #define syslog innocuous_syslog
15816
15817 /* System header to define __stub macros and hopefully few prototypes,
15818     which can conflict with char syslog (); below.
15819     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15820     <limits.h> exists even on freestanding compilers.  */
15821
15822 #ifdef __STDC__
15823 # include <limits.h>
15824 #else
15825 # include <assert.h>
15826 #endif
15827
15828 #undef syslog
15829
15830 /* Override any gcc2 internal prototype to avoid an error.  */
15831 #ifdef __cplusplus
15832 extern "C"
15833 {
15834 #endif
15835 /* We use char because int might match the return type of a gcc2
15836    builtin and then its argument prototype would still apply.  */
15837 char syslog ();
15838 /* The GNU C library defines this for functions which it implements
15839     to always fail with ENOSYS.  Some functions are actually named
15840     something starting with __ and the normal name is an alias.  */
15841 #if defined (__stub_syslog) || defined (__stub___syslog)
15842 choke me
15843 #else
15844 char (*f) () = syslog;
15845 #endif
15846 #ifdef __cplusplus
15847 }
15848 #endif
15849
15850 int
15851 main ()
15852 {
15853 return f != syslog;
15854   ;
15855   return 0;
15856 }
15857 _ACEOF
15858 rm -f conftest.$ac_objext conftest$ac_exeext
15859 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15860   (eval $ac_link) 2>conftest.er1
15861   ac_status=$?
15862   grep -v '^ *+' conftest.er1 >conftest.err
15863   rm -f conftest.er1
15864   cat conftest.err >&5
15865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15866   (exit $ac_status); } &&
15867          { ac_try='test -z "$ac_c_werror_flag"
15868                          || test ! -s conftest.err'
15869   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15870   (eval $ac_try) 2>&5
15871   ac_status=$?
15872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15873   (exit $ac_status); }; } &&
15874          { ac_try='test -s conftest$ac_exeext'
15875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15876   (eval $ac_try) 2>&5
15877   ac_status=$?
15878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15879   (exit $ac_status); }; }; then
15880   ac_cv_func_syslog=yes
15881 else
15882   echo "$as_me: failed program was:" >&5
15883 sed 's/^/| /' conftest.$ac_ext >&5
15884
15885 ac_cv_func_syslog=no
15886 fi
15887 rm -f conftest.err conftest.$ac_objext \
15888       conftest$ac_exeext conftest.$ac_ext
15889 fi
15890 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15891 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15892 if test $ac_cv_func_syslog = yes; then
15893   if test "${ac_cv_header_syslog_h+set}" = set; then
15894   echo "$as_me:$LINENO: checking for syslog.h" >&5
15895 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15896 if test "${ac_cv_header_syslog_h+set}" = set; then
15897   echo $ECHO_N "(cached) $ECHO_C" >&6
15898 fi
15899 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15900 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15901 else
15902   # Is the header compilable?
15903 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15904 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15905 cat >conftest.$ac_ext <<_ACEOF
15906 /* confdefs.h.  */
15907 _ACEOF
15908 cat confdefs.h >>conftest.$ac_ext
15909 cat >>conftest.$ac_ext <<_ACEOF
15910 /* end confdefs.h.  */
15911 $ac_includes_default
15912 #include <syslog.h>
15913 _ACEOF
15914 rm -f conftest.$ac_objext
15915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15916   (eval $ac_compile) 2>conftest.er1
15917   ac_status=$?
15918   grep -v '^ *+' conftest.er1 >conftest.err
15919   rm -f conftest.er1
15920   cat conftest.err >&5
15921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15922   (exit $ac_status); } &&
15923          { ac_try='test -z "$ac_c_werror_flag"
15924                          || test ! -s conftest.err'
15925   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15926   (eval $ac_try) 2>&5
15927   ac_status=$?
15928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15929   (exit $ac_status); }; } &&
15930          { ac_try='test -s conftest.$ac_objext'
15931   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15932   (eval $ac_try) 2>&5
15933   ac_status=$?
15934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935   (exit $ac_status); }; }; then
15936   ac_header_compiler=yes
15937 else
15938   echo "$as_me: failed program was:" >&5
15939 sed 's/^/| /' conftest.$ac_ext >&5
15940
15941 ac_header_compiler=no
15942 fi
15943 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15944 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15945 echo "${ECHO_T}$ac_header_compiler" >&6
15946
15947 # Is the header present?
15948 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15949 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15950 cat >conftest.$ac_ext <<_ACEOF
15951 /* confdefs.h.  */
15952 _ACEOF
15953 cat confdefs.h >>conftest.$ac_ext
15954 cat >>conftest.$ac_ext <<_ACEOF
15955 /* end confdefs.h.  */
15956 #include <syslog.h>
15957 _ACEOF
15958 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15959   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15960   ac_status=$?
15961   grep -v '^ *+' conftest.er1 >conftest.err
15962   rm -f conftest.er1
15963   cat conftest.err >&5
15964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15965   (exit $ac_status); } >/dev/null; then
15966   if test -s conftest.err; then
15967     ac_cpp_err=$ac_c_preproc_warn_flag
15968     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15969   else
15970     ac_cpp_err=
15971   fi
15972 else
15973   ac_cpp_err=yes
15974 fi
15975 if test -z "$ac_cpp_err"; then
15976   ac_header_preproc=yes
15977 else
15978   echo "$as_me: failed program was:" >&5
15979 sed 's/^/| /' conftest.$ac_ext >&5
15980
15981   ac_header_preproc=no
15982 fi
15983 rm -f conftest.err conftest.$ac_ext
15984 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15985 echo "${ECHO_T}$ac_header_preproc" >&6
15986
15987 # So?  What about this header?
15988 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15989   yes:no: )
15990     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15991 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15992     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15993 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15994     ac_header_preproc=yes
15995     ;;
15996   no:yes:* )
15997     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15998 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15999     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
16000 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
16001     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
16002 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
16003     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
16004 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16005     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
16006 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
16007     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
16008 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
16009     (
16010       cat <<\_ASBOX
16011 ## ---------------------------------------- ##
16012 ## Report this to pgsql-bugs@postgresql.org ##
16013 ## ---------------------------------------- ##
16014 _ASBOX
16015     ) |
16016       sed "s/^/$as_me: WARNING:     /" >&2
16017     ;;
16018 esac
16019 echo "$as_me:$LINENO: checking for syslog.h" >&5
16020 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
16021 if test "${ac_cv_header_syslog_h+set}" = set; then
16022   echo $ECHO_N "(cached) $ECHO_C" >&6
16023 else
16024   ac_cv_header_syslog_h=$ac_header_preproc
16025 fi
16026 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
16027 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
16028
16029 fi
16030 if test $ac_cv_header_syslog_h = yes; then
16031
16032 cat >>confdefs.h <<\_ACEOF
16033 #define HAVE_SYSLOG 1
16034 _ACEOF
16035
16036 fi
16037
16038
16039 fi
16040
16041
16042 echo "$as_me:$LINENO: checking for optreset" >&5
16043 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
16044 if test "${pgac_cv_var_int_optreset+set}" = set; then
16045   echo $ECHO_N "(cached) $ECHO_C" >&6
16046 else
16047   cat >conftest.$ac_ext <<_ACEOF
16048 /* confdefs.h.  */
16049 _ACEOF
16050 cat confdefs.h >>conftest.$ac_ext
16051 cat >>conftest.$ac_ext <<_ACEOF
16052 /* end confdefs.h.  */
16053 #include <unistd.h>
16054 int
16055 main ()
16056 {
16057 extern int optreset; optreset = 1;
16058   ;
16059   return 0;
16060 }
16061 _ACEOF
16062 rm -f conftest.$ac_objext conftest$ac_exeext
16063 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16064   (eval $ac_link) 2>conftest.er1
16065   ac_status=$?
16066   grep -v '^ *+' conftest.er1 >conftest.err
16067   rm -f conftest.er1
16068   cat conftest.err >&5
16069   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070   (exit $ac_status); } &&
16071          { ac_try='test -z "$ac_c_werror_flag"
16072                          || test ! -s conftest.err'
16073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16077   (exit $ac_status); }; } &&
16078          { ac_try='test -s conftest$ac_exeext'
16079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16080   (eval $ac_try) 2>&5
16081   ac_status=$?
16082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16083   (exit $ac_status); }; }; then
16084   pgac_cv_var_int_optreset=yes
16085 else
16086   echo "$as_me: failed program was:" >&5
16087 sed 's/^/| /' conftest.$ac_ext >&5
16088
16089 pgac_cv_var_int_optreset=no
16090 fi
16091 rm -f conftest.err conftest.$ac_objext \
16092       conftest$ac_exeext conftest.$ac_ext
16093 fi
16094 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
16095 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
16096 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16097
16098 cat >>confdefs.h <<\_ACEOF
16099 #define HAVE_INT_OPTRESET 1
16100 _ACEOF
16101
16102 fi
16103
16104
16105
16106 for ac_func in strtoll strtoq
16107 do
16108 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16109 echo "$as_me:$LINENO: checking for $ac_func" >&5
16110 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16111 if eval "test \"\${$as_ac_var+set}\" = set"; then
16112   echo $ECHO_N "(cached) $ECHO_C" >&6
16113 else
16114   cat >conftest.$ac_ext <<_ACEOF
16115 /* confdefs.h.  */
16116 _ACEOF
16117 cat confdefs.h >>conftest.$ac_ext
16118 cat >>conftest.$ac_ext <<_ACEOF
16119 /* end confdefs.h.  */
16120 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16121    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16122 #define $ac_func innocuous_$ac_func
16123
16124 /* System header to define __stub macros and hopefully few prototypes,
16125     which can conflict with char $ac_func (); below.
16126     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16127     <limits.h> exists even on freestanding compilers.  */
16128
16129 #ifdef __STDC__
16130 # include <limits.h>
16131 #else
16132 # include <assert.h>
16133 #endif
16134
16135 #undef $ac_func
16136
16137 /* Override any gcc2 internal prototype to avoid an error.  */
16138 #ifdef __cplusplus
16139 extern "C"
16140 {
16141 #endif
16142 /* We use char because int might match the return type of a gcc2
16143    builtin and then its argument prototype would still apply.  */
16144 char $ac_func ();
16145 /* The GNU C library defines this for functions which it implements
16146     to always fail with ENOSYS.  Some functions are actually named
16147     something starting with __ and the normal name is an alias.  */
16148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16149 choke me
16150 #else
16151 char (*f) () = $ac_func;
16152 #endif
16153 #ifdef __cplusplus
16154 }
16155 #endif
16156
16157 int
16158 main ()
16159 {
16160 return f != $ac_func;
16161   ;
16162   return 0;
16163 }
16164 _ACEOF
16165 rm -f conftest.$ac_objext conftest$ac_exeext
16166 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16167   (eval $ac_link) 2>conftest.er1
16168   ac_status=$?
16169   grep -v '^ *+' conftest.er1 >conftest.err
16170   rm -f conftest.er1
16171   cat conftest.err >&5
16172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16173   (exit $ac_status); } &&
16174          { ac_try='test -z "$ac_c_werror_flag"
16175                          || test ! -s conftest.err'
16176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16177   (eval $ac_try) 2>&5
16178   ac_status=$?
16179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16180   (exit $ac_status); }; } &&
16181          { ac_try='test -s conftest$ac_exeext'
16182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16183   (eval $ac_try) 2>&5
16184   ac_status=$?
16185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16186   (exit $ac_status); }; }; then
16187   eval "$as_ac_var=yes"
16188 else
16189   echo "$as_me: failed program was:" >&5
16190 sed 's/^/| /' conftest.$ac_ext >&5
16191
16192 eval "$as_ac_var=no"
16193 fi
16194 rm -f conftest.err conftest.$ac_objext \
16195       conftest$ac_exeext conftest.$ac_ext
16196 fi
16197 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16198 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16199 if test `eval echo '${'$as_ac_var'}'` = yes; then
16200   cat >>confdefs.h <<_ACEOF
16201 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16202 _ACEOF
16203  break
16204 fi
16205 done
16206
16207
16208
16209 for ac_func in strtoull strtouq
16210 do
16211 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16212 echo "$as_me:$LINENO: checking for $ac_func" >&5
16213 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16214 if eval "test \"\${$as_ac_var+set}\" = set"; then
16215   echo $ECHO_N "(cached) $ECHO_C" >&6
16216 else
16217   cat >conftest.$ac_ext <<_ACEOF
16218 /* confdefs.h.  */
16219 _ACEOF
16220 cat confdefs.h >>conftest.$ac_ext
16221 cat >>conftest.$ac_ext <<_ACEOF
16222 /* end confdefs.h.  */
16223 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16224    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16225 #define $ac_func innocuous_$ac_func
16226
16227 /* System header to define __stub macros and hopefully few prototypes,
16228     which can conflict with char $ac_func (); below.
16229     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16230     <limits.h> exists even on freestanding compilers.  */
16231
16232 #ifdef __STDC__
16233 # include <limits.h>
16234 #else
16235 # include <assert.h>
16236 #endif
16237
16238 #undef $ac_func
16239
16240 /* Override any gcc2 internal prototype to avoid an error.  */
16241 #ifdef __cplusplus
16242 extern "C"
16243 {
16244 #endif
16245 /* We use char because int might match the return type of a gcc2
16246    builtin and then its argument prototype would still apply.  */
16247 char $ac_func ();
16248 /* The GNU C library defines this for functions which it implements
16249     to always fail with ENOSYS.  Some functions are actually named
16250     something starting with __ and the normal name is an alias.  */
16251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16252 choke me
16253 #else
16254 char (*f) () = $ac_func;
16255 #endif
16256 #ifdef __cplusplus
16257 }
16258 #endif
16259
16260 int
16261 main ()
16262 {
16263 return f != $ac_func;
16264   ;
16265   return 0;
16266 }
16267 _ACEOF
16268 rm -f conftest.$ac_objext conftest$ac_exeext
16269 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16270   (eval $ac_link) 2>conftest.er1
16271   ac_status=$?
16272   grep -v '^ *+' conftest.er1 >conftest.err
16273   rm -f conftest.er1
16274   cat conftest.err >&5
16275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16276   (exit $ac_status); } &&
16277          { ac_try='test -z "$ac_c_werror_flag"
16278                          || test ! -s conftest.err'
16279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16280   (eval $ac_try) 2>&5
16281   ac_status=$?
16282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16283   (exit $ac_status); }; } &&
16284          { ac_try='test -s conftest$ac_exeext'
16285   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286   (eval $ac_try) 2>&5
16287   ac_status=$?
16288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289   (exit $ac_status); }; }; then
16290   eval "$as_ac_var=yes"
16291 else
16292   echo "$as_me: failed program was:" >&5
16293 sed 's/^/| /' conftest.$ac_ext >&5
16294
16295 eval "$as_ac_var=no"
16296 fi
16297 rm -f conftest.err conftest.$ac_objext \
16298       conftest$ac_exeext conftest.$ac_ext
16299 fi
16300 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16301 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16302 if test `eval echo '${'$as_ac_var'}'` = yes; then
16303   cat >>confdefs.h <<_ACEOF
16304 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16305 _ACEOF
16306  break
16307 fi
16308 done
16309
16310
16311 # Check for one of atexit() or on_exit()
16312
16313 for ac_func in atexit
16314 do
16315 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16316 echo "$as_me:$LINENO: checking for $ac_func" >&5
16317 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16318 if eval "test \"\${$as_ac_var+set}\" = set"; then
16319   echo $ECHO_N "(cached) $ECHO_C" >&6
16320 else
16321   cat >conftest.$ac_ext <<_ACEOF
16322 /* confdefs.h.  */
16323 _ACEOF
16324 cat confdefs.h >>conftest.$ac_ext
16325 cat >>conftest.$ac_ext <<_ACEOF
16326 /* end confdefs.h.  */
16327 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16328    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16329 #define $ac_func innocuous_$ac_func
16330
16331 /* System header to define __stub macros and hopefully few prototypes,
16332     which can conflict with char $ac_func (); below.
16333     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16334     <limits.h> exists even on freestanding compilers.  */
16335
16336 #ifdef __STDC__
16337 # include <limits.h>
16338 #else
16339 # include <assert.h>
16340 #endif
16341
16342 #undef $ac_func
16343
16344 /* Override any gcc2 internal prototype to avoid an error.  */
16345 #ifdef __cplusplus
16346 extern "C"
16347 {
16348 #endif
16349 /* We use char because int might match the return type of a gcc2
16350    builtin and then its argument prototype would still apply.  */
16351 char $ac_func ();
16352 /* The GNU C library defines this for functions which it implements
16353     to always fail with ENOSYS.  Some functions are actually named
16354     something starting with __ and the normal name is an alias.  */
16355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16356 choke me
16357 #else
16358 char (*f) () = $ac_func;
16359 #endif
16360 #ifdef __cplusplus
16361 }
16362 #endif
16363
16364 int
16365 main ()
16366 {
16367 return f != $ac_func;
16368   ;
16369   return 0;
16370 }
16371 _ACEOF
16372 rm -f conftest.$ac_objext conftest$ac_exeext
16373 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16374   (eval $ac_link) 2>conftest.er1
16375   ac_status=$?
16376   grep -v '^ *+' conftest.er1 >conftest.err
16377   rm -f conftest.er1
16378   cat conftest.err >&5
16379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16380   (exit $ac_status); } &&
16381          { ac_try='test -z "$ac_c_werror_flag"
16382                          || test ! -s conftest.err'
16383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16384   (eval $ac_try) 2>&5
16385   ac_status=$?
16386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16387   (exit $ac_status); }; } &&
16388          { ac_try='test -s conftest$ac_exeext'
16389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16390   (eval $ac_try) 2>&5
16391   ac_status=$?
16392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16393   (exit $ac_status); }; }; then
16394   eval "$as_ac_var=yes"
16395 else
16396   echo "$as_me: failed program was:" >&5
16397 sed 's/^/| /' conftest.$ac_ext >&5
16398
16399 eval "$as_ac_var=no"
16400 fi
16401 rm -f conftest.err conftest.$ac_objext \
16402       conftest$ac_exeext conftest.$ac_ext
16403 fi
16404 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16405 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16406 if test `eval echo '${'$as_ac_var'}'` = yes; then
16407   cat >>confdefs.h <<_ACEOF
16408 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16409 _ACEOF
16410
16411 else
16412
16413 for ac_func in on_exit
16414 do
16415 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16416 echo "$as_me:$LINENO: checking for $ac_func" >&5
16417 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16418 if eval "test \"\${$as_ac_var+set}\" = set"; then
16419   echo $ECHO_N "(cached) $ECHO_C" >&6
16420 else
16421   cat >conftest.$ac_ext <<_ACEOF
16422 /* confdefs.h.  */
16423 _ACEOF
16424 cat confdefs.h >>conftest.$ac_ext
16425 cat >>conftest.$ac_ext <<_ACEOF
16426 /* end confdefs.h.  */
16427 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16428    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16429 #define $ac_func innocuous_$ac_func
16430
16431 /* System header to define __stub macros and hopefully few prototypes,
16432     which can conflict with char $ac_func (); below.
16433     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16434     <limits.h> exists even on freestanding compilers.  */
16435
16436 #ifdef __STDC__
16437 # include <limits.h>
16438 #else
16439 # include <assert.h>
16440 #endif
16441
16442 #undef $ac_func
16443
16444 /* Override any gcc2 internal prototype to avoid an error.  */
16445 #ifdef __cplusplus
16446 extern "C"
16447 {
16448 #endif
16449 /* We use char because int might match the return type of a gcc2
16450    builtin and then its argument prototype would still apply.  */
16451 char $ac_func ();
16452 /* The GNU C library defines this for functions which it implements
16453     to always fail with ENOSYS.  Some functions are actually named
16454     something starting with __ and the normal name is an alias.  */
16455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16456 choke me
16457 #else
16458 char (*f) () = $ac_func;
16459 #endif
16460 #ifdef __cplusplus
16461 }
16462 #endif
16463
16464 int
16465 main ()
16466 {
16467 return f != $ac_func;
16468   ;
16469   return 0;
16470 }
16471 _ACEOF
16472 rm -f conftest.$ac_objext conftest$ac_exeext
16473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16474   (eval $ac_link) 2>conftest.er1
16475   ac_status=$?
16476   grep -v '^ *+' conftest.er1 >conftest.err
16477   rm -f conftest.er1
16478   cat conftest.err >&5
16479   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16480   (exit $ac_status); } &&
16481          { ac_try='test -z "$ac_c_werror_flag"
16482                          || test ! -s conftest.err'
16483   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16484   (eval $ac_try) 2>&5
16485   ac_status=$?
16486   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16487   (exit $ac_status); }; } &&
16488          { ac_try='test -s conftest$ac_exeext'
16489   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16490   (eval $ac_try) 2>&5
16491   ac_status=$?
16492   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16493   (exit $ac_status); }; }; then
16494   eval "$as_ac_var=yes"
16495 else
16496   echo "$as_me: failed program was:" >&5
16497 sed 's/^/| /' conftest.$ac_ext >&5
16498
16499 eval "$as_ac_var=no"
16500 fi
16501 rm -f conftest.err conftest.$ac_objext \
16502       conftest$ac_exeext conftest.$ac_ext
16503 fi
16504 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16505 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16506 if test `eval echo '${'$as_ac_var'}'` = yes; then
16507   cat >>confdefs.h <<_ACEOF
16508 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16509 _ACEOF
16510
16511 else
16512   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
16513 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
16514    { (exit 1); exit 1; }; }
16515 fi
16516 done
16517
16518 fi
16519 done
16520
16521
16522 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16523 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16524 if test "${ac_cv_sys_largefile_source+set}" = set; then
16525   echo $ECHO_N "(cached) $ECHO_C" >&6
16526 else
16527   while :; do
16528   ac_cv_sys_largefile_source=no
16529   cat >conftest.$ac_ext <<_ACEOF
16530 /* confdefs.h.  */
16531 _ACEOF
16532 cat confdefs.h >>conftest.$ac_ext
16533 cat >>conftest.$ac_ext <<_ACEOF
16534 /* end confdefs.h.  */
16535 #include <stdio.h>
16536 int
16537 main ()
16538 {
16539 return !fseeko;
16540   ;
16541   return 0;
16542 }
16543 _ACEOF
16544 rm -f conftest.$ac_objext
16545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16546   (eval $ac_compile) 2>conftest.er1
16547   ac_status=$?
16548   grep -v '^ *+' conftest.er1 >conftest.err
16549   rm -f conftest.er1
16550   cat conftest.err >&5
16551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16552   (exit $ac_status); } &&
16553          { ac_try='test -z "$ac_c_werror_flag"
16554                          || test ! -s conftest.err'
16555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16556   (eval $ac_try) 2>&5
16557   ac_status=$?
16558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16559   (exit $ac_status); }; } &&
16560          { ac_try='test -s conftest.$ac_objext'
16561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16562   (eval $ac_try) 2>&5
16563   ac_status=$?
16564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16565   (exit $ac_status); }; }; then
16566   break
16567 else
16568   echo "$as_me: failed program was:" >&5
16569 sed 's/^/| /' conftest.$ac_ext >&5
16570
16571 fi
16572 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16573   cat >conftest.$ac_ext <<_ACEOF
16574 /* confdefs.h.  */
16575 _ACEOF
16576 cat confdefs.h >>conftest.$ac_ext
16577 cat >>conftest.$ac_ext <<_ACEOF
16578 /* end confdefs.h.  */
16579 #define _LARGEFILE_SOURCE 1
16580 #include <stdio.h>
16581 int
16582 main ()
16583 {
16584 return !fseeko;
16585   ;
16586   return 0;
16587 }
16588 _ACEOF
16589 rm -f conftest.$ac_objext
16590 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16591   (eval $ac_compile) 2>conftest.er1
16592   ac_status=$?
16593   grep -v '^ *+' conftest.er1 >conftest.err
16594   rm -f conftest.er1
16595   cat conftest.err >&5
16596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597   (exit $ac_status); } &&
16598          { ac_try='test -z "$ac_c_werror_flag"
16599                          || test ! -s conftest.err'
16600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16601   (eval $ac_try) 2>&5
16602   ac_status=$?
16603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16604   (exit $ac_status); }; } &&
16605          { ac_try='test -s conftest.$ac_objext'
16606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16607   (eval $ac_try) 2>&5
16608   ac_status=$?
16609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16610   (exit $ac_status); }; }; then
16611   ac_cv_sys_largefile_source=1; break
16612 else
16613   echo "$as_me: failed program was:" >&5
16614 sed 's/^/| /' conftest.$ac_ext >&5
16615
16616 fi
16617 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16618   break
16619 done
16620 fi
16621 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16622 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16623 if test "$ac_cv_sys_largefile_source" != no; then
16624
16625 cat >>confdefs.h <<_ACEOF
16626 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16627 _ACEOF
16628
16629 fi
16630 rm -f conftest*
16631
16632 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16633 # in glibc 2.1.3, but that breaks too many other things.
16634 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16635 echo "$as_me:$LINENO: checking for fseeko" >&5
16636 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16637 if test "${ac_cv_func_fseeko+set}" = set; then
16638   echo $ECHO_N "(cached) $ECHO_C" >&6
16639 else
16640   cat >conftest.$ac_ext <<_ACEOF
16641 /* confdefs.h.  */
16642 _ACEOF
16643 cat confdefs.h >>conftest.$ac_ext
16644 cat >>conftest.$ac_ext <<_ACEOF
16645 /* end confdefs.h.  */
16646 #include <stdio.h>
16647 int
16648 main ()
16649 {
16650 return fseeko && fseeko (stdin, 0, 0);
16651   ;
16652   return 0;
16653 }
16654 _ACEOF
16655 rm -f conftest.$ac_objext conftest$ac_exeext
16656 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16657   (eval $ac_link) 2>conftest.er1
16658   ac_status=$?
16659   grep -v '^ *+' conftest.er1 >conftest.err
16660   rm -f conftest.er1
16661   cat conftest.err >&5
16662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663   (exit $ac_status); } &&
16664          { ac_try='test -z "$ac_c_werror_flag"
16665                          || test ! -s conftest.err'
16666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16667   (eval $ac_try) 2>&5
16668   ac_status=$?
16669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16670   (exit $ac_status); }; } &&
16671          { ac_try='test -s conftest$ac_exeext'
16672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16673   (eval $ac_try) 2>&5
16674   ac_status=$?
16675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16676   (exit $ac_status); }; }; then
16677   ac_cv_func_fseeko=yes
16678 else
16679   echo "$as_me: failed program was:" >&5
16680 sed 's/^/| /' conftest.$ac_ext >&5
16681
16682 ac_cv_func_fseeko=no
16683 fi
16684 rm -f conftest.err conftest.$ac_objext \
16685       conftest$ac_exeext conftest.$ac_ext
16686 fi
16687 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16688 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16689 if test $ac_cv_func_fseeko = yes; then
16690
16691 cat >>confdefs.h <<\_ACEOF
16692 #define HAVE_FSEEKO 1
16693 _ACEOF
16694
16695 fi
16696
16697
16698 #
16699 # Pthreads
16700 #
16701 # For each platform, we need to know about any special compile and link
16702 # libraries, and whether the normal C function names are thread-safe.
16703 # See the comment at the top of src/port/thread.c for more information.
16704 #
16705 if test "$enable_thread_safety" = yes; then
16706
16707
16708
16709
16710 ac_ext=c
16711 ac_cpp='$CPP $CPPFLAGS'
16712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16715
16716 acx_pthread_ok=no
16717
16718 # We used to check for pthread.h first, but this fails if pthread.h
16719 # requires special compiler flags (e.g. on True64 or Sequent).
16720 # It gets checked for in the link test anyway.
16721
16722 # First of all, check if the user has set any of the PTHREAD_LIBS,
16723 # etcetera environment variables, and if threads linking works using
16724 # them:
16725 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16726         save_CFLAGS="$CFLAGS"
16727         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16728         save_LIBS="$LIBS"
16729         LIBS="$PTHREAD_LIBS $LIBS"
16730         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16731 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16732         cat >conftest.$ac_ext <<_ACEOF
16733 /* confdefs.h.  */
16734 _ACEOF
16735 cat confdefs.h >>conftest.$ac_ext
16736 cat >>conftest.$ac_ext <<_ACEOF
16737 /* end confdefs.h.  */
16738
16739 /* Override any gcc2 internal prototype to avoid an error.  */
16740 #ifdef __cplusplus
16741 extern "C"
16742 #endif
16743 /* We use char because int might match the return type of a gcc2
16744    builtin and then its argument prototype would still apply.  */
16745 char pthread_join ();
16746 int
16747 main ()
16748 {
16749 pthread_join ();
16750   ;
16751   return 0;
16752 }
16753 _ACEOF
16754 rm -f conftest.$ac_objext conftest$ac_exeext
16755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16756   (eval $ac_link) 2>conftest.er1
16757   ac_status=$?
16758   grep -v '^ *+' conftest.er1 >conftest.err
16759   rm -f conftest.er1
16760   cat conftest.err >&5
16761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16762   (exit $ac_status); } &&
16763          { ac_try='test -z "$ac_c_werror_flag"
16764                          || test ! -s conftest.err'
16765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16766   (eval $ac_try) 2>&5
16767   ac_status=$?
16768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16769   (exit $ac_status); }; } &&
16770          { ac_try='test -s conftest$ac_exeext'
16771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16772   (eval $ac_try) 2>&5
16773   ac_status=$?
16774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16775   (exit $ac_status); }; }; then
16776   acx_pthread_ok=yes
16777 else
16778   echo "$as_me: failed program was:" >&5
16779 sed 's/^/| /' conftest.$ac_ext >&5
16780
16781 fi
16782 rm -f conftest.err conftest.$ac_objext \
16783       conftest$ac_exeext conftest.$ac_ext
16784         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16785 echo "${ECHO_T}$acx_pthread_ok" >&6
16786         if test x"$acx_pthread_ok" = xno; then
16787                 PTHREAD_LIBS=""
16788                 PTHREAD_CFLAGS=""
16789         fi
16790         LIBS="$save_LIBS"
16791         CFLAGS="$save_CFLAGS"
16792 fi
16793
16794 # We must check for the threads library under a number of different
16795 # names; the ordering is very important because some systems
16796 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16797 # libraries is broken (non-POSIX).
16798
16799 # Create a list of thread flags to try.  Items starting with a "-" are
16800 # C compiler flags, and other items are library names, except for "none"
16801 # which indicates that we try without any flags at all, and "pthread-config"
16802 # which is a program returning the flags for the Pth emulation library.
16803
16804 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16805
16806 # The ordering *is* (sometimes) important.  Some notes on the
16807 # individual items follow:
16808
16809 # pthreads: AIX (must check this before -lpthread)
16810 # none: in case threads are in libc; should be tried before -Kthread and
16811 #       other compiler flags to prevent continual compiler warnings
16812 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16813 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16814 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16815 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16816 # -pthreads: Solaris/gcc
16817 # -mthreads: Mingw32/gcc, Lynx/gcc
16818 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16819 #      doesn't hurt to check since this sometimes defines pthreads too;
16820 #      also defines -D_REENTRANT)
16821 # pthread: Linux, etcetera
16822 # --thread-safe: KAI C++
16823 # pthread-config: use pthread-config program (for GNU Pth library)
16824
16825 case "${host_cpu}-${host_os}" in
16826         *solaris*)
16827
16828         # On Solaris (at least, for some versions), libc contains stubbed
16829         # (non-functional) versions of the pthreads routines, so link-based
16830         # tests will erroneously succeed.  (We need to link with -pthread or
16831         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16832         # a function called by this macro, so we could check for that, but
16833         # who knows whether they'll stub that too in a future libc.)  So,
16834         # we'll just look for -pthreads and -lpthread first:
16835
16836         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16837         ;;
16838 esac
16839
16840 if test x"$acx_pthread_ok" = xno; then
16841 for flag in $acx_pthread_flags; do
16842
16843         tryPTHREAD_CFLAGS=""
16844         tryPTHREAD_LIBS=""
16845         case $flag in
16846                 none)
16847                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16848 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16849                 ;;
16850
16851                 -*)
16852                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16853 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16854                 tryPTHREAD_CFLAGS="$flag"
16855                 ;;
16856
16857                 pthread-config)
16858                 # skip this if we already have flags defined, for PostgreSQL
16859                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16860                 # Extract the first word of "pthread-config", so it can be a program name with args.
16861 set dummy pthread-config; ac_word=$2
16862 echo "$as_me:$LINENO: checking for $ac_word" >&5
16863 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16864 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16865   echo $ECHO_N "(cached) $ECHO_C" >&6
16866 else
16867   if test -n "$acx_pthread_config"; then
16868   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16869 else
16870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16871 for as_dir in $PATH
16872 do
16873   IFS=$as_save_IFS
16874   test -z "$as_dir" && as_dir=.
16875   for ac_exec_ext in '' $ac_executable_extensions; do
16876   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16877     ac_cv_prog_acx_pthread_config="yes"
16878     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16879     break 2
16880   fi
16881 done
16882 done
16883
16884   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16885 fi
16886 fi
16887 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16888 if test -n "$acx_pthread_config"; then
16889   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16890 echo "${ECHO_T}$acx_pthread_config" >&6
16891 else
16892   echo "$as_me:$LINENO: result: no" >&5
16893 echo "${ECHO_T}no" >&6
16894 fi
16895
16896                 if test x"$acx_pthread_config" = xno; then continue; fi
16897                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16898                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16899                 ;;
16900
16901                 *)
16902                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16903 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16904                 tryPTHREAD_LIBS="-l$flag"
16905                 ;;
16906         esac
16907
16908         save_LIBS="$LIBS"
16909         save_CFLAGS="$CFLAGS"
16910         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16911         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16912
16913         # Check for various functions.  We must include pthread.h,
16914         # since some functions may be macros.  (On the Sequent, we
16915         # need a special flag -Kthread to make this header compile.)
16916         # We check for pthread_join because it is in -lpthread on IRIX
16917         # while pthread_create is in libc.  We check for pthread_attr_init
16918         # due to DEC craziness with -lpthreads.  We check for
16919         # pthread_cleanup_push because it is one of the few pthread
16920         # functions on Solaris that doesn't have a non-functional libc stub.
16921         # We try pthread_create on general principles.
16922         cat >conftest.$ac_ext <<_ACEOF
16923 /* confdefs.h.  */
16924 _ACEOF
16925 cat confdefs.h >>conftest.$ac_ext
16926 cat >>conftest.$ac_ext <<_ACEOF
16927 /* end confdefs.h.  */
16928 #include <pthread.h>
16929 int
16930 main ()
16931 {
16932 pthread_t th; pthread_join(th, 0);
16933                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16934                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16935   ;
16936   return 0;
16937 }
16938 _ACEOF
16939 rm -f conftest.$ac_objext conftest$ac_exeext
16940 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16941   (eval $ac_link) 2>conftest.er1
16942   ac_status=$?
16943   grep -v '^ *+' conftest.er1 >conftest.err
16944   rm -f conftest.er1
16945   cat conftest.err >&5
16946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16947   (exit $ac_status); } &&
16948          { ac_try='test -z "$ac_c_werror_flag"
16949                          || test ! -s conftest.err'
16950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16951   (eval $ac_try) 2>&5
16952   ac_status=$?
16953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16954   (exit $ac_status); }; } &&
16955          { ac_try='test -s conftest$ac_exeext'
16956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16957   (eval $ac_try) 2>&5
16958   ac_status=$?
16959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16960   (exit $ac_status); }; }; then
16961   acx_pthread_ok=yes
16962 else
16963   echo "$as_me: failed program was:" >&5
16964 sed 's/^/| /' conftest.$ac_ext >&5
16965
16966 acx_pthread_ok=no
16967 fi
16968 rm -f conftest.err conftest.$ac_objext \
16969       conftest$ac_exeext conftest.$ac_ext
16970
16971         if test "x$acx_pthread_ok" = xyes; then
16972             # Don't use options that are ignored by the compiler.
16973             # We find them by checking stderror.
16974             cat >conftest.$ac_ext <<_ACEOF
16975 int
16976 main (int argc, char **argv)
16977 {
16978   (void) argc;
16979   (void) argv;
16980   return 0;
16981 }
16982 _ACEOF
16983             rm -f conftest.$ac_objext conftest$ac_exeext
16984             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16985                 # we continue with more flags because Linux needs -lpthread
16986                 # for libpq builds on PostgreSQL.  The test above only
16987                 # tests for building binaries, not shared libraries.
16988                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16989                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16990             else   acx_pthread_ok=no
16991             fi
16992         fi
16993
16994         LIBS="$save_LIBS"
16995         CFLAGS="$save_CFLAGS"
16996
16997         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16998 echo "${ECHO_T}$acx_pthread_ok" >&6
16999 done
17000 fi
17001
17002 # Various other checks:
17003 if test "x$acx_pthread_ok" = xyes; then
17004         save_LIBS="$LIBS"
17005         LIBS="$PTHREAD_LIBS $LIBS"
17006         save_CFLAGS="$CFLAGS"
17007         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17008
17009         # Detect AIX lossage: threads are created detached by default
17010         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
17011         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
17012 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
17013         cat >conftest.$ac_ext <<_ACEOF
17014 /* confdefs.h.  */
17015 _ACEOF
17016 cat confdefs.h >>conftest.$ac_ext
17017 cat >>conftest.$ac_ext <<_ACEOF
17018 /* end confdefs.h.  */
17019 #include <pthread.h>
17020 int
17021 main ()
17022 {
17023 int attr=PTHREAD_CREATE_JOINABLE;
17024   ;
17025   return 0;
17026 }
17027 _ACEOF
17028 rm -f conftest.$ac_objext conftest$ac_exeext
17029 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17030   (eval $ac_link) 2>conftest.er1
17031   ac_status=$?
17032   grep -v '^ *+' conftest.er1 >conftest.err
17033   rm -f conftest.er1
17034   cat conftest.err >&5
17035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17036   (exit $ac_status); } &&
17037          { ac_try='test -z "$ac_c_werror_flag"
17038                          || test ! -s conftest.err'
17039   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17040   (eval $ac_try) 2>&5
17041   ac_status=$?
17042   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17043   (exit $ac_status); }; } &&
17044          { ac_try='test -s conftest$ac_exeext'
17045   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17046   (eval $ac_try) 2>&5
17047   ac_status=$?
17048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17049   (exit $ac_status); }; }; then
17050   ok=PTHREAD_CREATE_JOINABLE
17051 else
17052   echo "$as_me: failed program was:" >&5
17053 sed 's/^/| /' conftest.$ac_ext >&5
17054
17055 ok=unknown
17056 fi
17057 rm -f conftest.err conftest.$ac_objext \
17058       conftest$ac_exeext conftest.$ac_ext
17059         if test x"$ok" = xunknown; then
17060                 cat >conftest.$ac_ext <<_ACEOF
17061 /* confdefs.h.  */
17062 _ACEOF
17063 cat confdefs.h >>conftest.$ac_ext
17064 cat >>conftest.$ac_ext <<_ACEOF
17065 /* end confdefs.h.  */
17066 #include <pthread.h>
17067 int
17068 main ()
17069 {
17070 int attr=PTHREAD_CREATE_UNDETACHED;
17071   ;
17072   return 0;
17073 }
17074 _ACEOF
17075 rm -f conftest.$ac_objext conftest$ac_exeext
17076 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17077   (eval $ac_link) 2>conftest.er1
17078   ac_status=$?
17079   grep -v '^ *+' conftest.er1 >conftest.err
17080   rm -f conftest.er1
17081   cat conftest.err >&5
17082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17083   (exit $ac_status); } &&
17084          { ac_try='test -z "$ac_c_werror_flag"
17085                          || test ! -s conftest.err'
17086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17087   (eval $ac_try) 2>&5
17088   ac_status=$?
17089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17090   (exit $ac_status); }; } &&
17091          { ac_try='test -s conftest$ac_exeext'
17092   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17093   (eval $ac_try) 2>&5
17094   ac_status=$?
17095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17096   (exit $ac_status); }; }; then
17097   ok=PTHREAD_CREATE_UNDETACHED
17098 else
17099   echo "$as_me: failed program was:" >&5
17100 sed 's/^/| /' conftest.$ac_ext >&5
17101
17102 ok=unknown
17103 fi
17104 rm -f conftest.err conftest.$ac_objext \
17105       conftest$ac_exeext conftest.$ac_ext
17106         fi
17107         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
17108
17109 cat >>confdefs.h <<\_ACEOF
17110 #define PTHREAD_CREATE_JOINABLE $ok
17111 _ACEOF
17112
17113         fi
17114         echo "$as_me:$LINENO: result: ${ok}" >&5
17115 echo "${ECHO_T}${ok}" >&6
17116         if test x"$ok" = xunknown; then
17117                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
17118 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
17119         fi
17120
17121         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
17122 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
17123         flag=no
17124 # We always add these in PostgreSQL
17125 #       case "${host_cpu}-${host_os}" in
17126 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
17127 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
17128 #       esac
17129         echo "$as_me:$LINENO: result: ${flag}" >&5
17130 echo "${ECHO_T}${flag}" >&6
17131         if test "x$flag" != xno; then
17132                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
17133         fi
17134
17135         LIBS="$save_LIBS"
17136         CFLAGS="$save_CFLAGS"
17137
17138 # Supporting cc_r would require a special CC in all places that
17139 # use libpq, and that is ugly, so we don't do it.  Users can still
17140 # define their compiler as cc_r to do thread builds of everything.
17141         # More AIX lossage: must compile with cc_r
17142         # Extract the first word of "cc_r", so it can be a program name with args.
17143 set dummy cc_r; ac_word=$2
17144 echo "$as_me:$LINENO: checking for $ac_word" >&5
17145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17146 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
17147   echo $ECHO_N "(cached) $ECHO_C" >&6
17148 else
17149   if test -n "$PTHREAD_CC"; then
17150   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
17151 else
17152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17153 for as_dir in $PATH
17154 do
17155   IFS=$as_save_IFS
17156   test -z "$as_dir" && as_dir=.
17157   for ac_exec_ext in '' $ac_executable_extensions; do
17158   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17159     ac_cv_prog_PTHREAD_CC="cc_r"
17160     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17161     break 2
17162   fi
17163 done
17164 done
17165
17166   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
17167 fi
17168 fi
17169 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
17170 if test -n "$PTHREAD_CC"; then
17171   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
17172 echo "${ECHO_T}$PTHREAD_CC" >&6
17173 else
17174   echo "$as_me:$LINENO: result: no" >&5
17175 echo "${ECHO_T}no" >&6
17176 fi
17177
17178 else
17179         PTHREAD_CC="$CC"
17180 fi
17181
17182
17183
17184
17185
17186 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
17187 if test x"$acx_pthread_ok" = xyes; then
17188
17189 cat >>confdefs.h <<\_ACEOF
17190 #define HAVE_PTHREAD 1
17191 _ACEOF
17192
17193         :
17194 else
17195         acx_pthread_ok=no
17196
17197 fi
17198 ac_ext=c
17199 ac_cpp='$CPP $CPPFLAGS'
17200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17203
17204         # set thread flags
17205
17206 # Some platforms use these, so just defineed them.  They can't hurt if they
17207 # are not supported.
17208 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
17209
17210
17211 # At this point, we don't want to muck with the compiler name for threading.
17212 # Let's see who fails, perhaps AIX.  2004-04-23
17213 if test "$PTHREAD_CC" != "$CC"; then
17214 { { echo "$as_me:$LINENO: error:
17215 PostgreSQL does not support platforms that require a special compiler
17216 for thread safety." >&5
17217 echo "$as_me: error:
17218 PostgreSQL does not support platforms that require a special compiler
17219 for thread safety." >&2;}
17220    { (exit 1); exit 1; }; }
17221 fi
17222
17223 if test "$THREAD_SUPPORT" = no; then
17224 { { echo "$as_me:$LINENO: error: cannot enable threads on this platform
17225 This platform is known to not support thread-safe programs.  For details,
17226 compile and run src/bin/pg_thread_test." >&5
17227 echo "$as_me: error: cannot enable threads on this platform
17228 This platform is known to not support thread-safe programs.  For details,
17229 compile and run src/bin/pg_thread_test." >&2;}
17230    { (exit 1); exit 1; }; }
17231 fi
17232
17233 # Check for *_r functions
17234 _CFLAGS="$CFLAGS"
17235 _LIBS="$LIBS"
17236 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
17237 LIBS="$LIBS $PTHREAD_LIBS"
17238
17239 if test "${ac_cv_header_pthread_h+set}" = set; then
17240   echo "$as_me:$LINENO: checking for pthread.h" >&5
17241 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17242 if test "${ac_cv_header_pthread_h+set}" = set; then
17243   echo $ECHO_N "(cached) $ECHO_C" >&6
17244 fi
17245 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17246 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17247 else
17248   # Is the header compilable?
17249 echo "$as_me:$LINENO: checking pthread.h usability" >&5
17250 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
17251 cat >conftest.$ac_ext <<_ACEOF
17252 /* confdefs.h.  */
17253 _ACEOF
17254 cat confdefs.h >>conftest.$ac_ext
17255 cat >>conftest.$ac_ext <<_ACEOF
17256 /* end confdefs.h.  */
17257 $ac_includes_default
17258 #include <pthread.h>
17259 _ACEOF
17260 rm -f conftest.$ac_objext
17261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17262   (eval $ac_compile) 2>conftest.er1
17263   ac_status=$?
17264   grep -v '^ *+' conftest.er1 >conftest.err
17265   rm -f conftest.er1
17266   cat conftest.err >&5
17267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17268   (exit $ac_status); } &&
17269          { ac_try='test -z "$ac_c_werror_flag"
17270                          || test ! -s conftest.err'
17271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17272   (eval $ac_try) 2>&5
17273   ac_status=$?
17274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17275   (exit $ac_status); }; } &&
17276          { ac_try='test -s conftest.$ac_objext'
17277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   ac_header_compiler=yes
17283 else
17284   echo "$as_me: failed program was:" >&5
17285 sed 's/^/| /' conftest.$ac_ext >&5
17286
17287 ac_header_compiler=no
17288 fi
17289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17290 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17291 echo "${ECHO_T}$ac_header_compiler" >&6
17292
17293 # Is the header present?
17294 echo "$as_me:$LINENO: checking pthread.h presence" >&5
17295 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
17296 cat >conftest.$ac_ext <<_ACEOF
17297 /* confdefs.h.  */
17298 _ACEOF
17299 cat confdefs.h >>conftest.$ac_ext
17300 cat >>conftest.$ac_ext <<_ACEOF
17301 /* end confdefs.h.  */
17302 #include <pthread.h>
17303 _ACEOF
17304 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17305   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17306   ac_status=$?
17307   grep -v '^ *+' conftest.er1 >conftest.err
17308   rm -f conftest.er1
17309   cat conftest.err >&5
17310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17311   (exit $ac_status); } >/dev/null; then
17312   if test -s conftest.err; then
17313     ac_cpp_err=$ac_c_preproc_warn_flag
17314     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
17315   else
17316     ac_cpp_err=
17317   fi
17318 else
17319   ac_cpp_err=yes
17320 fi
17321 if test -z "$ac_cpp_err"; then
17322   ac_header_preproc=yes
17323 else
17324   echo "$as_me: failed program was:" >&5
17325 sed 's/^/| /' conftest.$ac_ext >&5
17326
17327   ac_header_preproc=no
17328 fi
17329 rm -f conftest.err conftest.$ac_ext
17330 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17331 echo "${ECHO_T}$ac_header_preproc" >&6
17332
17333 # So?  What about this header?
17334 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17335   yes:no: )
17336     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
17337 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17338     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
17339 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
17340     ac_header_preproc=yes
17341     ;;
17342   no:yes:* )
17343     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
17344 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
17345     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
17346 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
17347     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
17348 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
17349     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
17350 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
17351     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
17352 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
17353     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
17354 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
17355     (
17356       cat <<\_ASBOX
17357 ## ---------------------------------------- ##
17358 ## Report this to pgsql-bugs@postgresql.org ##
17359 ## ---------------------------------------- ##
17360 _ASBOX
17361     ) |
17362       sed "s/^/$as_me: WARNING:     /" >&2
17363     ;;
17364 esac
17365 echo "$as_me:$LINENO: checking for pthread.h" >&5
17366 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
17367 if test "${ac_cv_header_pthread_h+set}" = set; then
17368   echo $ECHO_N "(cached) $ECHO_C" >&6
17369 else
17370   ac_cv_header_pthread_h=$ac_header_preproc
17371 fi
17372 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
17373 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
17374
17375 fi
17376 if test $ac_cv_header_pthread_h = yes; then
17377   :
17378 else
17379   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
17380 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
17381    { (exit 1); exit 1; }; }
17382 fi
17383
17384
17385
17386
17387
17388
17389 for ac_func in strerror_r getpwuid_r gethostbyname_r
17390 do
17391 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17392 echo "$as_me:$LINENO: checking for $ac_func" >&5
17393 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17394 if eval "test \"\${$as_ac_var+set}\" = set"; then
17395   echo $ECHO_N "(cached) $ECHO_C" >&6
17396 else
17397   cat >conftest.$ac_ext <<_ACEOF
17398 /* confdefs.h.  */
17399 _ACEOF
17400 cat confdefs.h >>conftest.$ac_ext
17401 cat >>conftest.$ac_ext <<_ACEOF
17402 /* end confdefs.h.  */
17403 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17404    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
17405 #define $ac_func innocuous_$ac_func
17406
17407 /* System header to define __stub macros and hopefully few prototypes,
17408     which can conflict with char $ac_func (); below.
17409     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17410     <limits.h> exists even on freestanding compilers.  */
17411
17412 #ifdef __STDC__
17413 # include <limits.h>
17414 #else
17415 # include <assert.h>
17416 #endif
17417
17418 #undef $ac_func
17419
17420 /* Override any gcc2 internal prototype to avoid an error.  */
17421 #ifdef __cplusplus
17422 extern "C"
17423 {
17424 #endif
17425 /* We use char because int might match the return type of a gcc2
17426    builtin and then its argument prototype would still apply.  */
17427 char $ac_func ();
17428 /* The GNU C library defines this for functions which it implements
17429     to always fail with ENOSYS.  Some functions are actually named
17430     something starting with __ and the normal name is an alias.  */
17431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17432 choke me
17433 #else
17434 char (*f) () = $ac_func;
17435 #endif
17436 #ifdef __cplusplus
17437 }
17438 #endif
17439
17440 int
17441 main ()
17442 {
17443 return f != $ac_func;
17444   ;
17445   return 0;
17446 }
17447 _ACEOF
17448 rm -f conftest.$ac_objext conftest$ac_exeext
17449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17450   (eval $ac_link) 2>conftest.er1
17451   ac_status=$?
17452   grep -v '^ *+' conftest.er1 >conftest.err
17453   rm -f conftest.er1
17454   cat conftest.err >&5
17455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17456   (exit $ac_status); } &&
17457          { ac_try='test -z "$ac_c_werror_flag"
17458                          || test ! -s conftest.err'
17459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17460   (eval $ac_try) 2>&5
17461   ac_status=$?
17462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17463   (exit $ac_status); }; } &&
17464          { ac_try='test -s conftest$ac_exeext'
17465   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17466   (eval $ac_try) 2>&5
17467   ac_status=$?
17468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17469   (exit $ac_status); }; }; then
17470   eval "$as_ac_var=yes"
17471 else
17472   echo "$as_me: failed program was:" >&5
17473 sed 's/^/| /' conftest.$ac_ext >&5
17474
17475 eval "$as_ac_var=no"
17476 fi
17477 rm -f conftest.err conftest.$ac_objext \
17478       conftest$ac_exeext conftest.$ac_ext
17479 fi
17480 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17481 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17482 if test `eval echo '${'$as_ac_var'}'` = yes; then
17483   cat >>confdefs.h <<_ACEOF
17484 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17485 _ACEOF
17486
17487 fi
17488 done
17489
17490
17491 # Do test here with the proper thread flags
17492 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
17493 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
17494 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
17495   echo $ECHO_N "(cached) $ECHO_C" >&6
17496 else
17497   cat >conftest.$ac_ext <<_ACEOF
17498 /* confdefs.h.  */
17499 _ACEOF
17500 cat confdefs.h >>conftest.$ac_ext
17501 cat >>conftest.$ac_ext <<_ACEOF
17502 /* end confdefs.h.  */
17503 #include <sys/types.h>
17504 #include <pwd.h>
17505 int
17506 main ()
17507 {
17508 uid_t uid;
17509 struct passwd *space;
17510 char *buf;
17511 size_t bufsize;
17512 struct passwd **result;
17513 getpwuid_r(uid, space, buf, bufsize, result);
17514   ;
17515   return 0;
17516 }
17517 _ACEOF
17518 rm -f conftest.$ac_objext
17519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17520   (eval $ac_compile) 2>conftest.er1
17521   ac_status=$?
17522   grep -v '^ *+' conftest.er1 >conftest.err
17523   rm -f conftest.er1
17524   cat conftest.err >&5
17525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17526   (exit $ac_status); } &&
17527          { ac_try='test -z "$ac_c_werror_flag"
17528                          || test ! -s conftest.err'
17529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17530   (eval $ac_try) 2>&5
17531   ac_status=$?
17532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17533   (exit $ac_status); }; } &&
17534          { ac_try='test -s conftest.$ac_objext'
17535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17539   (exit $ac_status); }; }; then
17540   pgac_func_getpwuid_r_5arg=yes
17541 else
17542   echo "$as_me: failed program was:" >&5
17543 sed 's/^/| /' conftest.$ac_ext >&5
17544
17545 pgac_func_getpwuid_r_5arg=no
17546 fi
17547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17548 fi
17549 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17550 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17551 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17552
17553 cat >>confdefs.h <<\_ACEOF
17554 #define GETPWUID_R_5ARG
17555 _ACEOF
17556
17557 fi
17558
17559 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17560 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17561 if test "${pgac_func_strerror_r_int+set}" = set; then
17562   echo $ECHO_N "(cached) $ECHO_C" >&6
17563 else
17564   cat >conftest.$ac_ext <<_ACEOF
17565 /* confdefs.h.  */
17566 _ACEOF
17567 cat confdefs.h >>conftest.$ac_ext
17568 cat >>conftest.$ac_ext <<_ACEOF
17569 /* end confdefs.h.  */
17570 #include <string.h>
17571 int
17572 main ()
17573 {
17574 #ifndef _AIX
17575 int strerror_r(int, char *, size_t);
17576 #else
17577 /* Older AIX has 'int' for the third argument so we don't test the args. */
17578 int strerror_r();
17579 #endif
17580   ;
17581   return 0;
17582 }
17583 _ACEOF
17584 rm -f conftest.$ac_objext
17585 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17586   (eval $ac_compile) 2>conftest.er1
17587   ac_status=$?
17588   grep -v '^ *+' conftest.er1 >conftest.err
17589   rm -f conftest.er1
17590   cat conftest.err >&5
17591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17592   (exit $ac_status); } &&
17593          { ac_try='test -z "$ac_c_werror_flag"
17594                          || test ! -s conftest.err'
17595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17596   (eval $ac_try) 2>&5
17597   ac_status=$?
17598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599   (exit $ac_status); }; } &&
17600          { ac_try='test -s conftest.$ac_objext'
17601   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17602   (eval $ac_try) 2>&5
17603   ac_status=$?
17604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605   (exit $ac_status); }; }; then
17606   pgac_func_strerror_r_int=yes
17607 else
17608   echo "$as_me: failed program was:" >&5
17609 sed 's/^/| /' conftest.$ac_ext >&5
17610
17611 pgac_func_strerror_r_int=no
17612 fi
17613 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17614 fi
17615 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17616 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17617 if test x"$pgac_func_strerror_r_int" = xyes ; then
17618
17619 cat >>confdefs.h <<\_ACEOF
17620 #define STRERROR_R_INT
17621 _ACEOF
17622
17623 fi
17624
17625
17626 CFLAGS="$_CFLAGS"
17627 LIBS="$_LIBS"
17628
17629 else
17630 # do not use values from template file
17631 PTHREAD_CFLAGS=
17632 PTHREAD_LIBS=
17633 fi
17634
17635
17636
17637
17638
17639 # We can test for libldap_r only after we know PTHREAD_LIBS
17640 if test "$with_ldap" = yes ; then
17641   _LIBS="$LIBS"
17642   if test "$PORTNAME" != "win32"; then
17643
17644 echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
17645 echo $ECHO_N "checking for ldap_bind in -lldap... $ECHO_C" >&6
17646 if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649   ac_check_lib_save_LIBS=$LIBS
17650 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
17651 cat >conftest.$ac_ext <<_ACEOF
17652 /* confdefs.h.  */
17653 _ACEOF
17654 cat confdefs.h >>conftest.$ac_ext
17655 cat >>conftest.$ac_ext <<_ACEOF
17656 /* end confdefs.h.  */
17657
17658 /* Override any gcc2 internal prototype to avoid an error.  */
17659 #ifdef __cplusplus
17660 extern "C"
17661 #endif
17662 /* We use char because int might match the return type of a gcc2
17663    builtin and then its argument prototype would still apply.  */
17664 char ldap_bind ();
17665 int
17666 main ()
17667 {
17668 ldap_bind ();
17669   ;
17670   return 0;
17671 }
17672 _ACEOF
17673 rm -f conftest.$ac_objext conftest$ac_exeext
17674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17675   (eval $ac_link) 2>conftest.er1
17676   ac_status=$?
17677   grep -v '^ *+' conftest.er1 >conftest.err
17678   rm -f conftest.er1
17679   cat conftest.err >&5
17680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17681   (exit $ac_status); } &&
17682          { ac_try='test -z "$ac_c_werror_flag"
17683                          || test ! -s conftest.err'
17684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17685   (eval $ac_try) 2>&5
17686   ac_status=$?
17687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17688   (exit $ac_status); }; } &&
17689          { ac_try='test -s conftest$ac_exeext'
17690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17691   (eval $ac_try) 2>&5
17692   ac_status=$?
17693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17694   (exit $ac_status); }; }; then
17695   ac_cv_lib_ldap_ldap_bind=yes
17696 else
17697   echo "$as_me: failed program was:" >&5
17698 sed 's/^/| /' conftest.$ac_ext >&5
17699
17700 ac_cv_lib_ldap_ldap_bind=no
17701 fi
17702 rm -f conftest.err conftest.$ac_objext \
17703       conftest$ac_exeext conftest.$ac_ext
17704 LIBS=$ac_check_lib_save_LIBS
17705 fi
17706 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
17707 echo "${ECHO_T}$ac_cv_lib_ldap_ldap_bind" >&6
17708 if test $ac_cv_lib_ldap_ldap_bind = yes; then
17709   cat >>confdefs.h <<_ACEOF
17710 #define HAVE_LIBLDAP 1
17711 _ACEOF
17712
17713   LIBS="-lldap $LIBS"
17714
17715 else
17716   { { echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
17717 echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
17718    { (exit 1); exit 1; }; }
17719 fi
17720
17721     LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
17722     if test "$enable_thread_safety" = yes; then
17723       # on some platforms ldap_r fails to link without PTHREAD_LIBS
17724
17725 echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
17726 echo $ECHO_N "checking for ldap_simple_bind in -lldap_r... $ECHO_C" >&6
17727 if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
17728   echo $ECHO_N "(cached) $ECHO_C" >&6
17729 else
17730   ac_check_lib_save_LIBS=$LIBS
17731 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
17732 cat >conftest.$ac_ext <<_ACEOF
17733 /* confdefs.h.  */
17734 _ACEOF
17735 cat confdefs.h >>conftest.$ac_ext
17736 cat >>conftest.$ac_ext <<_ACEOF
17737 /* end confdefs.h.  */
17738
17739 /* Override any gcc2 internal prototype to avoid an error.  */
17740 #ifdef __cplusplus
17741 extern "C"
17742 #endif
17743 /* We use char because int might match the return type of a gcc2
17744    builtin and then its argument prototype would still apply.  */
17745 char ldap_simple_bind ();
17746 int
17747 main ()
17748 {
17749 ldap_simple_bind ();
17750   ;
17751   return 0;
17752 }
17753 _ACEOF
17754 rm -f conftest.$ac_objext conftest$ac_exeext
17755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17756   (eval $ac_link) 2>conftest.er1
17757   ac_status=$?
17758   grep -v '^ *+' conftest.er1 >conftest.err
17759   rm -f conftest.er1
17760   cat conftest.err >&5
17761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17762   (exit $ac_status); } &&
17763          { ac_try='test -z "$ac_c_werror_flag"
17764                          || test ! -s conftest.err'
17765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17766   (eval $ac_try) 2>&5
17767   ac_status=$?
17768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769   (exit $ac_status); }; } &&
17770          { ac_try='test -s conftest$ac_exeext'
17771   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17772   (eval $ac_try) 2>&5
17773   ac_status=$?
17774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775   (exit $ac_status); }; }; then
17776   ac_cv_lib_ldap_r_ldap_simple_bind=yes
17777 else
17778   echo "$as_me: failed program was:" >&5
17779 sed 's/^/| /' conftest.$ac_ext >&5
17780
17781 ac_cv_lib_ldap_r_ldap_simple_bind=no
17782 fi
17783 rm -f conftest.err conftest.$ac_objext \
17784       conftest$ac_exeext conftest.$ac_ext
17785 LIBS=$ac_check_lib_save_LIBS
17786 fi
17787 echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
17788 echo "${ECHO_T}$ac_cv_lib_ldap_r_ldap_simple_bind" >&6
17789 if test $ac_cv_lib_ldap_r_ldap_simple_bind = yes; then
17790   cat >>confdefs.h <<_ACEOF
17791 #define HAVE_LIBLDAP_R 1
17792 _ACEOF
17793
17794   LIBS="-lldap_r $LIBS"
17795
17796 else
17797   { { echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
17798 echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
17799    { (exit 1); exit 1; }; }
17800 fi
17801
17802       LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
17803     else
17804       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
17805     fi
17806   else
17807
17808 echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
17809 echo $ECHO_N "checking for ldap_bind in -lwldap32... $ECHO_C" >&6
17810 if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
17811   echo $ECHO_N "(cached) $ECHO_C" >&6
17812 else
17813   ac_check_lib_save_LIBS=$LIBS
17814 LIBS="-lwldap32  $LIBS"
17815 cat >conftest.$ac_ext <<_ACEOF
17816 /* confdefs.h.  */
17817 _ACEOF
17818 cat confdefs.h >>conftest.$ac_ext
17819 cat >>conftest.$ac_ext <<_ACEOF
17820 /* end confdefs.h.  */
17821
17822 /* Override any gcc2 internal prototype to avoid an error.  */
17823 #ifdef __cplusplus
17824 extern "C"
17825 #endif
17826 /* We use char because int might match the return type of a gcc2
17827    builtin and then its argument prototype would still apply.  */
17828 char ldap_bind ();
17829 int
17830 main ()
17831 {
17832 ldap_bind ();
17833   ;
17834   return 0;
17835 }
17836 _ACEOF
17837 rm -f conftest.$ac_objext conftest$ac_exeext
17838 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17839   (eval $ac_link) 2>conftest.er1
17840   ac_status=$?
17841   grep -v '^ *+' conftest.er1 >conftest.err
17842   rm -f conftest.er1
17843   cat conftest.err >&5
17844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845   (exit $ac_status); } &&
17846          { ac_try='test -z "$ac_c_werror_flag"
17847                          || test ! -s conftest.err'
17848   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17849   (eval $ac_try) 2>&5
17850   ac_status=$?
17851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17852   (exit $ac_status); }; } &&
17853          { ac_try='test -s conftest$ac_exeext'
17854   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17855   (eval $ac_try) 2>&5
17856   ac_status=$?
17857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17858   (exit $ac_status); }; }; then
17859   ac_cv_lib_wldap32_ldap_bind=yes
17860 else
17861   echo "$as_me: failed program was:" >&5
17862 sed 's/^/| /' conftest.$ac_ext >&5
17863
17864 ac_cv_lib_wldap32_ldap_bind=no
17865 fi
17866 rm -f conftest.err conftest.$ac_objext \
17867       conftest$ac_exeext conftest.$ac_ext
17868 LIBS=$ac_check_lib_save_LIBS
17869 fi
17870 echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
17871 echo "${ECHO_T}$ac_cv_lib_wldap32_ldap_bind" >&6
17872 if test $ac_cv_lib_wldap32_ldap_bind = yes; then
17873   cat >>confdefs.h <<_ACEOF
17874 #define HAVE_LIBWLDAP32 1
17875 _ACEOF
17876
17877   LIBS="-lwldap32 $LIBS"
17878
17879 else
17880   { { echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
17881 echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
17882    { (exit 1); exit 1; }; }
17883 fi
17884
17885     LDAP_LIBS_FE="-lwldap32"
17886     LDAP_LIBS_BE="-lwldap32"
17887   fi
17888   LIBS="$_LIBS"
17889 fi
17890
17891
17892
17893
17894 # This test makes sure that run tests work at all.  Sometimes a shared
17895 # library is found by the linker, but the runtime linker can't find it.
17896 # This check should come after all modifications of compiler or linker
17897 # variables, and before any other run tests.
17898 echo "$as_me:$LINENO: checking test program" >&5
17899 echo $ECHO_N "checking test program... $ECHO_C" >&6
17900 if test "$cross_compiling" = yes; then
17901   echo "$as_me:$LINENO: result: cross-compiling" >&5
17902 echo "${ECHO_T}cross-compiling" >&6
17903 else
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 int main() { return 0; }
17911 _ACEOF
17912 rm -f conftest$ac_exeext
17913 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17914   (eval $ac_link) 2>&5
17915   ac_status=$?
17916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17917   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17919   (eval $ac_try) 2>&5
17920   ac_status=$?
17921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17922   (exit $ac_status); }; }; then
17923   echo "$as_me:$LINENO: result: ok" >&5
17924 echo "${ECHO_T}ok" >&6
17925 else
17926   echo "$as_me: program exited with status $ac_status" >&5
17927 echo "$as_me: failed program was:" >&5
17928 sed 's/^/| /' conftest.$ac_ext >&5
17929
17930 ( exit $ac_status )
17931 echo "$as_me:$LINENO: result: failed" >&5
17932 echo "${ECHO_T}failed" >&6
17933 { { echo "$as_me:$LINENO: error:
17934 Could not execute a simple test program.  This may be a problem
17935 related to locating shared libraries.  Check the file 'config.log'
17936 for the exact reason." >&5
17937 echo "$as_me: error:
17938 Could not execute a simple test program.  This may be a problem
17939 related to locating shared libraries.  Check the file 'config.log'
17940 for the exact reason." >&2;}
17941    { (exit 1); exit 1; }; }
17942 fi
17943 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17944 fi
17945
17946 # --------------------
17947 # Run tests below here
17948 # --------------------
17949
17950 # Force use of our snprintf if system's doesn't do arg control
17951 # See comment above at snprintf test for details.
17952 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
17953   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17954 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17955 if test "${pgac_cv_printf_arg_control+set}" = set; then
17956   echo $ECHO_N "(cached) $ECHO_C" >&6
17957 else
17958   if test "$cross_compiling" = yes; then
17959   pgac_cv_printf_arg_control=cross
17960 else
17961   cat >conftest.$ac_ext <<_ACEOF
17962 /* confdefs.h.  */
17963 _ACEOF
17964 cat confdefs.h >>conftest.$ac_ext
17965 cat >>conftest.$ac_ext <<_ACEOF
17966 /* end confdefs.h.  */
17967 #include <stdio.h>
17968 #include <string.h>
17969
17970 int main()
17971 {
17972   char buf[100];
17973
17974   /* can it swap arguments? */
17975   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17976   if (strcmp(buf, "4 3") != 0)
17977     return 1;
17978   return 0;
17979 }
17980 _ACEOF
17981 rm -f conftest$ac_exeext
17982 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17983   (eval $ac_link) 2>&5
17984   ac_status=$?
17985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17986   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17987   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17988   (eval $ac_try) 2>&5
17989   ac_status=$?
17990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17991   (exit $ac_status); }; }; then
17992   pgac_cv_printf_arg_control=yes
17993 else
17994   echo "$as_me: program exited with status $ac_status" >&5
17995 echo "$as_me: failed program was:" >&5
17996 sed 's/^/| /' conftest.$ac_ext >&5
17997
17998 ( exit $ac_status )
17999 pgac_cv_printf_arg_control=no
18000 fi
18001 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18002 fi
18003
18004 fi
18005 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
18006 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
18007
18008   if test $pgac_cv_printf_arg_control != yes ; then
18009     pgac_need_repl_snprintf=yes
18010   fi
18011 fi
18012
18013
18014
18015 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
18016 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
18017 if test "${pgac_cv_type_long_int_64+set}" = set; then
18018   echo $ECHO_N "(cached) $ECHO_C" >&6
18019 else
18020   if test "$cross_compiling" = yes; then
18021   # If cross-compiling, check the size reported by the compiler and
18022 # trust that the arithmetic works.
18023 cat >conftest.$ac_ext <<_ACEOF
18024 /* confdefs.h.  */
18025 _ACEOF
18026 cat confdefs.h >>conftest.$ac_ext
18027 cat >>conftest.$ac_ext <<_ACEOF
18028 /* end confdefs.h.  */
18029
18030 int
18031 main ()
18032 {
18033 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
18034 test_array [0] = 0
18035
18036   ;
18037   return 0;
18038 }
18039 _ACEOF
18040 rm -f conftest.$ac_objext
18041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18042   (eval $ac_compile) 2>conftest.er1
18043   ac_status=$?
18044   grep -v '^ *+' conftest.er1 >conftest.err
18045   rm -f conftest.er1
18046   cat conftest.err >&5
18047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18048   (exit $ac_status); } &&
18049          { ac_try='test -z "$ac_c_werror_flag"
18050                          || test ! -s conftest.err'
18051   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18052   (eval $ac_try) 2>&5
18053   ac_status=$?
18054   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18055   (exit $ac_status); }; } &&
18056          { ac_try='test -s conftest.$ac_objext'
18057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18058   (eval $ac_try) 2>&5
18059   ac_status=$?
18060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18061   (exit $ac_status); }; }; then
18062   pgac_cv_type_long_int_64=yes
18063 else
18064   echo "$as_me: failed program was:" >&5
18065 sed 's/^/| /' conftest.$ac_ext >&5
18066
18067 pgac_cv_type_long_int_64=no
18068 fi
18069 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18070 else
18071   cat >conftest.$ac_ext <<_ACEOF
18072 /* confdefs.h.  */
18073 _ACEOF
18074 cat confdefs.h >>conftest.$ac_ext
18075 cat >>conftest.$ac_ext <<_ACEOF
18076 /* end confdefs.h.  */
18077 typedef long int ac_int64;
18078
18079 /*
18080  * These are globals to discourage the compiler from folding all the
18081  * arithmetic tests down to compile-time constants.
18082  */
18083 ac_int64 a = 20000001;
18084 ac_int64 b = 40000005;
18085
18086 int does_int64_work()
18087 {
18088   ac_int64 c,d;
18089
18090   if (sizeof(ac_int64) != 8)
18091     return 0;                   /* definitely not the right size */
18092
18093   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
18094   c = a * b;
18095   d = (c + b) / b;
18096   if (d != a+1)
18097     return 0;
18098   return 1;
18099 }
18100 main() {
18101   exit(! does_int64_work());
18102 }
18103 _ACEOF
18104 rm -f conftest$ac_exeext
18105 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18106   (eval $ac_link) 2>&5
18107   ac_status=$?
18108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18111   (eval $ac_try) 2>&5
18112   ac_status=$?
18113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18114   (exit $ac_status); }; }; then
18115   pgac_cv_type_long_int_64=yes
18116 else
18117   echo "$as_me: program exited with status $ac_status" >&5
18118 echo "$as_me: failed program was:" >&5
18119 sed 's/^/| /' conftest.$ac_ext >&5
18120
18121 ( exit $ac_status )
18122 pgac_cv_type_long_int_64=no
18123 fi
18124 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18125 fi
18126 fi
18127 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
18128 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
18129
18130 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
18131 if test x"$pgac_cv_type_long_int_64" = xyes ; then
18132
18133 cat >>confdefs.h <<\_ACEOF
18134 #define HAVE_LONG_INT_64
18135 _ACEOF
18136
18137 fi
18138
18139
18140 if test x"$HAVE_LONG_INT_64" = x"no" ; then
18141   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
18142 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
18143 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
18144   echo $ECHO_N "(cached) $ECHO_C" >&6
18145 else
18146   if test "$cross_compiling" = yes; then
18147   # If cross-compiling, check the size reported by the compiler and
18148 # trust that the arithmetic works.
18149 cat >conftest.$ac_ext <<_ACEOF
18150 /* confdefs.h.  */
18151 _ACEOF
18152 cat confdefs.h >>conftest.$ac_ext
18153 cat >>conftest.$ac_ext <<_ACEOF
18154 /* end confdefs.h.  */
18155
18156 int
18157 main ()
18158 {
18159 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
18160 test_array [0] = 0
18161
18162   ;
18163   return 0;
18164 }
18165 _ACEOF
18166 rm -f conftest.$ac_objext
18167 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18168   (eval $ac_compile) 2>conftest.er1
18169   ac_status=$?
18170   grep -v '^ *+' conftest.er1 >conftest.err
18171   rm -f conftest.er1
18172   cat conftest.err >&5
18173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18174   (exit $ac_status); } &&
18175          { ac_try='test -z "$ac_c_werror_flag"
18176                          || test ! -s conftest.err'
18177   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18178   (eval $ac_try) 2>&5
18179   ac_status=$?
18180   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18181   (exit $ac_status); }; } &&
18182          { ac_try='test -s conftest.$ac_objext'
18183   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18184   (eval $ac_try) 2>&5
18185   ac_status=$?
18186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18187   (exit $ac_status); }; }; then
18188   pgac_cv_type_long_long_int_64=yes
18189 else
18190   echo "$as_me: failed program was:" >&5
18191 sed 's/^/| /' conftest.$ac_ext >&5
18192
18193 pgac_cv_type_long_long_int_64=no
18194 fi
18195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18196 else
18197   cat >conftest.$ac_ext <<_ACEOF
18198 /* confdefs.h.  */
18199 _ACEOF
18200 cat confdefs.h >>conftest.$ac_ext
18201 cat >>conftest.$ac_ext <<_ACEOF
18202 /* end confdefs.h.  */
18203 typedef long long int ac_int64;
18204
18205 /*
18206  * These are globals to discourage the compiler from folding all the
18207  * arithmetic tests down to compile-time constants.
18208  */
18209 ac_int64 a = 20000001;
18210 ac_int64 b = 40000005;
18211
18212 int does_int64_work()
18213 {
18214   ac_int64 c,d;
18215
18216   if (sizeof(ac_int64) != 8)
18217     return 0;                   /* definitely not the right size */
18218
18219   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
18220   c = a * b;
18221   d = (c + b) / b;
18222   if (d != a+1)
18223     return 0;
18224   return 1;
18225 }
18226 main() {
18227   exit(! does_int64_work());
18228 }
18229 _ACEOF
18230 rm -f conftest$ac_exeext
18231 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18232   (eval $ac_link) 2>&5
18233   ac_status=$?
18234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18235   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18237   (eval $ac_try) 2>&5
18238   ac_status=$?
18239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18240   (exit $ac_status); }; }; then
18241   pgac_cv_type_long_long_int_64=yes
18242 else
18243   echo "$as_me: program exited with status $ac_status" >&5
18244 echo "$as_me: failed program was:" >&5
18245 sed 's/^/| /' conftest.$ac_ext >&5
18246
18247 ( exit $ac_status )
18248 pgac_cv_type_long_long_int_64=no
18249 fi
18250 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18251 fi
18252 fi
18253 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
18254 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
18255
18256 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
18257 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
18258
18259 cat >>confdefs.h <<\_ACEOF
18260 #define HAVE_LONG_LONG_INT_64
18261 _ACEOF
18262
18263 fi
18264
18265 fi
18266
18267
18268
18269 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
18270   cat >conftest.$ac_ext <<_ACEOF
18271 /* confdefs.h.  */
18272 _ACEOF
18273 cat confdefs.h >>conftest.$ac_ext
18274 cat >>conftest.$ac_ext <<_ACEOF
18275 /* end confdefs.h.  */
18276
18277 #define INT64CONST(x)  x##LL
18278 long long int foo = INT64CONST(0x1234567890123456);
18279
18280 int
18281 main ()
18282 {
18283
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 rm -f conftest.$ac_objext
18289 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18290   (eval $ac_compile) 2>conftest.er1
18291   ac_status=$?
18292   grep -v '^ *+' conftest.er1 >conftest.err
18293   rm -f conftest.er1
18294   cat conftest.err >&5
18295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18296   (exit $ac_status); } &&
18297          { ac_try='test -z "$ac_c_werror_flag"
18298                          || test ! -s conftest.err'
18299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18300   (eval $ac_try) 2>&5
18301   ac_status=$?
18302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303   (exit $ac_status); }; } &&
18304          { ac_try='test -s conftest.$ac_objext'
18305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18306   (eval $ac_try) 2>&5
18307   ac_status=$?
18308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18309   (exit $ac_status); }; }; then
18310
18311 cat >>confdefs.h <<\_ACEOF
18312 #define HAVE_LL_CONSTANTS 1
18313 _ACEOF
18314
18315 else
18316   echo "$as_me: failed program was:" >&5
18317 sed 's/^/| /' conftest.$ac_ext >&5
18318
18319 fi
18320 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18321 fi
18322
18323
18324 # If we found "long int" is 64 bits, assume snprintf handles it.  If
18325 # we found we need to use "long long int", better check.  We cope with
18326 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
18327 # work, fall back to our own snprintf emulation (which we know uses %lld).
18328
18329 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
18330   if test $pgac_need_repl_snprintf = no; then
18331     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
18332 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
18333 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
18334   echo $ECHO_N "(cached) $ECHO_C" >&6
18335 else
18336   for pgac_format in '%lld' '%qd' '%I64d'; do
18337 if test "$cross_compiling" = yes; then
18338   pgac_cv_snprintf_long_long_int_format=cross; break
18339 else
18340   cat >conftest.$ac_ext <<_ACEOF
18341 /* confdefs.h.  */
18342 _ACEOF
18343 cat confdefs.h >>conftest.$ac_ext
18344 cat >>conftest.$ac_ext <<_ACEOF
18345 /* end confdefs.h.  */
18346 #include <stdio.h>
18347 typedef long long int ac_int64;
18348 #define INT64_FORMAT "$pgac_format"
18349
18350 ac_int64 a = 20000001;
18351 ac_int64 b = 40000005;
18352
18353 int does_int64_snprintf_work()
18354 {
18355   ac_int64 c;
18356   char buf[100];
18357
18358   if (sizeof(ac_int64) != 8)
18359     return 0;                   /* doesn't look like the right size */
18360
18361   c = a * b;
18362   snprintf(buf, 100, INT64_FORMAT, c);
18363   if (strcmp(buf, "800000140000005") != 0)
18364     return 0;                   /* either multiply or snprintf is busted */
18365   return 1;
18366 }
18367 main() {
18368   exit(! does_int64_snprintf_work());
18369 }
18370 _ACEOF
18371 rm -f conftest$ac_exeext
18372 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18373   (eval $ac_link) 2>&5
18374   ac_status=$?
18375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18378   (eval $ac_try) 2>&5
18379   ac_status=$?
18380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381   (exit $ac_status); }; }; then
18382   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
18383 else
18384   echo "$as_me: program exited with status $ac_status" >&5
18385 echo "$as_me: failed program was:" >&5
18386 sed 's/^/| /' conftest.$ac_ext >&5
18387
18388 fi
18389 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18390 fi
18391 done
18392 fi
18393
18394 LONG_LONG_INT_FORMAT=''
18395
18396 case $pgac_cv_snprintf_long_long_int_format in
18397   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
18398 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
18399   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
18400 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
18401          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
18402   *)     echo "$as_me:$LINENO: result: none" >&5
18403 echo "${ECHO_T}none" >&6;;
18404 esac
18405     if test "$LONG_LONG_INT_FORMAT" = ""; then
18406       # Force usage of our own snprintf, since system snprintf is broken
18407       pgac_need_repl_snprintf=yes
18408       LONG_LONG_INT_FORMAT='%lld'
18409     fi
18410   else
18411     # Here if we previously decided we needed to use our own snprintf
18412     LONG_LONG_INT_FORMAT='%lld'
18413   fi
18414   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
18415   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
18416   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
18417 else
18418   # Here if we are not using 'long long int' at all
18419   INT64_FORMAT='"%ld"'
18420   UINT64_FORMAT='"%lu"'
18421 fi
18422
18423
18424 cat >>confdefs.h <<_ACEOF
18425 #define INT64_FORMAT $INT64_FORMAT
18426 _ACEOF
18427
18428
18429
18430 cat >>confdefs.h <<_ACEOF
18431 #define UINT64_FORMAT $UINT64_FORMAT
18432 _ACEOF
18433
18434
18435 # Now we have checked all the reasons to replace snprintf
18436 if test $pgac_need_repl_snprintf = yes; then
18437
18438 cat >>confdefs.h <<\_ACEOF
18439 #define USE_REPL_SNPRINTF 1
18440 _ACEOF
18441
18442   case $LIBOBJS in
18443     "snprintf.$ac_objext"   | \
18444   *" snprintf.$ac_objext"   | \
18445     "snprintf.$ac_objext "* | \
18446   *" snprintf.$ac_objext "* ) ;;
18447   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
18448 esac
18449
18450 fi
18451
18452 # Need a #define for the size of Datum (unsigned long)
18453 echo "$as_me:$LINENO: checking for unsigned long" >&5
18454 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
18455 if test "${ac_cv_type_unsigned_long+set}" = set; then
18456   echo $ECHO_N "(cached) $ECHO_C" >&6
18457 else
18458   cat >conftest.$ac_ext <<_ACEOF
18459 /* confdefs.h.  */
18460 _ACEOF
18461 cat confdefs.h >>conftest.$ac_ext
18462 cat >>conftest.$ac_ext <<_ACEOF
18463 /* end confdefs.h.  */
18464 $ac_includes_default
18465 int
18466 main ()
18467 {
18468 if ((unsigned long *) 0)
18469   return 0;
18470 if (sizeof (unsigned long))
18471   return 0;
18472   ;
18473   return 0;
18474 }
18475 _ACEOF
18476 rm -f conftest.$ac_objext
18477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18478   (eval $ac_compile) 2>conftest.er1
18479   ac_status=$?
18480   grep -v '^ *+' conftest.er1 >conftest.err
18481   rm -f conftest.er1
18482   cat conftest.err >&5
18483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18484   (exit $ac_status); } &&
18485          { ac_try='test -z "$ac_c_werror_flag"
18486                          || test ! -s conftest.err'
18487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18488   (eval $ac_try) 2>&5
18489   ac_status=$?
18490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491   (exit $ac_status); }; } &&
18492          { ac_try='test -s conftest.$ac_objext'
18493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18497   (exit $ac_status); }; }; then
18498   ac_cv_type_unsigned_long=yes
18499 else
18500   echo "$as_me: failed program was:" >&5
18501 sed 's/^/| /' conftest.$ac_ext >&5
18502
18503 ac_cv_type_unsigned_long=no
18504 fi
18505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18506 fi
18507 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
18508 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
18509
18510 echo "$as_me:$LINENO: checking size of unsigned long" >&5
18511 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
18512 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
18513   echo $ECHO_N "(cached) $ECHO_C" >&6
18514 else
18515   if test "$ac_cv_type_unsigned_long" = yes; then
18516   # The cast to unsigned long works around a bug in the HP C Compiler
18517   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18518   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18519   # This bug is HP SR number 8606223364.
18520   if test "$cross_compiling" = yes; then
18521   # Depending upon the size, compute the lo and hi bounds.
18522 cat >conftest.$ac_ext <<_ACEOF
18523 /* confdefs.h.  */
18524 _ACEOF
18525 cat confdefs.h >>conftest.$ac_ext
18526 cat >>conftest.$ac_ext <<_ACEOF
18527 /* end confdefs.h.  */
18528 $ac_includes_default
18529 int
18530 main ()
18531 {
18532 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
18533 test_array [0] = 0
18534
18535   ;
18536   return 0;
18537 }
18538 _ACEOF
18539 rm -f conftest.$ac_objext
18540 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18541   (eval $ac_compile) 2>conftest.er1
18542   ac_status=$?
18543   grep -v '^ *+' conftest.er1 >conftest.err
18544   rm -f conftest.er1
18545   cat conftest.err >&5
18546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18547   (exit $ac_status); } &&
18548          { ac_try='test -z "$ac_c_werror_flag"
18549                          || test ! -s conftest.err'
18550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18551   (eval $ac_try) 2>&5
18552   ac_status=$?
18553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554   (exit $ac_status); }; } &&
18555          { ac_try='test -s conftest.$ac_objext'
18556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18557   (eval $ac_try) 2>&5
18558   ac_status=$?
18559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18560   (exit $ac_status); }; }; then
18561   ac_lo=0 ac_mid=0
18562   while :; do
18563     cat >conftest.$ac_ext <<_ACEOF
18564 /* confdefs.h.  */
18565 _ACEOF
18566 cat confdefs.h >>conftest.$ac_ext
18567 cat >>conftest.$ac_ext <<_ACEOF
18568 /* end confdefs.h.  */
18569 $ac_includes_default
18570 int
18571 main ()
18572 {
18573 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18574 test_array [0] = 0
18575
18576   ;
18577   return 0;
18578 }
18579 _ACEOF
18580 rm -f conftest.$ac_objext
18581 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18582   (eval $ac_compile) 2>conftest.er1
18583   ac_status=$?
18584   grep -v '^ *+' conftest.er1 >conftest.err
18585   rm -f conftest.er1
18586   cat conftest.err >&5
18587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18588   (exit $ac_status); } &&
18589          { ac_try='test -z "$ac_c_werror_flag"
18590                          || test ! -s conftest.err'
18591   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18592   (eval $ac_try) 2>&5
18593   ac_status=$?
18594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18595   (exit $ac_status); }; } &&
18596          { ac_try='test -s conftest.$ac_objext'
18597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18598   (eval $ac_try) 2>&5
18599   ac_status=$?
18600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18601   (exit $ac_status); }; }; then
18602   ac_hi=$ac_mid; break
18603 else
18604   echo "$as_me: failed program was:" >&5
18605 sed 's/^/| /' conftest.$ac_ext >&5
18606
18607 ac_lo=`expr $ac_mid + 1`
18608                     if test $ac_lo -le $ac_mid; then
18609                       ac_lo= ac_hi=
18610                       break
18611                     fi
18612                     ac_mid=`expr 2 '*' $ac_mid + 1`
18613 fi
18614 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18615   done
18616 else
18617   echo "$as_me: failed program was:" >&5
18618 sed 's/^/| /' conftest.$ac_ext >&5
18619
18620 cat >conftest.$ac_ext <<_ACEOF
18621 /* confdefs.h.  */
18622 _ACEOF
18623 cat confdefs.h >>conftest.$ac_ext
18624 cat >>conftest.$ac_ext <<_ACEOF
18625 /* end confdefs.h.  */
18626 $ac_includes_default
18627 int
18628 main ()
18629 {
18630 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
18631 test_array [0] = 0
18632
18633   ;
18634   return 0;
18635 }
18636 _ACEOF
18637 rm -f conftest.$ac_objext
18638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18639   (eval $ac_compile) 2>conftest.er1
18640   ac_status=$?
18641   grep -v '^ *+' conftest.er1 >conftest.err
18642   rm -f conftest.er1
18643   cat conftest.err >&5
18644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18645   (exit $ac_status); } &&
18646          { ac_try='test -z "$ac_c_werror_flag"
18647                          || test ! -s conftest.err'
18648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18649   (eval $ac_try) 2>&5
18650   ac_status=$?
18651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652   (exit $ac_status); }; } &&
18653          { ac_try='test -s conftest.$ac_objext'
18654   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18655   (eval $ac_try) 2>&5
18656   ac_status=$?
18657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18658   (exit $ac_status); }; }; then
18659   ac_hi=-1 ac_mid=-1
18660   while :; do
18661     cat >conftest.$ac_ext <<_ACEOF
18662 /* confdefs.h.  */
18663 _ACEOF
18664 cat confdefs.h >>conftest.$ac_ext
18665 cat >>conftest.$ac_ext <<_ACEOF
18666 /* end confdefs.h.  */
18667 $ac_includes_default
18668 int
18669 main ()
18670 {
18671 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
18672 test_array [0] = 0
18673
18674   ;
18675   return 0;
18676 }
18677 _ACEOF
18678 rm -f conftest.$ac_objext
18679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18680   (eval $ac_compile) 2>conftest.er1
18681   ac_status=$?
18682   grep -v '^ *+' conftest.er1 >conftest.err
18683   rm -f conftest.er1
18684   cat conftest.err >&5
18685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18686   (exit $ac_status); } &&
18687          { ac_try='test -z "$ac_c_werror_flag"
18688                          || test ! -s conftest.err'
18689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18693   (exit $ac_status); }; } &&
18694          { ac_try='test -s conftest.$ac_objext'
18695   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18696   (eval $ac_try) 2>&5
18697   ac_status=$?
18698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18699   (exit $ac_status); }; }; then
18700   ac_lo=$ac_mid; break
18701 else
18702   echo "$as_me: failed program was:" >&5
18703 sed 's/^/| /' conftest.$ac_ext >&5
18704
18705 ac_hi=`expr '(' $ac_mid ')' - 1`
18706                        if test $ac_mid -le $ac_hi; then
18707                          ac_lo= ac_hi=
18708                          break
18709                        fi
18710                        ac_mid=`expr 2 '*' $ac_mid`
18711 fi
18712 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18713   done
18714 else
18715   echo "$as_me: failed program was:" >&5
18716 sed 's/^/| /' conftest.$ac_ext >&5
18717
18718 ac_lo= ac_hi=
18719 fi
18720 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18721 fi
18722 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18723 # Binary search between lo and hi bounds.
18724 while test "x$ac_lo" != "x$ac_hi"; do
18725   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18726   cat >conftest.$ac_ext <<_ACEOF
18727 /* confdefs.h.  */
18728 _ACEOF
18729 cat confdefs.h >>conftest.$ac_ext
18730 cat >>conftest.$ac_ext <<_ACEOF
18731 /* end confdefs.h.  */
18732 $ac_includes_default
18733 int
18734 main ()
18735 {
18736 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
18737 test_array [0] = 0
18738
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 rm -f conftest.$ac_objext
18744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18745   (eval $ac_compile) 2>conftest.er1
18746   ac_status=$?
18747   grep -v '^ *+' conftest.er1 >conftest.err
18748   rm -f conftest.er1
18749   cat conftest.err >&5
18750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18751   (exit $ac_status); } &&
18752          { ac_try='test -z "$ac_c_werror_flag"
18753                          || test ! -s conftest.err'
18754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18755   (eval $ac_try) 2>&5
18756   ac_status=$?
18757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18758   (exit $ac_status); }; } &&
18759          { ac_try='test -s conftest.$ac_objext'
18760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18761   (eval $ac_try) 2>&5
18762   ac_status=$?
18763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18764   (exit $ac_status); }; }; then
18765   ac_hi=$ac_mid
18766 else
18767   echo "$as_me: failed program was:" >&5
18768 sed 's/^/| /' conftest.$ac_ext >&5
18769
18770 ac_lo=`expr '(' $ac_mid ')' + 1`
18771 fi
18772 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18773 done
18774 case $ac_lo in
18775 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
18776 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18777 See \`config.log' for more details." >&5
18778 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18779 See \`config.log' for more details." >&2;}
18780    { (exit 1); exit 1; }; } ;;
18781 esac
18782 else
18783   if test "$cross_compiling" = yes; then
18784   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18785 See \`config.log' for more details." >&5
18786 echo "$as_me: error: cannot run test program while cross compiling
18787 See \`config.log' for more details." >&2;}
18788    { (exit 1); exit 1; }; }
18789 else
18790   cat >conftest.$ac_ext <<_ACEOF
18791 /* confdefs.h.  */
18792 _ACEOF
18793 cat confdefs.h >>conftest.$ac_ext
18794 cat >>conftest.$ac_ext <<_ACEOF
18795 /* end confdefs.h.  */
18796 $ac_includes_default
18797 long longval () { return (long) (sizeof (unsigned long)); }
18798 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18799 #include <stdio.h>
18800 #include <stdlib.h>
18801 int
18802 main ()
18803 {
18804
18805   FILE *f = fopen ("conftest.val", "w");
18806   if (! f)
18807     exit (1);
18808   if (((long) (sizeof (unsigned long))) < 0)
18809     {
18810       long i = longval ();
18811       if (i != ((long) (sizeof (unsigned long))))
18812         exit (1);
18813       fprintf (f, "%ld\n", i);
18814     }
18815   else
18816     {
18817       unsigned long i = ulongval ();
18818       if (i != ((long) (sizeof (unsigned long))))
18819         exit (1);
18820       fprintf (f, "%lu\n", i);
18821     }
18822   exit (ferror (f) || fclose (f) != 0);
18823
18824   ;
18825   return 0;
18826 }
18827 _ACEOF
18828 rm -f conftest$ac_exeext
18829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18835   (eval $ac_try) 2>&5
18836   ac_status=$?
18837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18838   (exit $ac_status); }; }; then
18839   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18840 else
18841   echo "$as_me: program exited with status $ac_status" >&5
18842 echo "$as_me: failed program was:" >&5
18843 sed 's/^/| /' conftest.$ac_ext >&5
18844
18845 ( exit $ac_status )
18846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18847 See \`config.log' for more details." >&5
18848 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18849 See \`config.log' for more details." >&2;}
18850    { (exit 1); exit 1; }; }
18851 fi
18852 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18853 fi
18854 fi
18855 rm -f conftest.val
18856 else
18857   ac_cv_sizeof_unsigned_long=0
18858 fi
18859 fi
18860 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18861 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18862 cat >>confdefs.h <<_ACEOF
18863 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18864 _ACEOF
18865
18866
18867
18868 # And one for the size of size_t (enables tweaks for > 32bit address space)
18869 echo "$as_me:$LINENO: checking for size_t" >&5
18870 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18871 if test "${ac_cv_type_size_t+set}" = set; then
18872   echo $ECHO_N "(cached) $ECHO_C" >&6
18873 else
18874   cat >conftest.$ac_ext <<_ACEOF
18875 /* confdefs.h.  */
18876 _ACEOF
18877 cat confdefs.h >>conftest.$ac_ext
18878 cat >>conftest.$ac_ext <<_ACEOF
18879 /* end confdefs.h.  */
18880 $ac_includes_default
18881 int
18882 main ()
18883 {
18884 if ((size_t *) 0)
18885   return 0;
18886 if (sizeof (size_t))
18887   return 0;
18888   ;
18889   return 0;
18890 }
18891 _ACEOF
18892 rm -f conftest.$ac_objext
18893 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18894   (eval $ac_compile) 2>conftest.er1
18895   ac_status=$?
18896   grep -v '^ *+' conftest.er1 >conftest.err
18897   rm -f conftest.er1
18898   cat conftest.err >&5
18899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18900   (exit $ac_status); } &&
18901          { ac_try='test -z "$ac_c_werror_flag"
18902                          || test ! -s conftest.err'
18903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18904   (eval $ac_try) 2>&5
18905   ac_status=$?
18906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18907   (exit $ac_status); }; } &&
18908          { ac_try='test -s conftest.$ac_objext'
18909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18910   (eval $ac_try) 2>&5
18911   ac_status=$?
18912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18913   (exit $ac_status); }; }; then
18914   ac_cv_type_size_t=yes
18915 else
18916   echo "$as_me: failed program was:" >&5
18917 sed 's/^/| /' conftest.$ac_ext >&5
18918
18919 ac_cv_type_size_t=no
18920 fi
18921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18922 fi
18923 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18924 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18925
18926 echo "$as_me:$LINENO: checking size of size_t" >&5
18927 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18928 if test "${ac_cv_sizeof_size_t+set}" = set; then
18929   echo $ECHO_N "(cached) $ECHO_C" >&6
18930 else
18931   if test "$ac_cv_type_size_t" = yes; then
18932   # The cast to unsigned long works around a bug in the HP C Compiler
18933   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18934   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18935   # This bug is HP SR number 8606223364.
18936   if test "$cross_compiling" = yes; then
18937   # Depending upon the size, compute the lo and hi bounds.
18938 cat >conftest.$ac_ext <<_ACEOF
18939 /* confdefs.h.  */
18940 _ACEOF
18941 cat confdefs.h >>conftest.$ac_ext
18942 cat >>conftest.$ac_ext <<_ACEOF
18943 /* end confdefs.h.  */
18944 $ac_includes_default
18945 int
18946 main ()
18947 {
18948 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18949 test_array [0] = 0
18950
18951   ;
18952   return 0;
18953 }
18954 _ACEOF
18955 rm -f conftest.$ac_objext
18956 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18957   (eval $ac_compile) 2>conftest.er1
18958   ac_status=$?
18959   grep -v '^ *+' conftest.er1 >conftest.err
18960   rm -f conftest.er1
18961   cat conftest.err >&5
18962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18963   (exit $ac_status); } &&
18964          { ac_try='test -z "$ac_c_werror_flag"
18965                          || test ! -s conftest.err'
18966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18967   (eval $ac_try) 2>&5
18968   ac_status=$?
18969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18970   (exit $ac_status); }; } &&
18971          { ac_try='test -s conftest.$ac_objext'
18972   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18973   (eval $ac_try) 2>&5
18974   ac_status=$?
18975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18976   (exit $ac_status); }; }; then
18977   ac_lo=0 ac_mid=0
18978   while :; do
18979     cat >conftest.$ac_ext <<_ACEOF
18980 /* confdefs.h.  */
18981 _ACEOF
18982 cat confdefs.h >>conftest.$ac_ext
18983 cat >>conftest.$ac_ext <<_ACEOF
18984 /* end confdefs.h.  */
18985 $ac_includes_default
18986 int
18987 main ()
18988 {
18989 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18990 test_array [0] = 0
18991
18992   ;
18993   return 0;
18994 }
18995 _ACEOF
18996 rm -f conftest.$ac_objext
18997 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18998   (eval $ac_compile) 2>conftest.er1
18999   ac_status=$?
19000   grep -v '^ *+' conftest.er1 >conftest.err
19001   rm -f conftest.er1
19002   cat conftest.err >&5
19003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19004   (exit $ac_status); } &&
19005          { ac_try='test -z "$ac_c_werror_flag"
19006                          || test ! -s conftest.err'
19007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19008   (eval $ac_try) 2>&5
19009   ac_status=$?
19010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19011   (exit $ac_status); }; } &&
19012          { ac_try='test -s conftest.$ac_objext'
19013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19014   (eval $ac_try) 2>&5
19015   ac_status=$?
19016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19017   (exit $ac_status); }; }; then
19018   ac_hi=$ac_mid; break
19019 else
19020   echo "$as_me: failed program was:" >&5
19021 sed 's/^/| /' conftest.$ac_ext >&5
19022
19023 ac_lo=`expr $ac_mid + 1`
19024                     if test $ac_lo -le $ac_mid; then
19025                       ac_lo= ac_hi=
19026                       break
19027                     fi
19028                     ac_mid=`expr 2 '*' $ac_mid + 1`
19029 fi
19030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19031   done
19032 else
19033   echo "$as_me: failed program was:" >&5
19034 sed 's/^/| /' conftest.$ac_ext >&5
19035
19036 cat >conftest.$ac_ext <<_ACEOF
19037 /* confdefs.h.  */
19038 _ACEOF
19039 cat confdefs.h >>conftest.$ac_ext
19040 cat >>conftest.$ac_ext <<_ACEOF
19041 /* end confdefs.h.  */
19042 $ac_includes_default
19043 int
19044 main ()
19045 {
19046 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
19047 test_array [0] = 0
19048
19049   ;
19050   return 0;
19051 }
19052 _ACEOF
19053 rm -f conftest.$ac_objext
19054 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19055   (eval $ac_compile) 2>conftest.er1
19056   ac_status=$?
19057   grep -v '^ *+' conftest.er1 >conftest.err
19058   rm -f conftest.er1
19059   cat conftest.err >&5
19060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19061   (exit $ac_status); } &&
19062          { ac_try='test -z "$ac_c_werror_flag"
19063                          || test ! -s conftest.err'
19064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19065   (eval $ac_try) 2>&5
19066   ac_status=$?
19067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19068   (exit $ac_status); }; } &&
19069          { ac_try='test -s conftest.$ac_objext'
19070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19074   (exit $ac_status); }; }; then
19075   ac_hi=-1 ac_mid=-1
19076   while :; do
19077     cat >conftest.$ac_ext <<_ACEOF
19078 /* confdefs.h.  */
19079 _ACEOF
19080 cat confdefs.h >>conftest.$ac_ext
19081 cat >>conftest.$ac_ext <<_ACEOF
19082 /* end confdefs.h.  */
19083 $ac_includes_default
19084 int
19085 main ()
19086 {
19087 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
19088 test_array [0] = 0
19089
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f conftest.$ac_objext
19095 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19096   (eval $ac_compile) 2>conftest.er1
19097   ac_status=$?
19098   grep -v '^ *+' conftest.er1 >conftest.err
19099   rm -f conftest.er1
19100   cat conftest.err >&5
19101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19102   (exit $ac_status); } &&
19103          { ac_try='test -z "$ac_c_werror_flag"
19104                          || test ! -s conftest.err'
19105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19106   (eval $ac_try) 2>&5
19107   ac_status=$?
19108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19109   (exit $ac_status); }; } &&
19110          { ac_try='test -s conftest.$ac_objext'
19111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19112   (eval $ac_try) 2>&5
19113   ac_status=$?
19114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19115   (exit $ac_status); }; }; then
19116   ac_lo=$ac_mid; break
19117 else
19118   echo "$as_me: failed program was:" >&5
19119 sed 's/^/| /' conftest.$ac_ext >&5
19120
19121 ac_hi=`expr '(' $ac_mid ')' - 1`
19122                        if test $ac_mid -le $ac_hi; then
19123                          ac_lo= ac_hi=
19124                          break
19125                        fi
19126                        ac_mid=`expr 2 '*' $ac_mid`
19127 fi
19128 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19129   done
19130 else
19131   echo "$as_me: failed program was:" >&5
19132 sed 's/^/| /' conftest.$ac_ext >&5
19133
19134 ac_lo= ac_hi=
19135 fi
19136 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19137 fi
19138 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19139 # Binary search between lo and hi bounds.
19140 while test "x$ac_lo" != "x$ac_hi"; do
19141   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19142   cat >conftest.$ac_ext <<_ACEOF
19143 /* confdefs.h.  */
19144 _ACEOF
19145 cat confdefs.h >>conftest.$ac_ext
19146 cat >>conftest.$ac_ext <<_ACEOF
19147 /* end confdefs.h.  */
19148 $ac_includes_default
19149 int
19150 main ()
19151 {
19152 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
19153 test_array [0] = 0
19154
19155   ;
19156   return 0;
19157 }
19158 _ACEOF
19159 rm -f conftest.$ac_objext
19160 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19161   (eval $ac_compile) 2>conftest.er1
19162   ac_status=$?
19163   grep -v '^ *+' conftest.er1 >conftest.err
19164   rm -f conftest.er1
19165   cat conftest.err >&5
19166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19167   (exit $ac_status); } &&
19168          { ac_try='test -z "$ac_c_werror_flag"
19169                          || test ! -s conftest.err'
19170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19171   (eval $ac_try) 2>&5
19172   ac_status=$?
19173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19174   (exit $ac_status); }; } &&
19175          { ac_try='test -s conftest.$ac_objext'
19176   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19177   (eval $ac_try) 2>&5
19178   ac_status=$?
19179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19180   (exit $ac_status); }; }; then
19181   ac_hi=$ac_mid
19182 else
19183   echo "$as_me: failed program was:" >&5
19184 sed 's/^/| /' conftest.$ac_ext >&5
19185
19186 ac_lo=`expr '(' $ac_mid ')' + 1`
19187 fi
19188 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19189 done
19190 case $ac_lo in
19191 ?*) ac_cv_sizeof_size_t=$ac_lo;;
19192 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
19193 See \`config.log' for more details." >&5
19194 echo "$as_me: error: cannot compute sizeof (size_t), 77
19195 See \`config.log' for more details." >&2;}
19196    { (exit 1); exit 1; }; } ;;
19197 esac
19198 else
19199   if test "$cross_compiling" = yes; then
19200   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19201 See \`config.log' for more details." >&5
19202 echo "$as_me: error: cannot run test program while cross compiling
19203 See \`config.log' for more details." >&2;}
19204    { (exit 1); exit 1; }; }
19205 else
19206   cat >conftest.$ac_ext <<_ACEOF
19207 /* confdefs.h.  */
19208 _ACEOF
19209 cat confdefs.h >>conftest.$ac_ext
19210 cat >>conftest.$ac_ext <<_ACEOF
19211 /* end confdefs.h.  */
19212 $ac_includes_default
19213 long longval () { return (long) (sizeof (size_t)); }
19214 unsigned long ulongval () { return (long) (sizeof (size_t)); }
19215 #include <stdio.h>
19216 #include <stdlib.h>
19217 int
19218 main ()
19219 {
19220
19221   FILE *f = fopen ("conftest.val", "w");
19222   if (! f)
19223     exit (1);
19224   if (((long) (sizeof (size_t))) < 0)
19225     {
19226       long i = longval ();
19227       if (i != ((long) (sizeof (size_t))))
19228         exit (1);
19229       fprintf (f, "%ld\n", i);
19230     }
19231   else
19232     {
19233       unsigned long i = ulongval ();
19234       if (i != ((long) (sizeof (size_t))))
19235         exit (1);
19236       fprintf (f, "%lu\n", i);
19237     }
19238   exit (ferror (f) || fclose (f) != 0);
19239
19240   ;
19241   return 0;
19242 }
19243 _ACEOF
19244 rm -f conftest$ac_exeext
19245 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19246   (eval $ac_link) 2>&5
19247   ac_status=$?
19248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19249   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19251   (eval $ac_try) 2>&5
19252   ac_status=$?
19253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19254   (exit $ac_status); }; }; then
19255   ac_cv_sizeof_size_t=`cat conftest.val`
19256 else
19257   echo "$as_me: program exited with status $ac_status" >&5
19258 echo "$as_me: failed program was:" >&5
19259 sed 's/^/| /' conftest.$ac_ext >&5
19260
19261 ( exit $ac_status )
19262 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
19263 See \`config.log' for more details." >&5
19264 echo "$as_me: error: cannot compute sizeof (size_t), 77
19265 See \`config.log' for more details." >&2;}
19266    { (exit 1); exit 1; }; }
19267 fi
19268 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19269 fi
19270 fi
19271 rm -f conftest.val
19272 else
19273   ac_cv_sizeof_size_t=0
19274 fi
19275 fi
19276 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
19277 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
19278 cat >>confdefs.h <<_ACEOF
19279 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
19280 _ACEOF
19281
19282
19283
19284 # Determine memory alignment requirements for the basic C data types.
19285
19286 echo "$as_me:$LINENO: checking for short" >&5
19287 echo $ECHO_N "checking for short... $ECHO_C" >&6
19288 if test "${ac_cv_type_short+set}" = set; then
19289   echo $ECHO_N "(cached) $ECHO_C" >&6
19290 else
19291   cat >conftest.$ac_ext <<_ACEOF
19292 /* confdefs.h.  */
19293 _ACEOF
19294 cat confdefs.h >>conftest.$ac_ext
19295 cat >>conftest.$ac_ext <<_ACEOF
19296 /* end confdefs.h.  */
19297 $ac_includes_default
19298 int
19299 main ()
19300 {
19301 if ((short *) 0)
19302   return 0;
19303 if (sizeof (short))
19304   return 0;
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f conftest.$ac_objext
19310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19311   (eval $ac_compile) 2>conftest.er1
19312   ac_status=$?
19313   grep -v '^ *+' conftest.er1 >conftest.err
19314   rm -f conftest.er1
19315   cat conftest.err >&5
19316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19317   (exit $ac_status); } &&
19318          { ac_try='test -z "$ac_c_werror_flag"
19319                          || test ! -s conftest.err'
19320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19321   (eval $ac_try) 2>&5
19322   ac_status=$?
19323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19324   (exit $ac_status); }; } &&
19325          { ac_try='test -s conftest.$ac_objext'
19326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19327   (eval $ac_try) 2>&5
19328   ac_status=$?
19329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19330   (exit $ac_status); }; }; then
19331   ac_cv_type_short=yes
19332 else
19333   echo "$as_me: failed program was:" >&5
19334 sed 's/^/| /' conftest.$ac_ext >&5
19335
19336 ac_cv_type_short=no
19337 fi
19338 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19339 fi
19340 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
19341 echo "${ECHO_T}$ac_cv_type_short" >&6
19342
19343 echo "$as_me:$LINENO: checking alignment of short" >&5
19344 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
19345 if test "${pgac_cv_alignof_short+set}" = set; then
19346   echo $ECHO_N "(cached) $ECHO_C" >&6
19347 else
19348   if test "$ac_cv_type_short" = yes; then
19349   if test "$cross_compiling" = yes; then
19350   # Depending upon the size, compute the lo and hi bounds.
19351 cat >conftest.$ac_ext <<_ACEOF
19352 /* confdefs.h.  */
19353 _ACEOF
19354 cat confdefs.h >>conftest.$ac_ext
19355 cat >>conftest.$ac_ext <<_ACEOF
19356 /* end confdefs.h.  */
19357 $ac_includes_default
19358 struct { char filler; short field; } pgac_struct;
19359 int
19360 main ()
19361 {
19362 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19363 test_array [0] = 0
19364
19365   ;
19366   return 0;
19367 }
19368 _ACEOF
19369 rm -f conftest.$ac_objext
19370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19371   (eval $ac_compile) 2>conftest.er1
19372   ac_status=$?
19373   grep -v '^ *+' conftest.er1 >conftest.err
19374   rm -f conftest.er1
19375   cat conftest.err >&5
19376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19377   (exit $ac_status); } &&
19378          { ac_try='test -z "$ac_c_werror_flag"
19379                          || test ! -s conftest.err'
19380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19381   (eval $ac_try) 2>&5
19382   ac_status=$?
19383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19384   (exit $ac_status); }; } &&
19385          { ac_try='test -s conftest.$ac_objext'
19386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19387   (eval $ac_try) 2>&5
19388   ac_status=$?
19389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19390   (exit $ac_status); }; }; then
19391   ac_lo=0 ac_mid=0
19392   while :; do
19393     cat >conftest.$ac_ext <<_ACEOF
19394 /* confdefs.h.  */
19395 _ACEOF
19396 cat confdefs.h >>conftest.$ac_ext
19397 cat >>conftest.$ac_ext <<_ACEOF
19398 /* end confdefs.h.  */
19399 $ac_includes_default
19400 struct { char filler; short field; } pgac_struct;
19401 int
19402 main ()
19403 {
19404 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19405 test_array [0] = 0
19406
19407   ;
19408   return 0;
19409 }
19410 _ACEOF
19411 rm -f conftest.$ac_objext
19412 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19413   (eval $ac_compile) 2>conftest.er1
19414   ac_status=$?
19415   grep -v '^ *+' conftest.er1 >conftest.err
19416   rm -f conftest.er1
19417   cat conftest.err >&5
19418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419   (exit $ac_status); } &&
19420          { ac_try='test -z "$ac_c_werror_flag"
19421                          || test ! -s conftest.err'
19422   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19423   (eval $ac_try) 2>&5
19424   ac_status=$?
19425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19426   (exit $ac_status); }; } &&
19427          { ac_try='test -s conftest.$ac_objext'
19428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19429   (eval $ac_try) 2>&5
19430   ac_status=$?
19431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19432   (exit $ac_status); }; }; then
19433   ac_hi=$ac_mid; break
19434 else
19435   echo "$as_me: failed program was:" >&5
19436 sed 's/^/| /' conftest.$ac_ext >&5
19437
19438 ac_lo=`expr $ac_mid + 1`
19439                     if test $ac_lo -le $ac_mid; then
19440                       ac_lo= ac_hi=
19441                       break
19442                     fi
19443                     ac_mid=`expr 2 '*' $ac_mid + 1`
19444 fi
19445 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19446   done
19447 else
19448   echo "$as_me: failed program was:" >&5
19449 sed 's/^/| /' conftest.$ac_ext >&5
19450
19451 cat >conftest.$ac_ext <<_ACEOF
19452 /* confdefs.h.  */
19453 _ACEOF
19454 cat confdefs.h >>conftest.$ac_ext
19455 cat >>conftest.$ac_ext <<_ACEOF
19456 /* end confdefs.h.  */
19457 $ac_includes_default
19458 struct { char filler; short field; } pgac_struct;
19459 int
19460 main ()
19461 {
19462 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19463 test_array [0] = 0
19464
19465   ;
19466   return 0;
19467 }
19468 _ACEOF
19469 rm -f conftest.$ac_objext
19470 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19471   (eval $ac_compile) 2>conftest.er1
19472   ac_status=$?
19473   grep -v '^ *+' conftest.er1 >conftest.err
19474   rm -f conftest.er1
19475   cat conftest.err >&5
19476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19477   (exit $ac_status); } &&
19478          { ac_try='test -z "$ac_c_werror_flag"
19479                          || test ! -s conftest.err'
19480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19481   (eval $ac_try) 2>&5
19482   ac_status=$?
19483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19484   (exit $ac_status); }; } &&
19485          { ac_try='test -s conftest.$ac_objext'
19486   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19487   (eval $ac_try) 2>&5
19488   ac_status=$?
19489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490   (exit $ac_status); }; }; then
19491   ac_hi=-1 ac_mid=-1
19492   while :; do
19493     cat >conftest.$ac_ext <<_ACEOF
19494 /* confdefs.h.  */
19495 _ACEOF
19496 cat confdefs.h >>conftest.$ac_ext
19497 cat >>conftest.$ac_ext <<_ACEOF
19498 /* end confdefs.h.  */
19499 $ac_includes_default
19500 struct { char filler; short field; } pgac_struct;
19501 int
19502 main ()
19503 {
19504 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19505 test_array [0] = 0
19506
19507   ;
19508   return 0;
19509 }
19510 _ACEOF
19511 rm -f conftest.$ac_objext
19512 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19513   (eval $ac_compile) 2>conftest.er1
19514   ac_status=$?
19515   grep -v '^ *+' conftest.er1 >conftest.err
19516   rm -f conftest.er1
19517   cat conftest.err >&5
19518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19519   (exit $ac_status); } &&
19520          { ac_try='test -z "$ac_c_werror_flag"
19521                          || test ! -s conftest.err'
19522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19523   (eval $ac_try) 2>&5
19524   ac_status=$?
19525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19526   (exit $ac_status); }; } &&
19527          { ac_try='test -s conftest.$ac_objext'
19528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19529   (eval $ac_try) 2>&5
19530   ac_status=$?
19531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19532   (exit $ac_status); }; }; then
19533   ac_lo=$ac_mid; break
19534 else
19535   echo "$as_me: failed program was:" >&5
19536 sed 's/^/| /' conftest.$ac_ext >&5
19537
19538 ac_hi=`expr '(' $ac_mid ')' - 1`
19539                        if test $ac_mid -le $ac_hi; then
19540                          ac_lo= ac_hi=
19541                          break
19542                        fi
19543                        ac_mid=`expr 2 '*' $ac_mid`
19544 fi
19545 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19546   done
19547 else
19548   echo "$as_me: failed program was:" >&5
19549 sed 's/^/| /' conftest.$ac_ext >&5
19550
19551 ac_lo= ac_hi=
19552 fi
19553 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19554 fi
19555 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19556 # Binary search between lo and hi bounds.
19557 while test "x$ac_lo" != "x$ac_hi"; do
19558   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19559   cat >conftest.$ac_ext <<_ACEOF
19560 /* confdefs.h.  */
19561 _ACEOF
19562 cat confdefs.h >>conftest.$ac_ext
19563 cat >>conftest.$ac_ext <<_ACEOF
19564 /* end confdefs.h.  */
19565 $ac_includes_default
19566 struct { char filler; short field; } pgac_struct;
19567 int
19568 main ()
19569 {
19570 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19571 test_array [0] = 0
19572
19573   ;
19574   return 0;
19575 }
19576 _ACEOF
19577 rm -f conftest.$ac_objext
19578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19579   (eval $ac_compile) 2>conftest.er1
19580   ac_status=$?
19581   grep -v '^ *+' conftest.er1 >conftest.err
19582   rm -f conftest.er1
19583   cat conftest.err >&5
19584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19585   (exit $ac_status); } &&
19586          { ac_try='test -z "$ac_c_werror_flag"
19587                          || test ! -s conftest.err'
19588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19589   (eval $ac_try) 2>&5
19590   ac_status=$?
19591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19592   (exit $ac_status); }; } &&
19593          { ac_try='test -s conftest.$ac_objext'
19594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19595   (eval $ac_try) 2>&5
19596   ac_status=$?
19597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19598   (exit $ac_status); }; }; then
19599   ac_hi=$ac_mid
19600 else
19601   echo "$as_me: failed program was:" >&5
19602 sed 's/^/| /' conftest.$ac_ext >&5
19603
19604 ac_lo=`expr '(' $ac_mid ')' + 1`
19605 fi
19606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19607 done
19608 case $ac_lo in
19609 ?*) pgac_cv_alignof_short=$ac_lo;;
19610 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19611 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19612    { (exit 1); exit 1; }; } ;;
19613 esac
19614 else
19615   if test "$cross_compiling" = yes; then
19616   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19617 See \`config.log' for more details." >&5
19618 echo "$as_me: error: cannot run test program while cross compiling
19619 See \`config.log' for more details." >&2;}
19620    { (exit 1); exit 1; }; }
19621 else
19622   cat >conftest.$ac_ext <<_ACEOF
19623 /* confdefs.h.  */
19624 _ACEOF
19625 cat confdefs.h >>conftest.$ac_ext
19626 cat >>conftest.$ac_ext <<_ACEOF
19627 /* end confdefs.h.  */
19628 $ac_includes_default
19629 struct { char filler; short field; } pgac_struct;
19630 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19631 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19632 #include <stdio.h>
19633 #include <stdlib.h>
19634 int
19635 main ()
19636 {
19637
19638   FILE *f = fopen ("conftest.val", "w");
19639   if (! f)
19640     exit (1);
19641   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19642     {
19643       long i = longval ();
19644       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19645         exit (1);
19646       fprintf (f, "%ld\n", i);
19647     }
19648   else
19649     {
19650       unsigned long i = ulongval ();
19651       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19652         exit (1);
19653       fprintf (f, "%lu\n", i);
19654     }
19655   exit (ferror (f) || fclose (f) != 0);
19656
19657   ;
19658   return 0;
19659 }
19660 _ACEOF
19661 rm -f conftest$ac_exeext
19662 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19663   (eval $ac_link) 2>&5
19664   ac_status=$?
19665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19668   (eval $ac_try) 2>&5
19669   ac_status=$?
19670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19671   (exit $ac_status); }; }; then
19672   pgac_cv_alignof_short=`cat conftest.val`
19673 else
19674   echo "$as_me: program exited with status $ac_status" >&5
19675 echo "$as_me: failed program was:" >&5
19676 sed 's/^/| /' conftest.$ac_ext >&5
19677
19678 ( exit $ac_status )
19679 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
19680 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
19681    { (exit 1); exit 1; }; }
19682 fi
19683 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19684 fi
19685 fi
19686 rm -f conftest.val
19687 else
19688   pgac_cv_alignof_short=0
19689 fi
19690 fi
19691 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
19692 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
19693 cat >>confdefs.h <<_ACEOF
19694 #define ALIGNOF_SHORT $pgac_cv_alignof_short
19695 _ACEOF
19696
19697
19698 echo "$as_me:$LINENO: checking for int" >&5
19699 echo $ECHO_N "checking for int... $ECHO_C" >&6
19700 if test "${ac_cv_type_int+set}" = set; then
19701   echo $ECHO_N "(cached) $ECHO_C" >&6
19702 else
19703   cat >conftest.$ac_ext <<_ACEOF
19704 /* confdefs.h.  */
19705 _ACEOF
19706 cat confdefs.h >>conftest.$ac_ext
19707 cat >>conftest.$ac_ext <<_ACEOF
19708 /* end confdefs.h.  */
19709 $ac_includes_default
19710 int
19711 main ()
19712 {
19713 if ((int *) 0)
19714   return 0;
19715 if (sizeof (int))
19716   return 0;
19717   ;
19718   return 0;
19719 }
19720 _ACEOF
19721 rm -f conftest.$ac_objext
19722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19723   (eval $ac_compile) 2>conftest.er1
19724   ac_status=$?
19725   grep -v '^ *+' conftest.er1 >conftest.err
19726   rm -f conftest.er1
19727   cat conftest.err >&5
19728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19729   (exit $ac_status); } &&
19730          { ac_try='test -z "$ac_c_werror_flag"
19731                          || test ! -s conftest.err'
19732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19733   (eval $ac_try) 2>&5
19734   ac_status=$?
19735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19736   (exit $ac_status); }; } &&
19737          { ac_try='test -s conftest.$ac_objext'
19738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19739   (eval $ac_try) 2>&5
19740   ac_status=$?
19741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19742   (exit $ac_status); }; }; then
19743   ac_cv_type_int=yes
19744 else
19745   echo "$as_me: failed program was:" >&5
19746 sed 's/^/| /' conftest.$ac_ext >&5
19747
19748 ac_cv_type_int=no
19749 fi
19750 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19751 fi
19752 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
19753 echo "${ECHO_T}$ac_cv_type_int" >&6
19754
19755 echo "$as_me:$LINENO: checking alignment of int" >&5
19756 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
19757 if test "${pgac_cv_alignof_int+set}" = set; then
19758   echo $ECHO_N "(cached) $ECHO_C" >&6
19759 else
19760   if test "$ac_cv_type_int" = yes; then
19761   if test "$cross_compiling" = yes; then
19762   # Depending upon the size, compute the lo and hi bounds.
19763 cat >conftest.$ac_ext <<_ACEOF
19764 /* confdefs.h.  */
19765 _ACEOF
19766 cat confdefs.h >>conftest.$ac_ext
19767 cat >>conftest.$ac_ext <<_ACEOF
19768 /* end confdefs.h.  */
19769 $ac_includes_default
19770 struct { char filler; int field; } pgac_struct;
19771 int
19772 main ()
19773 {
19774 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19775 test_array [0] = 0
19776
19777   ;
19778   return 0;
19779 }
19780 _ACEOF
19781 rm -f conftest.$ac_objext
19782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19783   (eval $ac_compile) 2>conftest.er1
19784   ac_status=$?
19785   grep -v '^ *+' conftest.er1 >conftest.err
19786   rm -f conftest.er1
19787   cat conftest.err >&5
19788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789   (exit $ac_status); } &&
19790          { ac_try='test -z "$ac_c_werror_flag"
19791                          || test ! -s conftest.err'
19792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19793   (eval $ac_try) 2>&5
19794   ac_status=$?
19795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19796   (exit $ac_status); }; } &&
19797          { ac_try='test -s conftest.$ac_objext'
19798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19799   (eval $ac_try) 2>&5
19800   ac_status=$?
19801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19802   (exit $ac_status); }; }; then
19803   ac_lo=0 ac_mid=0
19804   while :; do
19805     cat >conftest.$ac_ext <<_ACEOF
19806 /* confdefs.h.  */
19807 _ACEOF
19808 cat confdefs.h >>conftest.$ac_ext
19809 cat >>conftest.$ac_ext <<_ACEOF
19810 /* end confdefs.h.  */
19811 $ac_includes_default
19812 struct { char filler; int field; } pgac_struct;
19813 int
19814 main ()
19815 {
19816 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19817 test_array [0] = 0
19818
19819   ;
19820   return 0;
19821 }
19822 _ACEOF
19823 rm -f conftest.$ac_objext
19824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19825   (eval $ac_compile) 2>conftest.er1
19826   ac_status=$?
19827   grep -v '^ *+' conftest.er1 >conftest.err
19828   rm -f conftest.er1
19829   cat conftest.err >&5
19830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19831   (exit $ac_status); } &&
19832          { ac_try='test -z "$ac_c_werror_flag"
19833                          || test ! -s conftest.err'
19834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19835   (eval $ac_try) 2>&5
19836   ac_status=$?
19837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19838   (exit $ac_status); }; } &&
19839          { ac_try='test -s conftest.$ac_objext'
19840   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19841   (eval $ac_try) 2>&5
19842   ac_status=$?
19843   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19844   (exit $ac_status); }; }; then
19845   ac_hi=$ac_mid; break
19846 else
19847   echo "$as_me: failed program was:" >&5
19848 sed 's/^/| /' conftest.$ac_ext >&5
19849
19850 ac_lo=`expr $ac_mid + 1`
19851                     if test $ac_lo -le $ac_mid; then
19852                       ac_lo= ac_hi=
19853                       break
19854                     fi
19855                     ac_mid=`expr 2 '*' $ac_mid + 1`
19856 fi
19857 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19858   done
19859 else
19860   echo "$as_me: failed program was:" >&5
19861 sed 's/^/| /' conftest.$ac_ext >&5
19862
19863 cat >conftest.$ac_ext <<_ACEOF
19864 /* confdefs.h.  */
19865 _ACEOF
19866 cat confdefs.h >>conftest.$ac_ext
19867 cat >>conftest.$ac_ext <<_ACEOF
19868 /* end confdefs.h.  */
19869 $ac_includes_default
19870 struct { char filler; int field; } pgac_struct;
19871 int
19872 main ()
19873 {
19874 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19875 test_array [0] = 0
19876
19877   ;
19878   return 0;
19879 }
19880 _ACEOF
19881 rm -f conftest.$ac_objext
19882 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19883   (eval $ac_compile) 2>conftest.er1
19884   ac_status=$?
19885   grep -v '^ *+' conftest.er1 >conftest.err
19886   rm -f conftest.er1
19887   cat conftest.err >&5
19888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19889   (exit $ac_status); } &&
19890          { ac_try='test -z "$ac_c_werror_flag"
19891                          || test ! -s conftest.err'
19892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19893   (eval $ac_try) 2>&5
19894   ac_status=$?
19895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19896   (exit $ac_status); }; } &&
19897          { ac_try='test -s conftest.$ac_objext'
19898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19899   (eval $ac_try) 2>&5
19900   ac_status=$?
19901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19902   (exit $ac_status); }; }; then
19903   ac_hi=-1 ac_mid=-1
19904   while :; do
19905     cat >conftest.$ac_ext <<_ACEOF
19906 /* confdefs.h.  */
19907 _ACEOF
19908 cat confdefs.h >>conftest.$ac_ext
19909 cat >>conftest.$ac_ext <<_ACEOF
19910 /* end confdefs.h.  */
19911 $ac_includes_default
19912 struct { char filler; int field; } pgac_struct;
19913 int
19914 main ()
19915 {
19916 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19917 test_array [0] = 0
19918
19919   ;
19920   return 0;
19921 }
19922 _ACEOF
19923 rm -f conftest.$ac_objext
19924 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19925   (eval $ac_compile) 2>conftest.er1
19926   ac_status=$?
19927   grep -v '^ *+' conftest.er1 >conftest.err
19928   rm -f conftest.er1
19929   cat conftest.err >&5
19930   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19931   (exit $ac_status); } &&
19932          { ac_try='test -z "$ac_c_werror_flag"
19933                          || test ! -s conftest.err'
19934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19935   (eval $ac_try) 2>&5
19936   ac_status=$?
19937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19938   (exit $ac_status); }; } &&
19939          { ac_try='test -s conftest.$ac_objext'
19940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19941   (eval $ac_try) 2>&5
19942   ac_status=$?
19943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19944   (exit $ac_status); }; }; then
19945   ac_lo=$ac_mid; break
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 sed 's/^/| /' conftest.$ac_ext >&5
19949
19950 ac_hi=`expr '(' $ac_mid ')' - 1`
19951                        if test $ac_mid -le $ac_hi; then
19952                          ac_lo= ac_hi=
19953                          break
19954                        fi
19955                        ac_mid=`expr 2 '*' $ac_mid`
19956 fi
19957 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19958   done
19959 else
19960   echo "$as_me: failed program was:" >&5
19961 sed 's/^/| /' conftest.$ac_ext >&5
19962
19963 ac_lo= ac_hi=
19964 fi
19965 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19966 fi
19967 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19968 # Binary search between lo and hi bounds.
19969 while test "x$ac_lo" != "x$ac_hi"; do
19970   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19971   cat >conftest.$ac_ext <<_ACEOF
19972 /* confdefs.h.  */
19973 _ACEOF
19974 cat confdefs.h >>conftest.$ac_ext
19975 cat >>conftest.$ac_ext <<_ACEOF
19976 /* end confdefs.h.  */
19977 $ac_includes_default
19978 struct { char filler; int field; } pgac_struct;
19979 int
19980 main ()
19981 {
19982 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19983 test_array [0] = 0
19984
19985   ;
19986   return 0;
19987 }
19988 _ACEOF
19989 rm -f conftest.$ac_objext
19990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19991   (eval $ac_compile) 2>conftest.er1
19992   ac_status=$?
19993   grep -v '^ *+' conftest.er1 >conftest.err
19994   rm -f conftest.er1
19995   cat conftest.err >&5
19996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19997   (exit $ac_status); } &&
19998          { ac_try='test -z "$ac_c_werror_flag"
19999                          || test ! -s conftest.err'
20000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20001   (eval $ac_try) 2>&5
20002   ac_status=$?
20003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20004   (exit $ac_status); }; } &&
20005          { ac_try='test -s conftest.$ac_objext'
20006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20007   (eval $ac_try) 2>&5
20008   ac_status=$?
20009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20010   (exit $ac_status); }; }; then
20011   ac_hi=$ac_mid
20012 else
20013   echo "$as_me: failed program was:" >&5
20014 sed 's/^/| /' conftest.$ac_ext >&5
20015
20016 ac_lo=`expr '(' $ac_mid ')' + 1`
20017 fi
20018 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20019 done
20020 case $ac_lo in
20021 ?*) pgac_cv_alignof_int=$ac_lo;;
20022 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
20023 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
20024    { (exit 1); exit 1; }; } ;;
20025 esac
20026 else
20027   if test "$cross_compiling" = yes; then
20028   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20029 See \`config.log' for more details." >&5
20030 echo "$as_me: error: cannot run test program while cross compiling
20031 See \`config.log' for more details." >&2;}
20032    { (exit 1); exit 1; }; }
20033 else
20034   cat >conftest.$ac_ext <<_ACEOF
20035 /* confdefs.h.  */
20036 _ACEOF
20037 cat confdefs.h >>conftest.$ac_ext
20038 cat >>conftest.$ac_ext <<_ACEOF
20039 /* end confdefs.h.  */
20040 $ac_includes_default
20041 struct { char filler; int field; } pgac_struct;
20042 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20043 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20044 #include <stdio.h>
20045 #include <stdlib.h>
20046 int
20047 main ()
20048 {
20049
20050   FILE *f = fopen ("conftest.val", "w");
20051   if (! f)
20052     exit (1);
20053   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20054     {
20055       long i = longval ();
20056       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20057         exit (1);
20058       fprintf (f, "%ld\n", i);
20059     }
20060   else
20061     {
20062       unsigned long i = ulongval ();
20063       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20064         exit (1);
20065       fprintf (f, "%lu\n", i);
20066     }
20067   exit (ferror (f) || fclose (f) != 0);
20068
20069   ;
20070   return 0;
20071 }
20072 _ACEOF
20073 rm -f conftest$ac_exeext
20074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20075   (eval $ac_link) 2>&5
20076   ac_status=$?
20077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20079   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20080   (eval $ac_try) 2>&5
20081   ac_status=$?
20082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20083   (exit $ac_status); }; }; then
20084   pgac_cv_alignof_int=`cat conftest.val`
20085 else
20086   echo "$as_me: program exited with status $ac_status" >&5
20087 echo "$as_me: failed program was:" >&5
20088 sed 's/^/| /' conftest.$ac_ext >&5
20089
20090 ( exit $ac_status )
20091 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
20092 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
20093    { (exit 1); exit 1; }; }
20094 fi
20095 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20096 fi
20097 fi
20098 rm -f conftest.val
20099 else
20100   pgac_cv_alignof_int=0
20101 fi
20102 fi
20103 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
20104 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
20105 cat >>confdefs.h <<_ACEOF
20106 #define ALIGNOF_INT $pgac_cv_alignof_int
20107 _ACEOF
20108
20109
20110 echo "$as_me:$LINENO: checking for long" >&5
20111 echo $ECHO_N "checking for long... $ECHO_C" >&6
20112 if test "${ac_cv_type_long+set}" = set; then
20113   echo $ECHO_N "(cached) $ECHO_C" >&6
20114 else
20115   cat >conftest.$ac_ext <<_ACEOF
20116 /* confdefs.h.  */
20117 _ACEOF
20118 cat confdefs.h >>conftest.$ac_ext
20119 cat >>conftest.$ac_ext <<_ACEOF
20120 /* end confdefs.h.  */
20121 $ac_includes_default
20122 int
20123 main ()
20124 {
20125 if ((long *) 0)
20126   return 0;
20127 if (sizeof (long))
20128   return 0;
20129   ;
20130   return 0;
20131 }
20132 _ACEOF
20133 rm -f conftest.$ac_objext
20134 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20135   (eval $ac_compile) 2>conftest.er1
20136   ac_status=$?
20137   grep -v '^ *+' conftest.er1 >conftest.err
20138   rm -f conftest.er1
20139   cat conftest.err >&5
20140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20141   (exit $ac_status); } &&
20142          { ac_try='test -z "$ac_c_werror_flag"
20143                          || test ! -s conftest.err'
20144   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20145   (eval $ac_try) 2>&5
20146   ac_status=$?
20147   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20148   (exit $ac_status); }; } &&
20149          { ac_try='test -s conftest.$ac_objext'
20150   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20151   (eval $ac_try) 2>&5
20152   ac_status=$?
20153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20154   (exit $ac_status); }; }; then
20155   ac_cv_type_long=yes
20156 else
20157   echo "$as_me: failed program was:" >&5
20158 sed 's/^/| /' conftest.$ac_ext >&5
20159
20160 ac_cv_type_long=no
20161 fi
20162 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20163 fi
20164 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
20165 echo "${ECHO_T}$ac_cv_type_long" >&6
20166
20167 echo "$as_me:$LINENO: checking alignment of long" >&5
20168 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
20169 if test "${pgac_cv_alignof_long+set}" = set; then
20170   echo $ECHO_N "(cached) $ECHO_C" >&6
20171 else
20172   if test "$ac_cv_type_long" = yes; then
20173   if test "$cross_compiling" = yes; then
20174   # Depending upon the size, compute the lo and hi bounds.
20175 cat >conftest.$ac_ext <<_ACEOF
20176 /* confdefs.h.  */
20177 _ACEOF
20178 cat confdefs.h >>conftest.$ac_ext
20179 cat >>conftest.$ac_ext <<_ACEOF
20180 /* end confdefs.h.  */
20181 $ac_includes_default
20182 struct { char filler; long field; } pgac_struct;
20183 int
20184 main ()
20185 {
20186 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20187 test_array [0] = 0
20188
20189   ;
20190   return 0;
20191 }
20192 _ACEOF
20193 rm -f conftest.$ac_objext
20194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20195   (eval $ac_compile) 2>conftest.er1
20196   ac_status=$?
20197   grep -v '^ *+' conftest.er1 >conftest.err
20198   rm -f conftest.er1
20199   cat conftest.err >&5
20200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20201   (exit $ac_status); } &&
20202          { ac_try='test -z "$ac_c_werror_flag"
20203                          || test ! -s conftest.err'
20204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20205   (eval $ac_try) 2>&5
20206   ac_status=$?
20207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20208   (exit $ac_status); }; } &&
20209          { ac_try='test -s conftest.$ac_objext'
20210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20211   (eval $ac_try) 2>&5
20212   ac_status=$?
20213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20214   (exit $ac_status); }; }; then
20215   ac_lo=0 ac_mid=0
20216   while :; do
20217     cat >conftest.$ac_ext <<_ACEOF
20218 /* confdefs.h.  */
20219 _ACEOF
20220 cat confdefs.h >>conftest.$ac_ext
20221 cat >>conftest.$ac_ext <<_ACEOF
20222 /* end confdefs.h.  */
20223 $ac_includes_default
20224 struct { char filler; long field; } pgac_struct;
20225 int
20226 main ()
20227 {
20228 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20229 test_array [0] = 0
20230
20231   ;
20232   return 0;
20233 }
20234 _ACEOF
20235 rm -f conftest.$ac_objext
20236 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20237   (eval $ac_compile) 2>conftest.er1
20238   ac_status=$?
20239   grep -v '^ *+' conftest.er1 >conftest.err
20240   rm -f conftest.er1
20241   cat conftest.err >&5
20242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20243   (exit $ac_status); } &&
20244          { ac_try='test -z "$ac_c_werror_flag"
20245                          || test ! -s conftest.err'
20246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20247   (eval $ac_try) 2>&5
20248   ac_status=$?
20249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20250   (exit $ac_status); }; } &&
20251          { ac_try='test -s conftest.$ac_objext'
20252   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20253   (eval $ac_try) 2>&5
20254   ac_status=$?
20255   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20256   (exit $ac_status); }; }; then
20257   ac_hi=$ac_mid; break
20258 else
20259   echo "$as_me: failed program was:" >&5
20260 sed 's/^/| /' conftest.$ac_ext >&5
20261
20262 ac_lo=`expr $ac_mid + 1`
20263                     if test $ac_lo -le $ac_mid; then
20264                       ac_lo= ac_hi=
20265                       break
20266                     fi
20267                     ac_mid=`expr 2 '*' $ac_mid + 1`
20268 fi
20269 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20270   done
20271 else
20272   echo "$as_me: failed program was:" >&5
20273 sed 's/^/| /' conftest.$ac_ext >&5
20274
20275 cat >conftest.$ac_ext <<_ACEOF
20276 /* confdefs.h.  */
20277 _ACEOF
20278 cat confdefs.h >>conftest.$ac_ext
20279 cat >>conftest.$ac_ext <<_ACEOF
20280 /* end confdefs.h.  */
20281 $ac_includes_default
20282 struct { char filler; long field; } pgac_struct;
20283 int
20284 main ()
20285 {
20286 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20287 test_array [0] = 0
20288
20289   ;
20290   return 0;
20291 }
20292 _ACEOF
20293 rm -f conftest.$ac_objext
20294 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20295   (eval $ac_compile) 2>conftest.er1
20296   ac_status=$?
20297   grep -v '^ *+' conftest.er1 >conftest.err
20298   rm -f conftest.er1
20299   cat conftest.err >&5
20300   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20301   (exit $ac_status); } &&
20302          { ac_try='test -z "$ac_c_werror_flag"
20303                          || test ! -s conftest.err'
20304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20305   (eval $ac_try) 2>&5
20306   ac_status=$?
20307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20308   (exit $ac_status); }; } &&
20309          { ac_try='test -s conftest.$ac_objext'
20310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20311   (eval $ac_try) 2>&5
20312   ac_status=$?
20313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20314   (exit $ac_status); }; }; then
20315   ac_hi=-1 ac_mid=-1
20316   while :; do
20317     cat >conftest.$ac_ext <<_ACEOF
20318 /* confdefs.h.  */
20319 _ACEOF
20320 cat confdefs.h >>conftest.$ac_ext
20321 cat >>conftest.$ac_ext <<_ACEOF
20322 /* end confdefs.h.  */
20323 $ac_includes_default
20324 struct { char filler; long field; } pgac_struct;
20325 int
20326 main ()
20327 {
20328 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20329 test_array [0] = 0
20330
20331   ;
20332   return 0;
20333 }
20334 _ACEOF
20335 rm -f conftest.$ac_objext
20336 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20337   (eval $ac_compile) 2>conftest.er1
20338   ac_status=$?
20339   grep -v '^ *+' conftest.er1 >conftest.err
20340   rm -f conftest.er1
20341   cat conftest.err >&5
20342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20343   (exit $ac_status); } &&
20344          { ac_try='test -z "$ac_c_werror_flag"
20345                          || test ! -s conftest.err'
20346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20347   (eval $ac_try) 2>&5
20348   ac_status=$?
20349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20350   (exit $ac_status); }; } &&
20351          { ac_try='test -s conftest.$ac_objext'
20352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20353   (eval $ac_try) 2>&5
20354   ac_status=$?
20355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20356   (exit $ac_status); }; }; then
20357   ac_lo=$ac_mid; break
20358 else
20359   echo "$as_me: failed program was:" >&5
20360 sed 's/^/| /' conftest.$ac_ext >&5
20361
20362 ac_hi=`expr '(' $ac_mid ')' - 1`
20363                        if test $ac_mid -le $ac_hi; then
20364                          ac_lo= ac_hi=
20365                          break
20366                        fi
20367                        ac_mid=`expr 2 '*' $ac_mid`
20368 fi
20369 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20370   done
20371 else
20372   echo "$as_me: failed program was:" >&5
20373 sed 's/^/| /' conftest.$ac_ext >&5
20374
20375 ac_lo= ac_hi=
20376 fi
20377 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20378 fi
20379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20380 # Binary search between lo and hi bounds.
20381 while test "x$ac_lo" != "x$ac_hi"; do
20382   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20383   cat >conftest.$ac_ext <<_ACEOF
20384 /* confdefs.h.  */
20385 _ACEOF
20386 cat confdefs.h >>conftest.$ac_ext
20387 cat >>conftest.$ac_ext <<_ACEOF
20388 /* end confdefs.h.  */
20389 $ac_includes_default
20390 struct { char filler; long field; } pgac_struct;
20391 int
20392 main ()
20393 {
20394 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20395 test_array [0] = 0
20396
20397   ;
20398   return 0;
20399 }
20400 _ACEOF
20401 rm -f conftest.$ac_objext
20402 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20403   (eval $ac_compile) 2>conftest.er1
20404   ac_status=$?
20405   grep -v '^ *+' conftest.er1 >conftest.err
20406   rm -f conftest.er1
20407   cat conftest.err >&5
20408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20409   (exit $ac_status); } &&
20410          { ac_try='test -z "$ac_c_werror_flag"
20411                          || test ! -s conftest.err'
20412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20413   (eval $ac_try) 2>&5
20414   ac_status=$?
20415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20416   (exit $ac_status); }; } &&
20417          { ac_try='test -s conftest.$ac_objext'
20418   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20419   (eval $ac_try) 2>&5
20420   ac_status=$?
20421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20422   (exit $ac_status); }; }; then
20423   ac_hi=$ac_mid
20424 else
20425   echo "$as_me: failed program was:" >&5
20426 sed 's/^/| /' conftest.$ac_ext >&5
20427
20428 ac_lo=`expr '(' $ac_mid ')' + 1`
20429 fi
20430 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20431 done
20432 case $ac_lo in
20433 ?*) pgac_cv_alignof_long=$ac_lo;;
20434 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20435 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20436    { (exit 1); exit 1; }; } ;;
20437 esac
20438 else
20439   if test "$cross_compiling" = yes; then
20440   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20441 See \`config.log' for more details." >&5
20442 echo "$as_me: error: cannot run test program while cross compiling
20443 See \`config.log' for more details." >&2;}
20444    { (exit 1); exit 1; }; }
20445 else
20446   cat >conftest.$ac_ext <<_ACEOF
20447 /* confdefs.h.  */
20448 _ACEOF
20449 cat confdefs.h >>conftest.$ac_ext
20450 cat >>conftest.$ac_ext <<_ACEOF
20451 /* end confdefs.h.  */
20452 $ac_includes_default
20453 struct { char filler; long field; } pgac_struct;
20454 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20455 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20456 #include <stdio.h>
20457 #include <stdlib.h>
20458 int
20459 main ()
20460 {
20461
20462   FILE *f = fopen ("conftest.val", "w");
20463   if (! f)
20464     exit (1);
20465   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20466     {
20467       long i = longval ();
20468       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20469         exit (1);
20470       fprintf (f, "%ld\n", i);
20471     }
20472   else
20473     {
20474       unsigned long i = ulongval ();
20475       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20476         exit (1);
20477       fprintf (f, "%lu\n", i);
20478     }
20479   exit (ferror (f) || fclose (f) != 0);
20480
20481   ;
20482   return 0;
20483 }
20484 _ACEOF
20485 rm -f conftest$ac_exeext
20486 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20487   (eval $ac_link) 2>&5
20488   ac_status=$?
20489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20490   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20492   (eval $ac_try) 2>&5
20493   ac_status=$?
20494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20495   (exit $ac_status); }; }; then
20496   pgac_cv_alignof_long=`cat conftest.val`
20497 else
20498   echo "$as_me: program exited with status $ac_status" >&5
20499 echo "$as_me: failed program was:" >&5
20500 sed 's/^/| /' conftest.$ac_ext >&5
20501
20502 ( exit $ac_status )
20503 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
20504 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
20505    { (exit 1); exit 1; }; }
20506 fi
20507 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20508 fi
20509 fi
20510 rm -f conftest.val
20511 else
20512   pgac_cv_alignof_long=0
20513 fi
20514 fi
20515 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
20516 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
20517 cat >>confdefs.h <<_ACEOF
20518 #define ALIGNOF_LONG $pgac_cv_alignof_long
20519 _ACEOF
20520
20521
20522 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
20523   echo "$as_me:$LINENO: checking for long long int" >&5
20524 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
20525 if test "${ac_cv_type_long_long_int+set}" = set; then
20526   echo $ECHO_N "(cached) $ECHO_C" >&6
20527 else
20528   cat >conftest.$ac_ext <<_ACEOF
20529 /* confdefs.h.  */
20530 _ACEOF
20531 cat confdefs.h >>conftest.$ac_ext
20532 cat >>conftest.$ac_ext <<_ACEOF
20533 /* end confdefs.h.  */
20534 $ac_includes_default
20535 int
20536 main ()
20537 {
20538 if ((long long int *) 0)
20539   return 0;
20540 if (sizeof (long long int))
20541   return 0;
20542   ;
20543   return 0;
20544 }
20545 _ACEOF
20546 rm -f conftest.$ac_objext
20547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20548   (eval $ac_compile) 2>conftest.er1
20549   ac_status=$?
20550   grep -v '^ *+' conftest.er1 >conftest.err
20551   rm -f conftest.er1
20552   cat conftest.err >&5
20553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20554   (exit $ac_status); } &&
20555          { ac_try='test -z "$ac_c_werror_flag"
20556                          || test ! -s conftest.err'
20557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20558   (eval $ac_try) 2>&5
20559   ac_status=$?
20560   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20561   (exit $ac_status); }; } &&
20562          { ac_try='test -s conftest.$ac_objext'
20563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20564   (eval $ac_try) 2>&5
20565   ac_status=$?
20566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20567   (exit $ac_status); }; }; then
20568   ac_cv_type_long_long_int=yes
20569 else
20570   echo "$as_me: failed program was:" >&5
20571 sed 's/^/| /' conftest.$ac_ext >&5
20572
20573 ac_cv_type_long_long_int=no
20574 fi
20575 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20576 fi
20577 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
20578 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
20579
20580 echo "$as_me:$LINENO: checking alignment of long long int" >&5
20581 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
20582 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
20583   echo $ECHO_N "(cached) $ECHO_C" >&6
20584 else
20585   if test "$ac_cv_type_long_long_int" = yes; then
20586   if test "$cross_compiling" = yes; then
20587   # Depending upon the size, compute the lo and hi bounds.
20588 cat >conftest.$ac_ext <<_ACEOF
20589 /* confdefs.h.  */
20590 _ACEOF
20591 cat confdefs.h >>conftest.$ac_ext
20592 cat >>conftest.$ac_ext <<_ACEOF
20593 /* end confdefs.h.  */
20594 $ac_includes_default
20595 struct { char filler; long long int field; } pgac_struct;
20596 int
20597 main ()
20598 {
20599 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20600 test_array [0] = 0
20601
20602   ;
20603   return 0;
20604 }
20605 _ACEOF
20606 rm -f conftest.$ac_objext
20607 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20608   (eval $ac_compile) 2>conftest.er1
20609   ac_status=$?
20610   grep -v '^ *+' conftest.er1 >conftest.err
20611   rm -f conftest.er1
20612   cat conftest.err >&5
20613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20614   (exit $ac_status); } &&
20615          { ac_try='test -z "$ac_c_werror_flag"
20616                          || test ! -s conftest.err'
20617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20618   (eval $ac_try) 2>&5
20619   ac_status=$?
20620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20621   (exit $ac_status); }; } &&
20622          { ac_try='test -s conftest.$ac_objext'
20623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20624   (eval $ac_try) 2>&5
20625   ac_status=$?
20626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20627   (exit $ac_status); }; }; then
20628   ac_lo=0 ac_mid=0
20629   while :; do
20630     cat >conftest.$ac_ext <<_ACEOF
20631 /* confdefs.h.  */
20632 _ACEOF
20633 cat confdefs.h >>conftest.$ac_ext
20634 cat >>conftest.$ac_ext <<_ACEOF
20635 /* end confdefs.h.  */
20636 $ac_includes_default
20637 struct { char filler; long long int field; } pgac_struct;
20638 int
20639 main ()
20640 {
20641 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20642 test_array [0] = 0
20643
20644   ;
20645   return 0;
20646 }
20647 _ACEOF
20648 rm -f conftest.$ac_objext
20649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20650   (eval $ac_compile) 2>conftest.er1
20651   ac_status=$?
20652   grep -v '^ *+' conftest.er1 >conftest.err
20653   rm -f conftest.er1
20654   cat conftest.err >&5
20655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20656   (exit $ac_status); } &&
20657          { ac_try='test -z "$ac_c_werror_flag"
20658                          || test ! -s conftest.err'
20659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20660   (eval $ac_try) 2>&5
20661   ac_status=$?
20662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20663   (exit $ac_status); }; } &&
20664          { ac_try='test -s conftest.$ac_objext'
20665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20666   (eval $ac_try) 2>&5
20667   ac_status=$?
20668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20669   (exit $ac_status); }; }; then
20670   ac_hi=$ac_mid; break
20671 else
20672   echo "$as_me: failed program was:" >&5
20673 sed 's/^/| /' conftest.$ac_ext >&5
20674
20675 ac_lo=`expr $ac_mid + 1`
20676                     if test $ac_lo -le $ac_mid; then
20677                       ac_lo= ac_hi=
20678                       break
20679                     fi
20680                     ac_mid=`expr 2 '*' $ac_mid + 1`
20681 fi
20682 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20683   done
20684 else
20685   echo "$as_me: failed program was:" >&5
20686 sed 's/^/| /' conftest.$ac_ext >&5
20687
20688 cat >conftest.$ac_ext <<_ACEOF
20689 /* confdefs.h.  */
20690 _ACEOF
20691 cat confdefs.h >>conftest.$ac_ext
20692 cat >>conftest.$ac_ext <<_ACEOF
20693 /* end confdefs.h.  */
20694 $ac_includes_default
20695 struct { char filler; long long int field; } pgac_struct;
20696 int
20697 main ()
20698 {
20699 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20700 test_array [0] = 0
20701
20702   ;
20703   return 0;
20704 }
20705 _ACEOF
20706 rm -f conftest.$ac_objext
20707 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20708   (eval $ac_compile) 2>conftest.er1
20709   ac_status=$?
20710   grep -v '^ *+' conftest.er1 >conftest.err
20711   rm -f conftest.er1
20712   cat conftest.err >&5
20713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20714   (exit $ac_status); } &&
20715          { ac_try='test -z "$ac_c_werror_flag"
20716                          || test ! -s conftest.err'
20717   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20718   (eval $ac_try) 2>&5
20719   ac_status=$?
20720   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20721   (exit $ac_status); }; } &&
20722          { ac_try='test -s conftest.$ac_objext'
20723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20724   (eval $ac_try) 2>&5
20725   ac_status=$?
20726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20727   (exit $ac_status); }; }; then
20728   ac_hi=-1 ac_mid=-1
20729   while :; do
20730     cat >conftest.$ac_ext <<_ACEOF
20731 /* confdefs.h.  */
20732 _ACEOF
20733 cat confdefs.h >>conftest.$ac_ext
20734 cat >>conftest.$ac_ext <<_ACEOF
20735 /* end confdefs.h.  */
20736 $ac_includes_default
20737 struct { char filler; long long int field; } pgac_struct;
20738 int
20739 main ()
20740 {
20741 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20742 test_array [0] = 0
20743
20744   ;
20745   return 0;
20746 }
20747 _ACEOF
20748 rm -f conftest.$ac_objext
20749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20750   (eval $ac_compile) 2>conftest.er1
20751   ac_status=$?
20752   grep -v '^ *+' conftest.er1 >conftest.err
20753   rm -f conftest.er1
20754   cat conftest.err >&5
20755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20756   (exit $ac_status); } &&
20757          { ac_try='test -z "$ac_c_werror_flag"
20758                          || test ! -s conftest.err'
20759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20760   (eval $ac_try) 2>&5
20761   ac_status=$?
20762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20763   (exit $ac_status); }; } &&
20764          { ac_try='test -s conftest.$ac_objext'
20765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20766   (eval $ac_try) 2>&5
20767   ac_status=$?
20768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20769   (exit $ac_status); }; }; then
20770   ac_lo=$ac_mid; break
20771 else
20772   echo "$as_me: failed program was:" >&5
20773 sed 's/^/| /' conftest.$ac_ext >&5
20774
20775 ac_hi=`expr '(' $ac_mid ')' - 1`
20776                        if test $ac_mid -le $ac_hi; then
20777                          ac_lo= ac_hi=
20778                          break
20779                        fi
20780                        ac_mid=`expr 2 '*' $ac_mid`
20781 fi
20782 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20783   done
20784 else
20785   echo "$as_me: failed program was:" >&5
20786 sed 's/^/| /' conftest.$ac_ext >&5
20787
20788 ac_lo= ac_hi=
20789 fi
20790 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20791 fi
20792 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20793 # Binary search between lo and hi bounds.
20794 while test "x$ac_lo" != "x$ac_hi"; do
20795   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20796   cat >conftest.$ac_ext <<_ACEOF
20797 /* confdefs.h.  */
20798 _ACEOF
20799 cat confdefs.h >>conftest.$ac_ext
20800 cat >>conftest.$ac_ext <<_ACEOF
20801 /* end confdefs.h.  */
20802 $ac_includes_default
20803 struct { char filler; long long int field; } pgac_struct;
20804 int
20805 main ()
20806 {
20807 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20808 test_array [0] = 0
20809
20810   ;
20811   return 0;
20812 }
20813 _ACEOF
20814 rm -f conftest.$ac_objext
20815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20816   (eval $ac_compile) 2>conftest.er1
20817   ac_status=$?
20818   grep -v '^ *+' conftest.er1 >conftest.err
20819   rm -f conftest.er1
20820   cat conftest.err >&5
20821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20822   (exit $ac_status); } &&
20823          { ac_try='test -z "$ac_c_werror_flag"
20824                          || test ! -s conftest.err'
20825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20826   (eval $ac_try) 2>&5
20827   ac_status=$?
20828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20829   (exit $ac_status); }; } &&
20830          { ac_try='test -s conftest.$ac_objext'
20831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20832   (eval $ac_try) 2>&5
20833   ac_status=$?
20834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20835   (exit $ac_status); }; }; then
20836   ac_hi=$ac_mid
20837 else
20838   echo "$as_me: failed program was:" >&5
20839 sed 's/^/| /' conftest.$ac_ext >&5
20840
20841 ac_lo=`expr '(' $ac_mid ')' + 1`
20842 fi
20843 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20844 done
20845 case $ac_lo in
20846 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20847 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20848 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20849    { (exit 1); exit 1; }; } ;;
20850 esac
20851 else
20852   if test "$cross_compiling" = yes; then
20853   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20854 See \`config.log' for more details." >&5
20855 echo "$as_me: error: cannot run test program while cross compiling
20856 See \`config.log' for more details." >&2;}
20857    { (exit 1); exit 1; }; }
20858 else
20859   cat >conftest.$ac_ext <<_ACEOF
20860 /* confdefs.h.  */
20861 _ACEOF
20862 cat confdefs.h >>conftest.$ac_ext
20863 cat >>conftest.$ac_ext <<_ACEOF
20864 /* end confdefs.h.  */
20865 $ac_includes_default
20866 struct { char filler; long long int field; } pgac_struct;
20867 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20868 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20869 #include <stdio.h>
20870 #include <stdlib.h>
20871 int
20872 main ()
20873 {
20874
20875   FILE *f = fopen ("conftest.val", "w");
20876   if (! f)
20877     exit (1);
20878   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20879     {
20880       long i = longval ();
20881       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20882         exit (1);
20883       fprintf (f, "%ld\n", i);
20884     }
20885   else
20886     {
20887       unsigned long i = ulongval ();
20888       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20889         exit (1);
20890       fprintf (f, "%lu\n", i);
20891     }
20892   exit (ferror (f) || fclose (f) != 0);
20893
20894   ;
20895   return 0;
20896 }
20897 _ACEOF
20898 rm -f conftest$ac_exeext
20899 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20900   (eval $ac_link) 2>&5
20901   ac_status=$?
20902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20903   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20905   (eval $ac_try) 2>&5
20906   ac_status=$?
20907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20908   (exit $ac_status); }; }; then
20909   pgac_cv_alignof_long_long_int=`cat conftest.val`
20910 else
20911   echo "$as_me: program exited with status $ac_status" >&5
20912 echo "$as_me: failed program was:" >&5
20913 sed 's/^/| /' conftest.$ac_ext >&5
20914
20915 ( exit $ac_status )
20916 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20917 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20918    { (exit 1); exit 1; }; }
20919 fi
20920 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20921 fi
20922 fi
20923 rm -f conftest.val
20924 else
20925   pgac_cv_alignof_long_long_int=0
20926 fi
20927 fi
20928 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20929 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20930 cat >>confdefs.h <<_ACEOF
20931 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20932 _ACEOF
20933
20934
20935 fi
20936 echo "$as_me:$LINENO: checking for double" >&5
20937 echo $ECHO_N "checking for double... $ECHO_C" >&6
20938 if test "${ac_cv_type_double+set}" = set; then
20939   echo $ECHO_N "(cached) $ECHO_C" >&6
20940 else
20941   cat >conftest.$ac_ext <<_ACEOF
20942 /* confdefs.h.  */
20943 _ACEOF
20944 cat confdefs.h >>conftest.$ac_ext
20945 cat >>conftest.$ac_ext <<_ACEOF
20946 /* end confdefs.h.  */
20947 $ac_includes_default
20948 int
20949 main ()
20950 {
20951 if ((double *) 0)
20952   return 0;
20953 if (sizeof (double))
20954   return 0;
20955   ;
20956   return 0;
20957 }
20958 _ACEOF
20959 rm -f conftest.$ac_objext
20960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20961   (eval $ac_compile) 2>conftest.er1
20962   ac_status=$?
20963   grep -v '^ *+' conftest.er1 >conftest.err
20964   rm -f conftest.er1
20965   cat conftest.err >&5
20966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20967   (exit $ac_status); } &&
20968          { ac_try='test -z "$ac_c_werror_flag"
20969                          || test ! -s conftest.err'
20970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20971   (eval $ac_try) 2>&5
20972   ac_status=$?
20973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20974   (exit $ac_status); }; } &&
20975          { ac_try='test -s conftest.$ac_objext'
20976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20977   (eval $ac_try) 2>&5
20978   ac_status=$?
20979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20980   (exit $ac_status); }; }; then
20981   ac_cv_type_double=yes
20982 else
20983   echo "$as_me: failed program was:" >&5
20984 sed 's/^/| /' conftest.$ac_ext >&5
20985
20986 ac_cv_type_double=no
20987 fi
20988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20989 fi
20990 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20991 echo "${ECHO_T}$ac_cv_type_double" >&6
20992
20993 echo "$as_me:$LINENO: checking alignment of double" >&5
20994 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20995 if test "${pgac_cv_alignof_double+set}" = set; then
20996   echo $ECHO_N "(cached) $ECHO_C" >&6
20997 else
20998   if test "$ac_cv_type_double" = yes; then
20999   if test "$cross_compiling" = yes; then
21000   # Depending upon the size, compute the lo and hi bounds.
21001 cat >conftest.$ac_ext <<_ACEOF
21002 /* confdefs.h.  */
21003 _ACEOF
21004 cat confdefs.h >>conftest.$ac_ext
21005 cat >>conftest.$ac_ext <<_ACEOF
21006 /* end confdefs.h.  */
21007 $ac_includes_default
21008 struct { char filler; double field; } pgac_struct;
21009 int
21010 main ()
21011 {
21012 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
21013 test_array [0] = 0
21014
21015   ;
21016   return 0;
21017 }
21018 _ACEOF
21019 rm -f conftest.$ac_objext
21020 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21021   (eval $ac_compile) 2>conftest.er1
21022   ac_status=$?
21023   grep -v '^ *+' conftest.er1 >conftest.err
21024   rm -f conftest.er1
21025   cat conftest.err >&5
21026   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027   (exit $ac_status); } &&
21028          { ac_try='test -z "$ac_c_werror_flag"
21029                          || test ! -s conftest.err'
21030   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21031   (eval $ac_try) 2>&5
21032   ac_status=$?
21033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21034   (exit $ac_status); }; } &&
21035          { ac_try='test -s conftest.$ac_objext'
21036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21037   (eval $ac_try) 2>&5
21038   ac_status=$?
21039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21040   (exit $ac_status); }; }; then
21041   ac_lo=0 ac_mid=0
21042   while :; do
21043     cat >conftest.$ac_ext <<_ACEOF
21044 /* confdefs.h.  */
21045 _ACEOF
21046 cat confdefs.h >>conftest.$ac_ext
21047 cat >>conftest.$ac_ext <<_ACEOF
21048 /* end confdefs.h.  */
21049 $ac_includes_default
21050 struct { char filler; double field; } pgac_struct;
21051 int
21052 main ()
21053 {
21054 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
21055 test_array [0] = 0
21056
21057   ;
21058   return 0;
21059 }
21060 _ACEOF
21061 rm -f conftest.$ac_objext
21062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21063   (eval $ac_compile) 2>conftest.er1
21064   ac_status=$?
21065   grep -v '^ *+' conftest.er1 >conftest.err
21066   rm -f conftest.er1
21067   cat conftest.err >&5
21068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21069   (exit $ac_status); } &&
21070          { ac_try='test -z "$ac_c_werror_flag"
21071                          || test ! -s conftest.err'
21072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21073   (eval $ac_try) 2>&5
21074   ac_status=$?
21075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21076   (exit $ac_status); }; } &&
21077          { ac_try='test -s conftest.$ac_objext'
21078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21079   (eval $ac_try) 2>&5
21080   ac_status=$?
21081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21082   (exit $ac_status); }; }; then
21083   ac_hi=$ac_mid; break
21084 else
21085   echo "$as_me: failed program was:" >&5
21086 sed 's/^/| /' conftest.$ac_ext >&5
21087
21088 ac_lo=`expr $ac_mid + 1`
21089                     if test $ac_lo -le $ac_mid; then
21090                       ac_lo= ac_hi=
21091                       break
21092                     fi
21093                     ac_mid=`expr 2 '*' $ac_mid + 1`
21094 fi
21095 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21096   done
21097 else
21098   echo "$as_me: failed program was:" >&5
21099 sed 's/^/| /' conftest.$ac_ext >&5
21100
21101 cat >conftest.$ac_ext <<_ACEOF
21102 /* confdefs.h.  */
21103 _ACEOF
21104 cat confdefs.h >>conftest.$ac_ext
21105 cat >>conftest.$ac_ext <<_ACEOF
21106 /* end confdefs.h.  */
21107 $ac_includes_default
21108 struct { char filler; double field; } pgac_struct;
21109 int
21110 main ()
21111 {
21112 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
21113 test_array [0] = 0
21114
21115   ;
21116   return 0;
21117 }
21118 _ACEOF
21119 rm -f conftest.$ac_objext
21120 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21121   (eval $ac_compile) 2>conftest.er1
21122   ac_status=$?
21123   grep -v '^ *+' conftest.er1 >conftest.err
21124   rm -f conftest.er1
21125   cat conftest.err >&5
21126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21127   (exit $ac_status); } &&
21128          { ac_try='test -z "$ac_c_werror_flag"
21129                          || test ! -s conftest.err'
21130   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21131   (eval $ac_try) 2>&5
21132   ac_status=$?
21133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21134   (exit $ac_status); }; } &&
21135          { ac_try='test -s conftest.$ac_objext'
21136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21137   (eval $ac_try) 2>&5
21138   ac_status=$?
21139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21140   (exit $ac_status); }; }; then
21141   ac_hi=-1 ac_mid=-1
21142   while :; do
21143     cat >conftest.$ac_ext <<_ACEOF
21144 /* confdefs.h.  */
21145 _ACEOF
21146 cat confdefs.h >>conftest.$ac_ext
21147 cat >>conftest.$ac_ext <<_ACEOF
21148 /* end confdefs.h.  */
21149 $ac_includes_default
21150 struct { char filler; double field; } pgac_struct;
21151 int
21152 main ()
21153 {
21154 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
21155 test_array [0] = 0
21156
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 rm -f conftest.$ac_objext
21162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21163   (eval $ac_compile) 2>conftest.er1
21164   ac_status=$?
21165   grep -v '^ *+' conftest.er1 >conftest.err
21166   rm -f conftest.er1
21167   cat conftest.err >&5
21168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21169   (exit $ac_status); } &&
21170          { ac_try='test -z "$ac_c_werror_flag"
21171                          || test ! -s conftest.err'
21172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21173   (eval $ac_try) 2>&5
21174   ac_status=$?
21175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21176   (exit $ac_status); }; } &&
21177          { ac_try='test -s conftest.$ac_objext'
21178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21179   (eval $ac_try) 2>&5
21180   ac_status=$?
21181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21182   (exit $ac_status); }; }; then
21183   ac_lo=$ac_mid; break
21184 else
21185   echo "$as_me: failed program was:" >&5
21186 sed 's/^/| /' conftest.$ac_ext >&5
21187
21188 ac_hi=`expr '(' $ac_mid ')' - 1`
21189                        if test $ac_mid -le $ac_hi; then
21190                          ac_lo= ac_hi=
21191                          break
21192                        fi
21193                        ac_mid=`expr 2 '*' $ac_mid`
21194 fi
21195 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21196   done
21197 else
21198   echo "$as_me: failed program was:" >&5
21199 sed 's/^/| /' conftest.$ac_ext >&5
21200
21201 ac_lo= ac_hi=
21202 fi
21203 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21204 fi
21205 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21206 # Binary search between lo and hi bounds.
21207 while test "x$ac_lo" != "x$ac_hi"; do
21208   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21209   cat >conftest.$ac_ext <<_ACEOF
21210 /* confdefs.h.  */
21211 _ACEOF
21212 cat confdefs.h >>conftest.$ac_ext
21213 cat >>conftest.$ac_ext <<_ACEOF
21214 /* end confdefs.h.  */
21215 $ac_includes_default
21216 struct { char filler; double field; } pgac_struct;
21217 int
21218 main ()
21219 {
21220 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
21221 test_array [0] = 0
21222
21223   ;
21224   return 0;
21225 }
21226 _ACEOF
21227 rm -f conftest.$ac_objext
21228 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21229   (eval $ac_compile) 2>conftest.er1
21230   ac_status=$?
21231   grep -v '^ *+' conftest.er1 >conftest.err
21232   rm -f conftest.er1
21233   cat conftest.err >&5
21234   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21235   (exit $ac_status); } &&
21236          { ac_try='test -z "$ac_c_werror_flag"
21237                          || test ! -s conftest.err'
21238   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21239   (eval $ac_try) 2>&5
21240   ac_status=$?
21241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21242   (exit $ac_status); }; } &&
21243          { ac_try='test -s conftest.$ac_objext'
21244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21245   (eval $ac_try) 2>&5
21246   ac_status=$?
21247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21248   (exit $ac_status); }; }; then
21249   ac_hi=$ac_mid
21250 else
21251   echo "$as_me: failed program was:" >&5
21252 sed 's/^/| /' conftest.$ac_ext >&5
21253
21254 ac_lo=`expr '(' $ac_mid ')' + 1`
21255 fi
21256 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21257 done
21258 case $ac_lo in
21259 ?*) pgac_cv_alignof_double=$ac_lo;;
21260 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21261 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21262    { (exit 1); exit 1; }; } ;;
21263 esac
21264 else
21265   if test "$cross_compiling" = yes; then
21266   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
21267 See \`config.log' for more details." >&5
21268 echo "$as_me: error: cannot run test program while cross compiling
21269 See \`config.log' for more details." >&2;}
21270    { (exit 1); exit 1; }; }
21271 else
21272   cat >conftest.$ac_ext <<_ACEOF
21273 /* confdefs.h.  */
21274 _ACEOF
21275 cat confdefs.h >>conftest.$ac_ext
21276 cat >>conftest.$ac_ext <<_ACEOF
21277 /* end confdefs.h.  */
21278 $ac_includes_default
21279 struct { char filler; double field; } pgac_struct;
21280 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21281 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
21282 #include <stdio.h>
21283 #include <stdlib.h>
21284 int
21285 main ()
21286 {
21287
21288   FILE *f = fopen ("conftest.val", "w");
21289   if (! f)
21290     exit (1);
21291   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
21292     {
21293       long i = longval ();
21294       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21295         exit (1);
21296       fprintf (f, "%ld\n", i);
21297     }
21298   else
21299     {
21300       unsigned long i = ulongval ();
21301       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
21302         exit (1);
21303       fprintf (f, "%lu\n", i);
21304     }
21305   exit (ferror (f) || fclose (f) != 0);
21306
21307   ;
21308   return 0;
21309 }
21310 _ACEOF
21311 rm -f conftest$ac_exeext
21312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21313   (eval $ac_link) 2>&5
21314   ac_status=$?
21315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21318   (eval $ac_try) 2>&5
21319   ac_status=$?
21320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21321   (exit $ac_status); }; }; then
21322   pgac_cv_alignof_double=`cat conftest.val`
21323 else
21324   echo "$as_me: program exited with status $ac_status" >&5
21325 echo "$as_me: failed program was:" >&5
21326 sed 's/^/| /' conftest.$ac_ext >&5
21327
21328 ( exit $ac_status )
21329 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
21330 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
21331    { (exit 1); exit 1; }; }
21332 fi
21333 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21334 fi
21335 fi
21336 rm -f conftest.val
21337 else
21338   pgac_cv_alignof_double=0
21339 fi
21340 fi
21341 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
21342 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
21343 cat >>confdefs.h <<_ACEOF
21344 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
21345 _ACEOF
21346
21347
21348
21349 # Compute maximum alignment of any basic type.
21350 # We assume long's alignment is at least as strong as char, short, or int;
21351 # but we must check long long (if it exists) and double.
21352
21353 MAX_ALIGNOF=$pgac_cv_alignof_long
21354 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
21355   MAX_ALIGNOF=$pgac_cv_alignof_double
21356 fi
21357 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
21358   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
21359 fi
21360
21361 cat >>confdefs.h <<_ACEOF
21362 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
21363 _ACEOF
21364
21365
21366
21367 # Some platforms predefine the types int8, int16, etc.  Only check
21368 # a (hopefully) representative subset.
21369 echo "$as_me:$LINENO: checking for int8" >&5
21370 echo $ECHO_N "checking for int8... $ECHO_C" >&6
21371 if test "${ac_cv_type_int8+set}" = set; then
21372   echo $ECHO_N "(cached) $ECHO_C" >&6
21373 else
21374   cat >conftest.$ac_ext <<_ACEOF
21375 /* confdefs.h.  */
21376 _ACEOF
21377 cat confdefs.h >>conftest.$ac_ext
21378 cat >>conftest.$ac_ext <<_ACEOF
21379 /* end confdefs.h.  */
21380 #include <stdio.h>
21381 #ifdef HAVE_SUPPORTDEFS_H
21382 #include <SupportDefs.h>
21383 #endif
21384
21385 int
21386 main ()
21387 {
21388 if ((int8 *) 0)
21389   return 0;
21390 if (sizeof (int8))
21391   return 0;
21392   ;
21393   return 0;
21394 }
21395 _ACEOF
21396 rm -f conftest.$ac_objext
21397 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21398   (eval $ac_compile) 2>conftest.er1
21399   ac_status=$?
21400   grep -v '^ *+' conftest.er1 >conftest.err
21401   rm -f conftest.er1
21402   cat conftest.err >&5
21403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21404   (exit $ac_status); } &&
21405          { ac_try='test -z "$ac_c_werror_flag"
21406                          || test ! -s conftest.err'
21407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21408   (eval $ac_try) 2>&5
21409   ac_status=$?
21410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21411   (exit $ac_status); }; } &&
21412          { ac_try='test -s conftest.$ac_objext'
21413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21417   (exit $ac_status); }; }; then
21418   ac_cv_type_int8=yes
21419 else
21420   echo "$as_me: failed program was:" >&5
21421 sed 's/^/| /' conftest.$ac_ext >&5
21422
21423 ac_cv_type_int8=no
21424 fi
21425 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21426 fi
21427 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
21428 echo "${ECHO_T}$ac_cv_type_int8" >&6
21429 if test $ac_cv_type_int8 = yes; then
21430
21431 cat >>confdefs.h <<_ACEOF
21432 #define HAVE_INT8 1
21433 _ACEOF
21434
21435
21436 fi
21437 echo "$as_me:$LINENO: checking for uint8" >&5
21438 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
21439 if test "${ac_cv_type_uint8+set}" = set; then
21440   echo $ECHO_N "(cached) $ECHO_C" >&6
21441 else
21442   cat >conftest.$ac_ext <<_ACEOF
21443 /* confdefs.h.  */
21444 _ACEOF
21445 cat confdefs.h >>conftest.$ac_ext
21446 cat >>conftest.$ac_ext <<_ACEOF
21447 /* end confdefs.h.  */
21448 #include <stdio.h>
21449 #ifdef HAVE_SUPPORTDEFS_H
21450 #include <SupportDefs.h>
21451 #endif
21452
21453 int
21454 main ()
21455 {
21456 if ((uint8 *) 0)
21457   return 0;
21458 if (sizeof (uint8))
21459   return 0;
21460   ;
21461   return 0;
21462 }
21463 _ACEOF
21464 rm -f conftest.$ac_objext
21465 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21466   (eval $ac_compile) 2>conftest.er1
21467   ac_status=$?
21468   grep -v '^ *+' conftest.er1 >conftest.err
21469   rm -f conftest.er1
21470   cat conftest.err >&5
21471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21472   (exit $ac_status); } &&
21473          { ac_try='test -z "$ac_c_werror_flag"
21474                          || test ! -s conftest.err'
21475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21476   (eval $ac_try) 2>&5
21477   ac_status=$?
21478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21479   (exit $ac_status); }; } &&
21480          { ac_try='test -s conftest.$ac_objext'
21481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21482   (eval $ac_try) 2>&5
21483   ac_status=$?
21484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21485   (exit $ac_status); }; }; then
21486   ac_cv_type_uint8=yes
21487 else
21488   echo "$as_me: failed program was:" >&5
21489 sed 's/^/| /' conftest.$ac_ext >&5
21490
21491 ac_cv_type_uint8=no
21492 fi
21493 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21494 fi
21495 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
21496 echo "${ECHO_T}$ac_cv_type_uint8" >&6
21497 if test $ac_cv_type_uint8 = yes; then
21498
21499 cat >>confdefs.h <<_ACEOF
21500 #define HAVE_UINT8 1
21501 _ACEOF
21502
21503
21504 fi
21505 echo "$as_me:$LINENO: checking for int64" >&5
21506 echo $ECHO_N "checking for int64... $ECHO_C" >&6
21507 if test "${ac_cv_type_int64+set}" = set; then
21508   echo $ECHO_N "(cached) $ECHO_C" >&6
21509 else
21510   cat >conftest.$ac_ext <<_ACEOF
21511 /* confdefs.h.  */
21512 _ACEOF
21513 cat confdefs.h >>conftest.$ac_ext
21514 cat >>conftest.$ac_ext <<_ACEOF
21515 /* end confdefs.h.  */
21516 #include <stdio.h>
21517 #ifdef HAVE_SUPPORTDEFS_H
21518 #include <SupportDefs.h>
21519 #endif
21520
21521 int
21522 main ()
21523 {
21524 if ((int64 *) 0)
21525   return 0;
21526 if (sizeof (int64))
21527   return 0;
21528   ;
21529   return 0;
21530 }
21531 _ACEOF
21532 rm -f conftest.$ac_objext
21533 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21534   (eval $ac_compile) 2>conftest.er1
21535   ac_status=$?
21536   grep -v '^ *+' conftest.er1 >conftest.err
21537   rm -f conftest.er1
21538   cat conftest.err >&5
21539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21540   (exit $ac_status); } &&
21541          { ac_try='test -z "$ac_c_werror_flag"
21542                          || test ! -s conftest.err'
21543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21547   (exit $ac_status); }; } &&
21548          { ac_try='test -s conftest.$ac_objext'
21549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21550   (eval $ac_try) 2>&5
21551   ac_status=$?
21552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21553   (exit $ac_status); }; }; then
21554   ac_cv_type_int64=yes
21555 else
21556   echo "$as_me: failed program was:" >&5
21557 sed 's/^/| /' conftest.$ac_ext >&5
21558
21559 ac_cv_type_int64=no
21560 fi
21561 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21562 fi
21563 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
21564 echo "${ECHO_T}$ac_cv_type_int64" >&6
21565 if test $ac_cv_type_int64 = yes; then
21566
21567 cat >>confdefs.h <<_ACEOF
21568 #define HAVE_INT64 1
21569 _ACEOF
21570
21571
21572 fi
21573 echo "$as_me:$LINENO: checking for uint64" >&5
21574 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
21575 if test "${ac_cv_type_uint64+set}" = set; then
21576   echo $ECHO_N "(cached) $ECHO_C" >&6
21577 else
21578   cat >conftest.$ac_ext <<_ACEOF
21579 /* confdefs.h.  */
21580 _ACEOF
21581 cat confdefs.h >>conftest.$ac_ext
21582 cat >>conftest.$ac_ext <<_ACEOF
21583 /* end confdefs.h.  */
21584 #include <stdio.h>
21585 #ifdef HAVE_SUPPORTDEFS_H
21586 #include <SupportDefs.h>
21587 #endif
21588
21589 int
21590 main ()
21591 {
21592 if ((uint64 *) 0)
21593   return 0;
21594 if (sizeof (uint64))
21595   return 0;
21596   ;
21597   return 0;
21598 }
21599 _ACEOF
21600 rm -f conftest.$ac_objext
21601 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21602   (eval $ac_compile) 2>conftest.er1
21603   ac_status=$?
21604   grep -v '^ *+' conftest.er1 >conftest.err
21605   rm -f conftest.er1
21606   cat conftest.err >&5
21607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21608   (exit $ac_status); } &&
21609          { ac_try='test -z "$ac_c_werror_flag"
21610                          || test ! -s conftest.err'
21611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21612   (eval $ac_try) 2>&5
21613   ac_status=$?
21614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21615   (exit $ac_status); }; } &&
21616          { ac_try='test -s conftest.$ac_objext'
21617   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21618   (eval $ac_try) 2>&5
21619   ac_status=$?
21620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21621   (exit $ac_status); }; }; then
21622   ac_cv_type_uint64=yes
21623 else
21624   echo "$as_me: failed program was:" >&5
21625 sed 's/^/| /' conftest.$ac_ext >&5
21626
21627 ac_cv_type_uint64=no
21628 fi
21629 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21630 fi
21631 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
21632 echo "${ECHO_T}$ac_cv_type_uint64" >&6
21633 if test $ac_cv_type_uint64 = yes; then
21634
21635 cat >>confdefs.h <<_ACEOF
21636 #define HAVE_UINT64 1
21637 _ACEOF
21638
21639
21640 fi
21641
21642
21643 # We also check for sig_atomic_t, which *should* be defined per ANSI
21644 # C, but is missing on some old platforms.
21645 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
21646 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
21647 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
21648   echo $ECHO_N "(cached) $ECHO_C" >&6
21649 else
21650   cat >conftest.$ac_ext <<_ACEOF
21651 /* confdefs.h.  */
21652 _ACEOF
21653 cat confdefs.h >>conftest.$ac_ext
21654 cat >>conftest.$ac_ext <<_ACEOF
21655 /* end confdefs.h.  */
21656 #include <signal.h>
21657
21658 int
21659 main ()
21660 {
21661 if ((sig_atomic_t *) 0)
21662   return 0;
21663 if (sizeof (sig_atomic_t))
21664   return 0;
21665   ;
21666   return 0;
21667 }
21668 _ACEOF
21669 rm -f conftest.$ac_objext
21670 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21671   (eval $ac_compile) 2>conftest.er1
21672   ac_status=$?
21673   grep -v '^ *+' conftest.er1 >conftest.err
21674   rm -f conftest.er1
21675   cat conftest.err >&5
21676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21677   (exit $ac_status); } &&
21678          { ac_try='test -z "$ac_c_werror_flag"
21679                          || test ! -s conftest.err'
21680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21681   (eval $ac_try) 2>&5
21682   ac_status=$?
21683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21684   (exit $ac_status); }; } &&
21685          { ac_try='test -s conftest.$ac_objext'
21686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21687   (eval $ac_try) 2>&5
21688   ac_status=$?
21689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21690   (exit $ac_status); }; }; then
21691   ac_cv_type_sig_atomic_t=yes
21692 else
21693   echo "$as_me: failed program was:" >&5
21694 sed 's/^/| /' conftest.$ac_ext >&5
21695
21696 ac_cv_type_sig_atomic_t=no
21697 fi
21698 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21699 fi
21700 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
21701 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
21702 if test $ac_cv_type_sig_atomic_t = yes; then
21703
21704 cat >>confdefs.h <<_ACEOF
21705 #define HAVE_SIG_ATOMIC_T 1
21706 _ACEOF
21707
21708
21709 fi
21710
21711
21712
21713 if test x"$template" != x"win32"
21714 then
21715 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
21716 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
21717 if test "${pgac_cv_func_posix_signals+set}" = set; then
21718   echo $ECHO_N "(cached) $ECHO_C" >&6
21719 else
21720   cat >conftest.$ac_ext <<_ACEOF
21721 /* confdefs.h.  */
21722 _ACEOF
21723 cat confdefs.h >>conftest.$ac_ext
21724 cat >>conftest.$ac_ext <<_ACEOF
21725 /* end confdefs.h.  */
21726 #include <signal.h>
21727
21728 int
21729 main ()
21730 {
21731 struct sigaction act, oact;
21732 sigemptyset(&act.sa_mask);
21733 act.sa_flags = SA_RESTART;
21734 sigaction(0, &act, &oact);
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 rm -f conftest.$ac_objext conftest$ac_exeext
21740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21741   (eval $ac_link) 2>conftest.er1
21742   ac_status=$?
21743   grep -v '^ *+' conftest.er1 >conftest.err
21744   rm -f conftest.er1
21745   cat conftest.err >&5
21746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21747   (exit $ac_status); } &&
21748          { ac_try='test -z "$ac_c_werror_flag"
21749                          || test ! -s conftest.err'
21750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21751   (eval $ac_try) 2>&5
21752   ac_status=$?
21753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21754   (exit $ac_status); }; } &&
21755          { ac_try='test -s conftest$ac_exeext'
21756   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21757   (eval $ac_try) 2>&5
21758   ac_status=$?
21759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21760   (exit $ac_status); }; }; then
21761   pgac_cv_func_posix_signals=yes
21762 else
21763   echo "$as_me: failed program was:" >&5
21764 sed 's/^/| /' conftest.$ac_ext >&5
21765
21766 pgac_cv_func_posix_signals=no
21767 fi
21768 rm -f conftest.err conftest.$ac_objext \
21769       conftest$ac_exeext conftest.$ac_ext
21770 fi
21771 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
21772 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
21773 if test x"$pgac_cv_func_posix_signals" = xyes ; then
21774
21775 cat >>confdefs.h <<\_ACEOF
21776 #define HAVE_POSIX_SIGNALS
21777 _ACEOF
21778
21779 fi
21780 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
21781
21782 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
21783   { { echo "$as_me:$LINENO: error:
21784 Thread-safety requires POSIX signals, which are not supported by this
21785 operating system." >&5
21786 echo "$as_me: error:
21787 Thread-safety requires POSIX signals, which are not supported by this
21788 operating system." >&2;}
21789    { (exit 1); exit 1; }; }
21790 fi
21791 fi
21792
21793 if test $ac_cv_func_fseeko = yes; then
21794 # Check whether --enable-largefile or --disable-largefile was given.
21795 if test "${enable_largefile+set}" = set; then
21796   enableval="$enable_largefile"
21797
21798 fi;
21799 if test "$enable_largefile" != no; then
21800
21801   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21802 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21803 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21804   echo $ECHO_N "(cached) $ECHO_C" >&6
21805 else
21806   ac_cv_sys_largefile_CC=no
21807      if test "$GCC" != yes; then
21808        ac_save_CC=$CC
21809        while :; do
21810          # IRIX 6.2 and later do not support large files by default,
21811          # so use the C compiler's -n32 option if that helps.
21812          cat >conftest.$ac_ext <<_ACEOF
21813 /* confdefs.h.  */
21814 _ACEOF
21815 cat confdefs.h >>conftest.$ac_ext
21816 cat >>conftest.$ac_ext <<_ACEOF
21817 /* end confdefs.h.  */
21818 #include <sys/types.h>
21819  /* Check that off_t can represent 2**63 - 1 correctly.
21820     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21821     since some C++ compilers masquerading as C compilers
21822     incorrectly reject 9223372036854775807.  */
21823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21824   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21825                        && LARGE_OFF_T % 2147483647 == 1)
21826                       ? 1 : -1];
21827 int
21828 main ()
21829 {
21830
21831   ;
21832   return 0;
21833 }
21834 _ACEOF
21835          rm -f conftest.$ac_objext
21836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21837   (eval $ac_compile) 2>conftest.er1
21838   ac_status=$?
21839   grep -v '^ *+' conftest.er1 >conftest.err
21840   rm -f conftest.er1
21841   cat conftest.err >&5
21842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21843   (exit $ac_status); } &&
21844          { ac_try='test -z "$ac_c_werror_flag"
21845                          || test ! -s conftest.err'
21846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21847   (eval $ac_try) 2>&5
21848   ac_status=$?
21849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850   (exit $ac_status); }; } &&
21851          { ac_try='test -s conftest.$ac_objext'
21852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21853   (eval $ac_try) 2>&5
21854   ac_status=$?
21855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21856   (exit $ac_status); }; }; then
21857   break
21858 else
21859   echo "$as_me: failed program was:" >&5
21860 sed 's/^/| /' conftest.$ac_ext >&5
21861
21862 fi
21863 rm -f conftest.err conftest.$ac_objext
21864          CC="$CC -n32"
21865          rm -f conftest.$ac_objext
21866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21867   (eval $ac_compile) 2>conftest.er1
21868   ac_status=$?
21869   grep -v '^ *+' conftest.er1 >conftest.err
21870   rm -f conftest.er1
21871   cat conftest.err >&5
21872   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21873   (exit $ac_status); } &&
21874          { ac_try='test -z "$ac_c_werror_flag"
21875                          || test ! -s conftest.err'
21876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21877   (eval $ac_try) 2>&5
21878   ac_status=$?
21879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21880   (exit $ac_status); }; } &&
21881          { ac_try='test -s conftest.$ac_objext'
21882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21883   (eval $ac_try) 2>&5
21884   ac_status=$?
21885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21886   (exit $ac_status); }; }; then
21887   ac_cv_sys_largefile_CC=' -n32'; break
21888 else
21889   echo "$as_me: failed program was:" >&5
21890 sed 's/^/| /' conftest.$ac_ext >&5
21891
21892 fi
21893 rm -f conftest.err conftest.$ac_objext
21894          break
21895        done
21896        CC=$ac_save_CC
21897        rm -f conftest.$ac_ext
21898     fi
21899 fi
21900 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21901 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21902   if test "$ac_cv_sys_largefile_CC" != no; then
21903     CC=$CC$ac_cv_sys_largefile_CC
21904   fi
21905
21906   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21907 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21908 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21909   echo $ECHO_N "(cached) $ECHO_C" >&6
21910 else
21911   while :; do
21912   ac_cv_sys_file_offset_bits=no
21913   cat >conftest.$ac_ext <<_ACEOF
21914 /* confdefs.h.  */
21915 _ACEOF
21916 cat confdefs.h >>conftest.$ac_ext
21917 cat >>conftest.$ac_ext <<_ACEOF
21918 /* end confdefs.h.  */
21919 #include <sys/types.h>
21920  /* Check that off_t can represent 2**63 - 1 correctly.
21921     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21922     since some C++ compilers masquerading as C compilers
21923     incorrectly reject 9223372036854775807.  */
21924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21925   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21926                        && LARGE_OFF_T % 2147483647 == 1)
21927                       ? 1 : -1];
21928 int
21929 main ()
21930 {
21931
21932   ;
21933   return 0;
21934 }
21935 _ACEOF
21936 rm -f conftest.$ac_objext
21937 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21938   (eval $ac_compile) 2>conftest.er1
21939   ac_status=$?
21940   grep -v '^ *+' conftest.er1 >conftest.err
21941   rm -f conftest.er1
21942   cat conftest.err >&5
21943   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21944   (exit $ac_status); } &&
21945          { ac_try='test -z "$ac_c_werror_flag"
21946                          || test ! -s conftest.err'
21947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21948   (eval $ac_try) 2>&5
21949   ac_status=$?
21950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21951   (exit $ac_status); }; } &&
21952          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
21958   break
21959 else
21960   echo "$as_me: failed program was:" >&5
21961 sed 's/^/| /' conftest.$ac_ext >&5
21962
21963 fi
21964 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21965   cat >conftest.$ac_ext <<_ACEOF
21966 /* confdefs.h.  */
21967 _ACEOF
21968 cat confdefs.h >>conftest.$ac_ext
21969 cat >>conftest.$ac_ext <<_ACEOF
21970 /* end confdefs.h.  */
21971 #define _FILE_OFFSET_BITS 64
21972 #include <sys/types.h>
21973  /* Check that off_t can represent 2**63 - 1 correctly.
21974     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21975     since some C++ compilers masquerading as C compilers
21976     incorrectly reject 9223372036854775807.  */
21977 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21978   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21979                        && LARGE_OFF_T % 2147483647 == 1)
21980                       ? 1 : -1];
21981 int
21982 main ()
21983 {
21984
21985   ;
21986   return 0;
21987 }
21988 _ACEOF
21989 rm -f conftest.$ac_objext
21990 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21991   (eval $ac_compile) 2>conftest.er1
21992   ac_status=$?
21993   grep -v '^ *+' conftest.er1 >conftest.err
21994   rm -f conftest.er1
21995   cat conftest.err >&5
21996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21997   (exit $ac_status); } &&
21998          { ac_try='test -z "$ac_c_werror_flag"
21999                          || test ! -s conftest.err'
22000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22001   (eval $ac_try) 2>&5
22002   ac_status=$?
22003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22004   (exit $ac_status); }; } &&
22005          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
22011   ac_cv_sys_file_offset_bits=64; break
22012 else
22013   echo "$as_me: failed program was:" >&5
22014 sed 's/^/| /' conftest.$ac_ext >&5
22015
22016 fi
22017 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22018   break
22019 done
22020 fi
22021 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
22022 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
22023 if test "$ac_cv_sys_file_offset_bits" != no; then
22024
22025 cat >>confdefs.h <<_ACEOF
22026 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
22027 _ACEOF
22028
22029 fi
22030 rm -f conftest*
22031   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
22032 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
22033 if test "${ac_cv_sys_large_files+set}" = set; then
22034   echo $ECHO_N "(cached) $ECHO_C" >&6
22035 else
22036   while :; do
22037   ac_cv_sys_large_files=no
22038   cat >conftest.$ac_ext <<_ACEOF
22039 /* confdefs.h.  */
22040 _ACEOF
22041 cat confdefs.h >>conftest.$ac_ext
22042 cat >>conftest.$ac_ext <<_ACEOF
22043 /* end confdefs.h.  */
22044 #include <sys/types.h>
22045  /* Check that off_t can represent 2**63 - 1 correctly.
22046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
22047     since some C++ compilers masquerading as C compilers
22048     incorrectly reject 9223372036854775807.  */
22049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
22050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
22051                        && LARGE_OFF_T % 2147483647 == 1)
22052                       ? 1 : -1];
22053 int
22054 main ()
22055 {
22056
22057   ;
22058   return 0;
22059 }
22060 _ACEOF
22061 rm -f conftest.$ac_objext
22062 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22063   (eval $ac_compile) 2>conftest.er1
22064   ac_status=$?
22065   grep -v '^ *+' conftest.er1 >conftest.err
22066   rm -f conftest.er1
22067   cat conftest.err >&5
22068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22069   (exit $ac_status); } &&
22070          { ac_try='test -z "$ac_c_werror_flag"
22071                          || test ! -s conftest.err'
22072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22073   (eval $ac_try) 2>&5
22074   ac_status=$?
22075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22076   (exit $ac_status); }; } &&
22077          { ac_try='test -s conftest.$ac_objext'
22078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22079   (eval $ac_try) 2>&5
22080   ac_status=$?
22081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22082   (exit $ac_status); }; }; then
22083   break
22084 else
22085   echo "$as_me: failed program was:" >&5
22086 sed 's/^/| /' conftest.$ac_ext >&5
22087
22088 fi
22089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22090   cat >conftest.$ac_ext <<_ACEOF
22091 /* confdefs.h.  */
22092 _ACEOF
22093 cat confdefs.h >>conftest.$ac_ext
22094 cat >>conftest.$ac_ext <<_ACEOF
22095 /* end confdefs.h.  */
22096 #define _LARGE_FILES 1
22097 #include <sys/types.h>
22098  /* Check that off_t can represent 2**63 - 1 correctly.
22099     We can't simply define LARGE_OFF_T to be 9223372036854775807,
22100     since some C++ compilers masquerading as C compilers
22101     incorrectly reject 9223372036854775807.  */
22102 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
22103   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
22104                        && LARGE_OFF_T % 2147483647 == 1)
22105                       ? 1 : -1];
22106 int
22107 main ()
22108 {
22109
22110   ;
22111   return 0;
22112 }
22113 _ACEOF
22114 rm -f conftest.$ac_objext
22115 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22116   (eval $ac_compile) 2>conftest.er1
22117   ac_status=$?
22118   grep -v '^ *+' conftest.er1 >conftest.err
22119   rm -f conftest.er1
22120   cat conftest.err >&5
22121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22122   (exit $ac_status); } &&
22123          { ac_try='test -z "$ac_c_werror_flag"
22124                          || test ! -s conftest.err'
22125   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22126   (eval $ac_try) 2>&5
22127   ac_status=$?
22128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22129   (exit $ac_status); }; } &&
22130          { ac_try='test -s conftest.$ac_objext'
22131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22132   (eval $ac_try) 2>&5
22133   ac_status=$?
22134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22135   (exit $ac_status); }; }; then
22136   ac_cv_sys_large_files=1; break
22137 else
22138   echo "$as_me: failed program was:" >&5
22139 sed 's/^/| /' conftest.$ac_ext >&5
22140
22141 fi
22142 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22143   break
22144 done
22145 fi
22146 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
22147 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
22148 if test "$ac_cv_sys_large_files" != no; then
22149
22150 cat >>confdefs.h <<_ACEOF
22151 #define _LARGE_FILES $ac_cv_sys_large_files
22152 _ACEOF
22153
22154 fi
22155 rm -f conftest*
22156 fi
22157
22158 fi
22159
22160 # SunOS doesn't handle negative byte comparisons properly with +/- return
22161 echo "$as_me:$LINENO: checking for working memcmp" >&5
22162 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
22163 if test "${ac_cv_func_memcmp_working+set}" = set; then
22164   echo $ECHO_N "(cached) $ECHO_C" >&6
22165 else
22166   if test "$cross_compiling" = yes; then
22167   ac_cv_func_memcmp_working=no
22168 else
22169   cat >conftest.$ac_ext <<_ACEOF
22170 /* confdefs.h.  */
22171 _ACEOF
22172 cat confdefs.h >>conftest.$ac_ext
22173 cat >>conftest.$ac_ext <<_ACEOF
22174 /* end confdefs.h.  */
22175 $ac_includes_default
22176 int
22177 main ()
22178 {
22179
22180   /* Some versions of memcmp are not 8-bit clean.  */
22181   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22182   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
22183     exit (1);
22184
22185   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
22186      or more and with at least one buffer not starting on a 4-byte boundary.
22187      William Lewis provided this test program.   */
22188   {
22189     char foo[21];
22190     char bar[21];
22191     int i;
22192     for (i = 0; i < 4; i++)
22193       {
22194         char *a = foo + i;
22195         char *b = bar + i;
22196         strcpy (a, "--------01111111");
22197         strcpy (b, "--------10000000");
22198         if (memcmp (a, b, 16) >= 0)
22199           exit (1);
22200       }
22201     exit (0);
22202   }
22203
22204   ;
22205   return 0;
22206 }
22207 _ACEOF
22208 rm -f conftest$ac_exeext
22209 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22210   (eval $ac_link) 2>&5
22211   ac_status=$?
22212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22215   (eval $ac_try) 2>&5
22216   ac_status=$?
22217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22218   (exit $ac_status); }; }; then
22219   ac_cv_func_memcmp_working=yes
22220 else
22221   echo "$as_me: program exited with status $ac_status" >&5
22222 echo "$as_me: failed program was:" >&5
22223 sed 's/^/| /' conftest.$ac_ext >&5
22224
22225 ( exit $ac_status )
22226 ac_cv_func_memcmp_working=no
22227 fi
22228 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22229 fi
22230 fi
22231 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
22232 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
22233 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
22234     "memcmp.$ac_objext"   | \
22235   *" memcmp.$ac_objext"   | \
22236     "memcmp.$ac_objext "* | \
22237   *" memcmp.$ac_objext "* ) ;;
22238   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
22239 esac
22240
22241
22242
22243
22244 # Select semaphore implementation type.
22245 if test "$PORTNAME" != "win32"; then
22246   if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
22247
22248 cat >>confdefs.h <<\_ACEOF
22249 #define USE_NAMED_POSIX_SEMAPHORES 1
22250 _ACEOF
22251
22252     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
22253   else
22254     if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
22255
22256 cat >>confdefs.h <<\_ACEOF
22257 #define USE_UNNAMED_POSIX_SEMAPHORES 1
22258 _ACEOF
22259
22260       SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
22261     else
22262
22263 cat >>confdefs.h <<\_ACEOF
22264 #define USE_SYSV_SEMAPHORES 1
22265 _ACEOF
22266
22267       SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
22268     fi
22269   fi
22270 else
22271
22272 cat >>confdefs.h <<\_ACEOF
22273 #define USE_WIN32_SEMAPHORES 1
22274 _ACEOF
22275
22276   SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
22277 fi
22278
22279
22280 # Select shared-memory implementation type.
22281 if test "$PORTNAME" != "win32"; then
22282
22283 cat >>confdefs.h <<\_ACEOF
22284 #define USE_SYSV_SHARED_MEMORY 1
22285 _ACEOF
22286
22287   SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
22288 else
22289
22290 cat >>confdefs.h <<\_ACEOF
22291 #define USE_WIN32_SHARED_MEMORY 1
22292 _ACEOF
22293
22294   SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
22295 fi
22296
22297 # If not set in template file, set bytes to use libc memset()
22298 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
22299   MEMSET_LOOP_LIMIT=1024
22300 fi
22301
22302 cat >>confdefs.h <<_ACEOF
22303 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
22304 _ACEOF
22305
22306
22307
22308 if test "$enable_nls" = yes ; then
22309
22310   echo "$as_me:$LINENO: checking for library containing gettext" >&5
22311 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
22312 if test "${ac_cv_search_gettext+set}" = set; then
22313   echo $ECHO_N "(cached) $ECHO_C" >&6
22314 else
22315   ac_func_search_save_LIBS=$LIBS
22316 ac_cv_search_gettext=no
22317 cat >conftest.$ac_ext <<_ACEOF
22318 /* confdefs.h.  */
22319 _ACEOF
22320 cat confdefs.h >>conftest.$ac_ext
22321 cat >>conftest.$ac_ext <<_ACEOF
22322 /* end confdefs.h.  */
22323
22324 /* Override any gcc2 internal prototype to avoid an error.  */
22325 #ifdef __cplusplus
22326 extern "C"
22327 #endif
22328 /* We use char because int might match the return type of a gcc2
22329    builtin and then its argument prototype would still apply.  */
22330 char gettext ();
22331 int
22332 main ()
22333 {
22334 gettext ();
22335   ;
22336   return 0;
22337 }
22338 _ACEOF
22339 rm -f conftest.$ac_objext conftest$ac_exeext
22340 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22341   (eval $ac_link) 2>conftest.er1
22342   ac_status=$?
22343   grep -v '^ *+' conftest.er1 >conftest.err
22344   rm -f conftest.er1
22345   cat conftest.err >&5
22346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22347   (exit $ac_status); } &&
22348          { ac_try='test -z "$ac_c_werror_flag"
22349                          || test ! -s conftest.err'
22350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22351   (eval $ac_try) 2>&5
22352   ac_status=$?
22353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22354   (exit $ac_status); }; } &&
22355          { ac_try='test -s conftest$ac_exeext'
22356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22357   (eval $ac_try) 2>&5
22358   ac_status=$?
22359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22360   (exit $ac_status); }; }; then
22361   ac_cv_search_gettext="none required"
22362 else
22363   echo "$as_me: failed program was:" >&5
22364 sed 's/^/| /' conftest.$ac_ext >&5
22365
22366 fi
22367 rm -f conftest.err conftest.$ac_objext \
22368       conftest$ac_exeext conftest.$ac_ext
22369 if test "$ac_cv_search_gettext" = no; then
22370   for ac_lib in intl; do
22371     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
22372     cat >conftest.$ac_ext <<_ACEOF
22373 /* confdefs.h.  */
22374 _ACEOF
22375 cat confdefs.h >>conftest.$ac_ext
22376 cat >>conftest.$ac_ext <<_ACEOF
22377 /* end confdefs.h.  */
22378
22379 /* Override any gcc2 internal prototype to avoid an error.  */
22380 #ifdef __cplusplus
22381 extern "C"
22382 #endif
22383 /* We use char because int might match the return type of a gcc2
22384    builtin and then its argument prototype would still apply.  */
22385 char gettext ();
22386 int
22387 main ()
22388 {
22389 gettext ();
22390   ;
22391   return 0;
22392 }
22393 _ACEOF
22394 rm -f conftest.$ac_objext conftest$ac_exeext
22395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22396   (eval $ac_link) 2>conftest.er1
22397   ac_status=$?
22398   grep -v '^ *+' conftest.er1 >conftest.err
22399   rm -f conftest.er1
22400   cat conftest.err >&5
22401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22402   (exit $ac_status); } &&
22403          { ac_try='test -z "$ac_c_werror_flag"
22404                          || test ! -s conftest.err'
22405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22406   (eval $ac_try) 2>&5
22407   ac_status=$?
22408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22409   (exit $ac_status); }; } &&
22410          { ac_try='test -s conftest$ac_exeext'
22411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22412   (eval $ac_try) 2>&5
22413   ac_status=$?
22414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22415   (exit $ac_status); }; }; then
22416   ac_cv_search_gettext="-l$ac_lib"
22417 break
22418 else
22419   echo "$as_me: failed program was:" >&5
22420 sed 's/^/| /' conftest.$ac_ext >&5
22421
22422 fi
22423 rm -f conftest.err conftest.$ac_objext \
22424       conftest$ac_exeext conftest.$ac_ext
22425   done
22426 fi
22427 LIBS=$ac_func_search_save_LIBS
22428 fi
22429 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
22430 echo "${ECHO_T}$ac_cv_search_gettext" >&6
22431 if test "$ac_cv_search_gettext" != no; then
22432   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
22433
22434 else
22435   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
22436 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
22437    { (exit 1); exit 1; }; }
22438 fi
22439
22440   if test "${ac_cv_header_libintl_h+set}" = set; then
22441   echo "$as_me:$LINENO: checking for libintl.h" >&5
22442 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22443 if test "${ac_cv_header_libintl_h+set}" = set; then
22444   echo $ECHO_N "(cached) $ECHO_C" >&6
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 else
22449   # Is the header compilable?
22450 echo "$as_me:$LINENO: checking libintl.h usability" >&5
22451 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
22452 cat >conftest.$ac_ext <<_ACEOF
22453 /* confdefs.h.  */
22454 _ACEOF
22455 cat confdefs.h >>conftest.$ac_ext
22456 cat >>conftest.$ac_ext <<_ACEOF
22457 /* end confdefs.h.  */
22458 $ac_includes_default
22459 #include <libintl.h>
22460 _ACEOF
22461 rm -f conftest.$ac_objext
22462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22463   (eval $ac_compile) 2>conftest.er1
22464   ac_status=$?
22465   grep -v '^ *+' conftest.er1 >conftest.err
22466   rm -f conftest.er1
22467   cat conftest.err >&5
22468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22469   (exit $ac_status); } &&
22470          { ac_try='test -z "$ac_c_werror_flag"
22471                          || test ! -s conftest.err'
22472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22473   (eval $ac_try) 2>&5
22474   ac_status=$?
22475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22476   (exit $ac_status); }; } &&
22477          { ac_try='test -s conftest.$ac_objext'
22478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22479   (eval $ac_try) 2>&5
22480   ac_status=$?
22481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22482   (exit $ac_status); }; }; then
22483   ac_header_compiler=yes
22484 else
22485   echo "$as_me: failed program was:" >&5
22486 sed 's/^/| /' conftest.$ac_ext >&5
22487
22488 ac_header_compiler=no
22489 fi
22490 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22491 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22492 echo "${ECHO_T}$ac_header_compiler" >&6
22493
22494 # Is the header present?
22495 echo "$as_me:$LINENO: checking libintl.h presence" >&5
22496 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
22497 cat >conftest.$ac_ext <<_ACEOF
22498 /* confdefs.h.  */
22499 _ACEOF
22500 cat confdefs.h >>conftest.$ac_ext
22501 cat >>conftest.$ac_ext <<_ACEOF
22502 /* end confdefs.h.  */
22503 #include <libintl.h>
22504 _ACEOF
22505 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22507   ac_status=$?
22508   grep -v '^ *+' conftest.er1 >conftest.err
22509   rm -f conftest.er1
22510   cat conftest.err >&5
22511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22512   (exit $ac_status); } >/dev/null; then
22513   if test -s conftest.err; then
22514     ac_cpp_err=$ac_c_preproc_warn_flag
22515     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22516   else
22517     ac_cpp_err=
22518   fi
22519 else
22520   ac_cpp_err=yes
22521 fi
22522 if test -z "$ac_cpp_err"; then
22523   ac_header_preproc=yes
22524 else
22525   echo "$as_me: failed program was:" >&5
22526 sed 's/^/| /' conftest.$ac_ext >&5
22527
22528   ac_header_preproc=no
22529 fi
22530 rm -f conftest.err conftest.$ac_ext
22531 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22532 echo "${ECHO_T}$ac_header_preproc" >&6
22533
22534 # So?  What about this header?
22535 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22536   yes:no: )
22537     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22538 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22539     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
22540 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
22541     ac_header_preproc=yes
22542     ;;
22543   no:yes:* )
22544     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
22545 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
22546     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
22547 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
22548     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
22549 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
22550     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
22551 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22552     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
22553 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
22554     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
22555 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
22556     (
22557       cat <<\_ASBOX
22558 ## ---------------------------------------- ##
22559 ## Report this to pgsql-bugs@postgresql.org ##
22560 ## ---------------------------------------- ##
22561 _ASBOX
22562     ) |
22563       sed "s/^/$as_me: WARNING:     /" >&2
22564     ;;
22565 esac
22566 echo "$as_me:$LINENO: checking for libintl.h" >&5
22567 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
22568 if test "${ac_cv_header_libintl_h+set}" = set; then
22569   echo $ECHO_N "(cached) $ECHO_C" >&6
22570 else
22571   ac_cv_header_libintl_h=$ac_header_preproc
22572 fi
22573 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
22574 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
22575
22576 fi
22577 if test $ac_cv_header_libintl_h = yes; then
22578   :
22579 else
22580   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
22581 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
22582    { (exit 1); exit 1; }; }
22583 fi
22584
22585
22586   for ac_prog in msgfmt
22587 do
22588   # Extract the first word of "$ac_prog", so it can be a program name with args.
22589 set dummy $ac_prog; ac_word=$2
22590 echo "$as_me:$LINENO: checking for $ac_word" >&5
22591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22592 if test "${ac_cv_prog_MSGFMT+set}" = set; then
22593   echo $ECHO_N "(cached) $ECHO_C" >&6
22594 else
22595   if test -n "$MSGFMT"; then
22596   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
22597 else
22598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599 for as_dir in $PATH
22600 do
22601   IFS=$as_save_IFS
22602   test -z "$as_dir" && as_dir=.
22603   for ac_exec_ext in '' $ac_executable_extensions; do
22604   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605     ac_cv_prog_MSGFMT="$ac_prog"
22606     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22607     break 2
22608   fi
22609 done
22610 done
22611
22612 fi
22613 fi
22614 MSGFMT=$ac_cv_prog_MSGFMT
22615 if test -n "$MSGFMT"; then
22616   echo "$as_me:$LINENO: result: $MSGFMT" >&5
22617 echo "${ECHO_T}$MSGFMT" >&6
22618 else
22619   echo "$as_me:$LINENO: result: no" >&5
22620 echo "${ECHO_T}no" >&6
22621 fi
22622
22623   test -n "$MSGFMT" && break
22624 done
22625
22626   if test -z "$MSGFMT"; then
22627     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
22628 echo "$as_me: error: msgfmt is required for NLS" >&2;}
22629    { (exit 1); exit 1; }; }
22630   fi
22631   for ac_prog in msgmerge
22632 do
22633   # Extract the first word of "$ac_prog", so it can be a program name with args.
22634 set dummy $ac_prog; ac_word=$2
22635 echo "$as_me:$LINENO: checking for $ac_word" >&5
22636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22637 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
22638   echo $ECHO_N "(cached) $ECHO_C" >&6
22639 else
22640   if test -n "$MSGMERGE"; then
22641   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
22642 else
22643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22644 for as_dir in $PATH
22645 do
22646   IFS=$as_save_IFS
22647   test -z "$as_dir" && as_dir=.
22648   for ac_exec_ext in '' $ac_executable_extensions; do
22649   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22650     ac_cv_prog_MSGMERGE="$ac_prog"
22651     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22652     break 2
22653   fi
22654 done
22655 done
22656
22657 fi
22658 fi
22659 MSGMERGE=$ac_cv_prog_MSGMERGE
22660 if test -n "$MSGMERGE"; then
22661   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
22662 echo "${ECHO_T}$MSGMERGE" >&6
22663 else
22664   echo "$as_me:$LINENO: result: no" >&5
22665 echo "${ECHO_T}no" >&6
22666 fi
22667
22668   test -n "$MSGMERGE" && break
22669 done
22670
22671   for ac_prog in xgettext
22672 do
22673   # Extract the first word of "$ac_prog", so it can be a program name with args.
22674 set dummy $ac_prog; ac_word=$2
22675 echo "$as_me:$LINENO: checking for $ac_word" >&5
22676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22677 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
22678   echo $ECHO_N "(cached) $ECHO_C" >&6
22679 else
22680   if test -n "$XGETTEXT"; then
22681   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
22682 else
22683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22684 for as_dir in $PATH
22685 do
22686   IFS=$as_save_IFS
22687   test -z "$as_dir" && as_dir=.
22688   for ac_exec_ext in '' $ac_executable_extensions; do
22689   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22690     ac_cv_prog_XGETTEXT="$ac_prog"
22691     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22692     break 2
22693   fi
22694 done
22695 done
22696
22697 fi
22698 fi
22699 XGETTEXT=$ac_cv_prog_XGETTEXT
22700 if test -n "$XGETTEXT"; then
22701   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
22702 echo "${ECHO_T}$XGETTEXT" >&6
22703 else
22704   echo "$as_me:$LINENO: result: no" >&5
22705 echo "${ECHO_T}no" >&6
22706 fi
22707
22708   test -n "$XGETTEXT" && break
22709 done
22710
22711
22712   # Note: share/locale is always the default, independent of $datadir
22713   localedir='${prefix}/share/locale'
22714
22715
22716 fi
22717
22718 # Check for Tcl configuration script tclConfig.sh
22719 if test "$with_tcl" = yes; then
22720     for ac_prog in tclsh tcl
22721 do
22722   # Extract the first word of "$ac_prog", so it can be a program name with args.
22723 set dummy $ac_prog; ac_word=$2
22724 echo "$as_me:$LINENO: checking for $ac_word" >&5
22725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22726 if test "${ac_cv_path_TCLSH+set}" = set; then
22727   echo $ECHO_N "(cached) $ECHO_C" >&6
22728 else
22729   case $TCLSH in
22730   [\\/]* | ?:[\\/]*)
22731   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
22732   ;;
22733   *)
22734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22735 for as_dir in $PATH
22736 do
22737   IFS=$as_save_IFS
22738   test -z "$as_dir" && as_dir=.
22739   for ac_exec_ext in '' $ac_executable_extensions; do
22740   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22741     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
22742     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22743     break 2
22744   fi
22745 done
22746 done
22747
22748   ;;
22749 esac
22750 fi
22751 TCLSH=$ac_cv_path_TCLSH
22752
22753 if test -n "$TCLSH"; then
22754   echo "$as_me:$LINENO: result: $TCLSH" >&5
22755 echo "${ECHO_T}$TCLSH" >&6
22756 else
22757   echo "$as_me:$LINENO: result: no" >&5
22758 echo "${ECHO_T}no" >&6
22759 fi
22760
22761   test -n "$TCLSH" && break
22762 done
22763
22764 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
22765 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
22766 # Let user override test
22767 if test -z "$TCL_CONFIG_SH"; then
22768     pgac_test_dirs="$with_tclconfig"
22769
22770     set X $pgac_test_dirs; shift
22771     if test $# -eq 0; then
22772         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
22773 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
22774    { (exit 1); exit 1; }; }
22775         set X `echo 'puts $auto_path' | $TCLSH`; shift
22776     fi
22777
22778     for pgac_dir do
22779         if test -r "$pgac_dir/tclConfig.sh"; then
22780             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
22781             break
22782         fi
22783     done
22784 fi
22785
22786 if test -z "$TCL_CONFIG_SH"; then
22787     echo "$as_me:$LINENO: result: no" >&5
22788 echo "${ECHO_T}no" >&6
22789     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
22790 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
22791    { (exit 1); exit 1; }; }
22792 else
22793     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
22794 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
22795 fi
22796
22797
22798
22799     . "$TCL_CONFIG_SH"
22800 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
22801 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
22802 eval TCL_LIBS=\"$TCL_LIBS\"
22803 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
22804 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
22805
22806         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22807     ac_save_CPPFLAGS=$CPPFLAGS
22808     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22809     if test "${ac_cv_header_tcl_h+set}" = set; then
22810   echo "$as_me:$LINENO: checking for tcl.h" >&5
22811 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22812 if test "${ac_cv_header_tcl_h+set}" = set; then
22813   echo $ECHO_N "(cached) $ECHO_C" >&6
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 else
22818   # Is the header compilable?
22819 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22820 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22821 cat >conftest.$ac_ext <<_ACEOF
22822 /* confdefs.h.  */
22823 _ACEOF
22824 cat confdefs.h >>conftest.$ac_ext
22825 cat >>conftest.$ac_ext <<_ACEOF
22826 /* end confdefs.h.  */
22827 $ac_includes_default
22828 #include <tcl.h>
22829 _ACEOF
22830 rm -f conftest.$ac_objext
22831 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22832   (eval $ac_compile) 2>conftest.er1
22833   ac_status=$?
22834   grep -v '^ *+' conftest.er1 >conftest.err
22835   rm -f conftest.er1
22836   cat conftest.err >&5
22837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22838   (exit $ac_status); } &&
22839          { ac_try='test -z "$ac_c_werror_flag"
22840                          || test ! -s conftest.err'
22841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22842   (eval $ac_try) 2>&5
22843   ac_status=$?
22844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22845   (exit $ac_status); }; } &&
22846          { ac_try='test -s conftest.$ac_objext'
22847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22848   (eval $ac_try) 2>&5
22849   ac_status=$?
22850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22851   (exit $ac_status); }; }; then
22852   ac_header_compiler=yes
22853 else
22854   echo "$as_me: failed program was:" >&5
22855 sed 's/^/| /' conftest.$ac_ext >&5
22856
22857 ac_header_compiler=no
22858 fi
22859 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22860 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22861 echo "${ECHO_T}$ac_header_compiler" >&6
22862
22863 # Is the header present?
22864 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22865 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22866 cat >conftest.$ac_ext <<_ACEOF
22867 /* confdefs.h.  */
22868 _ACEOF
22869 cat confdefs.h >>conftest.$ac_ext
22870 cat >>conftest.$ac_ext <<_ACEOF
22871 /* end confdefs.h.  */
22872 #include <tcl.h>
22873 _ACEOF
22874 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22875   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22876   ac_status=$?
22877   grep -v '^ *+' conftest.er1 >conftest.err
22878   rm -f conftest.er1
22879   cat conftest.err >&5
22880   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22881   (exit $ac_status); } >/dev/null; then
22882   if test -s conftest.err; then
22883     ac_cpp_err=$ac_c_preproc_warn_flag
22884     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22885   else
22886     ac_cpp_err=
22887   fi
22888 else
22889   ac_cpp_err=yes
22890 fi
22891 if test -z "$ac_cpp_err"; then
22892   ac_header_preproc=yes
22893 else
22894   echo "$as_me: failed program was:" >&5
22895 sed 's/^/| /' conftest.$ac_ext >&5
22896
22897   ac_header_preproc=no
22898 fi
22899 rm -f conftest.err conftest.$ac_ext
22900 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22901 echo "${ECHO_T}$ac_header_preproc" >&6
22902
22903 # So?  What about this header?
22904 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22905   yes:no: )
22906     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22907 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22908     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22909 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22910     ac_header_preproc=yes
22911     ;;
22912   no:yes:* )
22913     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22914 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22915     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22916 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22917     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22918 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22919     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22920 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22921     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22922 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22923     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22924 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22925     (
22926       cat <<\_ASBOX
22927 ## ---------------------------------------- ##
22928 ## Report this to pgsql-bugs@postgresql.org ##
22929 ## ---------------------------------------- ##
22930 _ASBOX
22931     ) |
22932       sed "s/^/$as_me: WARNING:     /" >&2
22933     ;;
22934 esac
22935 echo "$as_me:$LINENO: checking for tcl.h" >&5
22936 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22937 if test "${ac_cv_header_tcl_h+set}" = set; then
22938   echo $ECHO_N "(cached) $ECHO_C" >&6
22939 else
22940   ac_cv_header_tcl_h=$ac_header_preproc
22941 fi
22942 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22943 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22944
22945 fi
22946 if test $ac_cv_header_tcl_h = yes; then
22947   :
22948 else
22949   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22950 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22951    { (exit 1); exit 1; }; }
22952 fi
22953
22954
22955     CPPFLAGS=$ac_save_CPPFLAGS
22956 fi
22957
22958 #
22959 # Check for DocBook and tools
22960 #
22961 for ac_prog in onsgmls nsgmls
22962 do
22963   # Extract the first word of "$ac_prog", so it can be a program name with args.
22964 set dummy $ac_prog; ac_word=$2
22965 echo "$as_me:$LINENO: checking for $ac_word" >&5
22966 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22967 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22968   echo $ECHO_N "(cached) $ECHO_C" >&6
22969 else
22970   if test -n "$NSGMLS"; then
22971   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22972 else
22973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22974 for as_dir in $PATH
22975 do
22976   IFS=$as_save_IFS
22977   test -z "$as_dir" && as_dir=.
22978   for ac_exec_ext in '' $ac_executable_extensions; do
22979   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22980     ac_cv_prog_NSGMLS="$ac_prog"
22981     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22982     break 2
22983   fi
22984 done
22985 done
22986
22987 fi
22988 fi
22989 NSGMLS=$ac_cv_prog_NSGMLS
22990 if test -n "$NSGMLS"; then
22991   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22992 echo "${ECHO_T}$NSGMLS" >&6
22993 else
22994   echo "$as_me:$LINENO: result: no" >&5
22995 echo "${ECHO_T}no" >&6
22996 fi
22997
22998   test -n "$NSGMLS" && break
22999 done
23000
23001 for ac_prog in openjade jade
23002 do
23003   # Extract the first word of "$ac_prog", so it can be a program name with args.
23004 set dummy $ac_prog; ac_word=$2
23005 echo "$as_me:$LINENO: checking for $ac_word" >&5
23006 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23007 if test "${ac_cv_prog_JADE+set}" = set; then
23008   echo $ECHO_N "(cached) $ECHO_C" >&6
23009 else
23010   if test -n "$JADE"; then
23011   ac_cv_prog_JADE="$JADE" # Let the user override the test.
23012 else
23013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23014 for as_dir in $PATH
23015 do
23016   IFS=$as_save_IFS
23017   test -z "$as_dir" && as_dir=.
23018   for ac_exec_ext in '' $ac_executable_extensions; do
23019   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23020     ac_cv_prog_JADE="$ac_prog"
23021     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23022     break 2
23023   fi
23024 done
23025 done
23026
23027 fi
23028 fi
23029 JADE=$ac_cv_prog_JADE
23030 if test -n "$JADE"; then
23031   echo "$as_me:$LINENO: result: $JADE" >&5
23032 echo "${ECHO_T}$JADE" >&6
23033 else
23034   echo "$as_me:$LINENO: result: no" >&5
23035 echo "${ECHO_T}no" >&6
23036 fi
23037
23038   test -n "$JADE" && break
23039 done
23040
23041
23042 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
23043 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
23044 if test "${pgac_cv_check_docbook+set}" = set; then
23045   echo $ECHO_N "(cached) $ECHO_C" >&6
23046 else
23047   cat >conftest.sgml <<EOF
23048 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
23049 <book>
23050  <title>test</title>
23051  <chapter>
23052   <title>random</title>
23053    <sect1>
23054     <title>testsect</title>
23055     <para>text</para>
23056   </sect1>
23057  </chapter>
23058 </book>
23059 EOF
23060
23061 pgac_cv_check_docbook=no
23062
23063 if test -n "$NSGMLS"; then
23064   $NSGMLS -s conftest.sgml 1>&5 2>&1
23065   if test $? -eq 0; then
23066     pgac_cv_check_docbook=yes
23067   fi
23068 fi
23069 rm -f conftest.sgml
23070 fi
23071 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
23072 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
23073
23074 have_docbook=$pgac_cv_check_docbook
23075
23076
23077 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
23078 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
23079 if test "${pgac_cv_path_stylesheets+set}" = set; then
23080   echo $ECHO_N "(cached) $ECHO_C" >&6
23081 else
23082   if test -n "$DOCBOOKSTYLE"; then
23083   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
23084 else
23085   for pgac_prefix in /usr /usr/local /opt; do
23086     for pgac_infix in share lib; do
23087       for pgac_postfix in \
23088         sgml/stylesheets/nwalsh-modular \
23089         sgml/stylesheets/docbook \
23090                 sgml/docbook-dsssl \
23091         sgml/docbook/dsssl/modular \
23092         sgml/docbook/stylesheet/dsssl/modular \
23093         sgml/docbook/dsssl-stylesheets
23094       do
23095         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
23096         if test -r "$pgac_candidate/html/docbook.dsl" \
23097            && test -r "$pgac_candidate/print/docbook.dsl"
23098         then
23099           pgac_cv_path_stylesheets=$pgac_candidate
23100           break 3
23101         fi
23102       done
23103     done
23104   done
23105 fi
23106 fi
23107
23108 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
23109
23110 if test -n "$DOCBOOKSTYLE"; then
23111   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
23112 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
23113 else
23114   echo "$as_me:$LINENO: result: no" >&5
23115 echo "${ECHO_T}no" >&6
23116 fi
23117 if test -n "$DOCBOOKSTYLE"; then
23118   for ac_prog in collateindex.pl
23119 do
23120   # Extract the first word of "$ac_prog", so it can be a program name with args.
23121 set dummy $ac_prog; ac_word=$2
23122 echo "$as_me:$LINENO: checking for $ac_word" >&5
23123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23124 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
23125   echo $ECHO_N "(cached) $ECHO_C" >&6
23126 else
23127   case $COLLATEINDEX in
23128   [\\/]* | ?:[\\/]*)
23129   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
23130   ;;
23131   *)
23132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23133 for as_dir in $DOCBOOKSTYLE/bin $PATH
23134 do
23135   IFS=$as_save_IFS
23136   test -z "$as_dir" && as_dir=.
23137   for ac_exec_ext in '' $ac_executable_extensions; do
23138   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23139     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
23140     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23141     break 2
23142   fi
23143 done
23144 done
23145
23146   ;;
23147 esac
23148 fi
23149 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
23150
23151 if test -n "$COLLATEINDEX"; then
23152   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
23153 echo "${ECHO_T}$COLLATEINDEX" >&6
23154 else
23155   echo "$as_me:$LINENO: result: no" >&5
23156 echo "${ECHO_T}no" >&6
23157 fi
23158
23159   test -n "$COLLATEINDEX" && break
23160 done
23161
23162 else
23163   for ac_prog in collateindex.pl
23164 do
23165   # Extract the first word of "$ac_prog", so it can be a program name with args.
23166 set dummy $ac_prog; ac_word=$2
23167 echo "$as_me:$LINENO: checking for $ac_word" >&5
23168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23169 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
23170   echo $ECHO_N "(cached) $ECHO_C" >&6
23171 else
23172   case $COLLATEINDEX in
23173   [\\/]* | ?:[\\/]*)
23174   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
23175   ;;
23176   *)
23177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23178 for as_dir in $PATH
23179 do
23180   IFS=$as_save_IFS
23181   test -z "$as_dir" && as_dir=.
23182   for ac_exec_ext in '' $ac_executable_extensions; do
23183   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23184     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
23185     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23186     break 2
23187   fi
23188 done
23189 done
23190
23191   ;;
23192 esac
23193 fi
23194 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
23195
23196 if test -n "$COLLATEINDEX"; then
23197   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
23198 echo "${ECHO_T}$COLLATEINDEX" >&6
23199 else
23200   echo "$as_me:$LINENO: result: no" >&5
23201 echo "${ECHO_T}no" >&6
23202 fi
23203
23204   test -n "$COLLATEINDEX" && break
23205 done
23206
23207 fi
23208 for ac_prog in sgmlspl
23209 do
23210   # Extract the first word of "$ac_prog", so it can be a program name with args.
23211 set dummy $ac_prog; ac_word=$2
23212 echo "$as_me:$LINENO: checking for $ac_word" >&5
23213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23214 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
23215   echo $ECHO_N "(cached) $ECHO_C" >&6
23216 else
23217   if test -n "$SGMLSPL"; then
23218   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
23219 else
23220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23221 for as_dir in $PATH
23222 do
23223   IFS=$as_save_IFS
23224   test -z "$as_dir" && as_dir=.
23225   for ac_exec_ext in '' $ac_executable_extensions; do
23226   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23227     ac_cv_prog_SGMLSPL="$ac_prog"
23228     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
23229     break 2
23230   fi
23231 done
23232 done
23233
23234 fi
23235 fi
23236 SGMLSPL=$ac_cv_prog_SGMLSPL
23237 if test -n "$SGMLSPL"; then
23238   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
23239 echo "${ECHO_T}$SGMLSPL" >&6
23240 else
23241   echo "$as_me:$LINENO: result: no" >&5
23242 echo "${ECHO_T}no" >&6
23243 fi
23244
23245   test -n "$SGMLSPL" && break
23246 done
23247
23248
23249 # Thread testing
23250
23251 # We have to run the thread test near the end so we have all our symbols
23252 # defined.  Cross compiling throws a warning.
23253 #
23254 if test "$enable_thread_safety_force" = yes; then
23255 if test x"$template" != x"win32"
23256 then
23257   { echo "$as_me:$LINENO: WARNING:
23258 *** Skipping thread test program.  --enable-thread-safety-force was used.
23259 *** Run the program in src/test/thread on the your machine and add proper
23260 *** locking function calls to your applications to guarantee thread safety.
23261 " >&5
23262 echo "$as_me: WARNING:
23263 *** Skipping thread test program.  --enable-thread-safety-force was used.
23264 *** Run the program in src/test/thread on the your machine and add proper
23265 *** locking function calls to your applications to guarantee thread safety.
23266 " >&2;}
23267 else
23268 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23269 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23270 fi
23271 elif test "$enable_thread_safety" = yes; then
23272 if test x"$template" != x"win32"
23273 then
23274 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
23275 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
23276
23277 _CFLAGS="$CFLAGS"
23278 _LIBS="$LIBS"
23279 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
23280 LIBS="$LIBS $PTHREAD_LIBS"
23281 if test "$cross_compiling" = yes; then
23282   echo "$as_me:$LINENO: result: maybe" >&5
23283 echo "${ECHO_T}maybe" >&6
23284   { echo "$as_me:$LINENO: WARNING:
23285 *** Skipping thread test program because of cross-compile build.
23286 *** Run the program in src/test/thread on the target machine.
23287 " >&5
23288 echo "$as_me: WARNING:
23289 *** Skipping thread test program because of cross-compile build.
23290 *** Run the program in src/test/thread on the target machine.
23291 " >&2;}
23292 else
23293   cat >conftest.$ac_ext <<_ACEOF
23294 /* confdefs.h.  */
23295 _ACEOF
23296 cat confdefs.h >>conftest.$ac_ext
23297 cat >>conftest.$ac_ext <<_ACEOF
23298 /* end confdefs.h.  */
23299 #include "$srcdir/src/test/thread/thread_test.c"
23300 _ACEOF
23301 rm -f conftest$ac_exeext
23302 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
23303   (eval $ac_link) 2>&5
23304   ac_status=$?
23305   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23306   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23307   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23308   (eval $ac_try) 2>&5
23309   ac_status=$?
23310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23311   (exit $ac_status); }; }; then
23312   echo "$as_me:$LINENO: result: yes" >&5
23313 echo "${ECHO_T}yes" >&6
23314 else
23315   echo "$as_me: program exited with status $ac_status" >&5
23316 echo "$as_me: failed program was:" >&5
23317 sed 's/^/| /' conftest.$ac_ext >&5
23318
23319 ( exit $ac_status )
23320 echo "$as_me:$LINENO: result: no" >&5
23321 echo "${ECHO_T}no" >&6
23322   { { echo "$as_me:$LINENO: error: thread test program failed
23323 This platform is not thread-safe.  Check the file 'config.log'for the
23324 exact reason.
23325
23326 You can use the configure option --enable-thread-safety-force to force
23327 threads to be enabled.  But you must then run the program in
23328 src/test/thread and add locking function calls to your applications to
23329 guarantee thread safety." >&5
23330 echo "$as_me: error: thread test program failed
23331 This platform is not thread-safe.  Check the file 'config.log'for the
23332 exact reason.
23333
23334 You can use the configure option --enable-thread-safety-force to force
23335 threads to be enabled.  But you must then run the program in
23336 src/test/thread and add locking function calls to your applications to
23337 guarantee thread safety." >&2;}
23338    { (exit 1); exit 1; }; }
23339 fi
23340 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23341 fi
23342 CFLAGS="$_CFLAGS"
23343 LIBS="$_LIBS"
23344 else
23345 { echo "$as_me:$LINENO: WARNING: *** skipping thread test on Win32" >&5
23346 echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
23347 fi
23348 fi
23349
23350 # prepare build tree if outside source tree
23351 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
23352 # Note 2: /bin/pwd might be better than shell's built-in at getting
23353 #         a symlink-free name.
23354 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
23355   vpath_build=no
23356 else
23357   vpath_build=yes
23358   if test "$no_create" != yes; then
23359     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
23360     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
23361     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
23362       || { { echo "$as_me:$LINENO: error: failed" >&5
23363 echo "$as_me: error: failed" >&2;}
23364    { (exit 1); exit 1; }; }
23365     echo "$as_me:$LINENO: result: done" >&5
23366 echo "${ECHO_T}done" >&6
23367   fi
23368 fi
23369
23370
23371
23372                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
23373
23374
23375                                                             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}"
23376
23377
23378 if test "$PORTNAME" = "win32"; then
23379           ac_config_commands="$ac_config_commands check_win32_symlinks"
23380
23381 fi
23382
23383           ac_config_headers="$ac_config_headers src/include/pg_config.h"
23384
23385
23386           ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
23387
23388
23389 cat >confcache <<\_ACEOF
23390 # This file is a shell script that caches the results of configure
23391 # tests run on this system so they can be shared between configure
23392 # scripts and configure runs, see configure's option --config-cache.
23393 # It is not useful on other systems.  If it contains results you don't
23394 # want to keep, you may remove or edit it.
23395 #
23396 # config.status only pays attention to the cache file if you give it
23397 # the --recheck option to rerun configure.
23398 #
23399 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23400 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23401 # following values.
23402
23403 _ACEOF
23404
23405 # The following way of writing the cache mishandles newlines in values,
23406 # but we know of no workaround that is simple, portable, and efficient.
23407 # So, don't put newlines in cache variables' values.
23408 # Ultrix sh set writes to stderr and can't be redirected directly,
23409 # and sets the high bit in the cache file unless we assign to the vars.
23410 {
23411   (set) 2>&1 |
23412     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23413     *ac_space=\ *)
23414       # `set' does not quote correctly, so add quotes (double-quote
23415       # substitution turns \\\\ into \\, and sed turns \\ into \).
23416       sed -n \
23417         "s/'/'\\\\''/g;
23418           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23419       ;;
23420     *)
23421       # `set' quotes correctly as required by POSIX, so do not add quotes.
23422       sed -n \
23423         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23424       ;;
23425     esac;
23426 } |
23427   sed '
23428      t clear
23429      : clear
23430      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23431      t end
23432      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23433      : end' >>confcache
23434 if diff $cache_file confcache >/dev/null 2>&1; then :; else
23435   if test -w $cache_file; then
23436     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23437     cat confcache >$cache_file
23438   else
23439     echo "not updating unwritable cache $cache_file"
23440   fi
23441 fi
23442 rm -f confcache
23443
23444 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23445 # Let make expand exec_prefix.
23446 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23447
23448 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23449 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23450 # trailing colons and then remove the whole line if VPATH becomes empty
23451 # (actually we leave an empty line to preserve line numbers).
23452 if test "x$srcdir" = x.; then
23453   ac_vpsub='/^[  ]*VPATH[        ]*=/{
23454 s/:*\$(srcdir):*/:/;
23455 s/:*\${srcdir}:*/:/;
23456 s/:*@srcdir@:*/:/;
23457 s/^\([^=]*=[     ]*\):*/\1/;
23458 s/:*$//;
23459 s/^[^=]*=[       ]*$//;
23460 }'
23461 fi
23462
23463 DEFS=-DHAVE_CONFIG_H
23464
23465 ac_libobjs=
23466 ac_ltlibobjs=
23467 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23468   # 1. Remove the extension, and $U if already installed.
23469   ac_i=`echo "$ac_i" |
23470          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
23471   # 2. Add them.
23472   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
23473   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
23474 done
23475 LIBOBJS=$ac_libobjs
23476
23477 LTLIBOBJS=$ac_ltlibobjs
23478
23479
23480
23481 : ${CONFIG_STATUS=./config.status}
23482 ac_clean_files_save=$ac_clean_files
23483 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23484 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23485 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23486 cat >$CONFIG_STATUS <<_ACEOF
23487 #! $SHELL
23488 # Generated by $as_me.
23489 # Run this file to recreate the current configuration.
23490 # Compiler output produced by configure, useful for debugging
23491 # configure, is in config.log if it exists.
23492
23493 debug=false
23494 ac_cs_recheck=false
23495 ac_cs_silent=false
23496 SHELL=\${CONFIG_SHELL-$SHELL}
23497 _ACEOF
23498
23499 cat >>$CONFIG_STATUS <<\_ACEOF
23500 ## --------------------- ##
23501 ## M4sh Initialization.  ##
23502 ## --------------------- ##
23503
23504 # Be Bourne compatible
23505 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23506   emulate sh
23507   NULLCMD=:
23508   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23509   # is contrary to our usage.  Disable this feature.
23510   alias -g '${1+"$@"}'='"$@"'
23511 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23512   set -o posix
23513 fi
23514 DUALCASE=1; export DUALCASE # for MKS sh
23515
23516 # Support unset when possible.
23517 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23518   as_unset=unset
23519 else
23520   as_unset=false
23521 fi
23522
23523
23524 # Work around bugs in pre-3.0 UWIN ksh.
23525 $as_unset ENV MAIL MAILPATH
23526 PS1='$ '
23527 PS2='> '
23528 PS4='+ '
23529
23530 # NLS nuisances.
23531 for as_var in \
23532   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23533   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23534   LC_TELEPHONE LC_TIME
23535 do
23536   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23537     eval $as_var=C; export $as_var
23538   else
23539     $as_unset $as_var
23540   fi
23541 done
23542
23543 # Required to use basename.
23544 if expr a : '\(a\)' >/dev/null 2>&1; then
23545   as_expr=expr
23546 else
23547   as_expr=false
23548 fi
23549
23550 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
23551   as_basename=basename
23552 else
23553   as_basename=false
23554 fi
23555
23556
23557 # Name of the executable.
23558 as_me=`$as_basename "$0" ||
23559 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23560          X"$0" : 'X\(//\)$' \| \
23561          X"$0" : 'X\(/\)$' \| \
23562          .     : '\(.\)' 2>/dev/null ||
23563 echo X/"$0" |
23564     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
23565           /^X\/\(\/\/\)$/{ s//\1/; q; }
23566           /^X\/\(\/\).*/{ s//\1/; q; }
23567           s/.*/./; q'`
23568
23569
23570 # PATH needs CR, and LINENO needs CR and PATH.
23571 # Avoid depending upon Character Ranges.
23572 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23573 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23574 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23575 as_cr_digits='0123456789'
23576 as_cr_alnum=$as_cr_Letters$as_cr_digits
23577
23578 # The user is always right.
23579 if test "${PATH_SEPARATOR+set}" != set; then
23580   echo "#! /bin/sh" >conf$$.sh
23581   echo  "exit 0"   >>conf$$.sh
23582   chmod +x conf$$.sh
23583   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23584     PATH_SEPARATOR=';'
23585   else
23586     PATH_SEPARATOR=:
23587   fi
23588   rm -f conf$$.sh
23589 fi
23590
23591
23592   as_lineno_1=$LINENO
23593   as_lineno_2=$LINENO
23594   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23595   test "x$as_lineno_1" != "x$as_lineno_2" &&
23596   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
23597   # Find who we are.  Look in the path if we contain no path at all
23598   # relative or not.
23599   case $0 in
23600     *[\\/]* ) as_myself=$0 ;;
23601     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23602 for as_dir in $PATH
23603 do
23604   IFS=$as_save_IFS
23605   test -z "$as_dir" && as_dir=.
23606   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23607 done
23608
23609        ;;
23610   esac
23611   # We did not find ourselves, most probably we were run as `sh COMMAND'
23612   # in which case we are not to be found in the path.
23613   if test "x$as_myself" = x; then
23614     as_myself=$0
23615   fi
23616   if test ! -f "$as_myself"; then
23617     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23618 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23619    { (exit 1); exit 1; }; }
23620   fi
23621   case $CONFIG_SHELL in
23622   '')
23623     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23624 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23625 do
23626   IFS=$as_save_IFS
23627   test -z "$as_dir" && as_dir=.
23628   for as_base in sh bash ksh sh5; do
23629          case $as_dir in
23630          /*)
23631            if ("$as_dir/$as_base" -c '
23632   as_lineno_1=$LINENO
23633   as_lineno_2=$LINENO
23634   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23635   test "x$as_lineno_1" != "x$as_lineno_2" &&
23636   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
23637              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23638              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23639              CONFIG_SHELL=$as_dir/$as_base
23640              export CONFIG_SHELL
23641              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23642            fi;;
23643          esac
23644        done
23645 done
23646 ;;
23647   esac
23648
23649   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23650   # uniformly replaced by the line number.  The first 'sed' inserts a
23651   # line-number line before each line; the second 'sed' does the real
23652   # work.  The second script uses 'N' to pair each line-number line
23653   # with the numbered line, and appends trailing '-' during
23654   # substitution so that $LINENO is not a special case at line end.
23655   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
23656   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
23657   sed '=' <$as_myself |
23658     sed '
23659       N
23660       s,$,-,
23661       : loop
23662       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
23663       t loop
23664       s,-$,,
23665       s,^['$as_cr_digits']*\n,,
23666     ' >$as_me.lineno &&
23667   chmod +x $as_me.lineno ||
23668     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23669 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
23670    { (exit 1); exit 1; }; }
23671
23672   # Don't try to exec as it changes $[0], causing all sort of problems
23673   # (the dirname of $[0] is not the place where we might find the
23674   # original and so on.  Autoconf is especially sensible to this).
23675   . ./$as_me.lineno
23676   # Exit status is that of the last command.
23677   exit
23678 }
23679
23680
23681 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23682   *c*,-n*) ECHO_N= ECHO_C='
23683 ' ECHO_T='      ' ;;
23684   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23685   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
23686 esac
23687
23688 if expr a : '\(a\)' >/dev/null 2>&1; then
23689   as_expr=expr
23690 else
23691   as_expr=false
23692 fi
23693
23694 rm -f conf$$ conf$$.exe conf$$.file
23695 echo >conf$$.file
23696 if ln -s conf$$.file conf$$ 2>/dev/null; then
23697   # We could just check for DJGPP; but this test a) works b) is more generic
23698   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23699   if test -f conf$$.exe; then
23700     # Don't use ln at all; we don't have any links
23701     as_ln_s='cp -p'
23702   else
23703     as_ln_s='ln -s'
23704   fi
23705 elif ln conf$$.file conf$$ 2>/dev/null; then
23706   as_ln_s=ln
23707 else
23708   as_ln_s='cp -p'
23709 fi
23710 rm -f conf$$ conf$$.exe conf$$.file
23711
23712 if mkdir -p . 2>/dev/null; then
23713   as_mkdir_p=:
23714 else
23715   test -d ./-p && rmdir ./-p
23716   as_mkdir_p=false
23717 fi
23718
23719 as_executable_p="test -f"
23720
23721 # Sed expression to map a string onto a valid CPP name.
23722 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
23723
23724 # Sed expression to map a string onto a valid variable name.
23725 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
23726
23727
23728 # IFS
23729 # We need space, tab and new line, in precisely that order.
23730 as_nl='
23731 '
23732 IFS="   $as_nl"
23733
23734 # CDPATH.
23735 $as_unset CDPATH
23736
23737 exec 6>&1
23738
23739 # Open the log real soon, to keep \$[0] and so on meaningful, and to
23740 # report actual input values of CONFIG_FILES etc. instead of their
23741 # values after options handling.  Logging --version etc. is OK.
23742 exec 5>>config.log
23743 {
23744   echo
23745   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23746 ## Running $as_me. ##
23747 _ASBOX
23748 } >&5
23749 cat >&5 <<_CSEOF
23750
23751 This file was extended by PostgreSQL $as_me 8.3devel, which was
23752 generated by GNU Autoconf 2.59.  Invocation command line was
23753
23754   CONFIG_FILES    = $CONFIG_FILES
23755   CONFIG_HEADERS  = $CONFIG_HEADERS
23756   CONFIG_LINKS    = $CONFIG_LINKS
23757   CONFIG_COMMANDS = $CONFIG_COMMANDS
23758   $ $0 $@
23759
23760 _CSEOF
23761 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23762 echo >&5
23763 _ACEOF
23764
23765 # Files that config.status was made for.
23766 if test -n "$ac_config_files"; then
23767   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23768 fi
23769
23770 if test -n "$ac_config_headers"; then
23771   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23772 fi
23773
23774 if test -n "$ac_config_links"; then
23775   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23776 fi
23777
23778 if test -n "$ac_config_commands"; then
23779   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23780 fi
23781
23782 cat >>$CONFIG_STATUS <<\_ACEOF
23783
23784 ac_cs_usage="\
23785 \`$as_me' instantiates files from templates according to the
23786 current configuration.
23787
23788 Usage: $0 [OPTIONS] [FILE]...
23789
23790   -h, --help       print this help, then exit
23791   -V, --version    print version number, then exit
23792   -q, --quiet      do not print progress messages
23793   -d, --debug      don't remove temporary files
23794       --recheck    update $as_me by reconfiguring in the same conditions
23795   --file=FILE[:TEMPLATE]
23796                    instantiate the configuration file FILE
23797   --header=FILE[:TEMPLATE]
23798                    instantiate the configuration header FILE
23799
23800 Configuration files:
23801 $config_files
23802
23803 Configuration headers:
23804 $config_headers
23805
23806 Configuration links:
23807 $config_links
23808
23809 Configuration commands:
23810 $config_commands
23811
23812 Report bugs to <bug-autoconf@gnu.org>."
23813 _ACEOF
23814
23815 cat >>$CONFIG_STATUS <<_ACEOF
23816 ac_cs_version="\\
23817 PostgreSQL config.status 8.3devel
23818 configured by $0, generated by GNU Autoconf 2.59,
23819   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23820
23821 Copyright (C) 2003 Free Software Foundation, Inc.
23822 This config.status script is free software; the Free Software Foundation
23823 gives unlimited permission to copy, distribute and modify it."
23824 srcdir=$srcdir
23825 _ACEOF
23826
23827 cat >>$CONFIG_STATUS <<\_ACEOF
23828 # If no file are specified by the user, then we need to provide default
23829 # value.  By we need to know if files were specified by the user.
23830 ac_need_defaults=:
23831 while test $# != 0
23832 do
23833   case $1 in
23834   --*=*)
23835     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23836     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23837     ac_shift=:
23838     ;;
23839   -*)
23840     ac_option=$1
23841     ac_optarg=$2
23842     ac_shift=shift
23843     ;;
23844   *) # This is not an option, so the user has probably given explicit
23845      # arguments.
23846      ac_option=$1
23847      ac_need_defaults=false;;
23848   esac
23849
23850   case $ac_option in
23851   # Handling of the options.
23852 _ACEOF
23853 cat >>$CONFIG_STATUS <<\_ACEOF
23854   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23855     ac_cs_recheck=: ;;
23856   --version | --vers* | -V )
23857     echo "$ac_cs_version"; exit 0 ;;
23858   --he | --h)
23859     # Conflict between --help and --header
23860     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23861 Try \`$0 --help' for more information." >&5
23862 echo "$as_me: error: ambiguous option: $1
23863 Try \`$0 --help' for more information." >&2;}
23864    { (exit 1); exit 1; }; };;
23865   --help | --hel | -h )
23866     echo "$ac_cs_usage"; exit 0 ;;
23867   --debug | --d* | -d )
23868     debug=: ;;
23869   --file | --fil | --fi | --f )
23870     $ac_shift
23871     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23872     ac_need_defaults=false;;
23873   --header | --heade | --head | --hea )
23874     $ac_shift
23875     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23876     ac_need_defaults=false;;
23877   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23878   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23879     ac_cs_silent=: ;;
23880
23881   # This is an error.
23882   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23883 Try \`$0 --help' for more information." >&5
23884 echo "$as_me: error: unrecognized option: $1
23885 Try \`$0 --help' for more information." >&2;}
23886    { (exit 1); exit 1; }; } ;;
23887
23888   *) ac_config_targets="$ac_config_targets $1" ;;
23889
23890   esac
23891   shift
23892 done
23893
23894 ac_configure_extra_args=
23895
23896 if $ac_cs_silent; then
23897   exec 6>/dev/null
23898   ac_configure_extra_args="$ac_configure_extra_args --silent"
23899 fi
23900
23901 _ACEOF
23902 cat >>$CONFIG_STATUS <<_ACEOF
23903 if \$ac_cs_recheck; then
23904   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23905   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23906 fi
23907
23908 _ACEOF
23909
23910
23911
23912
23913
23914 cat >>$CONFIG_STATUS <<\_ACEOF
23915 for ac_config_target in $ac_config_targets
23916 do
23917   case "$ac_config_target" in
23918   # Handling of arguments.
23919   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23920   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23921   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23922   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23923   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23924   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23925   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23926   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23927   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23928   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23929   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23930   "src/interfaces/ecpg/include/ecpg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
23931   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23932 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23933    { (exit 1); exit 1; }; };;
23934   esac
23935 done
23936
23937 # If the user did not use the arguments to specify the items to instantiate,
23938 # then the envvar interface is used.  Set only those that are not.
23939 # We use the long form for the default assignment because of an extremely
23940 # bizarre bug on SunOS 4.1.3.
23941 if $ac_need_defaults; then
23942   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23943   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23944   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23945   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23946 fi
23947
23948 # Have a temporary directory for convenience.  Make it in the build tree
23949 # simply because there is no reason to put it here, and in addition,
23950 # creating and moving files from /tmp can sometimes cause problems.
23951 # Create a temporary directory, and hook for its removal unless debugging.
23952 $debug ||
23953 {
23954   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23955   trap '{ (exit 1); exit 1; }' 1 2 13 15
23956 }
23957
23958 # Create a (secure) tmp directory for tmp files.
23959
23960 {
23961   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23962   test -n "$tmp" && test -d "$tmp"
23963 }  ||
23964 {
23965   tmp=./confstat$$-$RANDOM
23966   (umask 077 && mkdir $tmp)
23967 } ||
23968 {
23969    echo "$me: cannot create a temporary directory in ." >&2
23970    { (exit 1); exit 1; }
23971 }
23972
23973 _ACEOF
23974
23975 cat >>$CONFIG_STATUS <<_ACEOF
23976
23977 #
23978 # CONFIG_FILES section.
23979 #
23980
23981 # No need to generate the scripts if there are no CONFIG_FILES.
23982 # This happens for instance when ./config.status config.h
23983 if test -n "\$CONFIG_FILES"; then
23984   # Protect against being on the right side of a sed subst in config.status.
23985   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23986    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23987 s,@SHELL@,$SHELL,;t t
23988 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23989 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23990 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23991 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23992 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23993 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23994 s,@exec_prefix@,$exec_prefix,;t t
23995 s,@prefix@,$prefix,;t t
23996 s,@program_transform_name@,$program_transform_name,;t t
23997 s,@bindir@,$bindir,;t t
23998 s,@sbindir@,$sbindir,;t t
23999 s,@libexecdir@,$libexecdir,;t t
24000 s,@datadir@,$datadir,;t t
24001 s,@sysconfdir@,$sysconfdir,;t t
24002 s,@sharedstatedir@,$sharedstatedir,;t t
24003 s,@localstatedir@,$localstatedir,;t t
24004 s,@libdir@,$libdir,;t t
24005 s,@includedir@,$includedir,;t t
24006 s,@oldincludedir@,$oldincludedir,;t t
24007 s,@infodir@,$infodir,;t t
24008 s,@mandir@,$mandir,;t t
24009 s,@build_alias@,$build_alias,;t t
24010 s,@host_alias@,$host_alias,;t t
24011 s,@target_alias@,$target_alias,;t t
24012 s,@DEFS@,$DEFS,;t t
24013 s,@ECHO_C@,$ECHO_C,;t t
24014 s,@ECHO_N@,$ECHO_N,;t t
24015 s,@ECHO_T@,$ECHO_T,;t t
24016 s,@LIBS@,$LIBS,;t t
24017 s,@configure_args@,$configure_args,;t t
24018 s,@build@,$build,;t t
24019 s,@build_cpu@,$build_cpu,;t t
24020 s,@build_vendor@,$build_vendor,;t t
24021 s,@build_os@,$build_os,;t t
24022 s,@host@,$host,;t t
24023 s,@host_cpu@,$host_cpu,;t t
24024 s,@host_vendor@,$host_vendor,;t t
24025 s,@host_os@,$host_os,;t t
24026 s,@PORTNAME@,$PORTNAME,;t t
24027 s,@docdir@,$docdir,;t t
24028 s,@enable_nls@,$enable_nls,;t t
24029 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
24030 s,@default_port@,$default_port,;t t
24031 s,@enable_shared@,$enable_shared,;t t
24032 s,@enable_rpath@,$enable_rpath,;t t
24033 s,@enable_debug@,$enable_debug,;t t
24034 s,@enable_profiling@,$enable_profiling,;t t
24035 s,@DTRACE@,$DTRACE,;t t
24036 s,@DTRACEFLAGS@,$DTRACEFLAGS,;t t
24037 s,@enable_dtrace@,$enable_dtrace,;t t
24038 s,@CC@,$CC,;t t
24039 s,@CFLAGS@,$CFLAGS,;t t
24040 s,@LDFLAGS@,$LDFLAGS,;t t
24041 s,@CPPFLAGS@,$CPPFLAGS,;t t
24042 s,@ac_ct_CC@,$ac_ct_CC,;t t
24043 s,@EXEEXT@,$EXEEXT,;t t
24044 s,@OBJEXT@,$OBJEXT,;t t
24045 s,@CPP@,$CPP,;t t
24046 s,@GCC@,$GCC,;t t
24047 s,@TAS@,$TAS,;t t
24048 s,@autodepend@,$autodepend,;t t
24049 s,@INCLUDES@,$INCLUDES,;t t
24050 s,@enable_thread_safety@,$enable_thread_safety,;t t
24051 s,@with_tcl@,$with_tcl,;t t
24052 s,@with_perl@,$with_perl,;t t
24053 s,@with_python@,$with_python,;t t
24054 s,@with_krb5@,$with_krb5,;t t
24055 s,@krb_srvtab@,$krb_srvtab,;t t
24056 s,@with_pam@,$with_pam,;t t
24057 s,@with_ldap@,$with_ldap,;t t
24058 s,@with_bonjour@,$with_bonjour,;t t
24059 s,@with_openssl@,$with_openssl,;t t
24060 s,@XML2_CONFIG@,$XML2_CONFIG,;t t
24061 s,@with_zlib@,$with_zlib,;t t
24062 s,@EGREP@,$EGREP,;t t
24063 s,@ELF_SYS@,$ELF_SYS,;t t
24064 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
24065 s,@AWK@,$AWK,;t t
24066 s,@FLEX@,$FLEX,;t t
24067 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
24068 s,@LN_S@,$LN_S,;t t
24069 s,@LD@,$LD,;t t
24070 s,@with_gnu_ld@,$with_gnu_ld,;t t
24071 s,@ld_R_works@,$ld_R_works,;t t
24072 s,@RANLIB@,$RANLIB,;t t
24073 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24074 s,@TAR@,$TAR,;t t
24075 s,@STRIP@,$STRIP,;t t
24076 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
24077 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
24078 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
24079 s,@YACC@,$YACC,;t t
24080 s,@YFLAGS@,$YFLAGS,;t t
24081 s,@PERL@,$PERL,;t t
24082 s,@perl_archlibexp@,$perl_archlibexp,;t t
24083 s,@perl_privlibexp@,$perl_privlibexp,;t t
24084 s,@perl_useshrplib@,$perl_useshrplib,;t t
24085 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
24086 s,@PYTHON@,$PYTHON,;t t
24087 s,@python_version@,$python_version,;t t
24088 s,@python_configdir@,$python_configdir,;t t
24089 s,@python_includespec@,$python_includespec,;t t
24090 s,@python_libdir@,$python_libdir,;t t
24091 s,@python_libspec@,$python_libspec,;t t
24092 s,@python_additional_libs@,$python_additional_libs,;t t
24093 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
24094 s,@LIBOBJS@,$LIBOBJS,;t t
24095 s,@acx_pthread_config@,$acx_pthread_config,;t t
24096 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
24097 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
24098 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
24099 s,@LDAP_LIBS_FE@,$LDAP_LIBS_FE,;t t
24100 s,@LDAP_LIBS_BE@,$LDAP_LIBS_BE,;t t
24101 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
24102 s,@MSGFMT@,$MSGFMT,;t t
24103 s,@MSGMERGE@,$MSGMERGE,;t t
24104 s,@XGETTEXT@,$XGETTEXT,;t t
24105 s,@localedir@,$localedir,;t t
24106 s,@TCLSH@,$TCLSH,;t t
24107 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
24108 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
24109 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
24110 s,@TCL_LIBS@,$TCL_LIBS,;t t
24111 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
24112 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
24113 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
24114 s,@NSGMLS@,$NSGMLS,;t t
24115 s,@JADE@,$JADE,;t t
24116 s,@have_docbook@,$have_docbook,;t t
24117 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
24118 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
24119 s,@SGMLSPL@,$SGMLSPL,;t t
24120 s,@vpath_build@,$vpath_build,;t t
24121 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
24122 CEOF
24123
24124 _ACEOF
24125
24126   cat >>$CONFIG_STATUS <<\_ACEOF
24127   # Split the substitutions into bite-sized pieces for seds with
24128   # small command number limits, like on Digital OSF/1 and HP-UX.
24129   ac_max_sed_lines=48
24130   ac_sed_frag=1 # Number of current file.
24131   ac_beg=1 # First line for current file.
24132   ac_end=$ac_max_sed_lines # Line after last line for current file.
24133   ac_more_lines=:
24134   ac_sed_cmds=
24135   while $ac_more_lines; do
24136     if test $ac_beg -gt 1; then
24137       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24138     else
24139       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24140     fi
24141     if test ! -s $tmp/subs.frag; then
24142       ac_more_lines=false
24143     else
24144       # The purpose of the label and of the branching condition is to
24145       # speed up the sed processing (if there are no `@' at all, there
24146       # is no need to browse any of the substitutions).
24147       # These are the two extra sed commands mentioned above.
24148       (echo ':t
24149   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24150       if test -z "$ac_sed_cmds"; then
24151         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24152       else
24153         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24154       fi
24155       ac_sed_frag=`expr $ac_sed_frag + 1`
24156       ac_beg=$ac_end
24157       ac_end=`expr $ac_end + $ac_max_sed_lines`
24158     fi
24159   done
24160   if test -z "$ac_sed_cmds"; then
24161     ac_sed_cmds=cat
24162   fi
24163 fi # test -n "$CONFIG_FILES"
24164
24165 _ACEOF
24166 cat >>$CONFIG_STATUS <<\_ACEOF
24167 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24168   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24169   case $ac_file in
24170   - | *:- | *:-:* ) # input from stdin
24171         cat >$tmp/stdin
24172         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24173         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24174   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24175         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24176   * )   ac_file_in=$ac_file.in ;;
24177   esac
24178
24179   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24180   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24181 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24182          X"$ac_file" : 'X\(//\)[^/]' \| \
24183          X"$ac_file" : 'X\(//\)$' \| \
24184          X"$ac_file" : 'X\(/\)' \| \
24185          .     : '\(.\)' 2>/dev/null ||
24186 echo X"$ac_file" |
24187     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24188           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24189           /^X\(\/\/\)$/{ s//\1/; q; }
24190           /^X\(\/\).*/{ s//\1/; q; }
24191           s/.*/./; q'`
24192   { if $as_mkdir_p; then
24193     mkdir -p "$ac_dir"
24194   else
24195     as_dir="$ac_dir"
24196     as_dirs=
24197     while test ! -d "$as_dir"; do
24198       as_dirs="$as_dir $as_dirs"
24199       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24200 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24201          X"$as_dir" : 'X\(//\)[^/]' \| \
24202          X"$as_dir" : 'X\(//\)$' \| \
24203          X"$as_dir" : 'X\(/\)' \| \
24204          .     : '\(.\)' 2>/dev/null ||
24205 echo X"$as_dir" |
24206     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24207           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24208           /^X\(\/\/\)$/{ s//\1/; q; }
24209           /^X\(\/\).*/{ s//\1/; q; }
24210           s/.*/./; q'`
24211     done
24212     test ! -n "$as_dirs" || mkdir $as_dirs
24213   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24214 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24215    { (exit 1); exit 1; }; }; }
24216
24217   ac_builddir=.
24218
24219 if test "$ac_dir" != .; then
24220   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24221   # A "../" for each directory in $ac_dir_suffix.
24222   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24223 else
24224   ac_dir_suffix= ac_top_builddir=
24225 fi
24226
24227 case $srcdir in
24228   .)  # No --srcdir option.  We are building in place.
24229     ac_srcdir=.
24230     if test -z "$ac_top_builddir"; then
24231        ac_top_srcdir=.
24232     else
24233        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24234     fi ;;
24235   [\\/]* | ?:[\\/]* )  # Absolute path.
24236     ac_srcdir=$srcdir$ac_dir_suffix;
24237     ac_top_srcdir=$srcdir ;;
24238   *) # Relative path.
24239     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24240     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24241 esac
24242
24243 # Do not use `cd foo && pwd` to compute absolute paths, because
24244 # the directories may not exist.
24245 case `pwd` in
24246 .) ac_abs_builddir="$ac_dir";;
24247 *)
24248   case "$ac_dir" in
24249   .) ac_abs_builddir=`pwd`;;
24250   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24251   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24252   esac;;
24253 esac
24254 case $ac_abs_builddir in
24255 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24256 *)
24257   case ${ac_top_builddir}. in
24258   .) ac_abs_top_builddir=$ac_abs_builddir;;
24259   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24260   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24261   esac;;
24262 esac
24263 case $ac_abs_builddir in
24264 .) ac_abs_srcdir=$ac_srcdir;;
24265 *)
24266   case $ac_srcdir in
24267   .) ac_abs_srcdir=$ac_abs_builddir;;
24268   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24269   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24270   esac;;
24271 esac
24272 case $ac_abs_builddir in
24273 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24274 *)
24275   case $ac_top_srcdir in
24276   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24277   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24278   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24279   esac;;
24280 esac
24281
24282
24283
24284   if test x"$ac_file" != x-; then
24285     { echo "$as_me:$LINENO: creating $ac_file" >&5
24286 echo "$as_me: creating $ac_file" >&6;}
24287     rm -f "$ac_file"
24288   fi
24289   # Let's still pretend it is `configure' which instantiates (i.e., don't
24290   # use $as_me), people would be surprised to read:
24291   #    /* config.h.  Generated by config.status.  */
24292   if test x"$ac_file" = x-; then
24293     configure_input=
24294   else
24295     configure_input="$ac_file.  "
24296   fi
24297   configure_input=$configure_input"Generated from `echo $ac_file_in |
24298                                      sed 's,.*/,,'` by configure."
24299
24300   # First look for the input files in the build tree, otherwise in the
24301   # src tree.
24302   ac_file_inputs=`IFS=:
24303     for f in $ac_file_in; do
24304       case $f in
24305       -) echo $tmp/stdin ;;
24306       [\\/$]*)
24307          # Absolute (can't be DOS-style, as IFS=:)
24308          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24309 echo "$as_me: error: cannot find input file: $f" >&2;}
24310    { (exit 1); exit 1; }; }
24311          echo "$f";;
24312       *) # Relative
24313          if test -f "$f"; then
24314            # Build tree
24315            echo "$f"
24316          elif test -f "$srcdir/$f"; then
24317            # Source tree
24318            echo "$srcdir/$f"
24319          else
24320            # /dev/null tree
24321            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24322 echo "$as_me: error: cannot find input file: $f" >&2;}
24323    { (exit 1); exit 1; }; }
24324          fi;;
24325       esac
24326     done` || { (exit 1); exit 1; }
24327 _ACEOF
24328 cat >>$CONFIG_STATUS <<_ACEOF
24329   sed "$ac_vpsub
24330 $extrasub
24331 _ACEOF
24332 cat >>$CONFIG_STATUS <<\_ACEOF
24333 :t
24334 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24335 s,@configure_input@,$configure_input,;t t
24336 s,@srcdir@,$ac_srcdir,;t t
24337 s,@abs_srcdir@,$ac_abs_srcdir,;t t
24338 s,@top_srcdir@,$ac_top_srcdir,;t t
24339 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
24340 s,@builddir@,$ac_builddir,;t t
24341 s,@abs_builddir@,$ac_abs_builddir,;t t
24342 s,@top_builddir@,$ac_top_builddir,;t t
24343 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
24344 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24345   rm -f $tmp/stdin
24346   if test x"$ac_file" != x-; then
24347     mv $tmp/out $ac_file
24348   else
24349     cat $tmp/out
24350     rm -f $tmp/out
24351   fi
24352
24353 done
24354 _ACEOF
24355 cat >>$CONFIG_STATUS <<\_ACEOF
24356
24357 #
24358 # CONFIG_HEADER section.
24359 #
24360
24361 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24362 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24363 #
24364 # ac_d sets the value in "#define NAME VALUE" lines.
24365 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
24366 ac_dB='[         ].*$,\1#\2'
24367 ac_dC=' '
24368 ac_dD=',;t'
24369 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24370 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24371 ac_uB='$,\1#\2define\3'
24372 ac_uC=' '
24373 ac_uD=',;t'
24374
24375 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24376   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24377   case $ac_file in
24378   - | *:- | *:-:* ) # input from stdin
24379         cat >$tmp/stdin
24380         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24381         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24382   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24383         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24384   * )   ac_file_in=$ac_file.in ;;
24385   esac
24386
24387   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
24388 echo "$as_me: creating $ac_file" >&6;}
24389
24390   # First look for the input files in the build tree, otherwise in the
24391   # src tree.
24392   ac_file_inputs=`IFS=:
24393     for f in $ac_file_in; do
24394       case $f in
24395       -) echo $tmp/stdin ;;
24396       [\\/$]*)
24397          # Absolute (can't be DOS-style, as IFS=:)
24398          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24399 echo "$as_me: error: cannot find input file: $f" >&2;}
24400    { (exit 1); exit 1; }; }
24401          # Do quote $f, to prevent DOS paths from being IFS'd.
24402          echo "$f";;
24403       *) # Relative
24404          if test -f "$f"; then
24405            # Build tree
24406            echo "$f"
24407          elif test -f "$srcdir/$f"; then
24408            # Source tree
24409            echo "$srcdir/$f"
24410          else
24411            # /dev/null tree
24412            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
24413 echo "$as_me: error: cannot find input file: $f" >&2;}
24414    { (exit 1); exit 1; }; }
24415          fi;;
24416       esac
24417     done` || { (exit 1); exit 1; }
24418   # Remove the trailing spaces.
24419   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
24420
24421 _ACEOF
24422
24423 # Transform confdefs.h into two sed scripts, `conftest.defines' and
24424 # `conftest.undefs', that substitutes the proper values into
24425 # config.h.in to produce config.h.  The first handles `#define'
24426 # templates, and the second `#undef' templates.
24427 # And first: Protect against being on the right side of a sed subst in
24428 # config.status.  Protect against being in an unquoted here document
24429 # in config.status.
24430 rm -f conftest.defines conftest.undefs
24431 # Using a here document instead of a string reduces the quoting nightmare.
24432 # Putting comments in sed scripts is not portable.
24433 #
24434 # `end' is used to avoid that the second main sed command (meant for
24435 # 0-ary CPP macros) applies to n-ary macro definitions.
24436 # See the Autoconf documentation for `clear'.
24437 cat >confdef2sed.sed <<\_ACEOF
24438 s/[\\&,]/\\&/g
24439 s,[\\$`],\\&,g
24440 t clear
24441 : clear
24442 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
24443 t end
24444 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
24445 : end
24446 _ACEOF
24447 # If some macros were called several times there might be several times
24448 # the same #defines, which is useless.  Nevertheless, we may not want to
24449 # sort them, since we want the *last* AC-DEFINE to be honored.
24450 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
24451 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
24452 rm -f confdef2sed.sed
24453
24454 # This sed command replaces #undef with comments.  This is necessary, for
24455 # example, in the case of _POSIX_SOURCE, which is predefined and required
24456 # on some systems where configure will not decide to define it.
24457 cat >>conftest.undefs <<\_ACEOF
24458 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
24459 _ACEOF
24460
24461 # Break up conftest.defines because some shells have a limit on the size
24462 # of here documents, and old seds have small limits too (100 cmds).
24463 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
24464 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
24465 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
24466 echo '  :' >>$CONFIG_STATUS
24467 rm -f conftest.tail
24468 while grep . conftest.defines >/dev/null
24469 do
24470   # Write a limited-size here document to $tmp/defines.sed.
24471   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
24472   # Speed up: don't consider the non `#define' lines.
24473   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
24474   # Work around the forget-to-reset-the-flag bug.
24475   echo 't clr' >>$CONFIG_STATUS
24476   echo ': clr' >>$CONFIG_STATUS
24477   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
24478   echo 'CEOF
24479   sed -f $tmp/defines.sed $tmp/in >$tmp/out
24480   rm -f $tmp/in
24481   mv $tmp/out $tmp/in
24482 ' >>$CONFIG_STATUS
24483   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
24484   rm -f conftest.defines
24485   mv conftest.tail conftest.defines
24486 done
24487 rm -f conftest.defines
24488 echo '  fi # grep' >>$CONFIG_STATUS
24489 echo >>$CONFIG_STATUS
24490
24491 # Break up conftest.undefs because some shells have a limit on the size
24492 # of here documents, and old seds have small limits too (100 cmds).
24493 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
24494 rm -f conftest.tail
24495 while grep . conftest.undefs >/dev/null
24496 do
24497   # Write a limited-size here document to $tmp/undefs.sed.
24498   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
24499   # Speed up: don't consider the non `#undef'
24500   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
24501   # Work around the forget-to-reset-the-flag bug.
24502   echo 't clr' >>$CONFIG_STATUS
24503   echo ': clr' >>$CONFIG_STATUS
24504   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
24505   echo 'CEOF
24506   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
24507   rm -f $tmp/in
24508   mv $tmp/out $tmp/in
24509 ' >>$CONFIG_STATUS
24510   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
24511   rm -f conftest.undefs
24512   mv conftest.tail conftest.undefs
24513 done
24514 rm -f conftest.undefs
24515
24516 cat >>$CONFIG_STATUS <<\_ACEOF
24517   # Let's still pretend it is `configure' which instantiates (i.e., don't
24518   # use $as_me), people would be surprised to read:
24519   #    /* config.h.  Generated by config.status.  */
24520   if test x"$ac_file" = x-; then
24521     echo "/* Generated by configure.  */" >$tmp/config.h
24522   else
24523     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
24524   fi
24525   cat $tmp/in >>$tmp/config.h
24526   rm -f $tmp/in
24527   if test x"$ac_file" != x-; then
24528     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
24529       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24530 echo "$as_me: $ac_file is unchanged" >&6;}
24531     else
24532       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
24533 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24534          X"$ac_file" : 'X\(//\)[^/]' \| \
24535          X"$ac_file" : 'X\(//\)$' \| \
24536          X"$ac_file" : 'X\(/\)' \| \
24537          .     : '\(.\)' 2>/dev/null ||
24538 echo X"$ac_file" |
24539     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24540           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24541           /^X\(\/\/\)$/{ s//\1/; q; }
24542           /^X\(\/\).*/{ s//\1/; q; }
24543           s/.*/./; q'`
24544       { if $as_mkdir_p; then
24545     mkdir -p "$ac_dir"
24546   else
24547     as_dir="$ac_dir"
24548     as_dirs=
24549     while test ! -d "$as_dir"; do
24550       as_dirs="$as_dir $as_dirs"
24551       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24552 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24553          X"$as_dir" : 'X\(//\)[^/]' \| \
24554          X"$as_dir" : 'X\(//\)$' \| \
24555          X"$as_dir" : 'X\(/\)' \| \
24556          .     : '\(.\)' 2>/dev/null ||
24557 echo X"$as_dir" |
24558     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24559           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24560           /^X\(\/\/\)$/{ s//\1/; q; }
24561           /^X\(\/\).*/{ s//\1/; q; }
24562           s/.*/./; q'`
24563     done
24564     test ! -n "$as_dirs" || mkdir $as_dirs
24565   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24566 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24567    { (exit 1); exit 1; }; }; }
24568
24569       rm -f $ac_file
24570       mv $tmp/config.h $ac_file
24571     fi
24572   else
24573     cat $tmp/config.h
24574     rm -f $tmp/config.h
24575   fi
24576   # Run the commands associated with the file.
24577   case $ac_file in
24578     src/include/pg_config.h )
24579 # Update timestamp for pg_config.h (see Makefile.global)
24580 echo >src/include/stamp-h
24581  ;;
24582   esac
24583 done
24584 _ACEOF
24585 cat >>$CONFIG_STATUS <<\_ACEOF
24586
24587 #
24588 # CONFIG_LINKS section.
24589 #
24590
24591 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
24592   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24593   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24594
24595   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
24596 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
24597
24598   if test ! -r $srcdir/$ac_source; then
24599     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
24600 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
24601    { (exit 1); exit 1; }; }
24602   fi
24603   rm -f $ac_dest
24604
24605   # Make relative symlinks.
24606   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
24607 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24608          X"$ac_dest" : 'X\(//\)[^/]' \| \
24609          X"$ac_dest" : 'X\(//\)$' \| \
24610          X"$ac_dest" : 'X\(/\)' \| \
24611          .     : '\(.\)' 2>/dev/null ||
24612 echo X"$ac_dest" |
24613     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24614           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24615           /^X\(\/\/\)$/{ s//\1/; q; }
24616           /^X\(\/\).*/{ s//\1/; q; }
24617           s/.*/./; q'`
24618   { if $as_mkdir_p; then
24619     mkdir -p "$ac_dest_dir"
24620   else
24621     as_dir="$ac_dest_dir"
24622     as_dirs=
24623     while test ! -d "$as_dir"; do
24624       as_dirs="$as_dir $as_dirs"
24625       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24626 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24627          X"$as_dir" : 'X\(//\)[^/]' \| \
24628          X"$as_dir" : 'X\(//\)$' \| \
24629          X"$as_dir" : 'X\(/\)' \| \
24630          .     : '\(.\)' 2>/dev/null ||
24631 echo X"$as_dir" |
24632     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24633           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24634           /^X\(\/\/\)$/{ s//\1/; q; }
24635           /^X\(\/\).*/{ s//\1/; q; }
24636           s/.*/./; q'`
24637     done
24638     test ! -n "$as_dirs" || mkdir $as_dirs
24639   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
24640 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
24641    { (exit 1); exit 1; }; }; }
24642
24643   ac_builddir=.
24644
24645 if test "$ac_dest_dir" != .; then
24646   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
24647   # A "../" for each directory in $ac_dir_suffix.
24648   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24649 else
24650   ac_dir_suffix= ac_top_builddir=
24651 fi
24652
24653 case $srcdir in
24654   .)  # No --srcdir option.  We are building in place.
24655     ac_srcdir=.
24656     if test -z "$ac_top_builddir"; then
24657        ac_top_srcdir=.
24658     else
24659        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24660     fi ;;
24661   [\\/]* | ?:[\\/]* )  # Absolute path.
24662     ac_srcdir=$srcdir$ac_dir_suffix;
24663     ac_top_srcdir=$srcdir ;;
24664   *) # Relative path.
24665     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24666     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24667 esac
24668
24669 # Do not use `cd foo && pwd` to compute absolute paths, because
24670 # the directories may not exist.
24671 case `pwd` in
24672 .) ac_abs_builddir="$ac_dest_dir";;
24673 *)
24674   case "$ac_dest_dir" in
24675   .) ac_abs_builddir=`pwd`;;
24676   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
24677   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
24678   esac;;
24679 esac
24680 case $ac_abs_builddir in
24681 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24682 *)
24683   case ${ac_top_builddir}. in
24684   .) ac_abs_top_builddir=$ac_abs_builddir;;
24685   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24686   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24687   esac;;
24688 esac
24689 case $ac_abs_builddir in
24690 .) ac_abs_srcdir=$ac_srcdir;;
24691 *)
24692   case $ac_srcdir in
24693   .) ac_abs_srcdir=$ac_abs_builddir;;
24694   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24695   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24696   esac;;
24697 esac
24698 case $ac_abs_builddir in
24699 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24700 *)
24701   case $ac_top_srcdir in
24702   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24703   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24704   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24705   esac;;
24706 esac
24707
24708
24709   case $srcdir in
24710   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
24711       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
24712   esac
24713
24714   # Try a symlink, then a hard link, then a copy.
24715   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
24716     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
24717     cp -p $srcdir/$ac_source $ac_dest ||
24718     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
24719 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
24720    { (exit 1); exit 1; }; }
24721 done
24722 _ACEOF
24723 cat >>$CONFIG_STATUS <<\_ACEOF
24724
24725 #
24726 # CONFIG_COMMANDS section.
24727 #
24728 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24729   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24730   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24731   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
24732 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24733          X"$ac_dest" : 'X\(//\)[^/]' \| \
24734          X"$ac_dest" : 'X\(//\)$' \| \
24735          X"$ac_dest" : 'X\(/\)' \| \
24736          .     : '\(.\)' 2>/dev/null ||
24737 echo X"$ac_dest" |
24738     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24739           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24740           /^X\(\/\/\)$/{ s//\1/; q; }
24741           /^X\(\/\).*/{ s//\1/; q; }
24742           s/.*/./; q'`
24743   { if $as_mkdir_p; then
24744     mkdir -p "$ac_dir"
24745   else
24746     as_dir="$ac_dir"
24747     as_dirs=
24748     while test ! -d "$as_dir"; do
24749       as_dirs="$as_dir $as_dirs"
24750       as_dir=`(dirname "$as_dir") 2>/dev/null ||
24751 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24752          X"$as_dir" : 'X\(//\)[^/]' \| \
24753          X"$as_dir" : 'X\(//\)$' \| \
24754          X"$as_dir" : 'X\(/\)' \| \
24755          .     : '\(.\)' 2>/dev/null ||
24756 echo X"$as_dir" |
24757     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24758           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24759           /^X\(\/\/\)$/{ s//\1/; q; }
24760           /^X\(\/\).*/{ s//\1/; q; }
24761           s/.*/./; q'`
24762     done
24763     test ! -n "$as_dirs" || mkdir $as_dirs
24764   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
24765 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
24766    { (exit 1); exit 1; }; }; }
24767
24768   ac_builddir=.
24769
24770 if test "$ac_dir" != .; then
24771   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
24772   # A "../" for each directory in $ac_dir_suffix.
24773   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
24774 else
24775   ac_dir_suffix= ac_top_builddir=
24776 fi
24777
24778 case $srcdir in
24779   .)  # No --srcdir option.  We are building in place.
24780     ac_srcdir=.
24781     if test -z "$ac_top_builddir"; then
24782        ac_top_srcdir=.
24783     else
24784        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
24785     fi ;;
24786   [\\/]* | ?:[\\/]* )  # Absolute path.
24787     ac_srcdir=$srcdir$ac_dir_suffix;
24788     ac_top_srcdir=$srcdir ;;
24789   *) # Relative path.
24790     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
24791     ac_top_srcdir=$ac_top_builddir$srcdir ;;
24792 esac
24793
24794 # Do not use `cd foo && pwd` to compute absolute paths, because
24795 # the directories may not exist.
24796 case `pwd` in
24797 .) ac_abs_builddir="$ac_dir";;
24798 *)
24799   case "$ac_dir" in
24800   .) ac_abs_builddir=`pwd`;;
24801   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
24802   *) ac_abs_builddir=`pwd`/"$ac_dir";;
24803   esac;;
24804 esac
24805 case $ac_abs_builddir in
24806 .) ac_abs_top_builddir=${ac_top_builddir}.;;
24807 *)
24808   case ${ac_top_builddir}. in
24809   .) ac_abs_top_builddir=$ac_abs_builddir;;
24810   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
24811   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
24812   esac;;
24813 esac
24814 case $ac_abs_builddir in
24815 .) ac_abs_srcdir=$ac_srcdir;;
24816 *)
24817   case $ac_srcdir in
24818   .) ac_abs_srcdir=$ac_abs_builddir;;
24819   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24820   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24821   esac;;
24822 esac
24823 case $ac_abs_builddir in
24824 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24825 *)
24826   case $ac_top_srcdir in
24827   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24828   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24829   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24830   esac;;
24831 esac
24832
24833
24834   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24835 echo "$as_me: executing $ac_dest commands" >&6;}
24836   case $ac_dest in
24837     check_win32_symlinks )
24838 # Links sometimes fail undetected on Mingw -
24839 # so here we detect it and warn the user
24840 for FILE in $CONFIG_LINKS
24841  do
24842         # test -e works for symlinks in the MinGW console
24843         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE -- please fix by hand" >&5
24844 echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
24845  done
24846  ;;
24847   esac
24848 done
24849 _ACEOF
24850
24851 cat >>$CONFIG_STATUS <<\_ACEOF
24852
24853 { (exit 0); exit 0; }
24854 _ACEOF
24855 chmod +x $CONFIG_STATUS
24856 ac_clean_files=$ac_clean_files_save
24857
24858
24859 # configure is writing to config.log, and then calls config.status.
24860 # config.status does its own redirection, appending to config.log.
24861 # Unfortunately, on DOS this fails, as config.log is still kept open
24862 # by configure, so config.status won't be able to write to it; its
24863 # output is simply discarded.  So we exec the FD to /dev/null,
24864 # effectively closing config.log, so it can be properly (re)opened and
24865 # appended to by config.status.  When coming back to configure, we
24866 # need to make the FD available again.
24867 if test "$no_create" != yes; then
24868   ac_cs_success=:
24869   ac_config_status_args=
24870   test "$silent" = yes &&
24871     ac_config_status_args="$ac_config_status_args --quiet"
24872   exec 5>/dev/null
24873   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24874   exec 5>>config.log
24875   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24876   # would make configure fail if this is the last instruction.
24877   $ac_cs_success || { (exit 1); exit 1; }
24878 fi
24879
24880
24881 # Warn about unknown options
24882 for pgac_var in `set | sed 's/=.*//' | $EGREP 'with_|enable_'`; do
24883   for pgac_arg in $pgac_args with_gnu_ld; do
24884     if test "$pgac_var" = "$pgac_arg"; then
24885       continue 2
24886     fi
24887   done
24888   pgac_txt=`echo $pgac_var | sed 's/_/-/g'`
24889   { echo "$as_me:$LINENO: WARNING: option ignored: --$pgac_txt" >&5
24890 echo "$as_me: WARNING: option ignored: --$pgac_txt" >&2;}
24891 done