]> granicus.if.org Git - postgresql/blob - configure
089573a0a71b582abbf431f8eeab0882761d30b8
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.59 for PostgreSQL 8.2devel.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright (C) 2003 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 #
11 # Copyright (c) 1996-2005, PostgreSQL Global Development Group
12 ## --------------------- ##
13 ## M4sh Initialization.  ##
14 ## --------------------- ##
15
16 # Be Bourne compatible
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18   emulate sh
19   NULLCMD=:
20   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
21   # is contrary to our usage.  Disable this feature.
22   alias -g '${1+"$@"}'='"$@"'
23 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24   set -o posix
25 fi
26 DUALCASE=1; export DUALCASE # for MKS sh
27
28 # Support unset when possible.
29 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
30   as_unset=unset
31 else
32   as_unset=false
33 fi
34
35
36 # Work around bugs in pre-3.0 UWIN ksh.
37 $as_unset ENV MAIL MAILPATH
38 PS1='$ '
39 PS2='> '
40 PS4='+ '
41
42 # NLS nuisances.
43 for as_var in \
44   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
45   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
46   LC_TELEPHONE LC_TIME
47 do
48   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
49     eval $as_var=C; export $as_var
50   else
51     $as_unset $as_var
52   fi
53 done
54
55 # Required to use basename.
56 if expr a : '\(a\)' >/dev/null 2>&1; then
57   as_expr=expr
58 else
59   as_expr=false
60 fi
61
62 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
63   as_basename=basename
64 else
65   as_basename=false
66 fi
67
68
69 # Name of the executable.
70 as_me=`$as_basename "$0" ||
71 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
72          X"$0" : 'X\(//\)$' \| \
73          X"$0" : 'X\(/\)$' \| \
74          .     : '\(.\)' 2>/dev/null ||
75 echo X/"$0" |
76     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
77           /^X\/\(\/\/\)$/{ s//\1/; q; }
78           /^X\/\(\/\).*/{ s//\1/; q; }
79           s/.*/./; q'`
80
81
82 # PATH needs CR, and LINENO needs CR and PATH.
83 # Avoid depending upon Character Ranges.
84 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
85 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
86 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
87 as_cr_digits='0123456789'
88 as_cr_alnum=$as_cr_Letters$as_cr_digits
89
90 # The user is always right.
91 if test "${PATH_SEPARATOR+set}" != set; then
92   echo "#! /bin/sh" >conf$$.sh
93   echo  "exit 0"   >>conf$$.sh
94   chmod +x conf$$.sh
95   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
96     PATH_SEPARATOR=';'
97   else
98     PATH_SEPARATOR=:
99   fi
100   rm -f conf$$.sh
101 fi
102
103
104   as_lineno_1=$LINENO
105   as_lineno_2=$LINENO
106   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
107   test "x$as_lineno_1" != "x$as_lineno_2" &&
108   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
109   # Find who we are.  Look in the path if we contain no path at all
110   # relative or not.
111   case $0 in
112     *[\\/]* ) as_myself=$0 ;;
113     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114 for as_dir in $PATH
115 do
116   IFS=$as_save_IFS
117   test -z "$as_dir" && as_dir=.
118   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
119 done
120
121        ;;
122   esac
123   # We did not find ourselves, most probably we were run as `sh COMMAND'
124   # in which case we are not to be found in the path.
125   if test "x$as_myself" = x; then
126     as_myself=$0
127   fi
128   if test ! -f "$as_myself"; then
129     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
130    { (exit 1); exit 1; }; }
131   fi
132   case $CONFIG_SHELL in
133   '')
134     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
135 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
136 do
137   IFS=$as_save_IFS
138   test -z "$as_dir" && as_dir=.
139   for as_base in sh bash ksh sh5; do
140          case $as_dir in
141          /*)
142            if ("$as_dir/$as_base" -c '
143   as_lineno_1=$LINENO
144   as_lineno_2=$LINENO
145   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
146   test "x$as_lineno_1" != "x$as_lineno_2" &&
147   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
148              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
149              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
150              CONFIG_SHELL=$as_dir/$as_base
151              export CONFIG_SHELL
152              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
153            fi;;
154          esac
155        done
156 done
157 ;;
158   esac
159
160   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
161   # uniformly replaced by the line number.  The first 'sed' inserts a
162   # line-number line before each line; the second 'sed' does the real
163   # work.  The second script uses 'N' to pair each line-number line
164   # with the numbered line, and appends trailing '-' during
165   # substitution so that $LINENO is not a special case at line end.
166   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
167   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
168   sed '=' <$as_myself |
169     sed '
170       N
171       s,$,-,
172       : loop
173       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
174       t loop
175       s,-$,,
176       s,^['$as_cr_digits']*\n,,
177     ' >$as_me.lineno &&
178   chmod +x $as_me.lineno ||
179     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
180    { (exit 1); exit 1; }; }
181
182   # Don't try to exec as it changes $[0], causing all sort of problems
183   # (the dirname of $[0] is not the place where we might find the
184   # original and so on.  Autoconf is especially sensible to this).
185   . ./$as_me.lineno
186   # Exit status is that of the last command.
187   exit
188 }
189
190
191 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
192   *c*,-n*) ECHO_N= ECHO_C='
193 ' ECHO_T='      ' ;;
194   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
195   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
196 esac
197
198 if expr a : '\(a\)' >/dev/null 2>&1; then
199   as_expr=expr
200 else
201   as_expr=false
202 fi
203
204 rm -f conf$$ conf$$.exe conf$$.file
205 echo >conf$$.file
206 if ln -s conf$$.file conf$$ 2>/dev/null; then
207   # We could just check for DJGPP; but this test a) works b) is more generic
208   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
209   if test -f conf$$.exe; then
210     # Don't use ln at all; we don't have any links
211     as_ln_s='cp -p'
212   else
213     as_ln_s='ln -s'
214   fi
215 elif ln conf$$.file conf$$ 2>/dev/null; then
216   as_ln_s=ln
217 else
218   as_ln_s='cp -p'
219 fi
220 rm -f conf$$ conf$$.exe conf$$.file
221
222 if mkdir -p . 2>/dev/null; then
223   as_mkdir_p=:
224 else
225   test -d ./-p && rmdir ./-p
226   as_mkdir_p=false
227 fi
228
229 as_executable_p="test -f"
230
231 # Sed expression to map a string onto a valid CPP name.
232 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
233
234 # Sed expression to map a string onto a valid variable name.
235 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
236
237
238 # IFS
239 # We need space, tab and new line, in precisely that order.
240 as_nl='
241 '
242 IFS="   $as_nl"
243
244 # CDPATH.
245 $as_unset CDPATH
246
247
248 # Name of the host.
249 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
250 # so uname gets run too.
251 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
252
253 exec 6>&1
254
255 #
256 # Initializations.
257 #
258 ac_default_prefix=/usr/local
259 ac_config_libobj_dir=.
260 cross_compiling=no
261 subdirs=
262 MFLAGS=
263 MAKEFLAGS=
264 SHELL=${CONFIG_SHELL-/bin/sh}
265
266 # Maximum number of lines to put in a shell here document.
267 # This variable seems obsolete.  It should probably be removed, and
268 # only ac_max_sed_lines should be used.
269 : ${ac_max_here_lines=38}
270
271 # Identity of this package.
272 PACKAGE_NAME='PostgreSQL'
273 PACKAGE_TARNAME='postgresql'
274 PACKAGE_VERSION='8.2devel'
275 PACKAGE_STRING='PostgreSQL 8.2devel'
276 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
277
278 ac_unique_file="src/backend/access/common/heaptuple.c"
279 ac_default_prefix=/usr/local/pgsql
280 # Factoring default headers for most tests.
281 ac_includes_default="\
282 #include <stdio.h>
283 #if HAVE_SYS_TYPES_H
284 # include <sys/types.h>
285 #endif
286 #if HAVE_SYS_STAT_H
287 # include <sys/stat.h>
288 #endif
289 #if STDC_HEADERS
290 # include <stdlib.h>
291 # include <stddef.h>
292 #else
293 # if HAVE_STDLIB_H
294 #  include <stdlib.h>
295 # endif
296 #endif
297 #if HAVE_STRING_H
298 # if !STDC_HEADERS && HAVE_MEMORY_H
299 #  include <memory.h>
300 # endif
301 # include <string.h>
302 #endif
303 #if HAVE_STRINGS_H
304 # include <strings.h>
305 #endif
306 #if HAVE_INTTYPES_H
307 # include <inttypes.h>
308 #else
309 # if HAVE_STDINT_H
310 #  include <stdint.h>
311 # endif
312 #endif
313 #if HAVE_UNISTD_H
314 # include <unistd.h>
315 #endif"
316
317 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318 ac_subst_files=''
319
320 # Initialize some variables set by options.
321 ac_init_help=
322 ac_init_version=false
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 cache_file=/dev/null
326 exec_prefix=NONE
327 no_create=
328 no_recursion=
329 prefix=NONE
330 program_prefix=NONE
331 program_suffix=NONE
332 program_transform_name=s,x,x,
333 silent=
334 site=
335 srcdir=
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339
340 # Installation directory options.
341 # These are left unexpanded so users can "make install exec_prefix=/foo"
342 # and all the variables that are supposed to be based on exec_prefix
343 # by default will actually change.
344 # Use braces instead of parens because sh, perl, etc. also accept them.
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 ac_prev=
359 for ac_option
360 do
361   # If the previous option needs an argument, assign it.
362   if test -n "$ac_prev"; then
363     eval "$ac_prev=\$ac_option"
364     ac_prev=
365     continue
366   fi
367
368   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
369
370   # Accept the important Cygnus configure options, so we can diagnose typos.
371
372   case $ac_option in
373
374   -bindir | --bindir | --bindi | --bind | --bin | --bi)
375     ac_prev=bindir ;;
376   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
377     bindir=$ac_optarg ;;
378
379   -build | --build | --buil | --bui | --bu)
380     ac_prev=build_alias ;;
381   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
382     build_alias=$ac_optarg ;;
383
384   -cache-file | --cache-file | --cache-fil | --cache-fi \
385   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
386     ac_prev=cache_file ;;
387   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
388   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
389     cache_file=$ac_optarg ;;
390
391   --config-cache | -C)
392     cache_file=config.cache ;;
393
394   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
395     ac_prev=datadir ;;
396   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
397   | --da=*)
398     datadir=$ac_optarg ;;
399
400   -disable-* | --disable-*)
401     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
405    { (exit 1); exit 1; }; }
406     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
407     eval "enable_$ac_feature=no" ;;
408
409   -enable-* | --enable-*)
410     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
414    { (exit 1); exit 1; }; }
415     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
416     case $ac_option in
417       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418       *) ac_optarg=yes ;;
419     esac
420     eval "enable_$ac_feature='$ac_optarg'" ;;
421
422   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
423   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
424   | --exec | --exe | --ex)
425     ac_prev=exec_prefix ;;
426   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
427   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
428   | --exec=* | --exe=* | --ex=*)
429     exec_prefix=$ac_optarg ;;
430
431   -gas | --gas | --ga | --g)
432     # Obsolete; use --with-gas.
433     with_gas=yes ;;
434
435   -help | --help | --hel | --he | -h)
436     ac_init_help=long ;;
437   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
438     ac_init_help=recursive ;;
439   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
440     ac_init_help=short ;;
441
442   -host | --host | --hos | --ho)
443     ac_prev=host_alias ;;
444   -host=* | --host=* | --hos=* | --ho=*)
445     host_alias=$ac_optarg ;;
446
447   -includedir | --includedir | --includedi | --included | --include \
448   | --includ | --inclu | --incl | --inc)
449     ac_prev=includedir ;;
450   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
451   | --includ=* | --inclu=* | --incl=* | --inc=*)
452     includedir=$ac_optarg ;;
453
454   -infodir | --infodir | --infodi | --infod | --info | --inf)
455     ac_prev=infodir ;;
456   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
457     infodir=$ac_optarg ;;
458
459   -libdir | --libdir | --libdi | --libd)
460     ac_prev=libdir ;;
461   -libdir=* | --libdir=* | --libdi=* | --libd=*)
462     libdir=$ac_optarg ;;
463
464   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
465   | --libexe | --libex | --libe)
466     ac_prev=libexecdir ;;
467   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
468   | --libexe=* | --libex=* | --libe=*)
469     libexecdir=$ac_optarg ;;
470
471   -localstatedir | --localstatedir | --localstatedi | --localstated \
472   | --localstate | --localstat | --localsta | --localst \
473   | --locals | --local | --loca | --loc | --lo)
474     ac_prev=localstatedir ;;
475   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
476   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
477   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
478     localstatedir=$ac_optarg ;;
479
480   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
481     ac_prev=mandir ;;
482   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
483     mandir=$ac_optarg ;;
484
485   -nfp | --nfp | --nf)
486     # Obsolete; use --without-fp.
487     with_fp=no ;;
488
489   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
490   | --no-cr | --no-c | -n)
491     no_create=yes ;;
492
493   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
494   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
495     no_recursion=yes ;;
496
497   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
498   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
499   | --oldin | --oldi | --old | --ol | --o)
500     ac_prev=oldincludedir ;;
501   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
502   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
503   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
504     oldincludedir=$ac_optarg ;;
505
506   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
507     ac_prev=prefix ;;
508   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
509     prefix=$ac_optarg ;;
510
511   -program-prefix | --program-prefix | --program-prefi | --program-pref \
512   | --program-pre | --program-pr | --program-p)
513     ac_prev=program_prefix ;;
514   -program-prefix=* | --program-prefix=* | --program-prefi=* \
515   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
516     program_prefix=$ac_optarg ;;
517
518   -program-suffix | --program-suffix | --program-suffi | --program-suff \
519   | --program-suf | --program-su | --program-s)
520     ac_prev=program_suffix ;;
521   -program-suffix=* | --program-suffix=* | --program-suffi=* \
522   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
523     program_suffix=$ac_optarg ;;
524
525   -program-transform-name | --program-transform-name \
526   | --program-transform-nam | --program-transform-na \
527   | --program-transform-n | --program-transform- \
528   | --program-transform | --program-transfor \
529   | --program-transfo | --program-transf \
530   | --program-trans | --program-tran \
531   | --progr-tra | --program-tr | --program-t)
532     ac_prev=program_transform_name ;;
533   -program-transform-name=* | --program-transform-name=* \
534   | --program-transform-nam=* | --program-transform-na=* \
535   | --program-transform-n=* | --program-transform-=* \
536   | --program-transform=* | --program-transfor=* \
537   | --program-transfo=* | --program-transf=* \
538   | --program-trans=* | --program-tran=* \
539   | --progr-tra=* | --program-tr=* | --program-t=*)
540     program_transform_name=$ac_optarg ;;
541
542   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
543   | -silent | --silent | --silen | --sile | --sil)
544     silent=yes ;;
545
546   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
547     ac_prev=sbindir ;;
548   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
549   | --sbi=* | --sb=*)
550     sbindir=$ac_optarg ;;
551
552   -sharedstatedir | --sharedstatedir | --sharedstatedi \
553   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
554   | --sharedst | --shareds | --shared | --share | --shar \
555   | --sha | --sh)
556     ac_prev=sharedstatedir ;;
557   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
558   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
559   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
560   | --sha=* | --sh=*)
561     sharedstatedir=$ac_optarg ;;
562
563   -site | --site | --sit)
564     ac_prev=site ;;
565   -site=* | --site=* | --sit=*)
566     site=$ac_optarg ;;
567
568   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
569     ac_prev=srcdir ;;
570   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
571     srcdir=$ac_optarg ;;
572
573   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
574   | --syscon | --sysco | --sysc | --sys | --sy)
575     ac_prev=sysconfdir ;;
576   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
577   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
578     sysconfdir=$ac_optarg ;;
579
580   -target | --target | --targe | --targ | --tar | --ta | --t)
581     ac_prev=target_alias ;;
582   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
583     target_alias=$ac_optarg ;;
584
585   -v | -verbose | --verbose | --verbos | --verbo | --verb)
586     verbose=yes ;;
587
588   -version | --version | --versio | --versi | --vers | -V)
589     ac_init_version=: ;;
590
591   -with-* | --with-*)
592     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
593     # Reject names that are not valid shell variable names.
594     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
595       { echo "$as_me: error: invalid package name: $ac_package" >&2
596    { (exit 1); exit 1; }; }
597     ac_package=`echo $ac_package| sed 's/-/_/g'`
598     case $ac_option in
599       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
600       *) ac_optarg=yes ;;
601     esac
602     eval "with_$ac_package='$ac_optarg'" ;;
603
604   -without-* | --without-*)
605     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
606     # Reject names that are not valid shell variable names.
607     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
608       { echo "$as_me: error: invalid package name: $ac_package" >&2
609    { (exit 1); exit 1; }; }
610     ac_package=`echo $ac_package | sed 's/-/_/g'`
611     eval "with_$ac_package=no" ;;
612
613   --x)
614     # Obsolete; use --with-x.
615     with_x=yes ;;
616
617   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
618   | --x-incl | --x-inc | --x-in | --x-i)
619     ac_prev=x_includes ;;
620   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
621   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
622     x_includes=$ac_optarg ;;
623
624   -x-libraries | --x-libraries | --x-librarie | --x-librari \
625   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
626     ac_prev=x_libraries ;;
627   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
628   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
629     x_libraries=$ac_optarg ;;
630
631   -*) { echo "$as_me: error: unrecognized option: $ac_option
632 Try \`$0 --help' for more information." >&2
633    { (exit 1); exit 1; }; }
634     ;;
635
636   *=*)
637     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
638     # Reject names that are not valid shell variable names.
639     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
640       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
641    { (exit 1); exit 1; }; }
642     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
643     eval "$ac_envvar='$ac_optarg'"
644     export $ac_envvar ;;
645
646   *)
647     # FIXME: should be removed in autoconf 3.0.
648     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
649     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
650       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
651     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
652     ;;
653
654   esac
655 done
656
657 if test -n "$ac_prev"; then
658   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
659   { echo "$as_me: error: missing argument to $ac_option" >&2
660    { (exit 1); exit 1; }; }
661 fi
662
663 # Be sure to have absolute paths.
664 for ac_var in exec_prefix prefix
665 do
666   eval ac_val=$`echo $ac_var`
667   case $ac_val in
668     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
669     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
670    { (exit 1); exit 1; }; };;
671   esac
672 done
673
674 # Be sure to have absolute paths.
675 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
676               localstatedir libdir includedir oldincludedir infodir mandir
677 do
678   eval ac_val=$`echo $ac_var`
679   case $ac_val in
680     [\\/$]* | ?:[\\/]* ) ;;
681     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
682    { (exit 1); exit 1; }; };;
683   esac
684 done
685
686 # There might be people who depend on the old broken behavior: `$host'
687 # used to hold the argument of --host etc.
688 # FIXME: To remove some day.
689 build=$build_alias
690 host=$host_alias
691 target=$target_alias
692
693 # FIXME: To remove some day.
694 if test "x$host_alias" != x; then
695   if test "x$build_alias" = x; then
696     cross_compiling=maybe
697     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
698     If a cross compiler is detected then cross compile mode will be used." >&2
699   elif test "x$build_alias" != "x$host_alias"; then
700     cross_compiling=yes
701   fi
702 fi
703
704 ac_tool_prefix=
705 test -n "$host_alias" && ac_tool_prefix=$host_alias-
706
707 test "$silent" = yes && exec 6>/dev/null
708
709
710 # Find the source files, if location was not specified.
711 if test -z "$srcdir"; then
712   ac_srcdir_defaulted=yes
713   # Try the directory containing this script, then its parent.
714   ac_confdir=`(dirname "$0") 2>/dev/null ||
715 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
716          X"$0" : 'X\(//\)[^/]' \| \
717          X"$0" : 'X\(//\)$' \| \
718          X"$0" : 'X\(/\)' \| \
719          .     : '\(.\)' 2>/dev/null ||
720 echo X"$0" |
721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
722           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
723           /^X\(\/\/\)$/{ s//\1/; q; }
724           /^X\(\/\).*/{ s//\1/; q; }
725           s/.*/./; q'`
726   srcdir=$ac_confdir
727   if test ! -r $srcdir/$ac_unique_file; then
728     srcdir=..
729   fi
730 else
731   ac_srcdir_defaulted=no
732 fi
733 if test ! -r $srcdir/$ac_unique_file; then
734   if test "$ac_srcdir_defaulted" = yes; then
735     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
736    { (exit 1); exit 1; }; }
737   else
738     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
739    { (exit 1); exit 1; }; }
740   fi
741 fi
742 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
743   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
744    { (exit 1); exit 1; }; }
745 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
746 ac_env_build_alias_set=${build_alias+set}
747 ac_env_build_alias_value=$build_alias
748 ac_cv_env_build_alias_set=${build_alias+set}
749 ac_cv_env_build_alias_value=$build_alias
750 ac_env_host_alias_set=${host_alias+set}
751 ac_env_host_alias_value=$host_alias
752 ac_cv_env_host_alias_set=${host_alias+set}
753 ac_cv_env_host_alias_value=$host_alias
754 ac_env_target_alias_set=${target_alias+set}
755 ac_env_target_alias_value=$target_alias
756 ac_cv_env_target_alias_set=${target_alias+set}
757 ac_cv_env_target_alias_value=$target_alias
758 ac_env_CC_set=${CC+set}
759 ac_env_CC_value=$CC
760 ac_cv_env_CC_set=${CC+set}
761 ac_cv_env_CC_value=$CC
762 ac_env_CFLAGS_set=${CFLAGS+set}
763 ac_env_CFLAGS_value=$CFLAGS
764 ac_cv_env_CFLAGS_set=${CFLAGS+set}
765 ac_cv_env_CFLAGS_value=$CFLAGS
766 ac_env_LDFLAGS_set=${LDFLAGS+set}
767 ac_env_LDFLAGS_value=$LDFLAGS
768 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
769 ac_cv_env_LDFLAGS_value=$LDFLAGS
770 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
771 ac_env_CPPFLAGS_value=$CPPFLAGS
772 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
773 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
774 ac_env_CPP_set=${CPP+set}
775 ac_env_CPP_value=$CPP
776 ac_cv_env_CPP_set=${CPP+set}
777 ac_cv_env_CPP_value=$CPP
778 ac_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
779 ac_env_LDFLAGS_SL_value=$LDFLAGS_SL
780 ac_cv_env_LDFLAGS_SL_set=${LDFLAGS_SL+set}
781 ac_cv_env_LDFLAGS_SL_value=$LDFLAGS_SL
782 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
783 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
784 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
785 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
786
787 #
788 # Report the --help message.
789 #
790 if test "$ac_init_help" = "long"; then
791   # Omit some internal or obsolete options to make the list less imposing.
792   # This message is too long to be a string in the A/UX 3.1 sh.
793   cat <<_ACEOF
794 \`configure' configures PostgreSQL 8.2devel to adapt to many kinds of systems.
795
796 Usage: $0 [OPTION]... [VAR=VALUE]...
797
798 To assign environment variables (e.g., CC, CFLAGS...), specify them as
799 VAR=VALUE.  See below for descriptions of some of the useful variables.
800
801 Defaults for the options are specified in brackets.
802
803 Configuration:
804   -h, --help              display this help and exit
805       --help=short        display options specific to this package
806       --help=recursive    display the short help of all the included packages
807   -V, --version           display version information and exit
808   -q, --quiet, --silent   do not print \`checking...' messages
809       --cache-file=FILE   cache test results in FILE [disabled]
810   -C, --config-cache      alias for \`--cache-file=config.cache'
811   -n, --no-create         do not create output files
812       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
813
814 _ACEOF
815
816   cat <<_ACEOF
817 Installation directories:
818   --prefix=PREFIX         install architecture-independent files in PREFIX
819                           [$ac_default_prefix]
820   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
821                           [PREFIX]
822
823 By default, \`make install' will install all the files in
824 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
825 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
826 for instance \`--prefix=\$HOME'.
827
828 For better control, use the options below.
829
830 Fine tuning of the installation directories:
831   --bindir=DIR           user executables [EPREFIX/bin]
832   --sbindir=DIR          system admin executables [EPREFIX/sbin]
833   --libexecdir=DIR       program executables [EPREFIX/libexec]
834   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
835   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
836   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
837   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
838   --libdir=DIR           object code libraries [EPREFIX/lib]
839   --includedir=DIR       C header files [PREFIX/include]
840   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
841   --infodir=DIR          info documentation [PREFIX/info]
842   --mandir=DIR           man documentation [PREFIX/man]
843 _ACEOF
844
845   cat <<\_ACEOF
846
847 System types:
848   --build=BUILD     configure for building on BUILD [guessed]
849   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
850 _ACEOF
851 fi
852
853 if test -n "$ac_init_help"; then
854   case $ac_init_help in
855      short | recursive ) echo "Configuration of PostgreSQL 8.2devel:";;
856    esac
857   cat <<\_ACEOF
858
859 Optional Features:
860   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
861   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
862   --enable-integer-datetimes  enable 64-bit integer date/time support
863   --enable-nls[=LANGUAGES]  enable Native Language Support
864   --disable-shared        do not build shared libraries
865   --disable-rpath         do not embed shared library search path in executables
866   --disable-spinlocks     do not use spinlocks
867   --enable-debug          build with debugging symbols (-g)
868   --enable-depend         turn on automatic dependency tracking
869   --enable-cassert        enable assertion checks (for debugging)
870   --enable-thread-safety  make client libraries thread-safe
871   --enable-thread-safety-force  force thread-safety in spite of thread test failure
872   --disable-largefile     omit support for large files
873
874 Optional Packages:
875   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
876   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
877
878   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
879   --without-docdir        do not install the documentation
880   --with-includes=DIRS    look for additional header files in DIRS
881   --with-libraries=DIRS   look for additional libraries in DIRS
882   --with-libs=DIRS        alternative spelling of --with-libraries
883   --with-pgport=PORTNUM   change default port number 5432
884   --with-tcl              build Tcl modules (PL/Tcl)
885   --with-tclconfig=DIR    tclConfig.sh is in DIR
886   --with-perl             build Perl modules (PL/Perl)
887   --with-python           build Python modules (PL/Python)
888   --with-krb5             build with Kerberos 5 support
889   --with-krb-srvnam=NAME  name of the default service principal in Kerberos [postgres]
890   --with-pam              build with PAM support
891   --with-bonjour          build with Bonjour support
892   --with-openssl          build with OpenSSL support
893   --with-libedit-preferred  prefer BSD Libedit over GNU Readline
894   --without-readline      do not use GNU Readline / BSD Libedit line editing
895   --without-zlib          do not use Zlib
896   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
897
898 Some influential environment variables:
899   CC          C compiler command
900   CFLAGS      C compiler flags
901   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
902               nonstandard directory <lib dir>
903   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
904               headers in a nonstandard directory <include dir>
905   CPP         C preprocessor
906   LDFLAGS_SL
907   DOCBOOKSTYLE
908               location of DocBook stylesheets
909
910 Use these variables to override the choices made by `configure' or to help
911 it to find libraries and programs with nonstandard names/locations.
912
913 Report bugs to <pgsql-bugs@postgresql.org>.
914 _ACEOF
915 fi
916
917 if test "$ac_init_help" = "recursive"; then
918   # If there are subdirs, report their specific --help.
919   ac_popdir=`pwd`
920   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
921     test -d $ac_dir || continue
922     ac_builddir=.
923
924 if test "$ac_dir" != .; then
925   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
926   # A "../" for each directory in $ac_dir_suffix.
927   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
928 else
929   ac_dir_suffix= ac_top_builddir=
930 fi
931
932 case $srcdir in
933   .)  # No --srcdir option.  We are building in place.
934     ac_srcdir=.
935     if test -z "$ac_top_builddir"; then
936        ac_top_srcdir=.
937     else
938        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
939     fi ;;
940   [\\/]* | ?:[\\/]* )  # Absolute path.
941     ac_srcdir=$srcdir$ac_dir_suffix;
942     ac_top_srcdir=$srcdir ;;
943   *) # Relative path.
944     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
945     ac_top_srcdir=$ac_top_builddir$srcdir ;;
946 esac
947
948 # Do not use `cd foo && pwd` to compute absolute paths, because
949 # the directories may not exist.
950 case `pwd` in
951 .) ac_abs_builddir="$ac_dir";;
952 *)
953   case "$ac_dir" in
954   .) ac_abs_builddir=`pwd`;;
955   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
956   *) ac_abs_builddir=`pwd`/"$ac_dir";;
957   esac;;
958 esac
959 case $ac_abs_builddir in
960 .) ac_abs_top_builddir=${ac_top_builddir}.;;
961 *)
962   case ${ac_top_builddir}. in
963   .) ac_abs_top_builddir=$ac_abs_builddir;;
964   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
965   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
966   esac;;
967 esac
968 case $ac_abs_builddir in
969 .) ac_abs_srcdir=$ac_srcdir;;
970 *)
971   case $ac_srcdir in
972   .) ac_abs_srcdir=$ac_abs_builddir;;
973   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
974   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
975   esac;;
976 esac
977 case $ac_abs_builddir in
978 .) ac_abs_top_srcdir=$ac_top_srcdir;;
979 *)
980   case $ac_top_srcdir in
981   .) ac_abs_top_srcdir=$ac_abs_builddir;;
982   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
983   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
984   esac;;
985 esac
986
987     cd $ac_dir
988     # Check for guested configure; otherwise get Cygnus style configure.
989     if test -f $ac_srcdir/configure.gnu; then
990       echo
991       $SHELL $ac_srcdir/configure.gnu  --help=recursive
992     elif test -f $ac_srcdir/configure; then
993       echo
994       $SHELL $ac_srcdir/configure  --help=recursive
995     elif test -f $ac_srcdir/configure.ac ||
996            test -f $ac_srcdir/configure.in; then
997       echo
998       $ac_configure --help
999     else
1000       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1001     fi
1002     cd $ac_popdir
1003   done
1004 fi
1005
1006 test -n "$ac_init_help" && exit 0
1007 if $ac_init_version; then
1008   cat <<\_ACEOF
1009 PostgreSQL configure 8.2devel
1010 generated by GNU Autoconf 2.59
1011
1012 Copyright (C) 2003 Free Software Foundation, Inc.
1013 This configure script is free software; the Free Software Foundation
1014 gives unlimited permission to copy, distribute and modify it.
1015
1016 Copyright (c) 1996-2005, PostgreSQL Global Development Group
1017 _ACEOF
1018   exit 0
1019 fi
1020 exec 5>config.log
1021 cat >&5 <<_ACEOF
1022 This file contains any messages produced by compilers while
1023 running configure, to aid debugging if configure makes a mistake.
1024
1025 It was created by PostgreSQL $as_me 8.2devel, which was
1026 generated by GNU Autoconf 2.59.  Invocation command line was
1027
1028   $ $0 $@
1029
1030 _ACEOF
1031 {
1032 cat <<_ASUNAME
1033 ## --------- ##
1034 ## Platform. ##
1035 ## --------- ##
1036
1037 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1038 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1039 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1040 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1041 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1042
1043 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1044 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1045
1046 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1047 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1048 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1049 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1050 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1051 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1052 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1053
1054 _ASUNAME
1055
1056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1057 for as_dir in $PATH
1058 do
1059   IFS=$as_save_IFS
1060   test -z "$as_dir" && as_dir=.
1061   echo "PATH: $as_dir"
1062 done
1063
1064 } >&5
1065
1066 cat >&5 <<_ACEOF
1067
1068
1069 ## ----------- ##
1070 ## Core tests. ##
1071 ## ----------- ##
1072
1073 _ACEOF
1074
1075
1076 # Keep a trace of the command line.
1077 # Strip out --no-create and --no-recursion so they do not pile up.
1078 # Strip out --silent because we don't want to record it for future runs.
1079 # Also quote any args containing shell meta-characters.
1080 # Make two passes to allow for proper duplicate-argument suppression.
1081 ac_configure_args=
1082 ac_configure_args0=
1083 ac_configure_args1=
1084 ac_sep=
1085 ac_must_keep_next=false
1086 for ac_pass in 1 2
1087 do
1088   for ac_arg
1089   do
1090     case $ac_arg in
1091     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1092     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1093     | -silent | --silent | --silen | --sile | --sil)
1094       continue ;;
1095     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1096       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1097     esac
1098     case $ac_pass in
1099     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1100     2)
1101       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1102       if test $ac_must_keep_next = true; then
1103         ac_must_keep_next=false # Got value, back to normal.
1104       else
1105         case $ac_arg in
1106           *=* | --config-cache | -C | -disable-* | --disable-* \
1107           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1108           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1109           | -with-* | --with-* | -without-* | --without-* | --x)
1110             case "$ac_configure_args0 " in
1111               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1112             esac
1113             ;;
1114           -* ) ac_must_keep_next=true ;;
1115         esac
1116       fi
1117       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1118       # Get rid of the leading space.
1119       ac_sep=" "
1120       ;;
1121     esac
1122   done
1123 done
1124 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1125 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1126
1127 # When interrupted or exit'd, cleanup temporary files, and complete
1128 # config.log.  We remove comments because anyway the quotes in there
1129 # would cause problems or look ugly.
1130 # WARNING: Be sure not to use single quotes in there, as some shells,
1131 # such as our DU 5.0 friend, will then `close' the trap.
1132 trap 'exit_status=$?
1133   # Save into config.log some information that might help in debugging.
1134   {
1135     echo
1136
1137     cat <<\_ASBOX
1138 ## ---------------- ##
1139 ## Cache variables. ##
1140 ## ---------------- ##
1141 _ASBOX
1142     echo
1143     # The following way of writing the cache mishandles newlines in values,
1144 {
1145   (set) 2>&1 |
1146     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1147     *ac_space=\ *)
1148       sed -n \
1149         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1150           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1151       ;;
1152     *)
1153       sed -n \
1154         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1155       ;;
1156     esac;
1157 }
1158     echo
1159
1160     cat <<\_ASBOX
1161 ## ----------------- ##
1162 ## Output variables. ##
1163 ## ----------------- ##
1164 _ASBOX
1165     echo
1166     for ac_var in $ac_subst_vars
1167     do
1168       eval ac_val=$`echo $ac_var`
1169       echo "$ac_var='"'"'$ac_val'"'"'"
1170     done | sort
1171     echo
1172
1173     if test -n "$ac_subst_files"; then
1174       cat <<\_ASBOX
1175 ## ------------- ##
1176 ## Output files. ##
1177 ## ------------- ##
1178 _ASBOX
1179       echo
1180       for ac_var in $ac_subst_files
1181       do
1182         eval ac_val=$`echo $ac_var`
1183         echo "$ac_var='"'"'$ac_val'"'"'"
1184       done | sort
1185       echo
1186     fi
1187
1188     if test -s confdefs.h; then
1189       cat <<\_ASBOX
1190 ## ----------- ##
1191 ## confdefs.h. ##
1192 ## ----------- ##
1193 _ASBOX
1194       echo
1195       sed "/^$/d" confdefs.h | sort
1196       echo
1197     fi
1198     test "$ac_signal" != 0 &&
1199       echo "$as_me: caught signal $ac_signal"
1200     echo "$as_me: exit $exit_status"
1201   } >&5
1202   rm -f core *.core &&
1203   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1204     exit $exit_status
1205      ' 0
1206 for ac_signal in 1 2 13 15; do
1207   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1208 done
1209 ac_signal=0
1210
1211 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1212 rm -rf conftest* confdefs.h
1213 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1214 echo >confdefs.h
1215
1216 # Predefined preprocessor variables.
1217
1218 cat >>confdefs.h <<_ACEOF
1219 #define PACKAGE_NAME "$PACKAGE_NAME"
1220 _ACEOF
1221
1222
1223 cat >>confdefs.h <<_ACEOF
1224 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1225 _ACEOF
1226
1227
1228 cat >>confdefs.h <<_ACEOF
1229 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1230 _ACEOF
1231
1232
1233 cat >>confdefs.h <<_ACEOF
1234 #define PACKAGE_STRING "$PACKAGE_STRING"
1235 _ACEOF
1236
1237
1238 cat >>confdefs.h <<_ACEOF
1239 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1240 _ACEOF
1241
1242
1243 # Let the site file select an alternate cache file if it wants to.
1244 # Prefer explicitly selected file to automatically selected ones.
1245 if test -z "$CONFIG_SITE"; then
1246   if test "x$prefix" != xNONE; then
1247     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1248   else
1249     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1250   fi
1251 fi
1252 for ac_site_file in $CONFIG_SITE; do
1253   if test -r "$ac_site_file"; then
1254     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1255 echo "$as_me: loading site script $ac_site_file" >&6;}
1256     sed 's/^/| /' "$ac_site_file" >&5
1257     . "$ac_site_file"
1258   fi
1259 done
1260
1261 if test -r "$cache_file"; then
1262   # Some versions of bash will fail to source /dev/null (special
1263   # files actually), so we avoid doing that.
1264   if test -f "$cache_file"; then
1265     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1266 echo "$as_me: loading cache $cache_file" >&6;}
1267     case $cache_file in
1268       [\\/]* | ?:[\\/]* ) . $cache_file;;
1269       *)                      . ./$cache_file;;
1270     esac
1271   fi
1272 else
1273   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1274 echo "$as_me: creating cache $cache_file" >&6;}
1275   >$cache_file
1276 fi
1277
1278 # Check that the precious variables saved in the cache have kept the same
1279 # value.
1280 ac_cache_corrupted=false
1281 for ac_var in `(set) 2>&1 |
1282                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1283   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1284   eval ac_new_set=\$ac_env_${ac_var}_set
1285   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1286   eval ac_new_val="\$ac_env_${ac_var}_value"
1287   case $ac_old_set,$ac_new_set in
1288     set,)
1289       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1290 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1291       ac_cache_corrupted=: ;;
1292     ,set)
1293       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1294 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1295       ac_cache_corrupted=: ;;
1296     ,);;
1297     *)
1298       if test "x$ac_old_val" != "x$ac_new_val"; then
1299         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1300 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1301         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1302 echo "$as_me:   former value:  $ac_old_val" >&2;}
1303         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1304 echo "$as_me:   current value: $ac_new_val" >&2;}
1305         ac_cache_corrupted=:
1306       fi;;
1307   esac
1308   # Pass precious variables to config.status.
1309   if test "$ac_new_set" = set; then
1310     case $ac_new_val in
1311     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1312       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1313     *) ac_arg=$ac_var=$ac_new_val ;;
1314     esac
1315     case " $ac_configure_args " in
1316       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1317       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1318     esac
1319   fi
1320 done
1321 if $ac_cache_corrupted; then
1322   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1323 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1324   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1325 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 ac_ext=c
1330 ac_cpp='$CPP $CPPFLAGS'
1331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365 ac_aux_dir=
1366 for ac_dir in config $srcdir/config; do
1367   if test -f $ac_dir/install-sh; then
1368     ac_aux_dir=$ac_dir
1369     ac_install_sh="$ac_aux_dir/install-sh -c"
1370     break
1371   elif 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/shtool; then
1376     ac_aux_dir=$ac_dir
1377     ac_install_sh="$ac_aux_dir/shtool install -c"
1378     break
1379   fi
1380 done
1381 if test -z "$ac_aux_dir"; then
1382   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1383 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1384    { (exit 1); exit 1; }; }
1385 fi
1386 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1387 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1388 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1389
1390
1391 configure_args=$ac_configure_args
1392
1393
1394
1395 cat >>confdefs.h <<_ACEOF
1396 #define PG_VERSION "$PACKAGE_VERSION"
1397 _ACEOF
1398
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:$LINENO: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431
1432 echo "$as_me:$LINENO: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453
1454
1455 template=
1456 echo "$as_me:$LINENO: checking which template to use" >&5
1457 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1458
1459
1460
1461
1462 # Check whether --with-template or --without-template was given.
1463 if test "${with_template+set}" = set; then
1464   withval="$with_template"
1465
1466   case $withval in
1467     yes)
1468       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1469 echo "$as_me: error: argument required for --with-template option" >&2;}
1470    { (exit 1); exit 1; }; }
1471       ;;
1472     no)
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     *)
1478
1479   case $withval in
1480     list)   echo; ls "$srcdir/src/template"; exit;;
1481     *)      if test -f "$srcdir/src/template/$with_template" ; then
1482               template=$withval
1483             else
1484               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1485 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1486    { (exit 1); exit 1; }; }
1487             fi;;
1488   esac
1489
1490       ;;
1491   esac
1492
1493 else
1494
1495 # --with-template not given
1496
1497 case $host_os in
1498      aix*) template=aix ;;
1499     beos*) template=beos ;;
1500     bsdi*) template=bsdi ;;
1501   cygwin*) template=cygwin ;;
1502   darwin*) template=darwin ;;
1503     dgux*) template=dgux ;;
1504  freebsd*) template=freebsd ;;
1505     hpux*) template=hpux ;;
1506     irix*) template=irix ;;
1507  linux*|gnu*|k*bsd*-gnu)
1508            template=linux ;;
1509    mingw*) template=win32 ;;
1510   netbsd*) template=netbsd ;;
1511 nextstep*) template=nextstep ;;
1512  openbsd*) template=openbsd ;;
1513      osf*) template=osf ;;
1514      qnx*) template=qnx4 ;;
1515      sco*) template=sco ;;
1516  solaris*) template=solaris ;;
1517    sunos*) template=sunos4 ;;
1518  sysv4.2*)
1519         case $host_vendor in
1520           univel) template=univel ;;
1521         esac ;;
1522    sysv4*) template=svr4 ;;
1523    sysv5*) template=unixware ;;
1524   ultrix*) template=ultrix4 ;;
1525 esac
1526
1527   if test x"$template" = x"" ; then
1528     { { echo "$as_me:$LINENO: error:
1529 *******************************************************************
1530 PostgreSQL has apparently not been ported to your platform yet.
1531 To try a manual configuration, look into the src/template directory
1532 for a similar platform and use the '--with-template=' option.
1533
1534 Please also contact <pgsql-ports@postgresql.org> to see about
1535 rectifying this.  Include the above 'checking host system type...'
1536 line.
1537 *******************************************************************
1538 " >&5
1539 echo "$as_me: error:
1540 *******************************************************************
1541 PostgreSQL has apparently not been ported to your platform yet.
1542 To try a manual configuration, look into the src/template directory
1543 for a similar platform and use the '--with-template=' option.
1544
1545 Please also contact <pgsql-ports@postgresql.org> to see about
1546 rectifying this.  Include the above 'checking host system type...'
1547 line.
1548 *******************************************************************
1549 " >&2;}
1550    { (exit 1); exit 1; }; }
1551   fi
1552
1553
1554 fi;
1555
1556
1557 echo "$as_me:$LINENO: result: $template" >&5
1558 echo "${ECHO_T}$template" >&6
1559
1560 PORTNAME=$template
1561
1562
1563 # Initialize default assumption that we do not need separate assembly code
1564 # for TAS (test-and-set).  This can be overridden by the template file
1565 # when it's executed.
1566 need_tas=no
1567 tas_file=dummy.s
1568
1569
1570
1571 ##
1572 ## Command line options
1573 ##
1574
1575 #
1576 # Installation directory for documentation
1577 #
1578
1579
1580
1581 # Check whether --with-docdir or --without-docdir was given.
1582 if test "${with_docdir+set}" = set; then
1583   withval="$with_docdir"
1584
1585   case $withval in
1586     yes)
1587       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1588 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1589    { (exit 1); exit 1; }; }
1590       ;;
1591     no)
1592       docdir=
1593       ;;
1594     *)
1595       docdir=$withval
1596       ;;
1597   esac
1598
1599 else
1600   docdir='${prefix}/doc'
1601 fi;
1602
1603
1604
1605
1606 #
1607 # Add non-standard directories to the include path
1608 #
1609
1610
1611
1612 # Check whether --with-includes or --without-includes was given.
1613 if test "${with_includes+set}" = set; then
1614   withval="$with_includes"
1615
1616   case $withval in
1617     yes)
1618       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1619 echo "$as_me: error: argument required for --with-includes option" >&2;}
1620    { (exit 1); exit 1; }; }
1621       ;;
1622     no)
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     *)
1628
1629       ;;
1630   esac
1631
1632 fi;
1633
1634
1635
1636 #
1637 # Add non-standard directories to the library search path
1638 #
1639
1640
1641
1642 # Check whether --with-libraries or --without-libraries was given.
1643 if test "${with_libraries+set}" = set; then
1644   withval="$with_libraries"
1645
1646   case $withval in
1647     yes)
1648       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1649 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1650    { (exit 1); exit 1; }; }
1651       ;;
1652     no)
1653       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1654 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1655    { (exit 1); exit 1; }; }
1656       ;;
1657     *)
1658       LIBRARY_DIRS=$withval
1659       ;;
1660   esac
1661
1662 fi;
1663
1664
1665
1666
1667
1668 # Check whether --with-libs or --without-libs was given.
1669 if test "${with_libs+set}" = set; then
1670   withval="$with_libs"
1671
1672   case $withval in
1673     yes)
1674       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1675 echo "$as_me: error: argument required for --with-libs option" >&2;}
1676    { (exit 1); exit 1; }; }
1677       ;;
1678     no)
1679       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1680 echo "$as_me: error: argument required for --with-libs option" >&2;}
1681    { (exit 1); exit 1; }; }
1682       ;;
1683     *)
1684       LIBRARY_DIRS=$withval
1685       ;;
1686   esac
1687
1688 fi;
1689
1690
1691
1692 #
1693 # 64-bit integer date/time storage (--enable-integer-datetimes)
1694 #
1695 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1696 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1697
1698
1699 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1700 if test "${enable_integer_datetimes+set}" = set; then
1701   enableval="$enable_integer_datetimes"
1702
1703   case $enableval in
1704     yes)
1705
1706 cat >>confdefs.h <<\_ACEOF
1707 #define USE_INTEGER_DATETIMES 1
1708 _ACEOF
1709
1710       ;;
1711     no)
1712       :
1713       ;;
1714     *)
1715       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1716 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1717    { (exit 1); exit 1; }; }
1718       ;;
1719   esac
1720
1721 else
1722   enable_integer_datetimes=no
1723
1724 fi;
1725
1726 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1727 echo "${ECHO_T}$enable_integer_datetimes" >&6
1728
1729
1730 #
1731 # NLS
1732 #
1733 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1734 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1735
1736
1737 # Check whether --enable-nls or --disable-nls was given.
1738 if test "${enable_nls+set}" = set; then
1739   enableval="$enable_nls"
1740
1741   case $enableval in
1742     yes)
1743       :
1744       ;;
1745     no)
1746       :
1747       ;;
1748     *)
1749       enable_nls=yes
1750 WANTED_LANGUAGES=$enableval
1751       ;;
1752   esac
1753
1754 else
1755   enable_nls=no
1756 fi;
1757
1758
1759 if test "$enable_nls" = yes; then
1760
1761 cat >>confdefs.h <<\_ACEOF
1762 #define ENABLE_NLS 1
1763 _ACEOF
1764
1765 fi
1766
1767 echo "$as_me:$LINENO: result: $enable_nls" >&5
1768 echo "${ECHO_T}$enable_nls" >&6
1769
1770
1771
1772 #
1773 # Default port number (--with-pgport), default 5432
1774 #
1775 echo "$as_me:$LINENO: checking for default port number" >&5
1776 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1777
1778
1779
1780 # Check whether --with-pgport or --without-pgport was given.
1781 if test "${with_pgport+set}" = set; then
1782   withval="$with_pgport"
1783
1784   case $withval in
1785     yes)
1786       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1787 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1788    { (exit 1); exit 1; }; }
1789       ;;
1790     no)
1791       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1792 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1793    { (exit 1); exit 1; }; }
1794       ;;
1795     *)
1796       default_port=$withval
1797       ;;
1798   esac
1799
1800 else
1801   default_port=5432
1802 fi;
1803
1804 echo "$as_me:$LINENO: result: $default_port" >&5
1805 echo "${ECHO_T}$default_port" >&6
1806 # Need both of these because some places want an integer and some a string
1807
1808 cat >>confdefs.h <<_ACEOF
1809 #define DEF_PGPORT ${default_port}
1810 _ACEOF
1811
1812
1813 cat >>confdefs.h <<_ACEOF
1814 #define DEF_PGPORT_STR "${default_port}"
1815 _ACEOF
1816
1817
1818
1819 #
1820 # Option to disable shared libraries
1821 #
1822
1823
1824 # Check whether --enable-shared or --disable-shared was given.
1825 if test "${enable_shared+set}" = set; then
1826   enableval="$enable_shared"
1827
1828   case $enableval in
1829     yes)
1830       :
1831       ;;
1832     no)
1833       :
1834       ;;
1835     *)
1836       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1837 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1838    { (exit 1); exit 1; }; }
1839       ;;
1840   esac
1841
1842 else
1843   enable_shared=yes
1844
1845 fi;
1846
1847
1848
1849 #
1850 # '-rpath'-like feature can be disabled
1851 #
1852
1853
1854 # Check whether --enable-rpath or --disable-rpath was given.
1855 if test "${enable_rpath+set}" = set; then
1856   enableval="$enable_rpath"
1857
1858   case $enableval in
1859     yes)
1860       :
1861       ;;
1862     no)
1863       :
1864       ;;
1865     *)
1866       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1867 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1868    { (exit 1); exit 1; }; }
1869       ;;
1870   esac
1871
1872 else
1873   enable_rpath=yes
1874
1875 fi;
1876
1877
1878
1879 #
1880 # Spinlocks
1881 #
1882
1883
1884 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1885 if test "${enable_spinlocks+set}" = set; then
1886   enableval="$enable_spinlocks"
1887
1888   case $enableval in
1889     yes)
1890       :
1891       ;;
1892     no)
1893       :
1894       ;;
1895     *)
1896       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1897 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1898    { (exit 1); exit 1; }; }
1899       ;;
1900   esac
1901
1902 else
1903   enable_spinlocks=yes
1904
1905 fi;
1906
1907
1908 #
1909 # --enable-debug adds -g to compiler flags
1910 #
1911
1912
1913 # Check whether --enable-debug or --disable-debug was given.
1914 if test "${enable_debug+set}" = set; then
1915   enableval="$enable_debug"
1916
1917   case $enableval in
1918     yes)
1919       :
1920       ;;
1921     no)
1922       :
1923       ;;
1924     *)
1925       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1926 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1927    { (exit 1); exit 1; }; }
1928       ;;
1929   esac
1930
1931 else
1932   enable_debug=no
1933
1934 fi;
1935
1936
1937
1938 #
1939 # C compiler
1940 #
1941
1942 # For historical reasons you can also use --with-CC to specify the C compiler
1943 # to use, although the standard way to do this is to set the CC environment
1944 # variable.
1945
1946
1947
1948 # Check whether --with-CC or --without-CC was given.
1949 if test "${with_CC+set}" = set; then
1950   withval="$with_CC"
1951
1952   case $withval in
1953     yes)
1954       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1955 echo "$as_me: error: argument required for --with-CC option" >&2;}
1956    { (exit 1); exit 1; }; }
1957       ;;
1958     no)
1959       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1960 echo "$as_me: error: argument required for --with-CC option" >&2;}
1961    { (exit 1); exit 1; }; }
1962       ;;
1963     *)
1964       CC=$with_CC
1965       ;;
1966   esac
1967
1968 fi;
1969
1970
1971 case $template in
1972   aix) pgac_cc_list="gcc xlc";;
1973  irix) pgac_cc_list="cc";; # no gcc
1974     *) pgac_cc_list="gcc cc";;
1975 esac
1976
1977 ac_ext=c
1978 ac_cpp='$CPP $CPPFLAGS'
1979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1982 if test -n "$ac_tool_prefix"; then
1983   for ac_prog in $pgac_cc_list
1984   do
1985     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1986 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1987 echo "$as_me:$LINENO: checking for $ac_word" >&5
1988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1989 if test "${ac_cv_prog_CC+set}" = set; then
1990   echo $ECHO_N "(cached) $ECHO_C" >&6
1991 else
1992   if test -n "$CC"; then
1993   ac_cv_prog_CC="$CC" # Let the user override the test.
1994 else
1995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1996 for as_dir in $PATH
1997 do
1998   IFS=$as_save_IFS
1999   test -z "$as_dir" && as_dir=.
2000   for ac_exec_ext in '' $ac_executable_extensions; do
2001   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2002     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2003     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2004     break 2
2005   fi
2006 done
2007 done
2008
2009 fi
2010 fi
2011 CC=$ac_cv_prog_CC
2012 if test -n "$CC"; then
2013   echo "$as_me:$LINENO: result: $CC" >&5
2014 echo "${ECHO_T}$CC" >&6
2015 else
2016   echo "$as_me:$LINENO: result: no" >&5
2017 echo "${ECHO_T}no" >&6
2018 fi
2019
2020     test -n "$CC" && break
2021   done
2022 fi
2023 if test -z "$CC"; then
2024   ac_ct_CC=$CC
2025   for ac_prog in $pgac_cc_list
2026 do
2027   # Extract the first word of "$ac_prog", so it can be a program name with args.
2028 set dummy $ac_prog; ac_word=$2
2029 echo "$as_me:$LINENO: checking for $ac_word" >&5
2030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2031 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2032   echo $ECHO_N "(cached) $ECHO_C" >&6
2033 else
2034   if test -n "$ac_ct_CC"; then
2035   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2036 else
2037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2038 for as_dir in $PATH
2039 do
2040   IFS=$as_save_IFS
2041   test -z "$as_dir" && as_dir=.
2042   for ac_exec_ext in '' $ac_executable_extensions; do
2043   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2044     ac_cv_prog_ac_ct_CC="$ac_prog"
2045     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2046     break 2
2047   fi
2048 done
2049 done
2050
2051 fi
2052 fi
2053 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2054 if test -n "$ac_ct_CC"; then
2055   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2056 echo "${ECHO_T}$ac_ct_CC" >&6
2057 else
2058   echo "$as_me:$LINENO: result: no" >&5
2059 echo "${ECHO_T}no" >&6
2060 fi
2061
2062   test -n "$ac_ct_CC" && break
2063 done
2064
2065   CC=$ac_ct_CC
2066 fi
2067
2068
2069 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2070 See \`config.log' for more details." >&5
2071 echo "$as_me: error: no acceptable C compiler found in \$PATH
2072 See \`config.log' for more details." >&2;}
2073    { (exit 1); exit 1; }; }
2074
2075 # Provide some information about the compiler.
2076 echo "$as_me:$LINENO:" \
2077      "checking for C compiler version" >&5
2078 ac_compiler=`set X $ac_compile; echo $2`
2079 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2080   (eval $ac_compiler --version </dev/null >&5) 2>&5
2081   ac_status=$?
2082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2083   (exit $ac_status); }
2084 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2085   (eval $ac_compiler -v </dev/null >&5) 2>&5
2086   ac_status=$?
2087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2088   (exit $ac_status); }
2089 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2090   (eval $ac_compiler -V </dev/null >&5) 2>&5
2091   ac_status=$?
2092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2093   (exit $ac_status); }
2094
2095 cat >conftest.$ac_ext <<_ACEOF
2096 /* confdefs.h.  */
2097 _ACEOF
2098 cat confdefs.h >>conftest.$ac_ext
2099 cat >>conftest.$ac_ext <<_ACEOF
2100 /* end confdefs.h.  */
2101
2102 int
2103 main ()
2104 {
2105
2106   ;
2107   return 0;
2108 }
2109 _ACEOF
2110 ac_clean_files_save=$ac_clean_files
2111 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2112 # Try to create an executable without -o first, disregard a.out.
2113 # It will help us diagnose broken compilers, and finding out an intuition
2114 # of exeext.
2115 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2116 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2117 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2118 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2119   (eval $ac_link_default) 2>&5
2120   ac_status=$?
2121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2122   (exit $ac_status); }; then
2123   # Find the output, starting from the most likely.  This scheme is
2124 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2125 # resort.
2126
2127 # Be careful to initialize this variable, since it used to be cached.
2128 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2129 ac_cv_exeext=
2130 # b.out is created by i960 compilers.
2131 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2132 do
2133   test -f "$ac_file" || continue
2134   case $ac_file in
2135     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2136         ;;
2137     conftest.$ac_ext )
2138         # This is the source file.
2139         ;;
2140     [ab].out )
2141         # We found the default executable, but exeext='' is most
2142         # certainly right.
2143         break;;
2144     *.* )
2145         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2146         # FIXME: I believe we export ac_cv_exeext for Libtool,
2147         # but it would be cool to find out if it's true.  Does anybody
2148         # maintain Libtool? --akim.
2149         export ac_cv_exeext
2150         break;;
2151     * )
2152         break;;
2153   esac
2154 done
2155 else
2156   echo "$as_me: failed program was:" >&5
2157 sed 's/^/| /' conftest.$ac_ext >&5
2158
2159 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2160 See \`config.log' for more details." >&5
2161 echo "$as_me: error: C compiler cannot create executables
2162 See \`config.log' for more details." >&2;}
2163    { (exit 77); exit 77; }; }
2164 fi
2165
2166 ac_exeext=$ac_cv_exeext
2167 echo "$as_me:$LINENO: result: $ac_file" >&5
2168 echo "${ECHO_T}$ac_file" >&6
2169
2170 # Check the compiler produces executables we can run.  If not, either
2171 # the compiler is broken, or we cross compile.
2172 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2173 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2174 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2175 # If not cross compiling, check that we can run a simple program.
2176 if test "$cross_compiling" != yes; then
2177   if { ac_try='./$ac_file'
2178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2179   (eval $ac_try) 2>&5
2180   ac_status=$?
2181   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2182   (exit $ac_status); }; }; then
2183     cross_compiling=no
2184   else
2185     if test "$cross_compiling" = maybe; then
2186         cross_compiling=yes
2187     else
2188         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2189 If you meant to cross compile, use \`--host'.
2190 See \`config.log' for more details." >&5
2191 echo "$as_me: error: cannot run C compiled programs.
2192 If you meant to cross compile, use \`--host'.
2193 See \`config.log' for more details." >&2;}
2194    { (exit 1); exit 1; }; }
2195     fi
2196   fi
2197 fi
2198 echo "$as_me:$LINENO: result: yes" >&5
2199 echo "${ECHO_T}yes" >&6
2200
2201 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2202 ac_clean_files=$ac_clean_files_save
2203 # Check the compiler produces executables we can run.  If not, either
2204 # the compiler is broken, or we cross compile.
2205 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2206 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2207 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2208 echo "${ECHO_T}$cross_compiling" >&6
2209
2210 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2211 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2213   (eval $ac_link) 2>&5
2214   ac_status=$?
2215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2216   (exit $ac_status); }; then
2217   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2218 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2219 # work properly (i.e., refer to `conftest.exe'), while it won't with
2220 # `rm'.
2221 for ac_file in conftest.exe conftest conftest.*; do
2222   test -f "$ac_file" || continue
2223   case $ac_file in
2224     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2225     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2226           export ac_cv_exeext
2227           break;;
2228     * ) break;;
2229   esac
2230 done
2231 else
2232   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2233 See \`config.log' for more details." >&5
2234 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2235 See \`config.log' for more details." >&2;}
2236    { (exit 1); exit 1; }; }
2237 fi
2238
2239 rm -f conftest$ac_cv_exeext
2240 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2241 echo "${ECHO_T}$ac_cv_exeext" >&6
2242
2243 rm -f conftest.$ac_ext
2244 EXEEXT=$ac_cv_exeext
2245 ac_exeext=$EXEEXT
2246 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2247 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2248 if test "${ac_cv_objext+set}" = set; then
2249   echo $ECHO_N "(cached) $ECHO_C" >&6
2250 else
2251   cat >conftest.$ac_ext <<_ACEOF
2252 /* confdefs.h.  */
2253 _ACEOF
2254 cat confdefs.h >>conftest.$ac_ext
2255 cat >>conftest.$ac_ext <<_ACEOF
2256 /* end confdefs.h.  */
2257
2258 int
2259 main ()
2260 {
2261
2262   ;
2263   return 0;
2264 }
2265 _ACEOF
2266 rm -f conftest.o conftest.obj
2267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2268   (eval $ac_compile) 2>&5
2269   ac_status=$?
2270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2271   (exit $ac_status); }; then
2272   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2273   case $ac_file in
2274     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2275     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2276        break;;
2277   esac
2278 done
2279 else
2280   echo "$as_me: failed program was:" >&5
2281 sed 's/^/| /' conftest.$ac_ext >&5
2282
2283 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2284 See \`config.log' for more details." >&5
2285 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2286 See \`config.log' for more details." >&2;}
2287    { (exit 1); exit 1; }; }
2288 fi
2289
2290 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2291 fi
2292 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2293 echo "${ECHO_T}$ac_cv_objext" >&6
2294 OBJEXT=$ac_cv_objext
2295 ac_objext=$OBJEXT
2296 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2297 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2298 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2299   echo $ECHO_N "(cached) $ECHO_C" >&6
2300 else
2301   cat >conftest.$ac_ext <<_ACEOF
2302 /* confdefs.h.  */
2303 _ACEOF
2304 cat confdefs.h >>conftest.$ac_ext
2305 cat >>conftest.$ac_ext <<_ACEOF
2306 /* end confdefs.h.  */
2307
2308 int
2309 main ()
2310 {
2311 #ifndef __GNUC__
2312        choke me
2313 #endif
2314
2315   ;
2316   return 0;
2317 }
2318 _ACEOF
2319 rm -f conftest.$ac_objext
2320 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2321   (eval $ac_compile) 2>conftest.er1
2322   ac_status=$?
2323   grep -v '^ *+' conftest.er1 >conftest.err
2324   rm -f conftest.er1
2325   cat conftest.err >&5
2326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2327   (exit $ac_status); } &&
2328          { ac_try='test -z "$ac_c_werror_flag"
2329                          || test ! -s conftest.err'
2330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331   (eval $ac_try) 2>&5
2332   ac_status=$?
2333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334   (exit $ac_status); }; } &&
2335          { ac_try='test -s conftest.$ac_objext'
2336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2337   (eval $ac_try) 2>&5
2338   ac_status=$?
2339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2340   (exit $ac_status); }; }; then
2341   ac_compiler_gnu=yes
2342 else
2343   echo "$as_me: failed program was:" >&5
2344 sed 's/^/| /' conftest.$ac_ext >&5
2345
2346 ac_compiler_gnu=no
2347 fi
2348 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2349 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2350
2351 fi
2352 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2353 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2354 GCC=`test $ac_compiler_gnu = yes && echo yes`
2355 ac_test_CFLAGS=${CFLAGS+set}
2356 ac_save_CFLAGS=$CFLAGS
2357 CFLAGS="-g"
2358 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2359 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2360 if test "${ac_cv_prog_cc_g+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363   cat >conftest.$ac_ext <<_ACEOF
2364 /* confdefs.h.  */
2365 _ACEOF
2366 cat confdefs.h >>conftest.$ac_ext
2367 cat >>conftest.$ac_ext <<_ACEOF
2368 /* end confdefs.h.  */
2369
2370 int
2371 main ()
2372 {
2373
2374   ;
2375   return 0;
2376 }
2377 _ACEOF
2378 rm -f conftest.$ac_objext
2379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2380   (eval $ac_compile) 2>conftest.er1
2381   ac_status=$?
2382   grep -v '^ *+' conftest.er1 >conftest.err
2383   rm -f conftest.er1
2384   cat conftest.err >&5
2385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2386   (exit $ac_status); } &&
2387          { ac_try='test -z "$ac_c_werror_flag"
2388                          || test ! -s conftest.err'
2389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2390   (eval $ac_try) 2>&5
2391   ac_status=$?
2392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2393   (exit $ac_status); }; } &&
2394          { ac_try='test -s conftest.$ac_objext'
2395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2399   (exit $ac_status); }; }; then
2400   ac_cv_prog_cc_g=yes
2401 else
2402   echo "$as_me: failed program was:" >&5
2403 sed 's/^/| /' conftest.$ac_ext >&5
2404
2405 ac_cv_prog_cc_g=no
2406 fi
2407 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2408 fi
2409 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2410 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2411 if test "$ac_test_CFLAGS" = set; then
2412   CFLAGS=$ac_save_CFLAGS
2413 elif test $ac_cv_prog_cc_g = yes; then
2414   if test "$GCC" = yes; then
2415     CFLAGS="-g -O2"
2416   else
2417     CFLAGS="-g"
2418   fi
2419 else
2420   if test "$GCC" = yes; then
2421     CFLAGS="-O2"
2422   else
2423     CFLAGS=
2424   fi
2425 fi
2426 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2427 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2428 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2429   echo $ECHO_N "(cached) $ECHO_C" >&6
2430 else
2431   ac_cv_prog_cc_stdc=no
2432 ac_save_CC=$CC
2433 cat >conftest.$ac_ext <<_ACEOF
2434 /* confdefs.h.  */
2435 _ACEOF
2436 cat confdefs.h >>conftest.$ac_ext
2437 cat >>conftest.$ac_ext <<_ACEOF
2438 /* end confdefs.h.  */
2439 #include <stdarg.h>
2440 #include <stdio.h>
2441 #include <sys/types.h>
2442 #include <sys/stat.h>
2443 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2444 struct buf { int x; };
2445 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2446 static char *e (p, i)
2447      char **p;
2448      int i;
2449 {
2450   return p[i];
2451 }
2452 static char *f (char * (*g) (char **, int), char **p, ...)
2453 {
2454   char *s;
2455   va_list v;
2456   va_start (v,p);
2457   s = g (p, va_arg (v,int));
2458   va_end (v);
2459   return s;
2460 }
2461
2462 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2463    function prototypes and stuff, but not '\xHH' hex character constants.
2464    These don't provoke an error unfortunately, instead are silently treated
2465    as 'x'.  The following induces an error, until -std1 is added to get
2466    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2467    array size at least.  It's necessary to write '\x00'==0 to get something
2468    that's true only with -std1.  */
2469 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2470
2471 int test (int i, double x);
2472 struct s1 {int (*f) (int a);};
2473 struct s2 {int (*f) (double a);};
2474 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2475 int argc;
2476 char **argv;
2477 int
2478 main ()
2479 {
2480 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2481   ;
2482   return 0;
2483 }
2484 _ACEOF
2485 # Don't try gcc -ansi; that turns off useful extensions and
2486 # breaks some systems' header files.
2487 # AIX                   -qlanglvl=ansi
2488 # Ultrix and OSF/1      -std1
2489 # HP-UX 10.20 and later -Ae
2490 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2491 # SVR4                  -Xc -D__EXTENSIONS__
2492 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2493 do
2494   CC="$ac_save_CC $ac_arg"
2495   rm -f conftest.$ac_objext
2496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2497   (eval $ac_compile) 2>conftest.er1
2498   ac_status=$?
2499   grep -v '^ *+' conftest.er1 >conftest.err
2500   rm -f conftest.er1
2501   cat conftest.err >&5
2502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2503   (exit $ac_status); } &&
2504          { ac_try='test -z "$ac_c_werror_flag"
2505                          || test ! -s conftest.err'
2506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2507   (eval $ac_try) 2>&5
2508   ac_status=$?
2509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2510   (exit $ac_status); }; } &&
2511          { ac_try='test -s conftest.$ac_objext'
2512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2516   (exit $ac_status); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 sed 's/^/| /' conftest.$ac_ext >&5
2522
2523 fi
2524 rm -f conftest.err conftest.$ac_objext
2525 done
2526 rm -f conftest.$ac_ext conftest.$ac_objext
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:$LINENO: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # Some people use a C++ compiler to compile C.  Since we use `exit',
2542 # in C++ we need to declare it.  In case someone uses the same compiler
2543 # for both compiling C and C++ we need to have the C++ compiler decide
2544 # the declaration of exit, since it's the most demanding environment.
2545 cat >conftest.$ac_ext <<_ACEOF
2546 #ifndef __cplusplus
2547   choke me
2548 #endif
2549 _ACEOF
2550 rm -f conftest.$ac_objext
2551 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2552   (eval $ac_compile) 2>conftest.er1
2553   ac_status=$?
2554   grep -v '^ *+' conftest.er1 >conftest.err
2555   rm -f conftest.er1
2556   cat conftest.err >&5
2557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2558   (exit $ac_status); } &&
2559          { ac_try='test -z "$ac_c_werror_flag"
2560                          || test ! -s conftest.err'
2561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2562   (eval $ac_try) 2>&5
2563   ac_status=$?
2564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2565   (exit $ac_status); }; } &&
2566          { ac_try='test -s conftest.$ac_objext'
2567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2568   (eval $ac_try) 2>&5
2569   ac_status=$?
2570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571   (exit $ac_status); }; }; then
2572   for ac_declaration in \
2573    '' \
2574    'extern "C" void std::exit (int) throw (); using std::exit;' \
2575    'extern "C" void std::exit (int); using std::exit;' \
2576    'extern "C" void exit (int) throw ();' \
2577    'extern "C" void exit (int);' \
2578    'void exit (int);'
2579 do
2580   cat >conftest.$ac_ext <<_ACEOF
2581 /* confdefs.h.  */
2582 _ACEOF
2583 cat confdefs.h >>conftest.$ac_ext
2584 cat >>conftest.$ac_ext <<_ACEOF
2585 /* end confdefs.h.  */
2586 $ac_declaration
2587 #include <stdlib.h>
2588 int
2589 main ()
2590 {
2591 exit (42);
2592   ;
2593   return 0;
2594 }
2595 _ACEOF
2596 rm -f conftest.$ac_objext
2597 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2598   (eval $ac_compile) 2>conftest.er1
2599   ac_status=$?
2600   grep -v '^ *+' conftest.er1 >conftest.err
2601   rm -f conftest.er1
2602   cat conftest.err >&5
2603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2604   (exit $ac_status); } &&
2605          { ac_try='test -z "$ac_c_werror_flag"
2606                          || test ! -s conftest.err'
2607   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2608   (eval $ac_try) 2>&5
2609   ac_status=$?
2610   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2611   (exit $ac_status); }; } &&
2612          { ac_try='test -s conftest.$ac_objext'
2613   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2614   (eval $ac_try) 2>&5
2615   ac_status=$?
2616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2617   (exit $ac_status); }; }; then
2618   :
2619 else
2620   echo "$as_me: failed program was:" >&5
2621 sed 's/^/| /' conftest.$ac_ext >&5
2622
2623 continue
2624 fi
2625 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2626   cat >conftest.$ac_ext <<_ACEOF
2627 /* confdefs.h.  */
2628 _ACEOF
2629 cat confdefs.h >>conftest.$ac_ext
2630 cat >>conftest.$ac_ext <<_ACEOF
2631 /* end confdefs.h.  */
2632 $ac_declaration
2633 int
2634 main ()
2635 {
2636 exit (42);
2637   ;
2638   return 0;
2639 }
2640 _ACEOF
2641 rm -f conftest.$ac_objext
2642 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2643   (eval $ac_compile) 2>conftest.er1
2644   ac_status=$?
2645   grep -v '^ *+' conftest.er1 >conftest.err
2646   rm -f conftest.er1
2647   cat conftest.err >&5
2648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649   (exit $ac_status); } &&
2650          { ac_try='test -z "$ac_c_werror_flag"
2651                          || test ! -s conftest.err'
2652   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2653   (eval $ac_try) 2>&5
2654   ac_status=$?
2655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2656   (exit $ac_status); }; } &&
2657          { ac_try='test -s conftest.$ac_objext'
2658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2659   (eval $ac_try) 2>&5
2660   ac_status=$?
2661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662   (exit $ac_status); }; }; then
2663   break
2664 else
2665   echo "$as_me: failed program was:" >&5
2666 sed 's/^/| /' conftest.$ac_ext >&5
2667
2668 fi
2669 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2670 done
2671 rm -f conftest*
2672 if test -n "$ac_declaration"; then
2673   echo '#ifdef __cplusplus' >>confdefs.h
2674   echo $ac_declaration      >>confdefs.h
2675   echo '#endif'             >>confdefs.h
2676 fi
2677
2678 else
2679   echo "$as_me: failed program was:" >&5
2680 sed 's/^/| /' conftest.$ac_ext >&5
2681
2682 fi
2683 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2684 ac_ext=c
2685 ac_cpp='$CPP $CPPFLAGS'
2686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2689
2690
2691 unset CFLAGS
2692
2693 #
2694 # Read the template
2695 #
2696 . "$srcdir/src/template/$template" || exit
2697
2698 # CFLAGS are selected so:
2699 # If the user specifies something in the environment, that is used.
2700 # else:  If the template file set something, that is used.
2701 # else:  If the compiler is GCC, then we use -O2.
2702 # else:  If the compiler is something else, then we use -0.
2703
2704 if test "$ac_env_CFLAGS_set" = set; then
2705   CFLAGS=$ac_env_CFLAGS_value
2706 elif test "${CFLAGS+set}" = set; then
2707   : # (keep what template set)
2708 elif test "$GCC" = yes; then
2709   CFLAGS="-O2"
2710 else
2711   # if the user selected debug mode, don't use -O
2712   if test "$enable_debug" != yes; then
2713     CFLAGS="-O"
2714   fi
2715 fi
2716
2717 if test "$GCC" = yes; then
2718   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
2719
2720   # Some versions of GCC support some additional useful warning flags.
2721   # Check whether they are supported, and add them to CFLAGS if so.
2722   echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
2723 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
2724 pgac_save_CFLAGS=$CFLAGS
2725 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
2726 cat >conftest.$ac_ext <<_ACEOF
2727 /* confdefs.h.  */
2728 _ACEOF
2729 cat confdefs.h >>conftest.$ac_ext
2730 cat >>conftest.$ac_ext <<_ACEOF
2731 /* end confdefs.h.  */
2732
2733 int
2734 main ()
2735 {
2736
2737   ;
2738   return 0;
2739 }
2740 _ACEOF
2741 rm -f conftest.$ac_objext
2742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2743   (eval $ac_compile) 2>conftest.er1
2744   ac_status=$?
2745   grep -v '^ *+' conftest.er1 >conftest.err
2746   rm -f conftest.er1
2747   cat conftest.err >&5
2748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2749   (exit $ac_status); } &&
2750          { ac_try='test -z "$ac_c_werror_flag"
2751                          || test ! -s conftest.err'
2752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2753   (eval $ac_try) 2>&5
2754   ac_status=$?
2755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2756   (exit $ac_status); }; } &&
2757          { ac_try='test -s conftest.$ac_objext'
2758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2759   (eval $ac_try) 2>&5
2760   ac_status=$?
2761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762   (exit $ac_status); }; }; then
2763   echo "$as_me:$LINENO: result: yes" >&5
2764 echo "${ECHO_T}yes" >&6
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 sed 's/^/| /' conftest.$ac_ext >&5
2768
2769 CFLAGS="$pgac_save_CFLAGS"
2770                     echo "$as_me:$LINENO: result: no" >&5
2771 echo "${ECHO_T}no" >&6
2772 fi
2773 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2774
2775   echo "$as_me:$LINENO: checking if $CC supports -Wendif-labels" >&5
2776 echo $ECHO_N "checking if $CC supports -Wendif-labels... $ECHO_C" >&6
2777 pgac_save_CFLAGS=$CFLAGS
2778 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
2779 cat >conftest.$ac_ext <<_ACEOF
2780 /* confdefs.h.  */
2781 _ACEOF
2782 cat confdefs.h >>conftest.$ac_ext
2783 cat >>conftest.$ac_ext <<_ACEOF
2784 /* end confdefs.h.  */
2785
2786 int
2787 main ()
2788 {
2789
2790   ;
2791   return 0;
2792 }
2793 _ACEOF
2794 rm -f conftest.$ac_objext
2795 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2796   (eval $ac_compile) 2>conftest.er1
2797   ac_status=$?
2798   grep -v '^ *+' conftest.er1 >conftest.err
2799   rm -f conftest.er1
2800   cat conftest.err >&5
2801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2802   (exit $ac_status); } &&
2803          { ac_try='test -z "$ac_c_werror_flag"
2804                          || test ! -s conftest.err'
2805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2806   (eval $ac_try) 2>&5
2807   ac_status=$?
2808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2809   (exit $ac_status); }; } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   echo "$as_me:$LINENO: result: yes" >&5
2817 echo "${ECHO_T}yes" >&6
2818 else
2819   echo "$as_me: failed program was:" >&5
2820 sed 's/^/| /' conftest.$ac_ext >&5
2821
2822 CFLAGS="$pgac_save_CFLAGS"
2823                     echo "$as_me:$LINENO: result: no" >&5
2824 echo "${ECHO_T}no" >&6
2825 fi
2826 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2827
2828
2829   # Disable strict-aliasing rules; needed for gcc 3.3+
2830   echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
2831 echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
2832 pgac_save_CFLAGS=$CFLAGS
2833 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
2834 cat >conftest.$ac_ext <<_ACEOF
2835 /* confdefs.h.  */
2836 _ACEOF
2837 cat confdefs.h >>conftest.$ac_ext
2838 cat >>conftest.$ac_ext <<_ACEOF
2839 /* end confdefs.h.  */
2840
2841 int
2842 main ()
2843 {
2844
2845   ;
2846   return 0;
2847 }
2848 _ACEOF
2849 rm -f conftest.$ac_objext
2850 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2851   (eval $ac_compile) 2>conftest.er1
2852   ac_status=$?
2853   grep -v '^ *+' conftest.er1 >conftest.err
2854   rm -f conftest.er1
2855   cat conftest.err >&5
2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2857   (exit $ac_status); } &&
2858          { ac_try='test -z "$ac_c_werror_flag"
2859                          || test ! -s conftest.err'
2860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2861   (eval $ac_try) 2>&5
2862   ac_status=$?
2863   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2864   (exit $ac_status); }; } &&
2865          { ac_try='test -s conftest.$ac_objext'
2866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2867   (eval $ac_try) 2>&5
2868   ac_status=$?
2869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870   (exit $ac_status); }; }; then
2871   echo "$as_me:$LINENO: result: yes" >&5
2872 echo "${ECHO_T}yes" >&6
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 sed 's/^/| /' conftest.$ac_ext >&5
2876
2877 CFLAGS="$pgac_save_CFLAGS"
2878                     echo "$as_me:$LINENO: result: no" >&5
2879 echo "${ECHO_T}no" >&6
2880 fi
2881 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2882
2883 fi
2884
2885 # supply -g if --enable-debug
2886 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2887   CFLAGS="$CFLAGS -g"
2888 fi
2889
2890 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2891 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2892
2893 # We already have this in Makefile.win32, but configure needs it too
2894 if test "$PORTNAME" = "win32"; then
2895   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2896 fi
2897
2898 # Check if the compiler still works with the template settings
2899 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2900 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2901
2902 cat >conftest.$ac_ext <<_ACEOF
2903 /* confdefs.h.  */
2904 _ACEOF
2905 cat confdefs.h >>conftest.$ac_ext
2906 cat >>conftest.$ac_ext <<_ACEOF
2907 /* end confdefs.h.  */
2908
2909 int
2910 main ()
2911 {
2912 return 0;
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 rm -f conftest.$ac_objext conftest$ac_exeext
2918 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2919   (eval $ac_link) 2>conftest.er1
2920   ac_status=$?
2921   grep -v '^ *+' conftest.er1 >conftest.err
2922   rm -f conftest.er1
2923   cat conftest.err >&5
2924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -z "$ac_c_werror_flag"
2927                          || test ! -s conftest.err'
2928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2929   (eval $ac_try) 2>&5
2930   ac_status=$?
2931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2932   (exit $ac_status); }; } &&
2933          { ac_try='test -s conftest$ac_exeext'
2934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2935   (eval $ac_try) 2>&5
2936   ac_status=$?
2937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2938   (exit $ac_status); }; }; then
2939   echo "$as_me:$LINENO: result: yes" >&5
2940 echo "${ECHO_T}yes" >&6
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 sed 's/^/| /' conftest.$ac_ext >&5
2944
2945 echo "$as_me:$LINENO: result: no" >&5
2946 echo "${ECHO_T}no" >&6
2947    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2948 echo "$as_me: error: cannot proceed" >&2;}
2949    { (exit 1); exit 1; }; }
2950 fi
2951 rm -f conftest.err conftest.$ac_objext \
2952       conftest$ac_exeext conftest.$ac_ext
2953
2954 # Defend against gcc -ffast-math
2955 if test "$GCC" = yes; then
2956 cat >conftest.$ac_ext <<_ACEOF
2957 /* confdefs.h.  */
2958 _ACEOF
2959 cat confdefs.h >>conftest.$ac_ext
2960 cat >>conftest.$ac_ext <<_ACEOF
2961 /* end confdefs.h.  */
2962
2963 int
2964 main ()
2965 {
2966 #ifdef __FAST_MATH__
2967 choke me
2968 #endif
2969   ;
2970   return 0;
2971 }
2972 _ACEOF
2973 rm -f conftest.$ac_objext
2974 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2975   (eval $ac_compile) 2>conftest.er1
2976   ac_status=$?
2977   grep -v '^ *+' conftest.er1 >conftest.err
2978   rm -f conftest.er1
2979   cat conftest.err >&5
2980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2981   (exit $ac_status); } &&
2982          { ac_try='test -z "$ac_c_werror_flag"
2983                          || test ! -s conftest.err'
2984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2985   (eval $ac_try) 2>&5
2986   ac_status=$?
2987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2988   (exit $ac_status); }; } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   :
2996 else
2997   echo "$as_me: failed program was:" >&5
2998 sed 's/^/| /' conftest.$ac_ext >&5
2999
3000 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
3001 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
3002    { (exit 1); exit 1; }; }
3003 fi
3004 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3005 fi
3006
3007 ac_ext=c
3008 ac_cpp='$CPP $CPPFLAGS'
3009 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3010 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3011 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3012 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3013 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3014 # On Suns, sometimes $CPP names a directory.
3015 if test -n "$CPP" && test -d "$CPP"; then
3016   CPP=
3017 fi
3018 if test -z "$CPP"; then
3019   if test "${ac_cv_prog_CPP+set}" = set; then
3020   echo $ECHO_N "(cached) $ECHO_C" >&6
3021 else
3022       # Double quotes because CPP needs to be expanded
3023     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3024     do
3025       ac_preproc_ok=false
3026 for ac_c_preproc_warn_flag in '' yes
3027 do
3028   # Use a header file that comes with gcc, so configuring glibc
3029   # with a fresh cross-compiler works.
3030   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3031   # <limits.h> exists even on freestanding compilers.
3032   # On the NeXT, cc -E runs the code through the compiler's parser,
3033   # not just through cpp. "Syntax error" is here to catch this case.
3034   cat >conftest.$ac_ext <<_ACEOF
3035 /* confdefs.h.  */
3036 _ACEOF
3037 cat confdefs.h >>conftest.$ac_ext
3038 cat >>conftest.$ac_ext <<_ACEOF
3039 /* end confdefs.h.  */
3040 #ifdef __STDC__
3041 # include <limits.h>
3042 #else
3043 # include <assert.h>
3044 #endif
3045                      Syntax error
3046 _ACEOF
3047 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3048   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3049   ac_status=$?
3050   grep -v '^ *+' conftest.er1 >conftest.err
3051   rm -f conftest.er1
3052   cat conftest.err >&5
3053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3054   (exit $ac_status); } >/dev/null; then
3055   if test -s conftest.err; then
3056     ac_cpp_err=$ac_c_preproc_warn_flag
3057     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3058   else
3059     ac_cpp_err=
3060   fi
3061 else
3062   ac_cpp_err=yes
3063 fi
3064 if test -z "$ac_cpp_err"; then
3065   :
3066 else
3067   echo "$as_me: failed program was:" >&5
3068 sed 's/^/| /' conftest.$ac_ext >&5
3069
3070   # Broken: fails on valid input.
3071 continue
3072 fi
3073 rm -f conftest.err conftest.$ac_ext
3074
3075   # OK, works on sane cases.  Now check whether non-existent headers
3076   # can be detected and how.
3077   cat >conftest.$ac_ext <<_ACEOF
3078 /* confdefs.h.  */
3079 _ACEOF
3080 cat confdefs.h >>conftest.$ac_ext
3081 cat >>conftest.$ac_ext <<_ACEOF
3082 /* end confdefs.h.  */
3083 #include <ac_nonexistent.h>
3084 _ACEOF
3085 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3086   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3087   ac_status=$?
3088   grep -v '^ *+' conftest.er1 >conftest.err
3089   rm -f conftest.er1
3090   cat conftest.err >&5
3091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3092   (exit $ac_status); } >/dev/null; then
3093   if test -s conftest.err; then
3094     ac_cpp_err=$ac_c_preproc_warn_flag
3095     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3096   else
3097     ac_cpp_err=
3098   fi
3099 else
3100   ac_cpp_err=yes
3101 fi
3102 if test -z "$ac_cpp_err"; then
3103   # Broken: success on invalid input.
3104 continue
3105 else
3106   echo "$as_me: failed program was:" >&5
3107 sed 's/^/| /' conftest.$ac_ext >&5
3108
3109   # Passes both tests.
3110 ac_preproc_ok=:
3111 break
3112 fi
3113 rm -f conftest.err conftest.$ac_ext
3114
3115 done
3116 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3117 rm -f conftest.err conftest.$ac_ext
3118 if $ac_preproc_ok; then
3119   break
3120 fi
3121
3122     done
3123     ac_cv_prog_CPP=$CPP
3124
3125 fi
3126   CPP=$ac_cv_prog_CPP
3127 else
3128   ac_cv_prog_CPP=$CPP
3129 fi
3130 echo "$as_me:$LINENO: result: $CPP" >&5
3131 echo "${ECHO_T}$CPP" >&6
3132 ac_preproc_ok=false
3133 for ac_c_preproc_warn_flag in '' yes
3134 do
3135   # Use a header file that comes with gcc, so configuring glibc
3136   # with a fresh cross-compiler works.
3137   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3138   # <limits.h> exists even on freestanding compilers.
3139   # On the NeXT, cc -E runs the code through the compiler's parser,
3140   # not just through cpp. "Syntax error" is here to catch this case.
3141   cat >conftest.$ac_ext <<_ACEOF
3142 /* confdefs.h.  */
3143 _ACEOF
3144 cat confdefs.h >>conftest.$ac_ext
3145 cat >>conftest.$ac_ext <<_ACEOF
3146 /* end confdefs.h.  */
3147 #ifdef __STDC__
3148 # include <limits.h>
3149 #else
3150 # include <assert.h>
3151 #endif
3152                      Syntax error
3153 _ACEOF
3154 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3155   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3156   ac_status=$?
3157   grep -v '^ *+' conftest.er1 >conftest.err
3158   rm -f conftest.er1
3159   cat conftest.err >&5
3160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3161   (exit $ac_status); } >/dev/null; then
3162   if test -s conftest.err; then
3163     ac_cpp_err=$ac_c_preproc_warn_flag
3164     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3165   else
3166     ac_cpp_err=
3167   fi
3168 else
3169   ac_cpp_err=yes
3170 fi
3171 if test -z "$ac_cpp_err"; then
3172   :
3173 else
3174   echo "$as_me: failed program was:" >&5
3175 sed 's/^/| /' conftest.$ac_ext >&5
3176
3177   # Broken: fails on valid input.
3178 continue
3179 fi
3180 rm -f conftest.err conftest.$ac_ext
3181
3182   # OK, works on sane cases.  Now check whether non-existent headers
3183   # can be detected and how.
3184   cat >conftest.$ac_ext <<_ACEOF
3185 /* confdefs.h.  */
3186 _ACEOF
3187 cat confdefs.h >>conftest.$ac_ext
3188 cat >>conftest.$ac_ext <<_ACEOF
3189 /* end confdefs.h.  */
3190 #include <ac_nonexistent.h>
3191 _ACEOF
3192 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3194   ac_status=$?
3195   grep -v '^ *+' conftest.er1 >conftest.err
3196   rm -f conftest.er1
3197   cat conftest.err >&5
3198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3199   (exit $ac_status); } >/dev/null; then
3200   if test -s conftest.err; then
3201     ac_cpp_err=$ac_c_preproc_warn_flag
3202     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3203   else
3204     ac_cpp_err=
3205   fi
3206 else
3207   ac_cpp_err=yes
3208 fi
3209 if test -z "$ac_cpp_err"; then
3210   # Broken: success on invalid input.
3211 continue
3212 else
3213   echo "$as_me: failed program was:" >&5
3214 sed 's/^/| /' conftest.$ac_ext >&5
3215
3216   # Passes both tests.
3217 ac_preproc_ok=:
3218 break
3219 fi
3220 rm -f conftest.err conftest.$ac_ext
3221
3222 done
3223 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3224 rm -f conftest.err conftest.$ac_ext
3225 if $ac_preproc_ok; then
3226   :
3227 else
3228   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3229 See \`config.log' for more details." >&5
3230 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3231 See \`config.log' for more details." >&2;}
3232    { (exit 1); exit 1; }; }
3233 fi
3234
3235 ac_ext=c
3236 ac_cpp='$CPP $CPPFLAGS'
3237 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3238 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3239 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3240
3241
3242
3243 # Create compiler version string
3244 if test x"$GCC" = x"yes" ; then
3245   cc_string="GCC `${CC} --version | sed q`"
3246 else
3247   cc_string=$CC
3248 fi
3249
3250 cat >>confdefs.h <<_ACEOF
3251 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
3252 _ACEOF
3253
3254
3255
3256 #
3257 # Set up TAS assembly code if needed; the template file has now had its
3258 # chance to request this.
3259 #
3260           ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
3261
3262
3263 if test "$need_tas" = yes ; then
3264   TAS=tas.o
3265 else
3266   TAS=""
3267 fi
3268
3269
3270
3271 #
3272 # Automatic dependency tracking
3273 #
3274
3275
3276 # Check whether --enable-depend or --disable-depend was given.
3277 if test "${enable_depend+set}" = set; then
3278   enableval="$enable_depend"
3279
3280   case $enableval in
3281     yes)
3282       autodepend=yes
3283       ;;
3284     no)
3285       :
3286       ;;
3287     *)
3288       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
3289 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
3290    { (exit 1); exit 1; }; }
3291       ;;
3292   esac
3293
3294 else
3295   enable_depend=no
3296
3297 fi;
3298
3299
3300
3301
3302 #
3303 # Enable assert checks
3304 #
3305
3306
3307 # Check whether --enable-cassert or --disable-cassert was given.
3308 if test "${enable_cassert+set}" = set; then
3309   enableval="$enable_cassert"
3310
3311   case $enableval in
3312     yes)
3313
3314 cat >>confdefs.h <<\_ACEOF
3315 #define USE_ASSERT_CHECKING 1
3316 _ACEOF
3317
3318       ;;
3319     no)
3320       :
3321       ;;
3322     *)
3323       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
3324 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
3325    { (exit 1); exit 1; }; }
3326       ;;
3327   esac
3328
3329 else
3330   enable_cassert=no
3331
3332 fi;
3333
3334
3335
3336 #
3337 # Include directories
3338 #
3339 ac_save_IFS=$IFS
3340 IFS="${IFS}${PATH_SEPARATOR}"
3341 # SRCH_INC comes from the template file
3342 for dir in $with_includes $SRCH_INC; do
3343   if test -d "$dir"; then
3344     INCLUDES="$INCLUDES -I$dir"
3345   else
3346     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
3347 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
3348   fi
3349 done
3350 IFS=$ac_save_IFS
3351
3352
3353
3354 #
3355 # Library directories
3356 #
3357 ac_save_IFS=$IFS
3358 IFS="${IFS}${PATH_SEPARATOR}"
3359 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
3360 for dir in $LIBRARY_DIRS $SRCH_LIB; do
3361   if test -d "$dir"; then
3362     LIBDIRS="$LIBDIRS -L$dir"
3363   else
3364     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
3365 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
3366   fi
3367 done
3368 IFS=$ac_save_IFS
3369
3370 #
3371 # Enable thread-safe client libraries
3372 #
3373 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
3374 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
3375
3376
3377 # Check whether --enable-thread-safety or --disable-thread-safety was given.
3378 if test "${enable_thread_safety+set}" = set; then
3379   enableval="$enable_thread_safety"
3380
3381   case $enableval in
3382     yes)
3383       :
3384       ;;
3385     no)
3386       :
3387       ;;
3388     *)
3389       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
3390 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
3391    { (exit 1); exit 1; }; }
3392       ;;
3393   esac
3394
3395 else
3396   enable_thread_safety=no
3397
3398 fi;
3399
3400
3401
3402 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
3403 if test "${enable_thread_safety_force+set}" = set; then
3404   enableval="$enable_thread_safety_force"
3405
3406   case $enableval in
3407     yes)
3408       :
3409       ;;
3410     no)
3411       :
3412       ;;
3413     *)
3414       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
3415 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
3416    { (exit 1); exit 1; }; }
3417       ;;
3418   esac
3419
3420 else
3421   enable_thread_safety_force=no
3422
3423 fi;
3424
3425 if test "$enable_thread_safety" = yes -o \
3426         "$enable_thread_safety_force" = yes; then
3427   enable_thread_safety="yes"    # for 'force'
3428
3429 cat >>confdefs.h <<\_ACEOF
3430 #define ENABLE_THREAD_SAFETY 1
3431 _ACEOF
3432
3433 fi
3434 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
3435 echo "${ECHO_T}$enable_thread_safety" >&6
3436
3437
3438 #
3439 # Optionally build Tcl modules (PL/Tcl)
3440 #
3441 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3442 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3443
3444
3445
3446 # Check whether --with-tcl or --without-tcl was given.
3447 if test "${with_tcl+set}" = set; then
3448   withval="$with_tcl"
3449
3450   case $withval in
3451     yes)
3452       :
3453       ;;
3454     no)
3455       :
3456       ;;
3457     *)
3458       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3459 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3460    { (exit 1); exit 1; }; }
3461       ;;
3462   esac
3463
3464 else
3465   with_tcl=no
3466
3467 fi;
3468
3469 echo "$as_me:$LINENO: result: $with_tcl" >&5
3470 echo "${ECHO_T}$with_tcl" >&6
3471
3472
3473 # We see if the path to the Tcl/Tk configuration scripts is specified.
3474 # This will override the use of tclsh to find the paths to search.
3475
3476
3477
3478
3479 # Check whether --with-tclconfig or --without-tclconfig was given.
3480 if test "${with_tclconfig+set}" = set; then
3481   withval="$with_tclconfig"
3482
3483   case $withval in
3484     yes)
3485       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3486 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3487    { (exit 1); exit 1; }; }
3488       ;;
3489     no)
3490       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3491 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3492    { (exit 1); exit 1; }; }
3493       ;;
3494     *)
3495
3496       ;;
3497   esac
3498
3499 fi;
3500
3501
3502 #
3503 # Optionally build Perl modules (PL/Perl)
3504 #
3505 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3506 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3507
3508
3509
3510 # Check whether --with-perl or --without-perl was given.
3511 if test "${with_perl+set}" = set; then
3512   withval="$with_perl"
3513
3514   case $withval in
3515     yes)
3516       :
3517       ;;
3518     no)
3519       :
3520       ;;
3521     *)
3522       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3523 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3524    { (exit 1); exit 1; }; }
3525       ;;
3526   esac
3527
3528 else
3529   with_perl=no
3530
3531 fi;
3532
3533 echo "$as_me:$LINENO: result: $with_perl" >&5
3534 echo "${ECHO_T}$with_perl" >&6
3535
3536
3537 #
3538 # Optionally build Python modules (PL/Python)
3539 #
3540 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3541 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3542
3543
3544
3545 # Check whether --with-python or --without-python was given.
3546 if test "${with_python+set}" = set; then
3547   withval="$with_python"
3548
3549   case $withval in
3550     yes)
3551       :
3552       ;;
3553     no)
3554       :
3555       ;;
3556     *)
3557       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3558 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3559    { (exit 1); exit 1; }; }
3560       ;;
3561   esac
3562
3563 else
3564   with_python=no
3565
3566 fi;
3567
3568 echo "$as_me:$LINENO: result: $with_python" >&5
3569 echo "${ECHO_T}$with_python" >&6
3570
3571
3572 #
3573 # Kerberos 5
3574 #
3575 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3576 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3577
3578
3579
3580 # Check whether --with-krb5 or --without-krb5 was given.
3581 if test "${with_krb5+set}" = set; then
3582   withval="$with_krb5"
3583
3584   case $withval in
3585     yes)
3586
3587
3588 cat >>confdefs.h <<\_ACEOF
3589 #define KRB5 1
3590 _ACEOF
3591
3592   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3593
3594       ;;
3595     no)
3596       :
3597       ;;
3598     *)
3599       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3600 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3601    { (exit 1); exit 1; }; }
3602       ;;
3603   esac
3604
3605 else
3606   with_krb5=no
3607
3608 fi;
3609
3610 echo "$as_me:$LINENO: result: $with_krb5" >&5
3611 echo "${ECHO_T}$with_krb5" >&6
3612
3613
3614
3615
3616
3617
3618 #
3619 # Kerberos configuration parameters
3620 #
3621
3622
3623
3624 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3625 if test "${with_krb_srvnam+set}" = set; then
3626   withval="$with_krb_srvnam"
3627
3628   case $withval in
3629     yes)
3630       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3631 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3632    { (exit 1); exit 1; }; }
3633       ;;
3634     no)
3635       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3636 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3637    { (exit 1); exit 1; }; }
3638       ;;
3639     *)
3640
3641       ;;
3642   esac
3643
3644 else
3645   with_krb_srvnam="postgres"
3646 fi;
3647
3648
3649 cat >>confdefs.h <<_ACEOF
3650 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3651 _ACEOF
3652
3653
3654
3655 #
3656 # PAM
3657 #
3658 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3659 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3660
3661
3662
3663 # Check whether --with-pam or --without-pam was given.
3664 if test "${with_pam+set}" = set; then
3665   withval="$with_pam"
3666
3667   case $withval in
3668     yes)
3669
3670 cat >>confdefs.h <<\_ACEOF
3671 #define USE_PAM 1
3672 _ACEOF
3673
3674       ;;
3675     no)
3676       :
3677       ;;
3678     *)
3679       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3680 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3681    { (exit 1); exit 1; }; }
3682       ;;
3683   esac
3684
3685 else
3686   with_pam=no
3687
3688 fi;
3689
3690 echo "$as_me:$LINENO: result: $with_pam" >&5
3691 echo "${ECHO_T}$with_pam" >&6
3692
3693
3694
3695 #
3696 # Bonjour
3697 #
3698 echo "$as_me:$LINENO: checking whether to build with Bonjour support" >&5
3699 echo $ECHO_N "checking whether to build with Bonjour support... $ECHO_C" >&6
3700
3701
3702
3703 # Check whether --with-bonjour or --without-bonjour was given.
3704 if test "${with_bonjour+set}" = set; then
3705   withval="$with_bonjour"
3706
3707   case $withval in
3708     yes)
3709
3710 cat >>confdefs.h <<\_ACEOF
3711 #define USE_BONJOUR 1
3712 _ACEOF
3713
3714       ;;
3715     no)
3716       :
3717       ;;
3718     *)
3719       { { echo "$as_me:$LINENO: error: no argument expected for --with-bonjour option" >&5
3720 echo "$as_me: error: no argument expected for --with-bonjour option" >&2;}
3721    { (exit 1); exit 1; }; }
3722       ;;
3723   esac
3724
3725 else
3726   with_bonjour=no
3727
3728 fi;
3729
3730 echo "$as_me:$LINENO: result: $with_bonjour" >&5
3731 echo "${ECHO_T}$with_bonjour" >&6
3732
3733
3734
3735 #
3736 # OpenSSL
3737 #
3738 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3739 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3740
3741
3742
3743 # Check whether --with-openssl or --without-openssl was given.
3744 if test "${with_openssl+set}" = set; then
3745   withval="$with_openssl"
3746
3747   case $withval in
3748     yes)
3749
3750 cat >>confdefs.h <<\_ACEOF
3751 #define USE_SSL 1
3752 _ACEOF
3753
3754       ;;
3755     no)
3756       :
3757       ;;
3758     *)
3759       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3760 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3761    { (exit 1); exit 1; }; }
3762       ;;
3763   esac
3764
3765 else
3766   with_openssl=no
3767
3768 fi;
3769
3770 echo "$as_me:$LINENO: result: $with_openssl" >&5
3771 echo "${ECHO_T}$with_openssl" >&6
3772
3773
3774
3775 #
3776 # Prefer libedit
3777 #
3778
3779
3780
3781 # Check whether --with-libedit-preferred or --without-libedit-preferred was given.
3782 if test "${with_libedit_preferred+set}" = set; then
3783   withval="$with_libedit_preferred"
3784
3785   case $withval in
3786     yes)
3787       :
3788       ;;
3789     no)
3790       :
3791       ;;
3792     *)
3793       { { echo "$as_me:$LINENO: error: no argument expected for --with-libedit-preferred option" >&5
3794 echo "$as_me: error: no argument expected for --with-libedit-preferred option" >&2;}
3795    { (exit 1); exit 1; }; }
3796       ;;
3797   esac
3798
3799 else
3800   with_libedit_preferred=no
3801
3802 fi;
3803
3804
3805
3806 #
3807 # Readline
3808 #
3809
3810
3811
3812 # Check whether --with-readline or --without-readline was given.
3813 if test "${with_readline+set}" = set; then
3814   withval="$with_readline"
3815
3816   case $withval in
3817     yes)
3818       :
3819       ;;
3820     no)
3821       :
3822       ;;
3823     *)
3824       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3825 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3826    { (exit 1); exit 1; }; }
3827       ;;
3828   esac
3829
3830 else
3831   with_readline=yes
3832
3833 fi;
3834
3835 # readline on MinGW has problems with backslashes in psql and other bugs.
3836 # This is particularly a problem with non-US code pages.
3837 # Therefore disable its use until we understand the cause. 2004-07-20
3838 if test "$PORTNAME" = "win32"; then
3839   if test "$with_readline" = yes; then
3840     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3841 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3842     with_readline=no
3843   fi
3844 fi
3845
3846
3847 #
3848 # Zlib
3849 #
3850
3851
3852
3853 # Check whether --with-zlib or --without-zlib was given.
3854 if test "${with_zlib+set}" = set; then
3855   withval="$with_zlib"
3856
3857   case $withval in
3858     yes)
3859       :
3860       ;;
3861     no)
3862       :
3863       ;;
3864     *)
3865       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3866 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3867    { (exit 1); exit 1; }; }
3868       ;;
3869   esac
3870
3871 else
3872   with_zlib=yes
3873
3874 fi;
3875
3876
3877
3878 #
3879 # Elf
3880 #
3881
3882 # Assume system is ELF if it predefines __ELF__ as 1,
3883 # otherwise believe host_os based default.
3884 case $host_os in
3885     freebsd1*|freebsd2*) elf=no;;
3886     freebsd3*|freebsd4*) elf=yes;;
3887 esac
3888
3889
3890 echo "$as_me:$LINENO: checking for egrep" >&5
3891 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3892 if test "${ac_cv_prog_egrep+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3896     then ac_cv_prog_egrep='grep -E'
3897     else ac_cv_prog_egrep='egrep'
3898     fi
3899 fi
3900 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3901 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3902  EGREP=$ac_cv_prog_egrep
3903
3904
3905 cat >conftest.$ac_ext <<_ACEOF
3906 /* confdefs.h.  */
3907 _ACEOF
3908 cat confdefs.h >>conftest.$ac_ext
3909 cat >>conftest.$ac_ext <<_ACEOF
3910 /* end confdefs.h.  */
3911 #if __ELF__
3912   yes
3913 #endif
3914
3915 _ACEOF
3916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3917   $EGREP "yes" >/dev/null 2>&1; then
3918   ELF_SYS=true
3919 else
3920   if test "X$elf" = "Xyes" ; then
3921   ELF_SYS=true
3922 else
3923   ELF_SYS=
3924 fi
3925 fi
3926 rm -f conftest*
3927
3928
3929
3930 #
3931 # Assignments
3932 #
3933
3934 CPPFLAGS="$CPPFLAGS $INCLUDES"
3935 LDFLAGS="$LDFLAGS $LIBDIRS"
3936
3937 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3938 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3939 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3940 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3941
3942
3943
3944 for ac_prog in gawk mawk nawk awk
3945 do
3946   # Extract the first word of "$ac_prog", so it can be a program name with args.
3947 set dummy $ac_prog; ac_word=$2
3948 echo "$as_me:$LINENO: checking for $ac_word" >&5
3949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3950 if test "${ac_cv_prog_AWK+set}" = set; then
3951   echo $ECHO_N "(cached) $ECHO_C" >&6
3952 else
3953   if test -n "$AWK"; then
3954   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3955 else
3956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957 for as_dir in $PATH
3958 do
3959   IFS=$as_save_IFS
3960   test -z "$as_dir" && as_dir=.
3961   for ac_exec_ext in '' $ac_executable_extensions; do
3962   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3963     ac_cv_prog_AWK="$ac_prog"
3964     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3965     break 2
3966   fi
3967 done
3968 done
3969
3970 fi
3971 fi
3972 AWK=$ac_cv_prog_AWK
3973 if test -n "$AWK"; then
3974   echo "$as_me:$LINENO: result: $AWK" >&5
3975 echo "${ECHO_T}$AWK" >&6
3976 else
3977   echo "$as_me:$LINENO: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3979 fi
3980
3981   test -n "$AWK" && break
3982 done
3983
3984 echo "$as_me:$LINENO: checking for flex" >&5
3985 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3986 if test "${pgac_cv_path_flex+set}" = set; then
3987   echo $ECHO_N "(cached) $ECHO_C" >&6
3988 else
3989   # Let the user override the test
3990 if test -n "$FLEX"; then
3991   pgac_cv_path_flex=$FLEX
3992 else
3993   pgac_save_IFS=$IFS
3994   IFS=$PATH_SEPARATOR
3995   for pgac_dir in $PATH; do
3996     IFS=$pgac_save_IFS
3997     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3998       pgac_dir=`pwd`
3999     fi
4000     for pgac_prog in flex lex; do
4001       pgac_candidate="$pgac_dir/$pgac_prog"
4002       if test -f "$pgac_candidate" \
4003         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4004       then
4005         echo '%%'  > conftest.l
4006         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4007           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
4008             pgac_broken_flex=$pgac_candidate
4009             continue
4010           fi
4011
4012           pgac_cv_path_flex=$pgac_candidate
4013           break 2
4014         fi
4015       fi
4016     done
4017   done
4018   rm -f conftest.l lex.yy.c
4019   : ${pgac_cv_path_flex=no}
4020 fi
4021
4022 fi
4023 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4024 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4025 if test x"$pgac_cv_path_flex" = x"no"; then
4026   if test -n "$pgac_broken_flex"; then
4027     { echo "$as_me:$LINENO: WARNING:
4028 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4029 *** should get version 2.5.4 or later." >&5
4030 echo "$as_me: WARNING:
4031 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4032 *** should get version 2.5.4 or later." >&2;}
4033   fi
4034
4035   { echo "$as_me:$LINENO: WARNING:
4036 *** Without Flex you will not be able to build PostgreSQL from CVS or
4037 *** change any of the scanner definition files.  You can obtain Flex from
4038 *** a GNU mirror site.  (If you are using the official distribution of
4039 *** PostgreSQL then you do not need to worry about this because the Flex
4040 *** output is pre-generated.)" >&5
4041 echo "$as_me: WARNING:
4042 *** Without Flex you will not be able to build PostgreSQL from CVS or
4043 *** change any of the scanner definition files.  You can obtain Flex from
4044 *** a GNU mirror site.  (If you are using the official distribution of
4045 *** PostgreSQL then you do not need to worry about this because the Flex
4046 *** output is pre-generated.)" >&2;}
4047 fi
4048
4049 if test x"$pgac_cv_path_flex" = x"no"; then
4050   FLEX=
4051 else
4052   FLEX=$pgac_cv_path_flex
4053 fi
4054
4055
4056
4057
4058 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4059 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4060 LN_S=$as_ln_s
4061 if test "$LN_S" = "ln -s"; then
4062   echo "$as_me:$LINENO: result: yes" >&5
4063 echo "${ECHO_T}yes" >&6
4064 else
4065   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4066 echo "${ECHO_T}no, using $LN_S" >&6
4067 fi
4068
4069
4070 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4071 if test "${with_gnu_ld+set}" = set; then
4072   withval="$with_gnu_ld"
4073   test "$withval" = no || with_gnu_ld=yes
4074 else
4075   with_gnu_ld=no
4076 fi;
4077 ac_prog=ld
4078 if test "$GCC" = yes; then
4079   # Check if gcc -print-prog-name=ld gives a path.
4080   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4081 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4082   case $host in
4083   *-*-mingw*)
4084     # gcc leaves a trailing carriage return which upsets mingw
4085     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4086   *)
4087     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4088   esac
4089   case "$ac_prog" in
4090     # Accept absolute paths.
4091     [\\/]* | [A-Za-z]:[\\/]*)
4092       re_direlt='/[^/][^/]*/\.\./'
4093       # Canonicalize the path of ld
4094       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4095       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4096         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4097       done
4098       test -z "$LD" && LD="$ac_prog"
4099       ;;
4100   "")
4101     # If it fails, then pretend we aren't using GCC.
4102     ac_prog=ld
4103     ;;
4104   *)
4105     # If it is relative, then search for the first ld in PATH.
4106     with_gnu_ld=unknown
4107     ;;
4108   esac
4109 elif test "$with_gnu_ld" = yes; then
4110   echo "$as_me:$LINENO: checking for GNU ld" >&5
4111 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4112 else
4113   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4114 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4115 fi
4116 if test "${ac_cv_path_LD+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   if test -z "$LD"; then
4120   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4121   for ac_dir in $PATH; do
4122     test -z "$ac_dir" && ac_dir=.
4123     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4124       ac_cv_path_LD="$ac_dir/$ac_prog"
4125       # Check to see if the program is GNU ld.  I'd rather use --version,
4126       # but apparently some GNU ld's only accept -v.
4127       # Break only if it was the GNU/non-GNU ld that we prefer.
4128       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4129         test "$with_gnu_ld" != no && break
4130       else
4131         test "$with_gnu_ld" != yes && break
4132       fi
4133     fi
4134   done
4135   IFS="$ac_save_ifs"
4136 else
4137   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4138 fi
4139 fi
4140
4141 LD="$ac_cv_path_LD"
4142 if test -n "$LD"; then
4143   echo "$as_me:$LINENO: result: $LD" >&5
4144 echo "${ECHO_T}$LD" >&6
4145 else
4146   echo "$as_me:$LINENO: result: no" >&5
4147 echo "${ECHO_T}no" >&6
4148 fi
4149 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4150 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4151    { (exit 1); exit 1; }; }
4152 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4153 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4154 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4155   echo $ECHO_N "(cached) $ECHO_C" >&6
4156 else
4157   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4158 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4159   ac_cv_prog_gnu_ld=yes
4160 else
4161   ac_cv_prog_gnu_ld=no
4162 fi
4163 fi
4164 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4165 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4166 with_gnu_ld=$ac_cv_prog_gnu_ld
4167
4168
4169
4170
4171 case $host_os in sysv5*)
4172   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4173 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4174 if test "${pgac_cv_prog_ld_R+set}" = set; then
4175   echo $ECHO_N "(cached) $ECHO_C" >&6
4176 else
4177
4178     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4179     cat >conftest.$ac_ext <<_ACEOF
4180 /* confdefs.h.  */
4181 _ACEOF
4182 cat confdefs.h >>conftest.$ac_ext
4183 cat >>conftest.$ac_ext <<_ACEOF
4184 /* end confdefs.h.  */
4185
4186 int
4187 main ()
4188 {
4189
4190   ;
4191   return 0;
4192 }
4193 _ACEOF
4194 rm -f conftest.$ac_objext conftest$ac_exeext
4195 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196   (eval $ac_link) 2>conftest.er1
4197   ac_status=$?
4198   grep -v '^ *+' conftest.er1 >conftest.err
4199   rm -f conftest.er1
4200   cat conftest.err >&5
4201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4202   (exit $ac_status); } &&
4203          { ac_try='test -z "$ac_c_werror_flag"
4204                          || test ! -s conftest.err'
4205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4206   (eval $ac_try) 2>&5
4207   ac_status=$?
4208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4209   (exit $ac_status); }; } &&
4210          { ac_try='test -s conftest$ac_exeext'
4211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4212   (eval $ac_try) 2>&5
4213   ac_status=$?
4214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4215   (exit $ac_status); }; }; then
4216   pgac_cv_prog_ld_R=yes
4217 else
4218   echo "$as_me: failed program was:" >&5
4219 sed 's/^/| /' conftest.$ac_ext >&5
4220
4221 pgac_cv_prog_ld_R=no
4222 fi
4223 rm -f conftest.err conftest.$ac_objext \
4224       conftest$ac_exeext conftest.$ac_ext
4225     LDFLAGS=$pgac_save_LDFLAGS
4226
4227 fi
4228 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4229 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4230   ld_R_works=$pgac_cv_prog_ld_R
4231
4232 esac
4233 if test -n "$ac_tool_prefix"; then
4234   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4235 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4236 echo "$as_me:$LINENO: checking for $ac_word" >&5
4237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4238 if test "${ac_cv_prog_RANLIB+set}" = set; then
4239   echo $ECHO_N "(cached) $ECHO_C" >&6
4240 else
4241   if test -n "$RANLIB"; then
4242   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4243 else
4244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4245 for as_dir in $PATH
4246 do
4247   IFS=$as_save_IFS
4248   test -z "$as_dir" && as_dir=.
4249   for ac_exec_ext in '' $ac_executable_extensions; do
4250   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4251     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4252     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4253     break 2
4254   fi
4255 done
4256 done
4257
4258 fi
4259 fi
4260 RANLIB=$ac_cv_prog_RANLIB
4261 if test -n "$RANLIB"; then
4262   echo "$as_me:$LINENO: result: $RANLIB" >&5
4263 echo "${ECHO_T}$RANLIB" >&6
4264 else
4265   echo "$as_me:$LINENO: result: no" >&5
4266 echo "${ECHO_T}no" >&6
4267 fi
4268
4269 fi
4270 if test -z "$ac_cv_prog_RANLIB"; then
4271   ac_ct_RANLIB=$RANLIB
4272   # Extract the first word of "ranlib", so it can be a program name with args.
4273 set dummy ranlib; ac_word=$2
4274 echo "$as_me:$LINENO: checking for $ac_word" >&5
4275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4276 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4277   echo $ECHO_N "(cached) $ECHO_C" >&6
4278 else
4279   if test -n "$ac_ct_RANLIB"; then
4280   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4281 else
4282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4283 for as_dir in $PATH
4284 do
4285   IFS=$as_save_IFS
4286   test -z "$as_dir" && as_dir=.
4287   for ac_exec_ext in '' $ac_executable_extensions; do
4288   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4289     ac_cv_prog_ac_ct_RANLIB="ranlib"
4290     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4291     break 2
4292   fi
4293 done
4294 done
4295
4296   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4297 fi
4298 fi
4299 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4300 if test -n "$ac_ct_RANLIB"; then
4301   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4302 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4303 else
4304   echo "$as_me:$LINENO: result: no" >&5
4305 echo "${ECHO_T}no" >&6
4306 fi
4307
4308   RANLIB=$ac_ct_RANLIB
4309 else
4310   RANLIB="$ac_cv_prog_RANLIB"
4311 fi
4312
4313 for ac_prog in lorder
4314 do
4315   # Extract the first word of "$ac_prog", so it can be a program name with args.
4316 set dummy $ac_prog; ac_word=$2
4317 echo "$as_me:$LINENO: checking for $ac_word" >&5
4318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4319 if test "${ac_cv_prog_LORDER+set}" = set; then
4320   echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322   if test -n "$LORDER"; then
4323   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4324 else
4325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326 for as_dir in $PATH
4327 do
4328   IFS=$as_save_IFS
4329   test -z "$as_dir" && as_dir=.
4330   for ac_exec_ext in '' $ac_executable_extensions; do
4331   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4332     ac_cv_prog_LORDER="$ac_prog"
4333     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4334     break 2
4335   fi
4336 done
4337 done
4338
4339 fi
4340 fi
4341 LORDER=$ac_cv_prog_LORDER
4342 if test -n "$LORDER"; then
4343   echo "$as_me:$LINENO: result: $LORDER" >&5
4344 echo "${ECHO_T}$LORDER" >&6
4345 else
4346   echo "$as_me:$LINENO: result: no" >&5
4347 echo "${ECHO_T}no" >&6
4348 fi
4349
4350   test -n "$LORDER" && break
4351 done
4352
4353 # Extract the first word of "tar", so it can be a program name with args.
4354 set dummy tar; ac_word=$2
4355 echo "$as_me:$LINENO: checking for $ac_word" >&5
4356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4357 if test "${ac_cv_path_TAR+set}" = set; then
4358   echo $ECHO_N "(cached) $ECHO_C" >&6
4359 else
4360   case $TAR in
4361   [\\/]* | ?:[\\/]*)
4362   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4363   ;;
4364   *)
4365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366 for as_dir in $PATH
4367 do
4368   IFS=$as_save_IFS
4369   test -z "$as_dir" && as_dir=.
4370   for ac_exec_ext in '' $ac_executable_extensions; do
4371   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4372     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4373     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4374     break 2
4375   fi
4376 done
4377 done
4378
4379   ;;
4380 esac
4381 fi
4382 TAR=$ac_cv_path_TAR
4383
4384 if test -n "$TAR"; then
4385   echo "$as_me:$LINENO: result: $TAR" >&5
4386 echo "${ECHO_T}$TAR" >&6
4387 else
4388   echo "$as_me:$LINENO: result: no" >&5
4389 echo "${ECHO_T}no" >&6
4390 fi
4391
4392
4393   if test -n "$ac_tool_prefix"; then
4394   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4395 set dummy ${ac_tool_prefix}strip; ac_word=$2
4396 echo "$as_me:$LINENO: checking for $ac_word" >&5
4397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4398 if test "${ac_cv_prog_STRIP+set}" = set; then
4399   echo $ECHO_N "(cached) $ECHO_C" >&6
4400 else
4401   if test -n "$STRIP"; then
4402   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4403 else
4404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405 for as_dir in $PATH
4406 do
4407   IFS=$as_save_IFS
4408   test -z "$as_dir" && as_dir=.
4409   for ac_exec_ext in '' $ac_executable_extensions; do
4410   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4411     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4412     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4413     break 2
4414   fi
4415 done
4416 done
4417
4418 fi
4419 fi
4420 STRIP=$ac_cv_prog_STRIP
4421 if test -n "$STRIP"; then
4422   echo "$as_me:$LINENO: result: $STRIP" >&5
4423 echo "${ECHO_T}$STRIP" >&6
4424 else
4425   echo "$as_me:$LINENO: result: no" >&5
4426 echo "${ECHO_T}no" >&6
4427 fi
4428
4429 fi
4430 if test -z "$ac_cv_prog_STRIP"; then
4431   ac_ct_STRIP=$STRIP
4432   # Extract the first word of "strip", so it can be a program name with args.
4433 set dummy strip; ac_word=$2
4434 echo "$as_me:$LINENO: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$ac_ct_STRIP"; then
4440   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4441 else
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443 for as_dir in $PATH
4444 do
4445   IFS=$as_save_IFS
4446   test -z "$as_dir" && as_dir=.
4447   for ac_exec_ext in '' $ac_executable_extensions; do
4448   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4449     ac_cv_prog_ac_ct_STRIP="strip"
4450     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4451     break 2
4452   fi
4453 done
4454 done
4455
4456   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4457 fi
4458 fi
4459 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4460 if test -n "$ac_ct_STRIP"; then
4461   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4462 echo "${ECHO_T}$ac_ct_STRIP" >&6
4463 else
4464   echo "$as_me:$LINENO: result: no" >&5
4465 echo "${ECHO_T}no" >&6
4466 fi
4467
4468   STRIP=$ac_ct_STRIP
4469 else
4470   STRIP="$ac_cv_prog_STRIP"
4471 fi
4472
4473
4474   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4475 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4476   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4477     STRIP_STATIC_LIB="$STRIP -x"
4478     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4479     echo "$as_me:$LINENO: result: yes" >&5
4480 echo "${ECHO_T}yes" >&6
4481   else
4482     STRIP_STATIC_LIB=:
4483     STRIP_SHARED_LIB=:
4484     echo "$as_me:$LINENO: result: no" >&5
4485 echo "${ECHO_T}no" >&6
4486   fi
4487
4488
4489
4490
4491 for ac_prog in 'bison -y'
4492 do
4493   # Extract the first word of "$ac_prog", so it can be a program name with args.
4494 set dummy $ac_prog; ac_word=$2
4495 echo "$as_me:$LINENO: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_YACC+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$YACC"; then
4501   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4502 else
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504 for as_dir in $PATH
4505 do
4506   IFS=$as_save_IFS
4507   test -z "$as_dir" && as_dir=.
4508   for ac_exec_ext in '' $ac_executable_extensions; do
4509   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510     ac_cv_prog_YACC="$ac_prog"
4511     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4512     break 2
4513   fi
4514 done
4515 done
4516
4517 fi
4518 fi
4519 YACC=$ac_cv_prog_YACC
4520 if test -n "$YACC"; then
4521   echo "$as_me:$LINENO: result: $YACC" >&5
4522 echo "${ECHO_T}$YACC" >&6
4523 else
4524   echo "$as_me:$LINENO: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$YACC" && break
4529 done
4530
4531
4532 if test "$YACC"; then
4533   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4534     { echo "$as_me:$LINENO: WARNING:
4535 *** If you are going to modify the grammar files or build from CVS, the installed
4536 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4537 echo "$as_me: WARNING:
4538 *** If you are going to modify the grammar files or build from CVS, the installed
4539 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4540   fi
4541 fi
4542
4543 if test -z "$YACC"; then
4544   { echo "$as_me:$LINENO: WARNING:
4545 *** Without Bison you will not be able to build PostgreSQL from CVS or
4546 *** change any of the parser definition files.  You can obtain Bison from
4547 *** a GNU mirror site.  (If you are using the official distribution of
4548 *** PostgreSQL then you do not need to worry about this because the Bison
4549 *** output is pre-generated.)  To use a different yacc program (possible,
4550 *** but not recommended), set the environment variable YACC before running
4551 *** 'configure'." >&5
4552 echo "$as_me: WARNING:
4553 *** Without Bison you will not be able to build PostgreSQL from CVS or
4554 *** change any of the parser definition files.  You can obtain Bison from
4555 *** a GNU mirror site.  (If you are using the official distribution of
4556 *** PostgreSQL then you do not need to worry about this because the Bison
4557 *** output is pre-generated.)  To use a different yacc program (possible,
4558 *** but not recommended), set the environment variable YACC before running
4559 *** 'configure'." >&2;}
4560 fi
4561
4562
4563 # Extract the first word of "perl", so it can be a program name with args.
4564 set dummy perl; ac_word=$2
4565 echo "$as_me:$LINENO: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_path_PERL+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   case $PERL in
4571   [\\/]* | ?:[\\/]*)
4572   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4573   ;;
4574   *)
4575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576 for as_dir in $PATH
4577 do
4578   IFS=$as_save_IFS
4579   test -z "$as_dir" && as_dir=.
4580   for ac_exec_ext in '' $ac_executable_extensions; do
4581   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4583     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4584     break 2
4585   fi
4586 done
4587 done
4588
4589   ;;
4590 esac
4591 fi
4592 PERL=$ac_cv_path_PERL
4593
4594 if test -n "$PERL"; then
4595   echo "$as_me:$LINENO: result: $PERL" >&5
4596 echo "${ECHO_T}$PERL" >&6
4597 else
4598   echo "$as_me:$LINENO: result: no" >&5
4599 echo "${ECHO_T}no" >&6
4600 fi
4601
4602 if test "$with_perl" = yes; then
4603
4604 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4605 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4606 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4607 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4608 echo "${ECHO_T}$perl_archlibexp" >&6
4609 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4610 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4611 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4612 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4613 echo "${ECHO_T}$perl_privlibexp" >&6
4614 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4615 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4616 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4617 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4618 echo "${ECHO_T}$perl_useshrplib" >&6
4619
4620 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4621 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4622 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4623 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4624 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4625 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4626 echo "${ECHO_T}$perl_embed_ldflags" >&6
4627 fi
4628
4629 if test "$with_python" = yes; then
4630   # Extract the first word of "python", so it can be a program name with args.
4631 set dummy python; ac_word=$2
4632 echo "$as_me:$LINENO: checking for $ac_word" >&5
4633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4634 if test "${ac_cv_path_PYTHON+set}" = set; then
4635   echo $ECHO_N "(cached) $ECHO_C" >&6
4636 else
4637   case $PYTHON in
4638   [\\/]* | ?:[\\/]*)
4639   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4640   ;;
4641   *)
4642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643 for as_dir in $PATH
4644 do
4645   IFS=$as_save_IFS
4646   test -z "$as_dir" && as_dir=.
4647   for ac_exec_ext in '' $ac_executable_extensions; do
4648   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4650     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4651     break 2
4652   fi
4653 done
4654 done
4655
4656   ;;
4657 esac
4658 fi
4659 PYTHON=$ac_cv_path_PYTHON
4660
4661 if test -n "$PYTHON"; then
4662   echo "$as_me:$LINENO: result: $PYTHON" >&5
4663 echo "${ECHO_T}$PYTHON" >&6
4664 else
4665   echo "$as_me:$LINENO: result: no" >&5
4666 echo "${ECHO_T}no" >&6
4667 fi
4668
4669 if test x"$PYTHON" = x""; then
4670   { { echo "$as_me:$LINENO: error: Python not found" >&5
4671 echo "$as_me: error: Python not found" >&2;}
4672    { (exit 1); exit 1; }; }
4673 fi
4674
4675
4676 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4677 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4678 if "${PYTHON}" 2>&- -c 'import distutils'
4679 then
4680     echo "$as_me:$LINENO: result: yes" >&5
4681 echo "${ECHO_T}yes" >&6
4682 else
4683     echo "$as_me:$LINENO: result: no" >&5
4684 echo "${ECHO_T}no" >&6
4685     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4686 echo "$as_me: error: distutils module not found" >&2;}
4687    { (exit 1); exit 1; }; }
4688 fi
4689 echo "$as_me:$LINENO: checking Python configuration directory" >&5
4690 echo $ECHO_N "checking Python configuration directory... $ECHO_C" >&6
4691 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4692 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')"`
4693 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"`
4694
4695 # This should be enough of a message.
4696 echo "$as_me:$LINENO: result: $python_configdir" >&5
4697 echo "${ECHO_T}$python_configdir" >&6
4698
4699
4700 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4701 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4702
4703 python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"`
4704 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"`
4705 python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"`
4706 ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
4707
4708 if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
4709 then
4710         # New way: use the official shared library
4711         ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
4712         python_libspec="-L${python_libdir} -l${ldlibrary}"
4713 else
4714         # Old way: use libpython from python_configdir
4715         python_libdir="${python_configdir}"
4716         python_libspec="-L${python_libdir} -lpython${python_version}"
4717 fi
4718
4719 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"`
4720
4721 echo "$as_me:$LINENO: result: ${python_libspec} ${python_additional_libs}" >&5
4722 echo "${ECHO_T}${python_libspec} ${python_additional_libs}" >&6
4723
4724
4725 # threaded python is not supported on bsd's
4726 echo "$as_me:$LINENO: checking whether Python is compiled with thread support" >&5
4727 echo $ECHO_N "checking whether Python is compiled with thread support... $ECHO_C" >&6
4728 pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"`
4729 if test "$pythreads" = "1"; then
4730   echo "$as_me:$LINENO: result: yes" >&5
4731 echo "${ECHO_T}yes" >&6
4732   case $host_os in
4733   openbsd*|freebsd4*)
4734     { { echo "$as_me:$LINENO: error: *** Threaded Python not supported on this platform ***" >&5
4735 echo "$as_me: error: *** Threaded Python not supported on this platform ***" >&2;}
4736    { (exit 1); exit 1; }; }
4737     ;;
4738   esac
4739 else
4740   echo "$as_me:$LINENO: result: no" >&5
4741 echo "${ECHO_T}no" >&6
4742 fi
4743
4744
4745 fi
4746
4747
4748 ##
4749 ## Libraries
4750 ##
4751
4752 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4753 then
4754
4755 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4756 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4757 if test "${ac_cv_lib_bsd_main+set}" = set; then
4758   echo $ECHO_N "(cached) $ECHO_C" >&6
4759 else
4760   ac_check_lib_save_LIBS=$LIBS
4761 LIBS="-lbsd  $LIBS"
4762 cat >conftest.$ac_ext <<_ACEOF
4763 /* confdefs.h.  */
4764 _ACEOF
4765 cat confdefs.h >>conftest.$ac_ext
4766 cat >>conftest.$ac_ext <<_ACEOF
4767 /* end confdefs.h.  */
4768
4769
4770 int
4771 main ()
4772 {
4773 main ();
4774   ;
4775   return 0;
4776 }
4777 _ACEOF
4778 rm -f conftest.$ac_objext conftest$ac_exeext
4779 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4780   (eval $ac_link) 2>conftest.er1
4781   ac_status=$?
4782   grep -v '^ *+' conftest.er1 >conftest.err
4783   rm -f conftest.er1
4784   cat conftest.err >&5
4785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -z "$ac_c_werror_flag"
4788                          || test ! -s conftest.err'
4789   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4790   (eval $ac_try) 2>&5
4791   ac_status=$?
4792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793   (exit $ac_status); }; } &&
4794          { ac_try='test -s conftest$ac_exeext'
4795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4796   (eval $ac_try) 2>&5
4797   ac_status=$?
4798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4799   (exit $ac_status); }; }; then
4800   ac_cv_lib_bsd_main=yes
4801 else
4802   echo "$as_me: failed program was:" >&5
4803 sed 's/^/| /' conftest.$ac_ext >&5
4804
4805 ac_cv_lib_bsd_main=no
4806 fi
4807 rm -f conftest.err conftest.$ac_objext \
4808       conftest$ac_exeext conftest.$ac_ext
4809 LIBS=$ac_check_lib_save_LIBS
4810 fi
4811 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4812 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4813 if test $ac_cv_lib_bsd_main = yes; then
4814   cat >>confdefs.h <<_ACEOF
4815 #define HAVE_LIBBSD 1
4816 _ACEOF
4817
4818   LIBS="-lbsd $LIBS"
4819
4820 fi
4821
4822 fi
4823
4824 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4825 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4826 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4827   echo $ECHO_N "(cached) $ECHO_C" >&6
4828 else
4829   ac_check_lib_save_LIBS=$LIBS
4830 LIBS="-lutil  $LIBS"
4831 cat >conftest.$ac_ext <<_ACEOF
4832 /* confdefs.h.  */
4833 _ACEOF
4834 cat confdefs.h >>conftest.$ac_ext
4835 cat >>conftest.$ac_ext <<_ACEOF
4836 /* end confdefs.h.  */
4837
4838 /* Override any gcc2 internal prototype to avoid an error.  */
4839 #ifdef __cplusplus
4840 extern "C"
4841 #endif
4842 /* We use char because int might match the return type of a gcc2
4843    builtin and then its argument prototype would still apply.  */
4844 char setproctitle ();
4845 int
4846 main ()
4847 {
4848 setproctitle ();
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext conftest$ac_exeext
4854 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4855   (eval $ac_link) 2>conftest.er1
4856   ac_status=$?
4857   grep -v '^ *+' conftest.er1 >conftest.err
4858   rm -f conftest.er1
4859   cat conftest.err >&5
4860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4861   (exit $ac_status); } &&
4862          { ac_try='test -z "$ac_c_werror_flag"
4863                          || test ! -s conftest.err'
4864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4865   (eval $ac_try) 2>&5
4866   ac_status=$?
4867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868   (exit $ac_status); }; } &&
4869          { ac_try='test -s conftest$ac_exeext'
4870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871   (eval $ac_try) 2>&5
4872   ac_status=$?
4873   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874   (exit $ac_status); }; }; then
4875   ac_cv_lib_util_setproctitle=yes
4876 else
4877   echo "$as_me: failed program was:" >&5
4878 sed 's/^/| /' conftest.$ac_ext >&5
4879
4880 ac_cv_lib_util_setproctitle=no
4881 fi
4882 rm -f conftest.err conftest.$ac_objext \
4883       conftest$ac_exeext conftest.$ac_ext
4884 LIBS=$ac_check_lib_save_LIBS
4885 fi
4886 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4887 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4888 if test $ac_cv_lib_util_setproctitle = yes; then
4889   cat >>confdefs.h <<_ACEOF
4890 #define HAVE_LIBUTIL 1
4891 _ACEOF
4892
4893   LIBS="-lutil $LIBS"
4894
4895 fi
4896
4897
4898 echo "$as_me:$LINENO: checking for main in -lm" >&5
4899 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4900 if test "${ac_cv_lib_m_main+set}" = set; then
4901   echo $ECHO_N "(cached) $ECHO_C" >&6
4902 else
4903   ac_check_lib_save_LIBS=$LIBS
4904 LIBS="-lm  $LIBS"
4905 cat >conftest.$ac_ext <<_ACEOF
4906 /* confdefs.h.  */
4907 _ACEOF
4908 cat confdefs.h >>conftest.$ac_ext
4909 cat >>conftest.$ac_ext <<_ACEOF
4910 /* end confdefs.h.  */
4911
4912
4913 int
4914 main ()
4915 {
4916 main ();
4917   ;
4918   return 0;
4919 }
4920 _ACEOF
4921 rm -f conftest.$ac_objext conftest$ac_exeext
4922 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4923   (eval $ac_link) 2>conftest.er1
4924   ac_status=$?
4925   grep -v '^ *+' conftest.er1 >conftest.err
4926   rm -f conftest.er1
4927   cat conftest.err >&5
4928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4929   (exit $ac_status); } &&
4930          { ac_try='test -z "$ac_c_werror_flag"
4931                          || test ! -s conftest.err'
4932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4933   (eval $ac_try) 2>&5
4934   ac_status=$?
4935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4936   (exit $ac_status); }; } &&
4937          { ac_try='test -s conftest$ac_exeext'
4938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4939   (eval $ac_try) 2>&5
4940   ac_status=$?
4941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4942   (exit $ac_status); }; }; then
4943   ac_cv_lib_m_main=yes
4944 else
4945   echo "$as_me: failed program was:" >&5
4946 sed 's/^/| /' conftest.$ac_ext >&5
4947
4948 ac_cv_lib_m_main=no
4949 fi
4950 rm -f conftest.err conftest.$ac_objext \
4951       conftest$ac_exeext conftest.$ac_ext
4952 LIBS=$ac_check_lib_save_LIBS
4953 fi
4954 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4955 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4956 if test $ac_cv_lib_m_main = yes; then
4957   cat >>confdefs.h <<_ACEOF
4958 #define HAVE_LIBM 1
4959 _ACEOF
4960
4961   LIBS="-lm $LIBS"
4962
4963 fi
4964
4965
4966 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4967 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4968 if test "${ac_cv_lib_dl_main+set}" = set; then
4969   echo $ECHO_N "(cached) $ECHO_C" >&6
4970 else
4971   ac_check_lib_save_LIBS=$LIBS
4972 LIBS="-ldl  $LIBS"
4973 cat >conftest.$ac_ext <<_ACEOF
4974 /* confdefs.h.  */
4975 _ACEOF
4976 cat confdefs.h >>conftest.$ac_ext
4977 cat >>conftest.$ac_ext <<_ACEOF
4978 /* end confdefs.h.  */
4979
4980
4981 int
4982 main ()
4983 {
4984 main ();
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext conftest$ac_exeext
4990 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4991   (eval $ac_link) 2>conftest.er1
4992   ac_status=$?
4993   grep -v '^ *+' conftest.er1 >conftest.err
4994   rm -f conftest.er1
4995   cat conftest.err >&5
4996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4997   (exit $ac_status); } &&
4998          { ac_try='test -z "$ac_c_werror_flag"
4999                          || test ! -s conftest.err'
5000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5001   (eval $ac_try) 2>&5
5002   ac_status=$?
5003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5004   (exit $ac_status); }; } &&
5005          { ac_try='test -s conftest$ac_exeext'
5006   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5007   (eval $ac_try) 2>&5
5008   ac_status=$?
5009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5010   (exit $ac_status); }; }; then
5011   ac_cv_lib_dl_main=yes
5012 else
5013   echo "$as_me: failed program was:" >&5
5014 sed 's/^/| /' conftest.$ac_ext >&5
5015
5016 ac_cv_lib_dl_main=no
5017 fi
5018 rm -f conftest.err conftest.$ac_objext \
5019       conftest$ac_exeext conftest.$ac_ext
5020 LIBS=$ac_check_lib_save_LIBS
5021 fi
5022 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
5023 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
5024 if test $ac_cv_lib_dl_main = yes; then
5025   cat >>confdefs.h <<_ACEOF
5026 #define HAVE_LIBDL 1
5027 _ACEOF
5028
5029   LIBS="-ldl $LIBS"
5030
5031 fi
5032
5033
5034 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5035 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5036 if test "${ac_cv_lib_nsl_main+set}" = set; then
5037   echo $ECHO_N "(cached) $ECHO_C" >&6
5038 else
5039   ac_check_lib_save_LIBS=$LIBS
5040 LIBS="-lnsl  $LIBS"
5041 cat >conftest.$ac_ext <<_ACEOF
5042 /* confdefs.h.  */
5043 _ACEOF
5044 cat confdefs.h >>conftest.$ac_ext
5045 cat >>conftest.$ac_ext <<_ACEOF
5046 /* end confdefs.h.  */
5047
5048
5049 int
5050 main ()
5051 {
5052 main ();
5053   ;
5054   return 0;
5055 }
5056 _ACEOF
5057 rm -f conftest.$ac_objext conftest$ac_exeext
5058 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5059   (eval $ac_link) 2>conftest.er1
5060   ac_status=$?
5061   grep -v '^ *+' conftest.er1 >conftest.err
5062   rm -f conftest.er1
5063   cat conftest.err >&5
5064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065   (exit $ac_status); } &&
5066          { ac_try='test -z "$ac_c_werror_flag"
5067                          || test ! -s conftest.err'
5068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5069   (eval $ac_try) 2>&5
5070   ac_status=$?
5071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5072   (exit $ac_status); }; } &&
5073          { ac_try='test -s conftest$ac_exeext'
5074   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5075   (eval $ac_try) 2>&5
5076   ac_status=$?
5077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078   (exit $ac_status); }; }; then
5079   ac_cv_lib_nsl_main=yes
5080 else
5081   echo "$as_me: failed program was:" >&5
5082 sed 's/^/| /' conftest.$ac_ext >&5
5083
5084 ac_cv_lib_nsl_main=no
5085 fi
5086 rm -f conftest.err conftest.$ac_objext \
5087       conftest$ac_exeext conftest.$ac_ext
5088 LIBS=$ac_check_lib_save_LIBS
5089 fi
5090 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5091 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5092 if test $ac_cv_lib_nsl_main = yes; then
5093   cat >>confdefs.h <<_ACEOF
5094 #define HAVE_LIBNSL 1
5095 _ACEOF
5096
5097   LIBS="-lnsl $LIBS"
5098
5099 fi
5100
5101
5102 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5103 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5104 if test "${ac_cv_lib_socket_main+set}" = set; then
5105   echo $ECHO_N "(cached) $ECHO_C" >&6
5106 else
5107   ac_check_lib_save_LIBS=$LIBS
5108 LIBS="-lsocket  $LIBS"
5109 cat >conftest.$ac_ext <<_ACEOF
5110 /* confdefs.h.  */
5111 _ACEOF
5112 cat confdefs.h >>conftest.$ac_ext
5113 cat >>conftest.$ac_ext <<_ACEOF
5114 /* end confdefs.h.  */
5115
5116
5117 int
5118 main ()
5119 {
5120 main ();
5121   ;
5122   return 0;
5123 }
5124 _ACEOF
5125 rm -f conftest.$ac_objext conftest$ac_exeext
5126 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5127   (eval $ac_link) 2>conftest.er1
5128   ac_status=$?
5129   grep -v '^ *+' conftest.er1 >conftest.err
5130   rm -f conftest.er1
5131   cat conftest.err >&5
5132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133   (exit $ac_status); } &&
5134          { ac_try='test -z "$ac_c_werror_flag"
5135                          || test ! -s conftest.err'
5136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140   (exit $ac_status); }; } &&
5141          { ac_try='test -s conftest$ac_exeext'
5142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5143   (eval $ac_try) 2>&5
5144   ac_status=$?
5145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5146   (exit $ac_status); }; }; then
5147   ac_cv_lib_socket_main=yes
5148 else
5149   echo "$as_me: failed program was:" >&5
5150 sed 's/^/| /' conftest.$ac_ext >&5
5151
5152 ac_cv_lib_socket_main=no
5153 fi
5154 rm -f conftest.err conftest.$ac_objext \
5155       conftest$ac_exeext conftest.$ac_ext
5156 LIBS=$ac_check_lib_save_LIBS
5157 fi
5158 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5159 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5160 if test $ac_cv_lib_socket_main = yes; then
5161   cat >>confdefs.h <<_ACEOF
5162 #define HAVE_LIBSOCKET 1
5163 _ACEOF
5164
5165   LIBS="-lsocket $LIBS"
5166
5167 fi
5168
5169
5170 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5171 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5172 if test "${ac_cv_lib_ipc_main+set}" = set; then
5173   echo $ECHO_N "(cached) $ECHO_C" >&6
5174 else
5175   ac_check_lib_save_LIBS=$LIBS
5176 LIBS="-lipc  $LIBS"
5177 cat >conftest.$ac_ext <<_ACEOF
5178 /* confdefs.h.  */
5179 _ACEOF
5180 cat confdefs.h >>conftest.$ac_ext
5181 cat >>conftest.$ac_ext <<_ACEOF
5182 /* end confdefs.h.  */
5183
5184
5185 int
5186 main ()
5187 {
5188 main ();
5189   ;
5190   return 0;
5191 }
5192 _ACEOF
5193 rm -f conftest.$ac_objext conftest$ac_exeext
5194 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5195   (eval $ac_link) 2>conftest.er1
5196   ac_status=$?
5197   grep -v '^ *+' conftest.er1 >conftest.err
5198   rm -f conftest.er1
5199   cat conftest.err >&5
5200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5201   (exit $ac_status); } &&
5202          { ac_try='test -z "$ac_c_werror_flag"
5203                          || test ! -s conftest.err'
5204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5205   (eval $ac_try) 2>&5
5206   ac_status=$?
5207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208   (exit $ac_status); }; } &&
5209          { ac_try='test -s conftest$ac_exeext'
5210   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5211   (eval $ac_try) 2>&5
5212   ac_status=$?
5213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5214   (exit $ac_status); }; }; then
5215   ac_cv_lib_ipc_main=yes
5216 else
5217   echo "$as_me: failed program was:" >&5
5218 sed 's/^/| /' conftest.$ac_ext >&5
5219
5220 ac_cv_lib_ipc_main=no
5221 fi
5222 rm -f conftest.err conftest.$ac_objext \
5223       conftest$ac_exeext conftest.$ac_ext
5224 LIBS=$ac_check_lib_save_LIBS
5225 fi
5226 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5227 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5228 if test $ac_cv_lib_ipc_main = yes; then
5229   cat >>confdefs.h <<_ACEOF
5230 #define HAVE_LIBIPC 1
5231 _ACEOF
5232
5233   LIBS="-lipc $LIBS"
5234
5235 fi
5236
5237
5238 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5239 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5240 if test "${ac_cv_lib_IPC_main+set}" = set; then
5241   echo $ECHO_N "(cached) $ECHO_C" >&6
5242 else
5243   ac_check_lib_save_LIBS=$LIBS
5244 LIBS="-lIPC  $LIBS"
5245 cat >conftest.$ac_ext <<_ACEOF
5246 /* confdefs.h.  */
5247 _ACEOF
5248 cat confdefs.h >>conftest.$ac_ext
5249 cat >>conftest.$ac_ext <<_ACEOF
5250 /* end confdefs.h.  */
5251
5252
5253 int
5254 main ()
5255 {
5256 main ();
5257   ;
5258   return 0;
5259 }
5260 _ACEOF
5261 rm -f conftest.$ac_objext conftest$ac_exeext
5262 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5263   (eval $ac_link) 2>conftest.er1
5264   ac_status=$?
5265   grep -v '^ *+' conftest.er1 >conftest.err
5266   rm -f conftest.er1
5267   cat conftest.err >&5
5268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -z "$ac_c_werror_flag"
5271                          || test ! -s conftest.err'
5272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273   (eval $ac_try) 2>&5
5274   ac_status=$?
5275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276   (exit $ac_status); }; } &&
5277          { ac_try='test -s conftest$ac_exeext'
5278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5279   (eval $ac_try) 2>&5
5280   ac_status=$?
5281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5282   (exit $ac_status); }; }; then
5283   ac_cv_lib_IPC_main=yes
5284 else
5285   echo "$as_me: failed program was:" >&5
5286 sed 's/^/| /' conftest.$ac_ext >&5
5287
5288 ac_cv_lib_IPC_main=no
5289 fi
5290 rm -f conftest.err conftest.$ac_objext \
5291       conftest$ac_exeext conftest.$ac_ext
5292 LIBS=$ac_check_lib_save_LIBS
5293 fi
5294 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5295 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5296 if test $ac_cv_lib_IPC_main = yes; then
5297   cat >>confdefs.h <<_ACEOF
5298 #define HAVE_LIBIPC 1
5299 _ACEOF
5300
5301   LIBS="-lIPC $LIBS"
5302
5303 fi
5304
5305
5306 echo "$as_me:$LINENO: checking for main in -llc" >&5
5307 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5308 if test "${ac_cv_lib_lc_main+set}" = set; then
5309   echo $ECHO_N "(cached) $ECHO_C" >&6
5310 else
5311   ac_check_lib_save_LIBS=$LIBS
5312 LIBS="-llc  $LIBS"
5313 cat >conftest.$ac_ext <<_ACEOF
5314 /* confdefs.h.  */
5315 _ACEOF
5316 cat confdefs.h >>conftest.$ac_ext
5317 cat >>conftest.$ac_ext <<_ACEOF
5318 /* end confdefs.h.  */
5319
5320
5321 int
5322 main ()
5323 {
5324 main ();
5325   ;
5326   return 0;
5327 }
5328 _ACEOF
5329 rm -f conftest.$ac_objext conftest$ac_exeext
5330 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5331   (eval $ac_link) 2>conftest.er1
5332   ac_status=$?
5333   grep -v '^ *+' conftest.er1 >conftest.err
5334   rm -f conftest.er1
5335   cat conftest.err >&5
5336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337   (exit $ac_status); } &&
5338          { ac_try='test -z "$ac_c_werror_flag"
5339                          || test ! -s conftest.err'
5340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344   (exit $ac_status); }; } &&
5345          { ac_try='test -s conftest$ac_exeext'
5346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5347   (eval $ac_try) 2>&5
5348   ac_status=$?
5349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5350   (exit $ac_status); }; }; then
5351   ac_cv_lib_lc_main=yes
5352 else
5353   echo "$as_me: failed program was:" >&5
5354 sed 's/^/| /' conftest.$ac_ext >&5
5355
5356 ac_cv_lib_lc_main=no
5357 fi
5358 rm -f conftest.err conftest.$ac_objext \
5359       conftest$ac_exeext conftest.$ac_ext
5360 LIBS=$ac_check_lib_save_LIBS
5361 fi
5362 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5363 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5364 if test $ac_cv_lib_lc_main = yes; then
5365   cat >>confdefs.h <<_ACEOF
5366 #define HAVE_LIBLC 1
5367 _ACEOF
5368
5369   LIBS="-llc $LIBS"
5370
5371 fi
5372
5373
5374 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5375 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5376 if test "${ac_cv_lib_dld_main+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   ac_check_lib_save_LIBS=$LIBS
5380 LIBS="-ldld  $LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 /* confdefs.h.  */
5383 _ACEOF
5384 cat confdefs.h >>conftest.$ac_ext
5385 cat >>conftest.$ac_ext <<_ACEOF
5386 /* end confdefs.h.  */
5387
5388
5389 int
5390 main ()
5391 {
5392 main ();
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5399   (eval $ac_link) 2>conftest.er1
5400   ac_status=$?
5401   grep -v '^ *+' conftest.er1 >conftest.err
5402   rm -f conftest.er1
5403   cat conftest.err >&5
5404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -z "$ac_c_werror_flag"
5407                          || test ! -s conftest.err'
5408   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5409   (eval $ac_try) 2>&5
5410   ac_status=$?
5411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5412   (exit $ac_status); }; } &&
5413          { ac_try='test -s conftest$ac_exeext'
5414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5415   (eval $ac_try) 2>&5
5416   ac_status=$?
5417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418   (exit $ac_status); }; }; then
5419   ac_cv_lib_dld_main=yes
5420 else
5421   echo "$as_me: failed program was:" >&5
5422 sed 's/^/| /' conftest.$ac_ext >&5
5423
5424 ac_cv_lib_dld_main=no
5425 fi
5426 rm -f conftest.err conftest.$ac_objext \
5427       conftest$ac_exeext conftest.$ac_ext
5428 LIBS=$ac_check_lib_save_LIBS
5429 fi
5430 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5431 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5432 if test $ac_cv_lib_dld_main = yes; then
5433   cat >>confdefs.h <<_ACEOF
5434 #define HAVE_LIBDLD 1
5435 _ACEOF
5436
5437   LIBS="-ldld $LIBS"
5438
5439 fi
5440
5441
5442 echo "$as_me:$LINENO: checking for main in -lld" >&5
5443 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5444 if test "${ac_cv_lib_ld_main+set}" = set; then
5445   echo $ECHO_N "(cached) $ECHO_C" >&6
5446 else
5447   ac_check_lib_save_LIBS=$LIBS
5448 LIBS="-lld  $LIBS"
5449 cat >conftest.$ac_ext <<_ACEOF
5450 /* confdefs.h.  */
5451 _ACEOF
5452 cat confdefs.h >>conftest.$ac_ext
5453 cat >>conftest.$ac_ext <<_ACEOF
5454 /* end confdefs.h.  */
5455
5456
5457 int
5458 main ()
5459 {
5460 main ();
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_lib_ld_main=yes
5488 else
5489   echo "$as_me: failed program was:" >&5
5490 sed 's/^/| /' conftest.$ac_ext >&5
5491
5492 ac_cv_lib_ld_main=no
5493 fi
5494 rm -f conftest.err conftest.$ac_objext \
5495       conftest$ac_exeext conftest.$ac_ext
5496 LIBS=$ac_check_lib_save_LIBS
5497 fi
5498 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5499 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5500 if test $ac_cv_lib_ld_main = yes; then
5501   cat >>confdefs.h <<_ACEOF
5502 #define HAVE_LIBLD 1
5503 _ACEOF
5504
5505   LIBS="-lld $LIBS"
5506
5507 fi
5508
5509
5510 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5511 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5512 if test "${ac_cv_lib_compat_main+set}" = set; then
5513   echo $ECHO_N "(cached) $ECHO_C" >&6
5514 else
5515   ac_check_lib_save_LIBS=$LIBS
5516 LIBS="-lcompat  $LIBS"
5517 cat >conftest.$ac_ext <<_ACEOF
5518 /* confdefs.h.  */
5519 _ACEOF
5520 cat confdefs.h >>conftest.$ac_ext
5521 cat >>conftest.$ac_ext <<_ACEOF
5522 /* end confdefs.h.  */
5523
5524
5525 int
5526 main ()
5527 {
5528 main ();
5529   ;
5530   return 0;
5531 }
5532 _ACEOF
5533 rm -f conftest.$ac_objext conftest$ac_exeext
5534 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5535   (eval $ac_link) 2>conftest.er1
5536   ac_status=$?
5537   grep -v '^ *+' conftest.er1 >conftest.err
5538   rm -f conftest.er1
5539   cat conftest.err >&5
5540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541   (exit $ac_status); } &&
5542          { ac_try='test -z "$ac_c_werror_flag"
5543                          || test ! -s conftest.err'
5544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5545   (eval $ac_try) 2>&5
5546   ac_status=$?
5547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548   (exit $ac_status); }; } &&
5549          { ac_try='test -s conftest$ac_exeext'
5550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5551   (eval $ac_try) 2>&5
5552   ac_status=$?
5553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554   (exit $ac_status); }; }; then
5555   ac_cv_lib_compat_main=yes
5556 else
5557   echo "$as_me: failed program was:" >&5
5558 sed 's/^/| /' conftest.$ac_ext >&5
5559
5560 ac_cv_lib_compat_main=no
5561 fi
5562 rm -f conftest.err conftest.$ac_objext \
5563       conftest$ac_exeext conftest.$ac_ext
5564 LIBS=$ac_check_lib_save_LIBS
5565 fi
5566 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5567 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5568 if test $ac_cv_lib_compat_main = yes; then
5569   cat >>confdefs.h <<_ACEOF
5570 #define HAVE_LIBCOMPAT 1
5571 _ACEOF
5572
5573   LIBS="-lcompat $LIBS"
5574
5575 fi
5576
5577
5578 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5579 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5580 if test "${ac_cv_lib_BSD_main+set}" = set; then
5581   echo $ECHO_N "(cached) $ECHO_C" >&6
5582 else
5583   ac_check_lib_save_LIBS=$LIBS
5584 LIBS="-lBSD  $LIBS"
5585 cat >conftest.$ac_ext <<_ACEOF
5586 /* confdefs.h.  */
5587 _ACEOF
5588 cat confdefs.h >>conftest.$ac_ext
5589 cat >>conftest.$ac_ext <<_ACEOF
5590 /* end confdefs.h.  */
5591
5592
5593 int
5594 main ()
5595 {
5596 main ();
5597   ;
5598   return 0;
5599 }
5600 _ACEOF
5601 rm -f conftest.$ac_objext conftest$ac_exeext
5602 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5603   (eval $ac_link) 2>conftest.er1
5604   ac_status=$?
5605   grep -v '^ *+' conftest.er1 >conftest.err
5606   rm -f conftest.er1
5607   cat conftest.err >&5
5608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5609   (exit $ac_status); } &&
5610          { ac_try='test -z "$ac_c_werror_flag"
5611                          || test ! -s conftest.err'
5612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5613   (eval $ac_try) 2>&5
5614   ac_status=$?
5615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5616   (exit $ac_status); }; } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   ac_cv_lib_BSD_main=yes
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 sed 's/^/| /' conftest.$ac_ext >&5
5627
5628 ac_cv_lib_BSD_main=no
5629 fi
5630 rm -f conftest.err conftest.$ac_objext \
5631       conftest$ac_exeext conftest.$ac_ext
5632 LIBS=$ac_check_lib_save_LIBS
5633 fi
5634 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5635 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5636 if test $ac_cv_lib_BSD_main = yes; then
5637   cat >>confdefs.h <<_ACEOF
5638 #define HAVE_LIBBSD 1
5639 _ACEOF
5640
5641   LIBS="-lBSD $LIBS"
5642
5643 fi
5644
5645
5646 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5647 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5648 if test "${ac_cv_lib_gen_main+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651   ac_check_lib_save_LIBS=$LIBS
5652 LIBS="-lgen  $LIBS"
5653 cat >conftest.$ac_ext <<_ACEOF
5654 /* confdefs.h.  */
5655 _ACEOF
5656 cat confdefs.h >>conftest.$ac_ext
5657 cat >>conftest.$ac_ext <<_ACEOF
5658 /* end confdefs.h.  */
5659
5660
5661 int
5662 main ()
5663 {
5664 main ();
5665   ;
5666   return 0;
5667 }
5668 _ACEOF
5669 rm -f conftest.$ac_objext conftest$ac_exeext
5670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5671   (eval $ac_link) 2>conftest.er1
5672   ac_status=$?
5673   grep -v '^ *+' conftest.er1 >conftest.err
5674   rm -f conftest.er1
5675   cat conftest.err >&5
5676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -z "$ac_c_werror_flag"
5679                          || test ! -s conftest.err'
5680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5684   (exit $ac_status); }; } &&
5685          { ac_try='test -s conftest$ac_exeext'
5686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5687   (eval $ac_try) 2>&5
5688   ac_status=$?
5689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690   (exit $ac_status); }; }; then
5691   ac_cv_lib_gen_main=yes
5692 else
5693   echo "$as_me: failed program was:" >&5
5694 sed 's/^/| /' conftest.$ac_ext >&5
5695
5696 ac_cv_lib_gen_main=no
5697 fi
5698 rm -f conftest.err conftest.$ac_objext \
5699       conftest$ac_exeext conftest.$ac_ext
5700 LIBS=$ac_check_lib_save_LIBS
5701 fi
5702 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5703 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5704 if test $ac_cv_lib_gen_main = yes; then
5705   cat >>confdefs.h <<_ACEOF
5706 #define HAVE_LIBGEN 1
5707 _ACEOF
5708
5709   LIBS="-lgen $LIBS"
5710
5711 fi
5712
5713
5714 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5715 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5716 if test "${ac_cv_lib_PW_main+set}" = set; then
5717   echo $ECHO_N "(cached) $ECHO_C" >&6
5718 else
5719   ac_check_lib_save_LIBS=$LIBS
5720 LIBS="-lPW  $LIBS"
5721 cat >conftest.$ac_ext <<_ACEOF
5722 /* confdefs.h.  */
5723 _ACEOF
5724 cat confdefs.h >>conftest.$ac_ext
5725 cat >>conftest.$ac_ext <<_ACEOF
5726 /* end confdefs.h.  */
5727
5728
5729 int
5730 main ()
5731 {
5732 main ();
5733   ;
5734   return 0;
5735 }
5736 _ACEOF
5737 rm -f conftest.$ac_objext conftest$ac_exeext
5738 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5739   (eval $ac_link) 2>conftest.er1
5740   ac_status=$?
5741   grep -v '^ *+' conftest.er1 >conftest.err
5742   rm -f conftest.er1
5743   cat conftest.err >&5
5744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745   (exit $ac_status); } &&
5746          { ac_try='test -z "$ac_c_werror_flag"
5747                          || test ! -s conftest.err'
5748   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5749   (eval $ac_try) 2>&5
5750   ac_status=$?
5751   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5752   (exit $ac_status); }; } &&
5753          { ac_try='test -s conftest$ac_exeext'
5754   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755   (eval $ac_try) 2>&5
5756   ac_status=$?
5757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758   (exit $ac_status); }; }; then
5759   ac_cv_lib_PW_main=yes
5760 else
5761   echo "$as_me: failed program was:" >&5
5762 sed 's/^/| /' conftest.$ac_ext >&5
5763
5764 ac_cv_lib_PW_main=no
5765 fi
5766 rm -f conftest.err conftest.$ac_objext \
5767       conftest$ac_exeext conftest.$ac_ext
5768 LIBS=$ac_check_lib_save_LIBS
5769 fi
5770 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5771 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5772 if test $ac_cv_lib_PW_main = yes; then
5773   cat >>confdefs.h <<_ACEOF
5774 #define HAVE_LIBPW 1
5775 _ACEOF
5776
5777   LIBS="-lPW $LIBS"
5778
5779 fi
5780
5781
5782 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5783 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5784 if test "${ac_cv_lib_resolv_main+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787   ac_check_lib_save_LIBS=$LIBS
5788 LIBS="-lresolv  $LIBS"
5789 cat >conftest.$ac_ext <<_ACEOF
5790 /* confdefs.h.  */
5791 _ACEOF
5792 cat confdefs.h >>conftest.$ac_ext
5793 cat >>conftest.$ac_ext <<_ACEOF
5794 /* end confdefs.h.  */
5795
5796
5797 int
5798 main ()
5799 {
5800 main ();
5801   ;
5802   return 0;
5803 }
5804 _ACEOF
5805 rm -f conftest.$ac_objext conftest$ac_exeext
5806 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5807   (eval $ac_link) 2>conftest.er1
5808   ac_status=$?
5809   grep -v '^ *+' conftest.er1 >conftest.err
5810   rm -f conftest.er1
5811   cat conftest.err >&5
5812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5813   (exit $ac_status); } &&
5814          { ac_try='test -z "$ac_c_werror_flag"
5815                          || test ! -s conftest.err'
5816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5817   (eval $ac_try) 2>&5
5818   ac_status=$?
5819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820   (exit $ac_status); }; } &&
5821          { ac_try='test -s conftest$ac_exeext'
5822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5823   (eval $ac_try) 2>&5
5824   ac_status=$?
5825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5826   (exit $ac_status); }; }; then
5827   ac_cv_lib_resolv_main=yes
5828 else
5829   echo "$as_me: failed program was:" >&5
5830 sed 's/^/| /' conftest.$ac_ext >&5
5831
5832 ac_cv_lib_resolv_main=no
5833 fi
5834 rm -f conftest.err conftest.$ac_objext \
5835       conftest$ac_exeext conftest.$ac_ext
5836 LIBS=$ac_check_lib_save_LIBS
5837 fi
5838 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5839 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5840 if test $ac_cv_lib_resolv_main = yes; then
5841   cat >>confdefs.h <<_ACEOF
5842 #define HAVE_LIBRESOLV 1
5843 _ACEOF
5844
5845   LIBS="-lresolv $LIBS"
5846
5847 fi
5848
5849 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5850 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5851 if test "${ac_cv_search_getopt_long+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854   ac_func_search_save_LIBS=$LIBS
5855 ac_cv_search_getopt_long=no
5856 cat >conftest.$ac_ext <<_ACEOF
5857 /* confdefs.h.  */
5858 _ACEOF
5859 cat confdefs.h >>conftest.$ac_ext
5860 cat >>conftest.$ac_ext <<_ACEOF
5861 /* end confdefs.h.  */
5862
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 #ifdef __cplusplus
5865 extern "C"
5866 #endif
5867 /* We use char because int might match the return type of a gcc2
5868    builtin and then its argument prototype would still apply.  */
5869 char getopt_long ();
5870 int
5871 main ()
5872 {
5873 getopt_long ();
5874   ;
5875   return 0;
5876 }
5877 _ACEOF
5878 rm -f conftest.$ac_objext conftest$ac_exeext
5879 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5880   (eval $ac_link) 2>conftest.er1
5881   ac_status=$?
5882   grep -v '^ *+' conftest.er1 >conftest.err
5883   rm -f conftest.er1
5884   cat conftest.err >&5
5885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5886   (exit $ac_status); } &&
5887          { ac_try='test -z "$ac_c_werror_flag"
5888                          || test ! -s conftest.err'
5889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890   (eval $ac_try) 2>&5
5891   ac_status=$?
5892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893   (exit $ac_status); }; } &&
5894          { ac_try='test -s conftest$ac_exeext'
5895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5896   (eval $ac_try) 2>&5
5897   ac_status=$?
5898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899   (exit $ac_status); }; }; then
5900   ac_cv_search_getopt_long="none required"
5901 else
5902   echo "$as_me: failed program was:" >&5
5903 sed 's/^/| /' conftest.$ac_ext >&5
5904
5905 fi
5906 rm -f conftest.err conftest.$ac_objext \
5907       conftest$ac_exeext conftest.$ac_ext
5908 if test "$ac_cv_search_getopt_long" = no; then
5909   for ac_lib in getopt gnugetopt; do
5910     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5911     cat >conftest.$ac_ext <<_ACEOF
5912 /* confdefs.h.  */
5913 _ACEOF
5914 cat confdefs.h >>conftest.$ac_ext
5915 cat >>conftest.$ac_ext <<_ACEOF
5916 /* end confdefs.h.  */
5917
5918 /* Override any gcc2 internal prototype to avoid an error.  */
5919 #ifdef __cplusplus
5920 extern "C"
5921 #endif
5922 /* We use char because int might match the return type of a gcc2
5923    builtin and then its argument prototype would still apply.  */
5924 char getopt_long ();
5925 int
5926 main ()
5927 {
5928 getopt_long ();
5929   ;
5930   return 0;
5931 }
5932 _ACEOF
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5935   (eval $ac_link) 2>conftest.er1
5936   ac_status=$?
5937   grep -v '^ *+' conftest.er1 >conftest.err
5938   rm -f conftest.er1
5939   cat conftest.err >&5
5940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941   (exit $ac_status); } &&
5942          { ac_try='test -z "$ac_c_werror_flag"
5943                          || test ! -s conftest.err'
5944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945   (eval $ac_try) 2>&5
5946   ac_status=$?
5947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948   (exit $ac_status); }; } &&
5949          { ac_try='test -s conftest$ac_exeext'
5950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5951   (eval $ac_try) 2>&5
5952   ac_status=$?
5953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5954   (exit $ac_status); }; }; then
5955   ac_cv_search_getopt_long="-l$ac_lib"
5956 break
5957 else
5958   echo "$as_me: failed program was:" >&5
5959 sed 's/^/| /' conftest.$ac_ext >&5
5960
5961 fi
5962 rm -f conftest.err conftest.$ac_objext \
5963       conftest$ac_exeext conftest.$ac_ext
5964   done
5965 fi
5966 LIBS=$ac_func_search_save_LIBS
5967 fi
5968 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5969 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5970 if test "$ac_cv_search_getopt_long" != no; then
5971   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5972
5973 fi
5974
5975 # QNX:
5976
5977 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5978 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5979 if test "${ac_cv_lib_unix_main+set}" = set; then
5980   echo $ECHO_N "(cached) $ECHO_C" >&6
5981 else
5982   ac_check_lib_save_LIBS=$LIBS
5983 LIBS="-lunix  $LIBS"
5984 cat >conftest.$ac_ext <<_ACEOF
5985 /* confdefs.h.  */
5986 _ACEOF
5987 cat confdefs.h >>conftest.$ac_ext
5988 cat >>conftest.$ac_ext <<_ACEOF
5989 /* end confdefs.h.  */
5990
5991
5992 int
5993 main ()
5994 {
5995 main ();
5996   ;
5997   return 0;
5998 }
5999 _ACEOF
6000 rm -f conftest.$ac_objext conftest$ac_exeext
6001 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6002   (eval $ac_link) 2>conftest.er1
6003   ac_status=$?
6004   grep -v '^ *+' conftest.er1 >conftest.err
6005   rm -f conftest.er1
6006   cat conftest.err >&5
6007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008   (exit $ac_status); } &&
6009          { ac_try='test -z "$ac_c_werror_flag"
6010                          || test ! -s conftest.err'
6011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012   (eval $ac_try) 2>&5
6013   ac_status=$?
6014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015   (exit $ac_status); }; } &&
6016          { ac_try='test -s conftest$ac_exeext'
6017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6018   (eval $ac_try) 2>&5
6019   ac_status=$?
6020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021   (exit $ac_status); }; }; then
6022   ac_cv_lib_unix_main=yes
6023 else
6024   echo "$as_me: failed program was:" >&5
6025 sed 's/^/| /' conftest.$ac_ext >&5
6026
6027 ac_cv_lib_unix_main=no
6028 fi
6029 rm -f conftest.err conftest.$ac_objext \
6030       conftest$ac_exeext conftest.$ac_ext
6031 LIBS=$ac_check_lib_save_LIBS
6032 fi
6033 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6034 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6035 if test $ac_cv_lib_unix_main = yes; then
6036   cat >>confdefs.h <<_ACEOF
6037 #define HAVE_LIBUNIX 1
6038 _ACEOF
6039
6040   LIBS="-lunix $LIBS"
6041
6042 fi
6043
6044 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6045 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6046 if test "${ac_cv_search_crypt+set}" = set; then
6047   echo $ECHO_N "(cached) $ECHO_C" >&6
6048 else
6049   ac_func_search_save_LIBS=$LIBS
6050 ac_cv_search_crypt=no
6051 cat >conftest.$ac_ext <<_ACEOF
6052 /* confdefs.h.  */
6053 _ACEOF
6054 cat confdefs.h >>conftest.$ac_ext
6055 cat >>conftest.$ac_ext <<_ACEOF
6056 /* end confdefs.h.  */
6057
6058 /* Override any gcc2 internal prototype to avoid an error.  */
6059 #ifdef __cplusplus
6060 extern "C"
6061 #endif
6062 /* We use char because int might match the return type of a gcc2
6063    builtin and then its argument prototype would still apply.  */
6064 char crypt ();
6065 int
6066 main ()
6067 {
6068 crypt ();
6069   ;
6070   return 0;
6071 }
6072 _ACEOF
6073 rm -f conftest.$ac_objext conftest$ac_exeext
6074 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6075   (eval $ac_link) 2>conftest.er1
6076   ac_status=$?
6077   grep -v '^ *+' conftest.er1 >conftest.err
6078   rm -f conftest.er1
6079   cat conftest.err >&5
6080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081   (exit $ac_status); } &&
6082          { ac_try='test -z "$ac_c_werror_flag"
6083                          || test ! -s conftest.err'
6084   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6085   (eval $ac_try) 2>&5
6086   ac_status=$?
6087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088   (exit $ac_status); }; } &&
6089          { ac_try='test -s conftest$ac_exeext'
6090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091   (eval $ac_try) 2>&5
6092   ac_status=$?
6093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094   (exit $ac_status); }; }; then
6095   ac_cv_search_crypt="none required"
6096 else
6097   echo "$as_me: failed program was:" >&5
6098 sed 's/^/| /' conftest.$ac_ext >&5
6099
6100 fi
6101 rm -f conftest.err conftest.$ac_objext \
6102       conftest$ac_exeext conftest.$ac_ext
6103 if test "$ac_cv_search_crypt" = no; then
6104   for ac_lib in crypt; do
6105     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6106     cat >conftest.$ac_ext <<_ACEOF
6107 /* confdefs.h.  */
6108 _ACEOF
6109 cat confdefs.h >>conftest.$ac_ext
6110 cat >>conftest.$ac_ext <<_ACEOF
6111 /* end confdefs.h.  */
6112
6113 /* Override any gcc2 internal prototype to avoid an error.  */
6114 #ifdef __cplusplus
6115 extern "C"
6116 #endif
6117 /* We use char because int might match the return type of a gcc2
6118    builtin and then its argument prototype would still apply.  */
6119 char crypt ();
6120 int
6121 main ()
6122 {
6123 crypt ();
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f conftest.$ac_objext conftest$ac_exeext
6129 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6130   (eval $ac_link) 2>conftest.er1
6131   ac_status=$?
6132   grep -v '^ *+' conftest.er1 >conftest.err
6133   rm -f conftest.er1
6134   cat conftest.err >&5
6135   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136   (exit $ac_status); } &&
6137          { ac_try='test -z "$ac_c_werror_flag"
6138                          || test ! -s conftest.err'
6139   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6143   (exit $ac_status); }; } &&
6144          { ac_try='test -s conftest$ac_exeext'
6145   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6146   (eval $ac_try) 2>&5
6147   ac_status=$?
6148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6149   (exit $ac_status); }; }; then
6150   ac_cv_search_crypt="-l$ac_lib"
6151 break
6152 else
6153   echo "$as_me: failed program was:" >&5
6154 sed 's/^/| /' conftest.$ac_ext >&5
6155
6156 fi
6157 rm -f conftest.err conftest.$ac_objext \
6158       conftest$ac_exeext conftest.$ac_ext
6159   done
6160 fi
6161 LIBS=$ac_func_search_save_LIBS
6162 fi
6163 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6164 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6165 if test "$ac_cv_search_crypt" != no; then
6166   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6167
6168 fi
6169
6170 # BeOS:
6171 if test "$PORTNAME" = "beos"
6172 then
6173
6174 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6175 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6176 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6177   echo $ECHO_N "(cached) $ECHO_C" >&6
6178 else
6179   ac_check_lib_save_LIBS=$LIBS
6180 LIBS="-lbind  $LIBS"
6181 cat >conftest.$ac_ext <<_ACEOF
6182 /* confdefs.h.  */
6183 _ACEOF
6184 cat confdefs.h >>conftest.$ac_ext
6185 cat >>conftest.$ac_ext <<_ACEOF
6186 /* end confdefs.h.  */
6187
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 #ifdef __cplusplus
6190 extern "C"
6191 #endif
6192 /* We use char because int might match the return type of a gcc2
6193    builtin and then its argument prototype would still apply.  */
6194 char __inet_ntoa ();
6195 int
6196 main ()
6197 {
6198 __inet_ntoa ();
6199   ;
6200   return 0;
6201 }
6202 _ACEOF
6203 rm -f conftest.$ac_objext conftest$ac_exeext
6204 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6205   (eval $ac_link) 2>conftest.er1
6206   ac_status=$?
6207   grep -v '^ *+' conftest.er1 >conftest.err
6208   rm -f conftest.er1
6209   cat conftest.err >&5
6210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211   (exit $ac_status); } &&
6212          { ac_try='test -z "$ac_c_werror_flag"
6213                          || test ! -s conftest.err'
6214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215   (eval $ac_try) 2>&5
6216   ac_status=$?
6217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218   (exit $ac_status); }; } &&
6219          { ac_try='test -s conftest$ac_exeext'
6220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6224   (exit $ac_status); }; }; then
6225   ac_cv_lib_bind___inet_ntoa=yes
6226 else
6227   echo "$as_me: failed program was:" >&5
6228 sed 's/^/| /' conftest.$ac_ext >&5
6229
6230 ac_cv_lib_bind___inet_ntoa=no
6231 fi
6232 rm -f conftest.err conftest.$ac_objext \
6233       conftest$ac_exeext conftest.$ac_ext
6234 LIBS=$ac_check_lib_save_LIBS
6235 fi
6236 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6237 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6238 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6239   cat >>confdefs.h <<_ACEOF
6240 #define HAVE_LIBBIND 1
6241 _ACEOF
6242
6243   LIBS="-lbind $LIBS"
6244
6245 fi
6246
6247 fi
6248 # Solaris:
6249 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6250 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6251 if test "${ac_cv_search_fdatasync+set}" = set; then
6252   echo $ECHO_N "(cached) $ECHO_C" >&6
6253 else
6254   ac_func_search_save_LIBS=$LIBS
6255 ac_cv_search_fdatasync=no
6256 cat >conftest.$ac_ext <<_ACEOF
6257 /* confdefs.h.  */
6258 _ACEOF
6259 cat confdefs.h >>conftest.$ac_ext
6260 cat >>conftest.$ac_ext <<_ACEOF
6261 /* end confdefs.h.  */
6262
6263 /* Override any gcc2 internal prototype to avoid an error.  */
6264 #ifdef __cplusplus
6265 extern "C"
6266 #endif
6267 /* We use char because int might match the return type of a gcc2
6268    builtin and then its argument prototype would still apply.  */
6269 char fdatasync ();
6270 int
6271 main ()
6272 {
6273 fdatasync ();
6274   ;
6275   return 0;
6276 }
6277 _ACEOF
6278 rm -f conftest.$ac_objext conftest$ac_exeext
6279 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6280   (eval $ac_link) 2>conftest.er1
6281   ac_status=$?
6282   grep -v '^ *+' conftest.er1 >conftest.err
6283   rm -f conftest.er1
6284   cat conftest.err >&5
6285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6286   (exit $ac_status); } &&
6287          { ac_try='test -z "$ac_c_werror_flag"
6288                          || test ! -s conftest.err'
6289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6290   (eval $ac_try) 2>&5
6291   ac_status=$?
6292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6293   (exit $ac_status); }; } &&
6294          { ac_try='test -s conftest$ac_exeext'
6295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6296   (eval $ac_try) 2>&5
6297   ac_status=$?
6298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6299   (exit $ac_status); }; }; then
6300   ac_cv_search_fdatasync="none required"
6301 else
6302   echo "$as_me: failed program was:" >&5
6303 sed 's/^/| /' conftest.$ac_ext >&5
6304
6305 fi
6306 rm -f conftest.err conftest.$ac_objext \
6307       conftest$ac_exeext conftest.$ac_ext
6308 if test "$ac_cv_search_fdatasync" = no; then
6309   for ac_lib in rt posix4; do
6310     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6311     cat >conftest.$ac_ext <<_ACEOF
6312 /* confdefs.h.  */
6313 _ACEOF
6314 cat confdefs.h >>conftest.$ac_ext
6315 cat >>conftest.$ac_ext <<_ACEOF
6316 /* end confdefs.h.  */
6317
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 #ifdef __cplusplus
6320 extern "C"
6321 #endif
6322 /* We use char because int might match the return type of a gcc2
6323    builtin and then its argument prototype would still apply.  */
6324 char fdatasync ();
6325 int
6326 main ()
6327 {
6328 fdatasync ();
6329   ;
6330   return 0;
6331 }
6332 _ACEOF
6333 rm -f conftest.$ac_objext conftest$ac_exeext
6334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6335   (eval $ac_link) 2>conftest.er1
6336   ac_status=$?
6337   grep -v '^ *+' conftest.er1 >conftest.err
6338   rm -f conftest.er1
6339   cat conftest.err >&5
6340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6341   (exit $ac_status); } &&
6342          { ac_try='test -z "$ac_c_werror_flag"
6343                          || test ! -s conftest.err'
6344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6348   (exit $ac_status); }; } &&
6349          { ac_try='test -s conftest$ac_exeext'
6350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6351   (eval $ac_try) 2>&5
6352   ac_status=$?
6353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354   (exit $ac_status); }; }; then
6355   ac_cv_search_fdatasync="-l$ac_lib"
6356 break
6357 else
6358   echo "$as_me: failed program was:" >&5
6359 sed 's/^/| /' conftest.$ac_ext >&5
6360
6361 fi
6362 rm -f conftest.err conftest.$ac_objext \
6363       conftest$ac_exeext conftest.$ac_ext
6364   done
6365 fi
6366 LIBS=$ac_func_search_save_LIBS
6367 fi
6368 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6369 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6370 if test "$ac_cv_search_fdatasync" != no; then
6371   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6372
6373 fi
6374
6375 # Cygwin:
6376
6377 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
6378 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
6379 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
6380   echo $ECHO_N "(cached) $ECHO_C" >&6
6381 else
6382   ac_check_lib_save_LIBS=$LIBS
6383 LIBS="-lcygipc  $LIBS"
6384 cat >conftest.$ac_ext <<_ACEOF
6385 /* confdefs.h.  */
6386 _ACEOF
6387 cat confdefs.h >>conftest.$ac_ext
6388 cat >>conftest.$ac_ext <<_ACEOF
6389 /* end confdefs.h.  */
6390
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 #ifdef __cplusplus
6393 extern "C"
6394 #endif
6395 /* We use char because int might match the return type of a gcc2
6396    builtin and then its argument prototype would still apply.  */
6397 char shmget ();
6398 int
6399 main ()
6400 {
6401 shmget ();
6402   ;
6403   return 0;
6404 }
6405 _ACEOF
6406 rm -f conftest.$ac_objext conftest$ac_exeext
6407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6408   (eval $ac_link) 2>conftest.er1
6409   ac_status=$?
6410   grep -v '^ *+' conftest.er1 >conftest.err
6411   rm -f conftest.er1
6412   cat conftest.err >&5
6413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6414   (exit $ac_status); } &&
6415          { ac_try='test -z "$ac_c_werror_flag"
6416                          || test ! -s conftest.err'
6417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6418   (eval $ac_try) 2>&5
6419   ac_status=$?
6420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6421   (exit $ac_status); }; } &&
6422          { ac_try='test -s conftest$ac_exeext'
6423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   ac_cv_lib_cygipc_shmget=yes
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 sed 's/^/| /' conftest.$ac_ext >&5
6432
6433 ac_cv_lib_cygipc_shmget=no
6434 fi
6435 rm -f conftest.err conftest.$ac_objext \
6436       conftest$ac_exeext conftest.$ac_ext
6437 LIBS=$ac_check_lib_save_LIBS
6438 fi
6439 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
6440 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
6441 if test $ac_cv_lib_cygipc_shmget = yes; then
6442   cat >>confdefs.h <<_ACEOF
6443 #define HAVE_LIBCYGIPC 1
6444 _ACEOF
6445
6446   LIBS="-lcygipc $LIBS"
6447
6448 fi
6449
6450 # WIN32:
6451 if test "$PORTNAME" = "win32"
6452 then
6453
6454 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
6455 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
6456 if test "${ac_cv_lib_wsock32_main+set}" = set; then
6457   echo $ECHO_N "(cached) $ECHO_C" >&6
6458 else
6459   ac_check_lib_save_LIBS=$LIBS
6460 LIBS="-lwsock32  $LIBS"
6461 cat >conftest.$ac_ext <<_ACEOF
6462 /* confdefs.h.  */
6463 _ACEOF
6464 cat confdefs.h >>conftest.$ac_ext
6465 cat >>conftest.$ac_ext <<_ACEOF
6466 /* end confdefs.h.  */
6467
6468
6469 int
6470 main ()
6471 {
6472 main ();
6473   ;
6474   return 0;
6475 }
6476 _ACEOF
6477 rm -f conftest.$ac_objext conftest$ac_exeext
6478 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6479   (eval $ac_link) 2>conftest.er1
6480   ac_status=$?
6481   grep -v '^ *+' conftest.er1 >conftest.err
6482   rm -f conftest.er1
6483   cat conftest.err >&5
6484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6485   (exit $ac_status); } &&
6486          { ac_try='test -z "$ac_c_werror_flag"
6487                          || test ! -s conftest.err'
6488   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6489   (eval $ac_try) 2>&5
6490   ac_status=$?
6491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6492   (exit $ac_status); }; } &&
6493          { ac_try='test -s conftest$ac_exeext'
6494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6498   (exit $ac_status); }; }; then
6499   ac_cv_lib_wsock32_main=yes
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 sed 's/^/| /' conftest.$ac_ext >&5
6503
6504 ac_cv_lib_wsock32_main=no
6505 fi
6506 rm -f conftest.err conftest.$ac_objext \
6507       conftest$ac_exeext conftest.$ac_ext
6508 LIBS=$ac_check_lib_save_LIBS
6509 fi
6510 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
6511 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
6512 if test $ac_cv_lib_wsock32_main = yes; then
6513   cat >>confdefs.h <<_ACEOF
6514 #define HAVE_LIBWSOCK32 1
6515 _ACEOF
6516
6517   LIBS="-lwsock32 $LIBS"
6518
6519 fi
6520
6521 fi
6522
6523 if test "$with_readline" = yes; then
6524
6525
6526 if test "${pgac_cv_check_readline+set}" = set; then
6527   echo $ECHO_N "(cached) $ECHO_C" >&6
6528 else
6529   pgac_cv_check_readline=no
6530 pgac_save_LIBS=$LIBS
6531 if test x"$with_libedit_preferred" != x"yes"
6532 then    READLINE_ORDER="-lreadline -ledit"
6533 else    READLINE_ORDER="-ledit -lreadline"
6534 fi
6535 for pgac_rllib in $READLINE_ORDER ; do
6536   echo "$as_me:$LINENO: checking for ${pgac_rllib}" >&5
6537 echo $ECHO_N "checking for ${pgac_rllib}... $ECHO_C" >&6
6538   for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
6539     LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
6540     cat >conftest.$ac_ext <<_ACEOF
6541 /* confdefs.h.  */
6542 _ACEOF
6543 cat confdefs.h >>conftest.$ac_ext
6544 cat >>conftest.$ac_ext <<_ACEOF
6545 /* end confdefs.h.  */
6546
6547 /* Override any gcc2 internal prototype to avoid an error.  */
6548 #ifdef __cplusplus
6549 extern "C"
6550 #endif
6551 /* We use char because int might match the return type of a gcc2
6552    builtin and then its argument prototype would still apply.  */
6553 char readline ();
6554 int
6555 main ()
6556 {
6557 readline ();
6558   ;
6559   return 0;
6560 }
6561 _ACEOF
6562 rm -f conftest.$ac_objext conftest$ac_exeext
6563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6564   (eval $ac_link) 2>conftest.er1
6565   ac_status=$?
6566   grep -v '^ *+' conftest.er1 >conftest.err
6567   rm -f conftest.er1
6568   cat conftest.err >&5
6569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570   (exit $ac_status); } &&
6571          { ac_try='test -z "$ac_c_werror_flag"
6572                          || test ! -s conftest.err'
6573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574   (eval $ac_try) 2>&5
6575   ac_status=$?
6576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577   (exit $ac_status); }; } &&
6578          { ac_try='test -s conftest$ac_exeext'
6579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580   (eval $ac_try) 2>&5
6581   ac_status=$?
6582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583   (exit $ac_status); }; }; then
6584
6585       # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
6586       # recognize dependent libraries; assume curses is needed if we didn't
6587       # find any dependency.
6588       case $host_os in
6589         netbsd* | openbsd* | irix*)
6590           if test x"$pgac_lib" = x"" ; then
6591             pgac_lib=" -lcurses"
6592           fi ;;
6593       esac
6594
6595       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
6596       break
6597
6598 else
6599   echo "$as_me: failed program was:" >&5
6600 sed 's/^/| /' conftest.$ac_ext >&5
6601
6602 fi
6603 rm -f conftest.err conftest.$ac_objext \
6604       conftest$ac_exeext conftest.$ac_ext
6605   done
6606   if test "$pgac_cv_check_readline" != no ; then
6607     echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
6608 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
6609     break
6610   else
6611     echo "$as_me:$LINENO: result: no" >&5
6612 echo "${ECHO_T}no" >&6
6613   fi
6614 done
6615 LIBS=$pgac_save_LIBS
6616
6617 fi
6618
6619 if test "$pgac_cv_check_readline" != no ; then
6620   LIBS="$pgac_cv_check_readline $LIBS"
6621
6622 cat >>confdefs.h <<\_ACEOF
6623 #define HAVE_LIBREADLINE 1
6624 _ACEOF
6625
6626 fi
6627
6628
6629   if test x"$pgac_cv_check_readline" = x"no"; then
6630     { { echo "$as_me:$LINENO: error: readline library not found
6631 If you have readline already installed, see config.log for details on the
6632 failure.  It is possible the compiler isn't looking in the proper directory.
6633 Use --without-readline to disable readline support." >&5
6634 echo "$as_me: error: readline library not found
6635 If you have readline already installed, see config.log for details on the
6636 failure.  It is possible the compiler isn't looking in the proper directory.
6637 Use --without-readline to disable readline support." >&2;}
6638    { (exit 1); exit 1; }; }
6639   fi
6640 fi
6641
6642 if test "$with_zlib" = yes; then
6643
6644 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6645 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6646 if test "${ac_cv_lib_z_inflate+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   ac_check_lib_save_LIBS=$LIBS
6650 LIBS="-lz  $LIBS"
6651 cat >conftest.$ac_ext <<_ACEOF
6652 /* confdefs.h.  */
6653 _ACEOF
6654 cat confdefs.h >>conftest.$ac_ext
6655 cat >>conftest.$ac_ext <<_ACEOF
6656 /* end confdefs.h.  */
6657
6658 /* Override any gcc2 internal prototype to avoid an error.  */
6659 #ifdef __cplusplus
6660 extern "C"
6661 #endif
6662 /* We use char because int might match the return type of a gcc2
6663    builtin and then its argument prototype would still apply.  */
6664 char inflate ();
6665 int
6666 main ()
6667 {
6668 inflate ();
6669   ;
6670   return 0;
6671 }
6672 _ACEOF
6673 rm -f conftest.$ac_objext conftest$ac_exeext
6674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6675   (eval $ac_link) 2>conftest.er1
6676   ac_status=$?
6677   grep -v '^ *+' conftest.er1 >conftest.err
6678   rm -f conftest.er1
6679   cat conftest.err >&5
6680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681   (exit $ac_status); } &&
6682          { ac_try='test -z "$ac_c_werror_flag"
6683                          || test ! -s conftest.err'
6684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6685   (eval $ac_try) 2>&5
6686   ac_status=$?
6687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6688   (exit $ac_status); }; } &&
6689          { ac_try='test -s conftest$ac_exeext'
6690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6691   (eval $ac_try) 2>&5
6692   ac_status=$?
6693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6694   (exit $ac_status); }; }; then
6695   ac_cv_lib_z_inflate=yes
6696 else
6697   echo "$as_me: failed program was:" >&5
6698 sed 's/^/| /' conftest.$ac_ext >&5
6699
6700 ac_cv_lib_z_inflate=no
6701 fi
6702 rm -f conftest.err conftest.$ac_objext \
6703       conftest$ac_exeext conftest.$ac_ext
6704 LIBS=$ac_check_lib_save_LIBS
6705 fi
6706 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6707 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6708 if test $ac_cv_lib_z_inflate = yes; then
6709   cat >>confdefs.h <<_ACEOF
6710 #define HAVE_LIBZ 1
6711 _ACEOF
6712
6713   LIBS="-lz $LIBS"
6714
6715 else
6716   { { echo "$as_me:$LINENO: error: zlib library not found
6717 If you have zlib already installed, see config.log for details on the
6718 failure.  It is possible the compiler isn't looking in the proper directory.
6719 Use --without-zlib to disable zlib support." >&5
6720 echo "$as_me: error: zlib library not found
6721 If you have zlib already installed, see config.log for details on the
6722 failure.  It is possible the compiler isn't looking in the proper directory.
6723 Use --without-zlib to disable zlib support." >&2;}
6724    { (exit 1); exit 1; }; }
6725 fi
6726
6727 fi
6728
6729 if test "$enable_spinlocks" = yes; then
6730
6731 cat >>confdefs.h <<\_ACEOF
6732 #define HAVE_SPINLOCKS 1
6733 _ACEOF
6734
6735 else
6736   { echo "$as_me:$LINENO: WARNING:
6737 *** Not using spinlocks will cause poor performance." >&5
6738 echo "$as_me: WARNING:
6739 *** Not using spinlocks will cause poor performance." >&2;}
6740 fi
6741
6742 if test "$with_krb5" = yes ; then
6743   if test "$PORTNAME" != "win32"; then
6744      echo "$as_me:$LINENO: checking for library containing com_err" >&5
6745 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6746 if test "${ac_cv_search_com_err+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749   ac_func_search_save_LIBS=$LIBS
6750 ac_cv_search_com_err=no
6751 cat >conftest.$ac_ext <<_ACEOF
6752 /* confdefs.h.  */
6753 _ACEOF
6754 cat confdefs.h >>conftest.$ac_ext
6755 cat >>conftest.$ac_ext <<_ACEOF
6756 /* end confdefs.h.  */
6757
6758 /* Override any gcc2 internal prototype to avoid an error.  */
6759 #ifdef __cplusplus
6760 extern "C"
6761 #endif
6762 /* We use char because int might match the return type of a gcc2
6763    builtin and then its argument prototype would still apply.  */
6764 char com_err ();
6765 int
6766 main ()
6767 {
6768 com_err ();
6769   ;
6770   return 0;
6771 }
6772 _ACEOF
6773 rm -f conftest.$ac_objext conftest$ac_exeext
6774 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6775   (eval $ac_link) 2>conftest.er1
6776   ac_status=$?
6777   grep -v '^ *+' conftest.er1 >conftest.err
6778   rm -f conftest.er1
6779   cat conftest.err >&5
6780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781   (exit $ac_status); } &&
6782          { ac_try='test -z "$ac_c_werror_flag"
6783                          || test ! -s conftest.err'
6784   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6788   (exit $ac_status); }; } &&
6789          { ac_try='test -s conftest$ac_exeext'
6790   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6791   (eval $ac_try) 2>&5
6792   ac_status=$?
6793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794   (exit $ac_status); }; }; then
6795   ac_cv_search_com_err="none required"
6796 else
6797   echo "$as_me: failed program was:" >&5
6798 sed 's/^/| /' conftest.$ac_ext >&5
6799
6800 fi
6801 rm -f conftest.err conftest.$ac_objext \
6802       conftest$ac_exeext conftest.$ac_ext
6803 if test "$ac_cv_search_com_err" = no; then
6804   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6805     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6806     cat >conftest.$ac_ext <<_ACEOF
6807 /* confdefs.h.  */
6808 _ACEOF
6809 cat confdefs.h >>conftest.$ac_ext
6810 cat >>conftest.$ac_ext <<_ACEOF
6811 /* end confdefs.h.  */
6812
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 #ifdef __cplusplus
6815 extern "C"
6816 #endif
6817 /* We use char because int might match the return type of a gcc2
6818    builtin and then its argument prototype would still apply.  */
6819 char com_err ();
6820 int
6821 main ()
6822 {
6823 com_err ();
6824   ;
6825   return 0;
6826 }
6827 _ACEOF
6828 rm -f conftest.$ac_objext conftest$ac_exeext
6829 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6830   (eval $ac_link) 2>conftest.er1
6831   ac_status=$?
6832   grep -v '^ *+' conftest.er1 >conftest.err
6833   rm -f conftest.er1
6834   cat conftest.err >&5
6835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836   (exit $ac_status); } &&
6837          { ac_try='test -z "$ac_c_werror_flag"
6838                          || test ! -s conftest.err'
6839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6840   (eval $ac_try) 2>&5
6841   ac_status=$?
6842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6843   (exit $ac_status); }; } &&
6844          { ac_try='test -s conftest$ac_exeext'
6845   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6846   (eval $ac_try) 2>&5
6847   ac_status=$?
6848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849   (exit $ac_status); }; }; then
6850   ac_cv_search_com_err="-l$ac_lib"
6851 break
6852 else
6853   echo "$as_me: failed program was:" >&5
6854 sed 's/^/| /' conftest.$ac_ext >&5
6855
6856 fi
6857 rm -f conftest.err conftest.$ac_objext \
6858       conftest$ac_exeext conftest.$ac_ext
6859   done
6860 fi
6861 LIBS=$ac_func_search_save_LIBS
6862 fi
6863 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6864 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6865 if test "$ac_cv_search_com_err" != no; then
6866   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6867
6868 else
6869   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6870 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6871    { (exit 1); exit 1; }; }
6872 fi
6873
6874      echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6875 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6876 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6877   echo $ECHO_N "(cached) $ECHO_C" >&6
6878 else
6879   ac_func_search_save_LIBS=$LIBS
6880 ac_cv_search_krb5_encrypt=no
6881 cat >conftest.$ac_ext <<_ACEOF
6882 /* confdefs.h.  */
6883 _ACEOF
6884 cat confdefs.h >>conftest.$ac_ext
6885 cat >>conftest.$ac_ext <<_ACEOF
6886 /* end confdefs.h.  */
6887
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 #ifdef __cplusplus
6890 extern "C"
6891 #endif
6892 /* We use char because int might match the return type of a gcc2
6893    builtin and then its argument prototype would still apply.  */
6894 char krb5_encrypt ();
6895 int
6896 main ()
6897 {
6898 krb5_encrypt ();
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 rm -f conftest.$ac_objext conftest$ac_exeext
6904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6905   (eval $ac_link) 2>conftest.er1
6906   ac_status=$?
6907   grep -v '^ *+' conftest.er1 >conftest.err
6908   rm -f conftest.er1
6909   cat conftest.err >&5
6910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6911   (exit $ac_status); } &&
6912          { ac_try='test -z "$ac_c_werror_flag"
6913                          || test ! -s conftest.err'
6914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6915   (eval $ac_try) 2>&5
6916   ac_status=$?
6917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6918   (exit $ac_status); }; } &&
6919          { ac_try='test -s conftest$ac_exeext'
6920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6921   (eval $ac_try) 2>&5
6922   ac_status=$?
6923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6924   (exit $ac_status); }; }; then
6925   ac_cv_search_krb5_encrypt="none required"
6926 else
6927   echo "$as_me: failed program was:" >&5
6928 sed 's/^/| /' conftest.$ac_ext >&5
6929
6930 fi
6931 rm -f conftest.err conftest.$ac_objext \
6932       conftest$ac_exeext conftest.$ac_ext
6933 if test "$ac_cv_search_krb5_encrypt" = no; then
6934   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6935     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6936     cat >conftest.$ac_ext <<_ACEOF
6937 /* confdefs.h.  */
6938 _ACEOF
6939 cat confdefs.h >>conftest.$ac_ext
6940 cat >>conftest.$ac_ext <<_ACEOF
6941 /* end confdefs.h.  */
6942
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 #ifdef __cplusplus
6945 extern "C"
6946 #endif
6947 /* We use char because int might match the return type of a gcc2
6948    builtin and then its argument prototype would still apply.  */
6949 char krb5_encrypt ();
6950 int
6951 main ()
6952 {
6953 krb5_encrypt ();
6954   ;
6955   return 0;
6956 }
6957 _ACEOF
6958 rm -f conftest.$ac_objext conftest$ac_exeext
6959 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6960   (eval $ac_link) 2>conftest.er1
6961   ac_status=$?
6962   grep -v '^ *+' conftest.er1 >conftest.err
6963   rm -f conftest.er1
6964   cat conftest.err >&5
6965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -z "$ac_c_werror_flag"
6968                          || test ! -s conftest.err'
6969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6970   (eval $ac_try) 2>&5
6971   ac_status=$?
6972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6973   (exit $ac_status); }; } &&
6974          { ac_try='test -s conftest$ac_exeext'
6975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980   ac_cv_search_krb5_encrypt="-l$ac_lib"
6981 break
6982 else
6983   echo "$as_me: failed program was:" >&5
6984 sed 's/^/| /' conftest.$ac_ext >&5
6985
6986 fi
6987 rm -f conftest.err conftest.$ac_objext \
6988       conftest$ac_exeext conftest.$ac_ext
6989   done
6990 fi
6991 LIBS=$ac_func_search_save_LIBS
6992 fi
6993 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6994 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6995 if test "$ac_cv_search_krb5_encrypt" != no; then
6996   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6997
6998 else
6999   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
7000 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
7001    { (exit 1); exit 1; }; }
7002 fi
7003
7004      echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
7005 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
7006 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009   ac_func_search_save_LIBS=$LIBS
7010 ac_cv_search_krb5_sendauth=no
7011 cat >conftest.$ac_ext <<_ACEOF
7012 /* confdefs.h.  */
7013 _ACEOF
7014 cat confdefs.h >>conftest.$ac_ext
7015 cat >>conftest.$ac_ext <<_ACEOF
7016 /* end confdefs.h.  */
7017
7018 /* Override any gcc2 internal prototype to avoid an error.  */
7019 #ifdef __cplusplus
7020 extern "C"
7021 #endif
7022 /* We use char because int might match the return type of a gcc2
7023    builtin and then its argument prototype would still apply.  */
7024 char krb5_sendauth ();
7025 int
7026 main ()
7027 {
7028 krb5_sendauth ();
7029   ;
7030   return 0;
7031 }
7032 _ACEOF
7033 rm -f conftest.$ac_objext conftest$ac_exeext
7034 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7035   (eval $ac_link) 2>conftest.er1
7036   ac_status=$?
7037   grep -v '^ *+' conftest.er1 >conftest.err
7038   rm -f conftest.er1
7039   cat conftest.err >&5
7040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7041   (exit $ac_status); } &&
7042          { ac_try='test -z "$ac_c_werror_flag"
7043                          || test ! -s conftest.err'
7044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7045   (eval $ac_try) 2>&5
7046   ac_status=$?
7047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048   (exit $ac_status); }; } &&
7049          { ac_try='test -s conftest$ac_exeext'
7050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7051   (eval $ac_try) 2>&5
7052   ac_status=$?
7053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054   (exit $ac_status); }; }; then
7055   ac_cv_search_krb5_sendauth="none required"
7056 else
7057   echo "$as_me: failed program was:" >&5
7058 sed 's/^/| /' conftest.$ac_ext >&5
7059
7060 fi
7061 rm -f conftest.err conftest.$ac_objext \
7062       conftest$ac_exeext conftest.$ac_ext
7063 if test "$ac_cv_search_krb5_sendauth" = no; then
7064   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7065     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7066     cat >conftest.$ac_ext <<_ACEOF
7067 /* confdefs.h.  */
7068 _ACEOF
7069 cat confdefs.h >>conftest.$ac_ext
7070 cat >>conftest.$ac_ext <<_ACEOF
7071 /* end confdefs.h.  */
7072
7073 /* Override any gcc2 internal prototype to avoid an error.  */
7074 #ifdef __cplusplus
7075 extern "C"
7076 #endif
7077 /* We use char because int might match the return type of a gcc2
7078    builtin and then its argument prototype would still apply.  */
7079 char krb5_sendauth ();
7080 int
7081 main ()
7082 {
7083 krb5_sendauth ();
7084   ;
7085   return 0;
7086 }
7087 _ACEOF
7088 rm -f conftest.$ac_objext conftest$ac_exeext
7089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7090   (eval $ac_link) 2>conftest.er1
7091   ac_status=$?
7092   grep -v '^ *+' conftest.er1 >conftest.err
7093   rm -f conftest.er1
7094   cat conftest.err >&5
7095   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7096   (exit $ac_status); } &&
7097          { ac_try='test -z "$ac_c_werror_flag"
7098                          || test ! -s conftest.err'
7099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7100   (eval $ac_try) 2>&5
7101   ac_status=$?
7102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7103   (exit $ac_status); }; } &&
7104          { ac_try='test -s conftest$ac_exeext'
7105   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7106   (eval $ac_try) 2>&5
7107   ac_status=$?
7108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7109   (exit $ac_status); }; }; then
7110   ac_cv_search_krb5_sendauth="-l$ac_lib"
7111 break
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 sed 's/^/| /' conftest.$ac_ext >&5
7115
7116 fi
7117 rm -f conftest.err conftest.$ac_objext \
7118       conftest$ac_exeext conftest.$ac_ext
7119   done
7120 fi
7121 LIBS=$ac_func_search_save_LIBS
7122 fi
7123 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7124 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7125 if test "$ac_cv_search_krb5_sendauth" != no; then
7126   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7127
7128 else
7129   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7130 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7131    { (exit 1); exit 1; }; }
7132 fi
7133
7134   else
7135      echo "$as_me:$LINENO: checking for library containing com_err" >&5
7136 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
7137 if test "${ac_cv_search_com_err+set}" = set; then
7138   echo $ECHO_N "(cached) $ECHO_C" >&6
7139 else
7140   ac_func_search_save_LIBS=$LIBS
7141 ac_cv_search_com_err=no
7142 cat >conftest.$ac_ext <<_ACEOF
7143 /* confdefs.h.  */
7144 _ACEOF
7145 cat confdefs.h >>conftest.$ac_ext
7146 cat >>conftest.$ac_ext <<_ACEOF
7147 /* end confdefs.h.  */
7148
7149 /* Override any gcc2 internal prototype to avoid an error.  */
7150 #ifdef __cplusplus
7151 extern "C"
7152 #endif
7153 /* We use char because int might match the return type of a gcc2
7154    builtin and then its argument prototype would still apply.  */
7155 char com_err ();
7156 int
7157 main ()
7158 {
7159 com_err ();
7160   ;
7161   return 0;
7162 }
7163 _ACEOF
7164 rm -f conftest.$ac_objext conftest$ac_exeext
7165 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7166   (eval $ac_link) 2>conftest.er1
7167   ac_status=$?
7168   grep -v '^ *+' conftest.er1 >conftest.err
7169   rm -f conftest.er1
7170   cat conftest.err >&5
7171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -z "$ac_c_werror_flag"
7174                          || test ! -s conftest.err'
7175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7176   (eval $ac_try) 2>&5
7177   ac_status=$?
7178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7179   (exit $ac_status); }; } &&
7180          { ac_try='test -s conftest$ac_exeext'
7181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185   (exit $ac_status); }; }; then
7186   ac_cv_search_com_err="none required"
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 sed 's/^/| /' conftest.$ac_ext >&5
7190
7191 fi
7192 rm -f conftest.err conftest.$ac_objext \
7193       conftest$ac_exeext conftest.$ac_ext
7194 if test "$ac_cv_search_com_err" = no; then
7195   for ac_lib in 'comerr32 -lkrb5_32'; do
7196     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7197     cat >conftest.$ac_ext <<_ACEOF
7198 /* confdefs.h.  */
7199 _ACEOF
7200 cat confdefs.h >>conftest.$ac_ext
7201 cat >>conftest.$ac_ext <<_ACEOF
7202 /* end confdefs.h.  */
7203
7204 /* Override any gcc2 internal prototype to avoid an error.  */
7205 #ifdef __cplusplus
7206 extern "C"
7207 #endif
7208 /* We use char because int might match the return type of a gcc2
7209    builtin and then its argument prototype would still apply.  */
7210 char com_err ();
7211 int
7212 main ()
7213 {
7214 com_err ();
7215   ;
7216   return 0;
7217 }
7218 _ACEOF
7219 rm -f conftest.$ac_objext conftest$ac_exeext
7220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7221   (eval $ac_link) 2>conftest.er1
7222   ac_status=$?
7223   grep -v '^ *+' conftest.er1 >conftest.err
7224   rm -f conftest.er1
7225   cat conftest.err >&5
7226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7227   (exit $ac_status); } &&
7228          { ac_try='test -z "$ac_c_werror_flag"
7229                          || test ! -s conftest.err'
7230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7231   (eval $ac_try) 2>&5
7232   ac_status=$?
7233   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7234   (exit $ac_status); }; } &&
7235          { ac_try='test -s conftest$ac_exeext'
7236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7237   (eval $ac_try) 2>&5
7238   ac_status=$?
7239   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7240   (exit $ac_status); }; }; then
7241   ac_cv_search_com_err="-l$ac_lib"
7242 break
7243 else
7244   echo "$as_me: failed program was:" >&5
7245 sed 's/^/| /' conftest.$ac_ext >&5
7246
7247 fi
7248 rm -f conftest.err conftest.$ac_objext \
7249       conftest$ac_exeext conftest.$ac_ext
7250   done
7251 fi
7252 LIBS=$ac_func_search_save_LIBS
7253 fi
7254 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
7255 echo "${ECHO_T}$ac_cv_search_com_err" >&6
7256 if test "$ac_cv_search_com_err" != no; then
7257   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
7258
7259 else
7260   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
7261 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
7262    { (exit 1); exit 1; }; }
7263 fi
7264
7265   fi
7266 fi
7267
7268 if test "$with_openssl" = yes ; then
7269     if test "$PORTNAME" != "win32"; then
7270
7271 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7272 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7273 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7274   echo $ECHO_N "(cached) $ECHO_C" >&6
7275 else
7276   ac_check_lib_save_LIBS=$LIBS
7277 LIBS="-lcrypto  $LIBS"
7278 cat >conftest.$ac_ext <<_ACEOF
7279 /* confdefs.h.  */
7280 _ACEOF
7281 cat confdefs.h >>conftest.$ac_ext
7282 cat >>conftest.$ac_ext <<_ACEOF
7283 /* end confdefs.h.  */
7284
7285 /* Override any gcc2 internal prototype to avoid an error.  */
7286 #ifdef __cplusplus
7287 extern "C"
7288 #endif
7289 /* We use char because int might match the return type of a gcc2
7290    builtin and then its argument prototype would still apply.  */
7291 char CRYPTO_new_ex_data ();
7292 int
7293 main ()
7294 {
7295 CRYPTO_new_ex_data ();
7296   ;
7297   return 0;
7298 }
7299 _ACEOF
7300 rm -f conftest.$ac_objext conftest$ac_exeext
7301 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>conftest.er1
7303   ac_status=$?
7304   grep -v '^ *+' conftest.er1 >conftest.err
7305   rm -f conftest.er1
7306   cat conftest.err >&5
7307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7308   (exit $ac_status); } &&
7309          { ac_try='test -z "$ac_c_werror_flag"
7310                          || test ! -s conftest.err'
7311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7312   (eval $ac_try) 2>&5
7313   ac_status=$?
7314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7315   (exit $ac_status); }; } &&
7316          { ac_try='test -s conftest$ac_exeext'
7317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321   (exit $ac_status); }; }; then
7322   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7323 else
7324   echo "$as_me: failed program was:" >&5
7325 sed 's/^/| /' conftest.$ac_ext >&5
7326
7327 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7328 fi
7329 rm -f conftest.err conftest.$ac_objext \
7330       conftest$ac_exeext conftest.$ac_ext
7331 LIBS=$ac_check_lib_save_LIBS
7332 fi
7333 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7334 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7335 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7336   cat >>confdefs.h <<_ACEOF
7337 #define HAVE_LIBCRYPTO 1
7338 _ACEOF
7339
7340   LIBS="-lcrypto $LIBS"
7341
7342 else
7343   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7344 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7345    { (exit 1); exit 1; }; }
7346 fi
7347
7348
7349 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7350 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7351 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7352   echo $ECHO_N "(cached) $ECHO_C" >&6
7353 else
7354   ac_check_lib_save_LIBS=$LIBS
7355 LIBS="-lssl  $LIBS"
7356 cat >conftest.$ac_ext <<_ACEOF
7357 /* confdefs.h.  */
7358 _ACEOF
7359 cat confdefs.h >>conftest.$ac_ext
7360 cat >>conftest.$ac_ext <<_ACEOF
7361 /* end confdefs.h.  */
7362
7363 /* Override any gcc2 internal prototype to avoid an error.  */
7364 #ifdef __cplusplus
7365 extern "C"
7366 #endif
7367 /* We use char because int might match the return type of a gcc2
7368    builtin and then its argument prototype would still apply.  */
7369 char SSL_library_init ();
7370 int
7371 main ()
7372 {
7373 SSL_library_init ();
7374   ;
7375   return 0;
7376 }
7377 _ACEOF
7378 rm -f conftest.$ac_objext conftest$ac_exeext
7379 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7380   (eval $ac_link) 2>conftest.er1
7381   ac_status=$?
7382   grep -v '^ *+' conftest.er1 >conftest.err
7383   rm -f conftest.er1
7384   cat conftest.err >&5
7385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386   (exit $ac_status); } &&
7387          { ac_try='test -z "$ac_c_werror_flag"
7388                          || test ! -s conftest.err'
7389   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7390   (eval $ac_try) 2>&5
7391   ac_status=$?
7392   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7393   (exit $ac_status); }; } &&
7394          { ac_try='test -s conftest$ac_exeext'
7395   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7396   (eval $ac_try) 2>&5
7397   ac_status=$?
7398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399   (exit $ac_status); }; }; then
7400   ac_cv_lib_ssl_SSL_library_init=yes
7401 else
7402   echo "$as_me: failed program was:" >&5
7403 sed 's/^/| /' conftest.$ac_ext >&5
7404
7405 ac_cv_lib_ssl_SSL_library_init=no
7406 fi
7407 rm -f conftest.err conftest.$ac_objext \
7408       conftest$ac_exeext conftest.$ac_ext
7409 LIBS=$ac_check_lib_save_LIBS
7410 fi
7411 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7412 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7413 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7414   cat >>confdefs.h <<_ACEOF
7415 #define HAVE_LIBSSL 1
7416 _ACEOF
7417
7418   LIBS="-lssl $LIBS"
7419
7420 else
7421   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7422 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7423    { (exit 1); exit 1; }; }
7424 fi
7425
7426   else
7427
7428 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -leay32" >&5
7429 echo $ECHO_N "checking for CRYPTO_new_ex_data in -leay32... $ECHO_C" >&6
7430 if test "${ac_cv_lib_eay32_CRYPTO_new_ex_data+set}" = set; then
7431   echo $ECHO_N "(cached) $ECHO_C" >&6
7432 else
7433   ac_check_lib_save_LIBS=$LIBS
7434 LIBS="-leay32  $LIBS"
7435 cat >conftest.$ac_ext <<_ACEOF
7436 /* confdefs.h.  */
7437 _ACEOF
7438 cat confdefs.h >>conftest.$ac_ext
7439 cat >>conftest.$ac_ext <<_ACEOF
7440 /* end confdefs.h.  */
7441
7442 /* Override any gcc2 internal prototype to avoid an error.  */
7443 #ifdef __cplusplus
7444 extern "C"
7445 #endif
7446 /* We use char because int might match the return type of a gcc2
7447    builtin and then its argument prototype would still apply.  */
7448 char CRYPTO_new_ex_data ();
7449 int
7450 main ()
7451 {
7452 CRYPTO_new_ex_data ();
7453   ;
7454   return 0;
7455 }
7456 _ACEOF
7457 rm -f conftest.$ac_objext conftest$ac_exeext
7458 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7459   (eval $ac_link) 2>conftest.er1
7460   ac_status=$?
7461   grep -v '^ *+' conftest.er1 >conftest.err
7462   rm -f conftest.er1
7463   cat conftest.err >&5
7464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7465   (exit $ac_status); } &&
7466          { ac_try='test -z "$ac_c_werror_flag"
7467                          || test ! -s conftest.err'
7468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7469   (eval $ac_try) 2>&5
7470   ac_status=$?
7471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472   (exit $ac_status); }; } &&
7473          { ac_try='test -s conftest$ac_exeext'
7474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475   (eval $ac_try) 2>&5
7476   ac_status=$?
7477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478   (exit $ac_status); }; }; then
7479   ac_cv_lib_eay32_CRYPTO_new_ex_data=yes
7480 else
7481   echo "$as_me: failed program was:" >&5
7482 sed 's/^/| /' conftest.$ac_ext >&5
7483
7484 ac_cv_lib_eay32_CRYPTO_new_ex_data=no
7485 fi
7486 rm -f conftest.err conftest.$ac_objext \
7487       conftest$ac_exeext conftest.$ac_ext
7488 LIBS=$ac_check_lib_save_LIBS
7489 fi
7490 echo "$as_me:$LINENO: result: $ac_cv_lib_eay32_CRYPTO_new_ex_data" >&5
7491 echo "${ECHO_T}$ac_cv_lib_eay32_CRYPTO_new_ex_data" >&6
7492 if test $ac_cv_lib_eay32_CRYPTO_new_ex_data = yes; then
7493   cat >>confdefs.h <<_ACEOF
7494 #define HAVE_LIBEAY32 1
7495 _ACEOF
7496
7497   LIBS="-leay32 $LIBS"
7498
7499 else
7500   { { echo "$as_me:$LINENO: error: library 'eay32' is required for OpenSSL" >&5
7501 echo "$as_me: error: library 'eay32' is required for OpenSSL" >&2;}
7502    { (exit 1); exit 1; }; }
7503 fi
7504
7505
7506 echo "$as_me:$LINENO: checking for SSL_library_init in -lssleay32" >&5
7507 echo $ECHO_N "checking for SSL_library_init in -lssleay32... $ECHO_C" >&6
7508 if test "${ac_cv_lib_ssleay32_SSL_library_init+set}" = set; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lssleay32  $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 /* confdefs.h.  */
7515 _ACEOF
7516 cat confdefs.h >>conftest.$ac_ext
7517 cat >>conftest.$ac_ext <<_ACEOF
7518 /* end confdefs.h.  */
7519
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 #ifdef __cplusplus
7522 extern "C"
7523 #endif
7524 /* We use char because int might match the return type of a gcc2
7525    builtin and then its argument prototype would still apply.  */
7526 char SSL_library_init ();
7527 int
7528 main ()
7529 {
7530 SSL_library_init ();
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7537   (eval $ac_link) 2>conftest.er1
7538   ac_status=$?
7539   grep -v '^ *+' conftest.er1 >conftest.err
7540   rm -f conftest.er1
7541   cat conftest.err >&5
7542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543   (exit $ac_status); } &&
7544          { ac_try='test -z "$ac_c_werror_flag"
7545                          || test ! -s conftest.err'
7546   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547   (eval $ac_try) 2>&5
7548   ac_status=$?
7549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550   (exit $ac_status); }; } &&
7551          { ac_try='test -s conftest$ac_exeext'
7552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   ac_cv_lib_ssleay32_SSL_library_init=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 sed 's/^/| /' conftest.$ac_ext >&5
7561
7562 ac_cv_lib_ssleay32_SSL_library_init=no
7563 fi
7564 rm -f conftest.err conftest.$ac_objext \
7565       conftest$ac_exeext conftest.$ac_ext
7566 LIBS=$ac_check_lib_save_LIBS
7567 fi
7568 echo "$as_me:$LINENO: result: $ac_cv_lib_ssleay32_SSL_library_init" >&5
7569 echo "${ECHO_T}$ac_cv_lib_ssleay32_SSL_library_init" >&6
7570 if test $ac_cv_lib_ssleay32_SSL_library_init = yes; then
7571   cat >>confdefs.h <<_ACEOF
7572 #define HAVE_LIBSSLEAY32 1
7573 _ACEOF
7574
7575   LIBS="-lssleay32 $LIBS"
7576
7577 else
7578   { { echo "$as_me:$LINENO: error: library 'ssleay32' is required for OpenSSL" >&5
7579 echo "$as_me: error: library 'ssleay32' is required for OpenSSL" >&2;}
7580    { (exit 1); exit 1; }; }
7581 fi
7582
7583   fi
7584 fi
7585
7586 if test "$with_pam" = yes ; then
7587
7588 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7589 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7590 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7591   echo $ECHO_N "(cached) $ECHO_C" >&6
7592 else
7593   ac_check_lib_save_LIBS=$LIBS
7594 LIBS="-lpam  $LIBS"
7595 cat >conftest.$ac_ext <<_ACEOF
7596 /* confdefs.h.  */
7597 _ACEOF
7598 cat confdefs.h >>conftest.$ac_ext
7599 cat >>conftest.$ac_ext <<_ACEOF
7600 /* end confdefs.h.  */
7601
7602 /* Override any gcc2 internal prototype to avoid an error.  */
7603 #ifdef __cplusplus
7604 extern "C"
7605 #endif
7606 /* We use char because int might match the return type of a gcc2
7607    builtin and then its argument prototype would still apply.  */
7608 char pam_start ();
7609 int
7610 main ()
7611 {
7612 pam_start ();
7613   ;
7614   return 0;
7615 }
7616 _ACEOF
7617 rm -f conftest.$ac_objext conftest$ac_exeext
7618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7619   (eval $ac_link) 2>conftest.er1
7620   ac_status=$?
7621   grep -v '^ *+' conftest.er1 >conftest.err
7622   rm -f conftest.er1
7623   cat conftest.err >&5
7624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7625   (exit $ac_status); } &&
7626          { ac_try='test -z "$ac_c_werror_flag"
7627                          || test ! -s conftest.err'
7628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7629   (eval $ac_try) 2>&5
7630   ac_status=$?
7631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632   (exit $ac_status); }; } &&
7633          { ac_try='test -s conftest$ac_exeext'
7634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635   (eval $ac_try) 2>&5
7636   ac_status=$?
7637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638   (exit $ac_status); }; }; then
7639   ac_cv_lib_pam_pam_start=yes
7640 else
7641   echo "$as_me: failed program was:" >&5
7642 sed 's/^/| /' conftest.$ac_ext >&5
7643
7644 ac_cv_lib_pam_pam_start=no
7645 fi
7646 rm -f conftest.err conftest.$ac_objext \
7647       conftest$ac_exeext conftest.$ac_ext
7648 LIBS=$ac_check_lib_save_LIBS
7649 fi
7650 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7651 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7652 if test $ac_cv_lib_pam_pam_start = yes; then
7653   cat >>confdefs.h <<_ACEOF
7654 #define HAVE_LIBPAM 1
7655 _ACEOF
7656
7657   LIBS="-lpam $LIBS"
7658
7659 else
7660   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7661 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7662    { (exit 1); exit 1; }; }
7663 fi
7664
7665 fi
7666
7667
7668 ##
7669 ## Header files
7670 ##
7671
7672 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7673 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7674 if test "${ac_cv_header_stdc+set}" = set; then
7675   echo $ECHO_N "(cached) $ECHO_C" >&6
7676 else
7677   cat >conftest.$ac_ext <<_ACEOF
7678 /* confdefs.h.  */
7679 _ACEOF
7680 cat confdefs.h >>conftest.$ac_ext
7681 cat >>conftest.$ac_ext <<_ACEOF
7682 /* end confdefs.h.  */
7683 #include <stdlib.h>
7684 #include <stdarg.h>
7685 #include <string.h>
7686 #include <float.h>
7687
7688 int
7689 main ()
7690 {
7691
7692   ;
7693   return 0;
7694 }
7695 _ACEOF
7696 rm -f conftest.$ac_objext
7697 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7698   (eval $ac_compile) 2>conftest.er1
7699   ac_status=$?
7700   grep -v '^ *+' conftest.er1 >conftest.err
7701   rm -f conftest.er1
7702   cat conftest.err >&5
7703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704   (exit $ac_status); } &&
7705          { ac_try='test -z "$ac_c_werror_flag"
7706                          || test ! -s conftest.err'
7707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7708   (eval $ac_try) 2>&5
7709   ac_status=$?
7710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7711   (exit $ac_status); }; } &&
7712          { ac_try='test -s conftest.$ac_objext'
7713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7714   (eval $ac_try) 2>&5
7715   ac_status=$?
7716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7717   (exit $ac_status); }; }; then
7718   ac_cv_header_stdc=yes
7719 else
7720   echo "$as_me: failed program was:" >&5
7721 sed 's/^/| /' conftest.$ac_ext >&5
7722
7723 ac_cv_header_stdc=no
7724 fi
7725 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7726
7727 if test $ac_cv_header_stdc = yes; then
7728   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7729   cat >conftest.$ac_ext <<_ACEOF
7730 /* confdefs.h.  */
7731 _ACEOF
7732 cat confdefs.h >>conftest.$ac_ext
7733 cat >>conftest.$ac_ext <<_ACEOF
7734 /* end confdefs.h.  */
7735 #include <string.h>
7736
7737 _ACEOF
7738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7739   $EGREP "memchr" >/dev/null 2>&1; then
7740   :
7741 else
7742   ac_cv_header_stdc=no
7743 fi
7744 rm -f conftest*
7745
7746 fi
7747
7748 if test $ac_cv_header_stdc = yes; then
7749   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7750   cat >conftest.$ac_ext <<_ACEOF
7751 /* confdefs.h.  */
7752 _ACEOF
7753 cat confdefs.h >>conftest.$ac_ext
7754 cat >>conftest.$ac_ext <<_ACEOF
7755 /* end confdefs.h.  */
7756 #include <stdlib.h>
7757
7758 _ACEOF
7759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7760   $EGREP "free" >/dev/null 2>&1; then
7761   :
7762 else
7763   ac_cv_header_stdc=no
7764 fi
7765 rm -f conftest*
7766
7767 fi
7768
7769 if test $ac_cv_header_stdc = yes; then
7770   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7771   if test "$cross_compiling" = yes; then
7772   :
7773 else
7774   cat >conftest.$ac_ext <<_ACEOF
7775 /* confdefs.h.  */
7776 _ACEOF
7777 cat confdefs.h >>conftest.$ac_ext
7778 cat >>conftest.$ac_ext <<_ACEOF
7779 /* end confdefs.h.  */
7780 #include <ctype.h>
7781 #if ((' ' & 0x0FF) == 0x020)
7782 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7783 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7784 #else
7785 # define ISLOWER(c) \
7786                    (('a' <= (c) && (c) <= 'i') \
7787                      || ('j' <= (c) && (c) <= 'r') \
7788                      || ('s' <= (c) && (c) <= 'z'))
7789 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7790 #endif
7791
7792 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7793 int
7794 main ()
7795 {
7796   int i;
7797   for (i = 0; i < 256; i++)
7798     if (XOR (islower (i), ISLOWER (i))
7799         || toupper (i) != TOUPPER (i))
7800       exit(2);
7801   exit (0);
7802 }
7803 _ACEOF
7804 rm -f conftest$ac_exeext
7805 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7806   (eval $ac_link) 2>&5
7807   ac_status=$?
7808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7810   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   :
7816 else
7817   echo "$as_me: program exited with status $ac_status" >&5
7818 echo "$as_me: failed program was:" >&5
7819 sed 's/^/| /' conftest.$ac_ext >&5
7820
7821 ( exit $ac_status )
7822 ac_cv_header_stdc=no
7823 fi
7824 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7825 fi
7826 fi
7827 fi
7828 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7829 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7830 if test $ac_cv_header_stdc = yes; then
7831
7832 cat >>confdefs.h <<\_ACEOF
7833 #define STDC_HEADERS 1
7834 _ACEOF
7835
7836 fi
7837
7838 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7849                   inttypes.h stdint.h unistd.h
7850 do
7851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7852 echo "$as_me:$LINENO: checking for $ac_header" >&5
7853 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7855   echo $ECHO_N "(cached) $ECHO_C" >&6
7856 else
7857   cat >conftest.$ac_ext <<_ACEOF
7858 /* confdefs.h.  */
7859 _ACEOF
7860 cat confdefs.h >>conftest.$ac_ext
7861 cat >>conftest.$ac_ext <<_ACEOF
7862 /* end confdefs.h.  */
7863 $ac_includes_default
7864
7865 #include <$ac_header>
7866 _ACEOF
7867 rm -f conftest.$ac_objext
7868 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7869   (eval $ac_compile) 2>conftest.er1
7870   ac_status=$?
7871   grep -v '^ *+' conftest.er1 >conftest.err
7872   rm -f conftest.er1
7873   cat conftest.err >&5
7874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -z "$ac_c_werror_flag"
7877                          || test ! -s conftest.err'
7878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879   (eval $ac_try) 2>&5
7880   ac_status=$?
7881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882   (exit $ac_status); }; } &&
7883          { ac_try='test -s conftest.$ac_objext'
7884   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7885   (eval $ac_try) 2>&5
7886   ac_status=$?
7887   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7888   (exit $ac_status); }; }; then
7889   eval "$as_ac_Header=yes"
7890 else
7891   echo "$as_me: failed program was:" >&5
7892 sed 's/^/| /' conftest.$ac_ext >&5
7893
7894 eval "$as_ac_Header=no"
7895 fi
7896 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7897 fi
7898 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7901   cat >>confdefs.h <<_ACEOF
7902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7903 _ACEOF
7904
7905 fi
7906
7907 done
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h langinfo.h poll.h pwd.h sys/ipc.h sys/poll.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/time.h sys/un.h termios.h utime.h wchar.h wctype.h kernel/OS.h kernel/image.h SupportDefs.h
7936 do
7937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7938 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7939   echo "$as_me:$LINENO: checking for $ac_header" >&5
7940 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7941 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7942   echo $ECHO_N "(cached) $ECHO_C" >&6
7943 fi
7944 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7945 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7946 else
7947   # Is the header compilable?
7948 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7949 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7950 cat >conftest.$ac_ext <<_ACEOF
7951 /* confdefs.h.  */
7952 _ACEOF
7953 cat confdefs.h >>conftest.$ac_ext
7954 cat >>conftest.$ac_ext <<_ACEOF
7955 /* end confdefs.h.  */
7956 $ac_includes_default
7957 #include <$ac_header>
7958 _ACEOF
7959 rm -f conftest.$ac_objext
7960 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961   (eval $ac_compile) 2>conftest.er1
7962   ac_status=$?
7963   grep -v '^ *+' conftest.er1 >conftest.err
7964   rm -f conftest.er1
7965   cat conftest.err >&5
7966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -z "$ac_c_werror_flag"
7969                          || test ! -s conftest.err'
7970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971   (eval $ac_try) 2>&5
7972   ac_status=$?
7973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974   (exit $ac_status); }; } &&
7975          { ac_try='test -s conftest.$ac_objext'
7976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977   (eval $ac_try) 2>&5
7978   ac_status=$?
7979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980   (exit $ac_status); }; }; then
7981   ac_header_compiler=yes
7982 else
7983   echo "$as_me: failed program was:" >&5
7984 sed 's/^/| /' conftest.$ac_ext >&5
7985
7986 ac_header_compiler=no
7987 fi
7988 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7989 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7990 echo "${ECHO_T}$ac_header_compiler" >&6
7991
7992 # Is the header present?
7993 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7994 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7995 cat >conftest.$ac_ext <<_ACEOF
7996 /* confdefs.h.  */
7997 _ACEOF
7998 cat confdefs.h >>conftest.$ac_ext
7999 cat >>conftest.$ac_ext <<_ACEOF
8000 /* end confdefs.h.  */
8001 #include <$ac_header>
8002 _ACEOF
8003 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8004   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8005   ac_status=$?
8006   grep -v '^ *+' conftest.er1 >conftest.err
8007   rm -f conftest.er1
8008   cat conftest.err >&5
8009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8010   (exit $ac_status); } >/dev/null; then
8011   if test -s conftest.err; then
8012     ac_cpp_err=$ac_c_preproc_warn_flag
8013     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8014   else
8015     ac_cpp_err=
8016   fi
8017 else
8018   ac_cpp_err=yes
8019 fi
8020 if test -z "$ac_cpp_err"; then
8021   ac_header_preproc=yes
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 sed 's/^/| /' conftest.$ac_ext >&5
8025
8026   ac_header_preproc=no
8027 fi
8028 rm -f conftest.err conftest.$ac_ext
8029 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8030 echo "${ECHO_T}$ac_header_preproc" >&6
8031
8032 # So?  What about this header?
8033 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8034   yes:no: )
8035     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8036 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8037     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8038 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8039     ac_header_preproc=yes
8040     ;;
8041   no:yes:* )
8042     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8043 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8044     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8045 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8046     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8047 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8048     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8049 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8050     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8051 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8052     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8053 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8054     (
8055       cat <<\_ASBOX
8056 ## ---------------------------------------- ##
8057 ## Report this to pgsql-bugs@postgresql.org ##
8058 ## ---------------------------------------- ##
8059 _ASBOX
8060     ) |
8061       sed "s/^/$as_me: WARNING:     /" >&2
8062     ;;
8063 esac
8064 echo "$as_me:$LINENO: checking for $ac_header" >&5
8065 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8066 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8067   echo $ECHO_N "(cached) $ECHO_C" >&6
8068 else
8069   eval "$as_ac_Header=\$ac_header_preproc"
8070 fi
8071 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8072 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8073
8074 fi
8075 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8076   cat >>confdefs.h <<_ACEOF
8077 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8078 _ACEOF
8079
8080 fi
8081
8082 done
8083
8084
8085 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
8086 # netinet/in.h is included first.
8087
8088 for ac_header in netinet/in.h
8089 do
8090 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8092   echo "$as_me:$LINENO: checking for $ac_header" >&5
8093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8095   echo $ECHO_N "(cached) $ECHO_C" >&6
8096 fi
8097 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8098 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8099 else
8100   # Is the header compilable?
8101 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8102 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8103 cat >conftest.$ac_ext <<_ACEOF
8104 /* confdefs.h.  */
8105 _ACEOF
8106 cat confdefs.h >>conftest.$ac_ext
8107 cat >>conftest.$ac_ext <<_ACEOF
8108 /* end confdefs.h.  */
8109 $ac_includes_default
8110 #include <$ac_header>
8111 _ACEOF
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8114   (eval $ac_compile) 2>conftest.er1
8115   ac_status=$?
8116   grep -v '^ *+' conftest.er1 >conftest.err
8117   rm -f conftest.er1
8118   cat conftest.err >&5
8119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8120   (exit $ac_status); } &&
8121          { ac_try='test -z "$ac_c_werror_flag"
8122                          || test ! -s conftest.err'
8123   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124   (eval $ac_try) 2>&5
8125   ac_status=$?
8126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127   (exit $ac_status); }; } &&
8128          { ac_try='test -s conftest.$ac_objext'
8129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8130   (eval $ac_try) 2>&5
8131   ac_status=$?
8132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8133   (exit $ac_status); }; }; then
8134   ac_header_compiler=yes
8135 else
8136   echo "$as_me: failed program was:" >&5
8137 sed 's/^/| /' conftest.$ac_ext >&5
8138
8139 ac_header_compiler=no
8140 fi
8141 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8142 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8143 echo "${ECHO_T}$ac_header_compiler" >&6
8144
8145 # Is the header present?
8146 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8147 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8148 cat >conftest.$ac_ext <<_ACEOF
8149 /* confdefs.h.  */
8150 _ACEOF
8151 cat confdefs.h >>conftest.$ac_ext
8152 cat >>conftest.$ac_ext <<_ACEOF
8153 /* end confdefs.h.  */
8154 #include <$ac_header>
8155 _ACEOF
8156 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8157   (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
8164   if test -s conftest.err; then
8165     ac_cpp_err=$ac_c_preproc_warn_flag
8166     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8167   else
8168     ac_cpp_err=
8169   fi
8170 else
8171   ac_cpp_err=yes
8172 fi
8173 if test -z "$ac_cpp_err"; then
8174   ac_header_preproc=yes
8175 else
8176   echo "$as_me: failed program was:" >&5
8177 sed 's/^/| /' conftest.$ac_ext >&5
8178
8179   ac_header_preproc=no
8180 fi
8181 rm -f conftest.err conftest.$ac_ext
8182 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8183 echo "${ECHO_T}$ac_header_preproc" >&6
8184
8185 # So?  What about this header?
8186 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8187   yes:no: )
8188     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8189 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8190     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8191 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8192     ac_header_preproc=yes
8193     ;;
8194   no:yes:* )
8195     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8196 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8197     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8198 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8199     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8200 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8201     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8202 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8203     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8204 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8205     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8206 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8207     (
8208       cat <<\_ASBOX
8209 ## ---------------------------------------- ##
8210 ## Report this to pgsql-bugs@postgresql.org ##
8211 ## ---------------------------------------- ##
8212 _ASBOX
8213     ) |
8214       sed "s/^/$as_me: WARNING:     /" >&2
8215     ;;
8216 esac
8217 echo "$as_me:$LINENO: checking for $ac_header" >&5
8218 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8219 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8220   echo $ECHO_N "(cached) $ECHO_C" >&6
8221 else
8222   eval "$as_ac_Header=\$ac_header_preproc"
8223 fi
8224 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8225 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8226
8227 fi
8228 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8229   cat >>confdefs.h <<_ACEOF
8230 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8231 _ACEOF
8232
8233 fi
8234
8235 done
8236
8237
8238 for ac_header in netinet/tcp.h
8239 do
8240 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8241 echo "$as_me:$LINENO: checking for $ac_header" >&5
8242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8244   echo $ECHO_N "(cached) $ECHO_C" >&6
8245 else
8246   cat >conftest.$ac_ext <<_ACEOF
8247 /* confdefs.h.  */
8248 _ACEOF
8249 cat confdefs.h >>conftest.$ac_ext
8250 cat >>conftest.$ac_ext <<_ACEOF
8251 /* end confdefs.h.  */
8252 $ac_includes_default
8253 #ifdef HAVE_NETINET_IN_H
8254 #include <netinet/in.h>
8255 #endif
8256
8257
8258 #include <$ac_header>
8259 _ACEOF
8260 rm -f conftest.$ac_objext
8261 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8262   (eval $ac_compile) 2>conftest.er1
8263   ac_status=$?
8264   grep -v '^ *+' conftest.er1 >conftest.err
8265   rm -f conftest.er1
8266   cat conftest.err >&5
8267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8268   (exit $ac_status); } &&
8269          { ac_try='test -z "$ac_c_werror_flag"
8270                          || test ! -s conftest.err'
8271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8272   (eval $ac_try) 2>&5
8273   ac_status=$?
8274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8275   (exit $ac_status); }; } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   eval "$as_ac_Header=yes"
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 sed 's/^/| /' conftest.$ac_ext >&5
8286
8287 eval "$as_ac_Header=no"
8288 fi
8289 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8290 fi
8291 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8292 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8293 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8294   cat >>confdefs.h <<_ACEOF
8295 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8296 _ACEOF
8297
8298 fi
8299
8300 done
8301
8302
8303 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
8304
8305 for ac_header in readline/readline.h
8306 do
8307 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8309   echo "$as_me:$LINENO: checking for $ac_header" >&5
8310 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8311 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8312   echo $ECHO_N "(cached) $ECHO_C" >&6
8313 fi
8314 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8315 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8316 else
8317   # Is the header compilable?
8318 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8319 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8320 cat >conftest.$ac_ext <<_ACEOF
8321 /* confdefs.h.  */
8322 _ACEOF
8323 cat confdefs.h >>conftest.$ac_ext
8324 cat >>conftest.$ac_ext <<_ACEOF
8325 /* end confdefs.h.  */
8326 $ac_includes_default
8327 #include <$ac_header>
8328 _ACEOF
8329 rm -f conftest.$ac_objext
8330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8331   (eval $ac_compile) 2>conftest.er1
8332   ac_status=$?
8333   grep -v '^ *+' conftest.er1 >conftest.err
8334   rm -f conftest.er1
8335   cat conftest.err >&5
8336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337   (exit $ac_status); } &&
8338          { ac_try='test -z "$ac_c_werror_flag"
8339                          || test ! -s conftest.err'
8340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8341   (eval $ac_try) 2>&5
8342   ac_status=$?
8343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8344   (exit $ac_status); }; } &&
8345          { ac_try='test -s conftest.$ac_objext'
8346   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8347   (eval $ac_try) 2>&5
8348   ac_status=$?
8349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350   (exit $ac_status); }; }; then
8351   ac_header_compiler=yes
8352 else
8353   echo "$as_me: failed program was:" >&5
8354 sed 's/^/| /' conftest.$ac_ext >&5
8355
8356 ac_header_compiler=no
8357 fi
8358 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8359 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8360 echo "${ECHO_T}$ac_header_compiler" >&6
8361
8362 # Is the header present?
8363 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8364 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8365 cat >conftest.$ac_ext <<_ACEOF
8366 /* confdefs.h.  */
8367 _ACEOF
8368 cat confdefs.h >>conftest.$ac_ext
8369 cat >>conftest.$ac_ext <<_ACEOF
8370 /* end confdefs.h.  */
8371 #include <$ac_header>
8372 _ACEOF
8373 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8375   ac_status=$?
8376   grep -v '^ *+' conftest.er1 >conftest.err
8377   rm -f conftest.er1
8378   cat conftest.err >&5
8379   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8380   (exit $ac_status); } >/dev/null; then
8381   if test -s conftest.err; then
8382     ac_cpp_err=$ac_c_preproc_warn_flag
8383     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8384   else
8385     ac_cpp_err=
8386   fi
8387 else
8388   ac_cpp_err=yes
8389 fi
8390 if test -z "$ac_cpp_err"; then
8391   ac_header_preproc=yes
8392 else
8393   echo "$as_me: failed program was:" >&5
8394 sed 's/^/| /' conftest.$ac_ext >&5
8395
8396   ac_header_preproc=no
8397 fi
8398 rm -f conftest.err conftest.$ac_ext
8399 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8400 echo "${ECHO_T}$ac_header_preproc" >&6
8401
8402 # So?  What about this header?
8403 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8404   yes:no: )
8405     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8406 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8407     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8408 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8409     ac_header_preproc=yes
8410     ;;
8411   no:yes:* )
8412     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8413 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8414     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8415 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8416     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8417 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8418     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8419 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8420     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8421 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8422     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8423 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8424     (
8425       cat <<\_ASBOX
8426 ## ---------------------------------------- ##
8427 ## Report this to pgsql-bugs@postgresql.org ##
8428 ## ---------------------------------------- ##
8429 _ASBOX
8430     ) |
8431       sed "s/^/$as_me: WARNING:     /" >&2
8432     ;;
8433 esac
8434 echo "$as_me:$LINENO: checking for $ac_header" >&5
8435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8437   echo $ECHO_N "(cached) $ECHO_C" >&6
8438 else
8439   eval "$as_ac_Header=\$ac_header_preproc"
8440 fi
8441 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8442 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8443
8444 fi
8445 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8446   cat >>confdefs.h <<_ACEOF
8447 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8448 _ACEOF
8449
8450 else
8451
8452 for ac_header in readline.h
8453 do
8454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8456   echo "$as_me:$LINENO: checking for $ac_header" >&5
8457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8459   echo $ECHO_N "(cached) $ECHO_C" >&6
8460 fi
8461 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8462 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8463 else
8464   # Is the header compilable?
8465 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8466 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8467 cat >conftest.$ac_ext <<_ACEOF
8468 /* confdefs.h.  */
8469 _ACEOF
8470 cat confdefs.h >>conftest.$ac_ext
8471 cat >>conftest.$ac_ext <<_ACEOF
8472 /* end confdefs.h.  */
8473 $ac_includes_default
8474 #include <$ac_header>
8475 _ACEOF
8476 rm -f conftest.$ac_objext
8477 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8478   (eval $ac_compile) 2>conftest.er1
8479   ac_status=$?
8480   grep -v '^ *+' conftest.er1 >conftest.err
8481   rm -f conftest.er1
8482   cat conftest.err >&5
8483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -z "$ac_c_werror_flag"
8486                          || test ! -s conftest.err'
8487   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8491   (exit $ac_status); }; } &&
8492          { ac_try='test -s conftest.$ac_objext'
8493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8494   (eval $ac_try) 2>&5
8495   ac_status=$?
8496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8497   (exit $ac_status); }; }; then
8498   ac_header_compiler=yes
8499 else
8500   echo "$as_me: failed program was:" >&5
8501 sed 's/^/| /' conftest.$ac_ext >&5
8502
8503 ac_header_compiler=no
8504 fi
8505 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8506 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8507 echo "${ECHO_T}$ac_header_compiler" >&6
8508
8509 # Is the header present?
8510 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8511 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8512 cat >conftest.$ac_ext <<_ACEOF
8513 /* confdefs.h.  */
8514 _ACEOF
8515 cat confdefs.h >>conftest.$ac_ext
8516 cat >>conftest.$ac_ext <<_ACEOF
8517 /* end confdefs.h.  */
8518 #include <$ac_header>
8519 _ACEOF
8520 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8522   ac_status=$?
8523   grep -v '^ *+' conftest.er1 >conftest.err
8524   rm -f conftest.er1
8525   cat conftest.err >&5
8526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8527   (exit $ac_status); } >/dev/null; then
8528   if test -s conftest.err; then
8529     ac_cpp_err=$ac_c_preproc_warn_flag
8530     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8531   else
8532     ac_cpp_err=
8533   fi
8534 else
8535   ac_cpp_err=yes
8536 fi
8537 if test -z "$ac_cpp_err"; then
8538   ac_header_preproc=yes
8539 else
8540   echo "$as_me: failed program was:" >&5
8541 sed 's/^/| /' conftest.$ac_ext >&5
8542
8543   ac_header_preproc=no
8544 fi
8545 rm -f conftest.err conftest.$ac_ext
8546 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8547 echo "${ECHO_T}$ac_header_preproc" >&6
8548
8549 # So?  What about this header?
8550 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8551   yes:no: )
8552     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8553 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8555 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8556     ac_header_preproc=yes
8557     ;;
8558   no:yes:* )
8559     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8560 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8561     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8562 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8563     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8564 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8565     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8566 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8567     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8568 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8569     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8570 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8571     (
8572       cat <<\_ASBOX
8573 ## ---------------------------------------- ##
8574 ## Report this to pgsql-bugs@postgresql.org ##
8575 ## ---------------------------------------- ##
8576 _ASBOX
8577     ) |
8578       sed "s/^/$as_me: WARNING:     /" >&2
8579     ;;
8580 esac
8581 echo "$as_me:$LINENO: checking for $ac_header" >&5
8582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8584   echo $ECHO_N "(cached) $ECHO_C" >&6
8585 else
8586   eval "$as_ac_Header=\$ac_header_preproc"
8587 fi
8588 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8590
8591 fi
8592 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8593   cat >>confdefs.h <<_ACEOF
8594 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8595 _ACEOF
8596
8597 else
8598   { { echo "$as_me:$LINENO: error: readline header not found
8599 If you have readline already installed, see config.log for details on the
8600 failure.  It is possible the compiler isn't looking in the proper directory.
8601 Use --without-readline to disable readline support." >&5
8602 echo "$as_me: error: readline header not found
8603 If you have readline already installed, see config.log for details on the
8604 failure.  It is possible the compiler isn't looking in the proper directory.
8605 Use --without-readline to disable readline support." >&2;}
8606    { (exit 1); exit 1; }; }
8607 fi
8608
8609 done
8610
8611 fi
8612
8613 done
8614
8615
8616 for ac_header in readline/history.h
8617 do
8618 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8620   echo "$as_me:$LINENO: checking for $ac_header" >&5
8621 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8622 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8623   echo $ECHO_N "(cached) $ECHO_C" >&6
8624 fi
8625 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8626 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8627 else
8628   # Is the header compilable?
8629 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8630 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8631 cat >conftest.$ac_ext <<_ACEOF
8632 /* confdefs.h.  */
8633 _ACEOF
8634 cat confdefs.h >>conftest.$ac_ext
8635 cat >>conftest.$ac_ext <<_ACEOF
8636 /* end confdefs.h.  */
8637 $ac_includes_default
8638 #include <$ac_header>
8639 _ACEOF
8640 rm -f conftest.$ac_objext
8641 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8642   (eval $ac_compile) 2>conftest.er1
8643   ac_status=$?
8644   grep -v '^ *+' conftest.er1 >conftest.err
8645   rm -f conftest.er1
8646   cat conftest.err >&5
8647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648   (exit $ac_status); } &&
8649          { ac_try='test -z "$ac_c_werror_flag"
8650                          || test ! -s conftest.err'
8651   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8655   (exit $ac_status); }; } &&
8656          { ac_try='test -s conftest.$ac_objext'
8657   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8658   (eval $ac_try) 2>&5
8659   ac_status=$?
8660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8661   (exit $ac_status); }; }; then
8662   ac_header_compiler=yes
8663 else
8664   echo "$as_me: failed program was:" >&5
8665 sed 's/^/| /' conftest.$ac_ext >&5
8666
8667 ac_header_compiler=no
8668 fi
8669 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8670 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8671 echo "${ECHO_T}$ac_header_compiler" >&6
8672
8673 # Is the header present?
8674 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8675 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8676 cat >conftest.$ac_ext <<_ACEOF
8677 /* confdefs.h.  */
8678 _ACEOF
8679 cat confdefs.h >>conftest.$ac_ext
8680 cat >>conftest.$ac_ext <<_ACEOF
8681 /* end confdefs.h.  */
8682 #include <$ac_header>
8683 _ACEOF
8684 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8685   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8686   ac_status=$?
8687   grep -v '^ *+' conftest.er1 >conftest.err
8688   rm -f conftest.er1
8689   cat conftest.err >&5
8690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8691   (exit $ac_status); } >/dev/null; then
8692   if test -s conftest.err; then
8693     ac_cpp_err=$ac_c_preproc_warn_flag
8694     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8695   else
8696     ac_cpp_err=
8697   fi
8698 else
8699   ac_cpp_err=yes
8700 fi
8701 if test -z "$ac_cpp_err"; then
8702   ac_header_preproc=yes
8703 else
8704   echo "$as_me: failed program was:" >&5
8705 sed 's/^/| /' conftest.$ac_ext >&5
8706
8707   ac_header_preproc=no
8708 fi
8709 rm -f conftest.err conftest.$ac_ext
8710 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8711 echo "${ECHO_T}$ac_header_preproc" >&6
8712
8713 # So?  What about this header?
8714 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8715   yes:no: )
8716     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8717 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8718     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8719 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8720     ac_header_preproc=yes
8721     ;;
8722   no:yes:* )
8723     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8724 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8725     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8726 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8727     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8728 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8729     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8730 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8731     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8732 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8733     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8734 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8735     (
8736       cat <<\_ASBOX
8737 ## ---------------------------------------- ##
8738 ## Report this to pgsql-bugs@postgresql.org ##
8739 ## ---------------------------------------- ##
8740 _ASBOX
8741     ) |
8742       sed "s/^/$as_me: WARNING:     /" >&2
8743     ;;
8744 esac
8745 echo "$as_me:$LINENO: checking for $ac_header" >&5
8746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8748   echo $ECHO_N "(cached) $ECHO_C" >&6
8749 else
8750   eval "$as_ac_Header=\$ac_header_preproc"
8751 fi
8752 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8753 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8754
8755 fi
8756 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8757   cat >>confdefs.h <<_ACEOF
8758 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8759 _ACEOF
8760
8761 else
8762
8763 for ac_header in history.h
8764 do
8765 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8766 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8767   echo "$as_me:$LINENO: checking for $ac_header" >&5
8768 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8769 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8770   echo $ECHO_N "(cached) $ECHO_C" >&6
8771 fi
8772 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8773 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8774 else
8775   # Is the header compilable?
8776 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8777 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8778 cat >conftest.$ac_ext <<_ACEOF
8779 /* confdefs.h.  */
8780 _ACEOF
8781 cat confdefs.h >>conftest.$ac_ext
8782 cat >>conftest.$ac_ext <<_ACEOF
8783 /* end confdefs.h.  */
8784 $ac_includes_default
8785 #include <$ac_header>
8786 _ACEOF
8787 rm -f conftest.$ac_objext
8788 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8789   (eval $ac_compile) 2>conftest.er1
8790   ac_status=$?
8791   grep -v '^ *+' conftest.er1 >conftest.err
8792   rm -f conftest.er1
8793   cat conftest.err >&5
8794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -z "$ac_c_werror_flag"
8797                          || test ! -s conftest.err'
8798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8799   (eval $ac_try) 2>&5
8800   ac_status=$?
8801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802   (exit $ac_status); }; } &&
8803          { ac_try='test -s conftest.$ac_objext'
8804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   ac_header_compiler=yes
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 sed 's/^/| /' conftest.$ac_ext >&5
8813
8814 ac_header_compiler=no
8815 fi
8816 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8817 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8818 echo "${ECHO_T}$ac_header_compiler" >&6
8819
8820 # Is the header present?
8821 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8822 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8823 cat >conftest.$ac_ext <<_ACEOF
8824 /* confdefs.h.  */
8825 _ACEOF
8826 cat confdefs.h >>conftest.$ac_ext
8827 cat >>conftest.$ac_ext <<_ACEOF
8828 /* end confdefs.h.  */
8829 #include <$ac_header>
8830 _ACEOF
8831 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8832   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8833   ac_status=$?
8834   grep -v '^ *+' conftest.er1 >conftest.err
8835   rm -f conftest.er1
8836   cat conftest.err >&5
8837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8838   (exit $ac_status); } >/dev/null; then
8839   if test -s conftest.err; then
8840     ac_cpp_err=$ac_c_preproc_warn_flag
8841     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
8842   else
8843     ac_cpp_err=
8844   fi
8845 else
8846   ac_cpp_err=yes
8847 fi
8848 if test -z "$ac_cpp_err"; then
8849   ac_header_preproc=yes
8850 else
8851   echo "$as_me: failed program was:" >&5
8852 sed 's/^/| /' conftest.$ac_ext >&5
8853
8854   ac_header_preproc=no
8855 fi
8856 rm -f conftest.err conftest.$ac_ext
8857 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8858 echo "${ECHO_T}$ac_header_preproc" >&6
8859
8860 # So?  What about this header?
8861 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8862   yes:no: )
8863     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8864 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8865     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8866 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8867     ac_header_preproc=yes
8868     ;;
8869   no:yes:* )
8870     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8871 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8872     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
8873 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
8874     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8875 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8876     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
8877 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
8878     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8879 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8880     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8881 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8882     (
8883       cat <<\_ASBOX
8884 ## ---------------------------------------- ##
8885 ## Report this to pgsql-bugs@postgresql.org ##
8886 ## ---------------------------------------- ##
8887 _ASBOX
8888     ) |
8889       sed "s/^/$as_me: WARNING:     /" >&2
8890     ;;
8891 esac
8892 echo "$as_me:$LINENO: checking for $ac_header" >&5
8893 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8894 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8895   echo $ECHO_N "(cached) $ECHO_C" >&6
8896 else
8897   eval "$as_ac_Header=\$ac_header_preproc"
8898 fi
8899 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8900 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8901
8902 fi
8903 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8904   cat >>confdefs.h <<_ACEOF
8905 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8906 _ACEOF
8907
8908 else
8909   { { echo "$as_me:$LINENO: error: history header not found
8910 If you have readline already installed, see config.log for details on the
8911 failure.  It is possible the compiler isn't looking in the proper directory.
8912 Use --without-readline to disable readline support." >&5
8913 echo "$as_me: error: history header not found
8914 If you have readline already installed, see config.log for details on the
8915 failure.  It is possible the compiler isn't looking in the proper directory.
8916 Use --without-readline to disable readline support." >&2;}
8917    { (exit 1); exit 1; }; }
8918 fi
8919
8920 done
8921
8922 fi
8923
8924 done
8925
8926 fi
8927
8928 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8929 # Some installations of libedit usurp /usr/include/readline/, which seems
8930 # bad practice, since in combined installations readline will have its headers
8931 # there.  We might have to resort to AC_EGREP checks to make sure we found
8932 # the proper header...
8933
8934 for ac_header in editline/readline.h
8935 do
8936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8938   echo "$as_me:$LINENO: checking for $ac_header" >&5
8939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8941   echo $ECHO_N "(cached) $ECHO_C" >&6
8942 fi
8943 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8945 else
8946   # Is the header compilable?
8947 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8948 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8949 cat >conftest.$ac_ext <<_ACEOF
8950 /* confdefs.h.  */
8951 _ACEOF
8952 cat confdefs.h >>conftest.$ac_ext
8953 cat >>conftest.$ac_ext <<_ACEOF
8954 /* end confdefs.h.  */
8955 $ac_includes_default
8956 #include <$ac_header>
8957 _ACEOF
8958 rm -f conftest.$ac_objext
8959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8960   (eval $ac_compile) 2>conftest.er1
8961   ac_status=$?
8962   grep -v '^ *+' conftest.er1 >conftest.err
8963   rm -f conftest.er1
8964   cat conftest.err >&5
8965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8966   (exit $ac_status); } &&
8967          { ac_try='test -z "$ac_c_werror_flag"
8968                          || test ! -s conftest.err'
8969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8973   (exit $ac_status); }; } &&
8974          { ac_try='test -s conftest.$ac_objext'
8975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8976   (eval $ac_try) 2>&5
8977   ac_status=$?
8978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8979   (exit $ac_status); }; }; then
8980   ac_header_compiler=yes
8981 else
8982   echo "$as_me: failed program was:" >&5
8983 sed 's/^/| /' conftest.$ac_ext >&5
8984
8985 ac_header_compiler=no
8986 fi
8987 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8988 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8989 echo "${ECHO_T}$ac_header_compiler" >&6
8990
8991 # Is the header present?
8992 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8993 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8994 cat >conftest.$ac_ext <<_ACEOF
8995 /* confdefs.h.  */
8996 _ACEOF
8997 cat confdefs.h >>conftest.$ac_ext
8998 cat >>conftest.$ac_ext <<_ACEOF
8999 /* end confdefs.h.  */
9000 #include <$ac_header>
9001 _ACEOF
9002 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9003   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9004   ac_status=$?
9005   grep -v '^ *+' conftest.er1 >conftest.err
9006   rm -f conftest.er1
9007   cat conftest.err >&5
9008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9009   (exit $ac_status); } >/dev/null; then
9010   if test -s conftest.err; then
9011     ac_cpp_err=$ac_c_preproc_warn_flag
9012     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9013   else
9014     ac_cpp_err=
9015   fi
9016 else
9017   ac_cpp_err=yes
9018 fi
9019 if test -z "$ac_cpp_err"; then
9020   ac_header_preproc=yes
9021 else
9022   echo "$as_me: failed program was:" >&5
9023 sed 's/^/| /' conftest.$ac_ext >&5
9024
9025   ac_header_preproc=no
9026 fi
9027 rm -f conftest.err conftest.$ac_ext
9028 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9029 echo "${ECHO_T}$ac_header_preproc" >&6
9030
9031 # So?  What about this header?
9032 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9033   yes:no: )
9034     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9035 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9036     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9037 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9038     ac_header_preproc=yes
9039     ;;
9040   no:yes:* )
9041     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9042 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9043     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9044 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9045     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9046 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9047     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9048 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9049     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9050 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9051     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9052 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9053     (
9054       cat <<\_ASBOX
9055 ## ---------------------------------------- ##
9056 ## Report this to pgsql-bugs@postgresql.org ##
9057 ## ---------------------------------------- ##
9058 _ASBOX
9059     ) |
9060       sed "s/^/$as_me: WARNING:     /" >&2
9061     ;;
9062 esac
9063 echo "$as_me:$LINENO: checking for $ac_header" >&5
9064 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9065 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9066   echo $ECHO_N "(cached) $ECHO_C" >&6
9067 else
9068   eval "$as_ac_Header=\$ac_header_preproc"
9069 fi
9070 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9071 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9072
9073 fi
9074 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9075   cat >>confdefs.h <<_ACEOF
9076 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9077 _ACEOF
9078
9079 else
9080
9081 for ac_header in readline.h
9082 do
9083 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9085   echo "$as_me:$LINENO: checking for $ac_header" >&5
9086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9088   echo $ECHO_N "(cached) $ECHO_C" >&6
9089 fi
9090 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9092 else
9093   # Is the header compilable?
9094 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9095 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9096 cat >conftest.$ac_ext <<_ACEOF
9097 /* confdefs.h.  */
9098 _ACEOF
9099 cat confdefs.h >>conftest.$ac_ext
9100 cat >>conftest.$ac_ext <<_ACEOF
9101 /* end confdefs.h.  */
9102 $ac_includes_default
9103 #include <$ac_header>
9104 _ACEOF
9105 rm -f conftest.$ac_objext
9106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9107   (eval $ac_compile) 2>conftest.er1
9108   ac_status=$?
9109   grep -v '^ *+' conftest.er1 >conftest.err
9110   rm -f conftest.er1
9111   cat conftest.err >&5
9112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9113   (exit $ac_status); } &&
9114          { ac_try='test -z "$ac_c_werror_flag"
9115                          || test ! -s conftest.err'
9116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9117   (eval $ac_try) 2>&5
9118   ac_status=$?
9119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9120   (exit $ac_status); }; } &&
9121          { ac_try='test -s conftest.$ac_objext'
9122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9123   (eval $ac_try) 2>&5
9124   ac_status=$?
9125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9126   (exit $ac_status); }; }; then
9127   ac_header_compiler=yes
9128 else
9129   echo "$as_me: failed program was:" >&5
9130 sed 's/^/| /' conftest.$ac_ext >&5
9131
9132 ac_header_compiler=no
9133 fi
9134 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9135 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9136 echo "${ECHO_T}$ac_header_compiler" >&6
9137
9138 # Is the header present?
9139 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9140 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9141 cat >conftest.$ac_ext <<_ACEOF
9142 /* confdefs.h.  */
9143 _ACEOF
9144 cat confdefs.h >>conftest.$ac_ext
9145 cat >>conftest.$ac_ext <<_ACEOF
9146 /* end confdefs.h.  */
9147 #include <$ac_header>
9148 _ACEOF
9149 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9151   ac_status=$?
9152   grep -v '^ *+' conftest.er1 >conftest.err
9153   rm -f conftest.er1
9154   cat conftest.err >&5
9155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9156   (exit $ac_status); } >/dev/null; then
9157   if test -s conftest.err; then
9158     ac_cpp_err=$ac_c_preproc_warn_flag
9159     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9160   else
9161     ac_cpp_err=
9162   fi
9163 else
9164   ac_cpp_err=yes
9165 fi
9166 if test -z "$ac_cpp_err"; then
9167   ac_header_preproc=yes
9168 else
9169   echo "$as_me: failed program was:" >&5
9170 sed 's/^/| /' conftest.$ac_ext >&5
9171
9172   ac_header_preproc=no
9173 fi
9174 rm -f conftest.err conftest.$ac_ext
9175 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9176 echo "${ECHO_T}$ac_header_preproc" >&6
9177
9178 # So?  What about this header?
9179 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9180   yes:no: )
9181     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9182 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9183     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9184 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9185     ac_header_preproc=yes
9186     ;;
9187   no:yes:* )
9188     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9189 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9190     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9191 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9192     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9193 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9194     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9195 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9196     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9197 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9198     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9199 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9200     (
9201       cat <<\_ASBOX
9202 ## ---------------------------------------- ##
9203 ## Report this to pgsql-bugs@postgresql.org ##
9204 ## ---------------------------------------- ##
9205 _ASBOX
9206     ) |
9207       sed "s/^/$as_me: WARNING:     /" >&2
9208     ;;
9209 esac
9210 echo "$as_me:$LINENO: checking for $ac_header" >&5
9211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9213   echo $ECHO_N "(cached) $ECHO_C" >&6
9214 else
9215   eval "$as_ac_Header=\$ac_header_preproc"
9216 fi
9217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9218 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9219
9220 fi
9221 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9222   cat >>confdefs.h <<_ACEOF
9223 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9224 _ACEOF
9225
9226 else
9227
9228 for ac_header in readline/readline.h
9229 do
9230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9232   echo "$as_me:$LINENO: checking for $ac_header" >&5
9233 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9234 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9235   echo $ECHO_N "(cached) $ECHO_C" >&6
9236 fi
9237 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9238 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9239 else
9240   # Is the header compilable?
9241 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9242 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9243 cat >conftest.$ac_ext <<_ACEOF
9244 /* confdefs.h.  */
9245 _ACEOF
9246 cat confdefs.h >>conftest.$ac_ext
9247 cat >>conftest.$ac_ext <<_ACEOF
9248 /* end confdefs.h.  */
9249 $ac_includes_default
9250 #include <$ac_header>
9251 _ACEOF
9252 rm -f conftest.$ac_objext
9253 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9254   (eval $ac_compile) 2>conftest.er1
9255   ac_status=$?
9256   grep -v '^ *+' conftest.er1 >conftest.err
9257   rm -f conftest.er1
9258   cat conftest.err >&5
9259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9260   (exit $ac_status); } &&
9261          { ac_try='test -z "$ac_c_werror_flag"
9262                          || test ! -s conftest.err'
9263   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9267   (exit $ac_status); }; } &&
9268          { ac_try='test -s conftest.$ac_objext'
9269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9270   (eval $ac_try) 2>&5
9271   ac_status=$?
9272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273   (exit $ac_status); }; }; then
9274   ac_header_compiler=yes
9275 else
9276   echo "$as_me: failed program was:" >&5
9277 sed 's/^/| /' conftest.$ac_ext >&5
9278
9279 ac_header_compiler=no
9280 fi
9281 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9282 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9283 echo "${ECHO_T}$ac_header_compiler" >&6
9284
9285 # Is the header present?
9286 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9287 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9288 cat >conftest.$ac_ext <<_ACEOF
9289 /* confdefs.h.  */
9290 _ACEOF
9291 cat confdefs.h >>conftest.$ac_ext
9292 cat >>conftest.$ac_ext <<_ACEOF
9293 /* end confdefs.h.  */
9294 #include <$ac_header>
9295 _ACEOF
9296 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9297   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9298   ac_status=$?
9299   grep -v '^ *+' conftest.er1 >conftest.err
9300   rm -f conftest.er1
9301   cat conftest.err >&5
9302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9303   (exit $ac_status); } >/dev/null; then
9304   if test -s conftest.err; then
9305     ac_cpp_err=$ac_c_preproc_warn_flag
9306     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9307   else
9308     ac_cpp_err=
9309   fi
9310 else
9311   ac_cpp_err=yes
9312 fi
9313 if test -z "$ac_cpp_err"; then
9314   ac_header_preproc=yes
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 sed 's/^/| /' conftest.$ac_ext >&5
9318
9319   ac_header_preproc=no
9320 fi
9321 rm -f conftest.err conftest.$ac_ext
9322 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9323 echo "${ECHO_T}$ac_header_preproc" >&6
9324
9325 # So?  What about this header?
9326 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9327   yes:no: )
9328     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9329 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9330     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9331 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9332     ac_header_preproc=yes
9333     ;;
9334   no:yes:* )
9335     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9336 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9337     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9338 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9339     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9340 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9341     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9342 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9343     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9344 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9345     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9346 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9347     (
9348       cat <<\_ASBOX
9349 ## ---------------------------------------- ##
9350 ## Report this to pgsql-bugs@postgresql.org ##
9351 ## ---------------------------------------- ##
9352 _ASBOX
9353     ) |
9354       sed "s/^/$as_me: WARNING:     /" >&2
9355     ;;
9356 esac
9357 echo "$as_me:$LINENO: checking for $ac_header" >&5
9358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9360   echo $ECHO_N "(cached) $ECHO_C" >&6
9361 else
9362   eval "$as_ac_Header=\$ac_header_preproc"
9363 fi
9364 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9365 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9366
9367 fi
9368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9369   cat >>confdefs.h <<_ACEOF
9370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9371 _ACEOF
9372
9373 else
9374   { { echo "$as_me:$LINENO: error: readline header not found
9375 If you have libedit already installed, see config.log for details on the
9376 failure.  It is possible the compiler isn't looking in the proper directory.
9377 Use --without-readline to disable libedit support." >&5
9378 echo "$as_me: error: readline header not found
9379 If you have libedit already installed, see config.log for details on the
9380 failure.  It is possible the compiler isn't looking in the proper directory.
9381 Use --without-readline to disable libedit support." >&2;}
9382    { (exit 1); exit 1; }; }
9383 fi
9384
9385 done
9386
9387 fi
9388
9389 done
9390
9391 fi
9392
9393 done
9394
9395
9396 for ac_header in editline/history.h
9397 do
9398 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9399 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9400   echo "$as_me:$LINENO: checking for $ac_header" >&5
9401 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9402 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9403   echo $ECHO_N "(cached) $ECHO_C" >&6
9404 fi
9405 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9406 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9407 else
9408   # Is the header compilable?
9409 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9410 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9411 cat >conftest.$ac_ext <<_ACEOF
9412 /* confdefs.h.  */
9413 _ACEOF
9414 cat confdefs.h >>conftest.$ac_ext
9415 cat >>conftest.$ac_ext <<_ACEOF
9416 /* end confdefs.h.  */
9417 $ac_includes_default
9418 #include <$ac_header>
9419 _ACEOF
9420 rm -f conftest.$ac_objext
9421 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9422   (eval $ac_compile) 2>conftest.er1
9423   ac_status=$?
9424   grep -v '^ *+' conftest.er1 >conftest.err
9425   rm -f conftest.er1
9426   cat conftest.err >&5
9427   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9428   (exit $ac_status); } &&
9429          { ac_try='test -z "$ac_c_werror_flag"
9430                          || test ! -s conftest.err'
9431   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9432   (eval $ac_try) 2>&5
9433   ac_status=$?
9434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9435   (exit $ac_status); }; } &&
9436          { ac_try='test -s conftest.$ac_objext'
9437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9438   (eval $ac_try) 2>&5
9439   ac_status=$?
9440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9441   (exit $ac_status); }; }; then
9442   ac_header_compiler=yes
9443 else
9444   echo "$as_me: failed program was:" >&5
9445 sed 's/^/| /' conftest.$ac_ext >&5
9446
9447 ac_header_compiler=no
9448 fi
9449 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9450 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9451 echo "${ECHO_T}$ac_header_compiler" >&6
9452
9453 # Is the header present?
9454 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9455 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9456 cat >conftest.$ac_ext <<_ACEOF
9457 /* confdefs.h.  */
9458 _ACEOF
9459 cat confdefs.h >>conftest.$ac_ext
9460 cat >>conftest.$ac_ext <<_ACEOF
9461 /* end confdefs.h.  */
9462 #include <$ac_header>
9463 _ACEOF
9464 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9466   ac_status=$?
9467   grep -v '^ *+' conftest.er1 >conftest.err
9468   rm -f conftest.er1
9469   cat conftest.err >&5
9470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9471   (exit $ac_status); } >/dev/null; then
9472   if test -s conftest.err; then
9473     ac_cpp_err=$ac_c_preproc_warn_flag
9474     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9475   else
9476     ac_cpp_err=
9477   fi
9478 else
9479   ac_cpp_err=yes
9480 fi
9481 if test -z "$ac_cpp_err"; then
9482   ac_header_preproc=yes
9483 else
9484   echo "$as_me: failed program was:" >&5
9485 sed 's/^/| /' conftest.$ac_ext >&5
9486
9487   ac_header_preproc=no
9488 fi
9489 rm -f conftest.err conftest.$ac_ext
9490 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9491 echo "${ECHO_T}$ac_header_preproc" >&6
9492
9493 # So?  What about this header?
9494 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9495   yes:no: )
9496     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9497 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9498     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9499 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9500     ac_header_preproc=yes
9501     ;;
9502   no:yes:* )
9503     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9504 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9505     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9506 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9507     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9508 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9509     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9510 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9512 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9513     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9514 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9515     (
9516       cat <<\_ASBOX
9517 ## ---------------------------------------- ##
9518 ## Report this to pgsql-bugs@postgresql.org ##
9519 ## ---------------------------------------- ##
9520 _ASBOX
9521     ) |
9522       sed "s/^/$as_me: WARNING:     /" >&2
9523     ;;
9524 esac
9525 echo "$as_me:$LINENO: checking for $ac_header" >&5
9526 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9527 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9528   echo $ECHO_N "(cached) $ECHO_C" >&6
9529 else
9530   eval "$as_ac_Header=\$ac_header_preproc"
9531 fi
9532 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9533 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9534
9535 fi
9536 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9537   cat >>confdefs.h <<_ACEOF
9538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9539 _ACEOF
9540
9541 else
9542
9543 for ac_header in history.h
9544 do
9545 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9547   echo "$as_me:$LINENO: checking for $ac_header" >&5
9548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 fi
9552 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9553 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9554 else
9555   # Is the header compilable?
9556 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9557 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9558 cat >conftest.$ac_ext <<_ACEOF
9559 /* confdefs.h.  */
9560 _ACEOF
9561 cat confdefs.h >>conftest.$ac_ext
9562 cat >>conftest.$ac_ext <<_ACEOF
9563 /* end confdefs.h.  */
9564 $ac_includes_default
9565 #include <$ac_header>
9566 _ACEOF
9567 rm -f conftest.$ac_objext
9568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9569   (eval $ac_compile) 2>conftest.er1
9570   ac_status=$?
9571   grep -v '^ *+' conftest.er1 >conftest.err
9572   rm -f conftest.er1
9573   cat conftest.err >&5
9574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575   (exit $ac_status); } &&
9576          { ac_try='test -z "$ac_c_werror_flag"
9577                          || test ! -s conftest.err'
9578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9579   (eval $ac_try) 2>&5
9580   ac_status=$?
9581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9582   (exit $ac_status); }; } &&
9583          { ac_try='test -s conftest.$ac_objext'
9584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9585   (eval $ac_try) 2>&5
9586   ac_status=$?
9587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9588   (exit $ac_status); }; }; then
9589   ac_header_compiler=yes
9590 else
9591   echo "$as_me: failed program was:" >&5
9592 sed 's/^/| /' conftest.$ac_ext >&5
9593
9594 ac_header_compiler=no
9595 fi
9596 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9597 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9598 echo "${ECHO_T}$ac_header_compiler" >&6
9599
9600 # Is the header present?
9601 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9602 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9603 cat >conftest.$ac_ext <<_ACEOF
9604 /* confdefs.h.  */
9605 _ACEOF
9606 cat confdefs.h >>conftest.$ac_ext
9607 cat >>conftest.$ac_ext <<_ACEOF
9608 /* end confdefs.h.  */
9609 #include <$ac_header>
9610 _ACEOF
9611 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9612   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9613   ac_status=$?
9614   grep -v '^ *+' conftest.er1 >conftest.err
9615   rm -f conftest.er1
9616   cat conftest.err >&5
9617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618   (exit $ac_status); } >/dev/null; then
9619   if test -s conftest.err; then
9620     ac_cpp_err=$ac_c_preproc_warn_flag
9621     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9622   else
9623     ac_cpp_err=
9624   fi
9625 else
9626   ac_cpp_err=yes
9627 fi
9628 if test -z "$ac_cpp_err"; then
9629   ac_header_preproc=yes
9630 else
9631   echo "$as_me: failed program was:" >&5
9632 sed 's/^/| /' conftest.$ac_ext >&5
9633
9634   ac_header_preproc=no
9635 fi
9636 rm -f conftest.err conftest.$ac_ext
9637 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9638 echo "${ECHO_T}$ac_header_preproc" >&6
9639
9640 # So?  What about this header?
9641 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9642   yes:no: )
9643     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9644 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9645     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9646 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9647     ac_header_preproc=yes
9648     ;;
9649   no:yes:* )
9650     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9651 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9652     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9653 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9654     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9655 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9656     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9657 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9658     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9659 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9660     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9661 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9662     (
9663       cat <<\_ASBOX
9664 ## ---------------------------------------- ##
9665 ## Report this to pgsql-bugs@postgresql.org ##
9666 ## ---------------------------------------- ##
9667 _ASBOX
9668     ) |
9669       sed "s/^/$as_me: WARNING:     /" >&2
9670     ;;
9671 esac
9672 echo "$as_me:$LINENO: checking for $ac_header" >&5
9673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   eval "$as_ac_Header=\$ac_header_preproc"
9678 fi
9679 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9680 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9681
9682 fi
9683 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9684   cat >>confdefs.h <<_ACEOF
9685 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9686 _ACEOF
9687
9688 else
9689
9690 for ac_header in readline/history.h
9691 do
9692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9693 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9694   echo "$as_me:$LINENO: checking for $ac_header" >&5
9695 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9696 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 fi
9699 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9701 else
9702   # Is the header compilable?
9703 echo "$as_me:$LINENO: checking $ac_header usability" >&5
9704 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
9705 cat >conftest.$ac_ext <<_ACEOF
9706 /* confdefs.h.  */
9707 _ACEOF
9708 cat confdefs.h >>conftest.$ac_ext
9709 cat >>conftest.$ac_ext <<_ACEOF
9710 /* end confdefs.h.  */
9711 $ac_includes_default
9712 #include <$ac_header>
9713 _ACEOF
9714 rm -f conftest.$ac_objext
9715 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9716   (eval $ac_compile) 2>conftest.er1
9717   ac_status=$?
9718   grep -v '^ *+' conftest.er1 >conftest.err
9719   rm -f conftest.er1
9720   cat conftest.err >&5
9721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9722   (exit $ac_status); } &&
9723          { ac_try='test -z "$ac_c_werror_flag"
9724                          || test ! -s conftest.err'
9725   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9726   (eval $ac_try) 2>&5
9727   ac_status=$?
9728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729   (exit $ac_status); }; } &&
9730          { ac_try='test -s conftest.$ac_objext'
9731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9732   (eval $ac_try) 2>&5
9733   ac_status=$?
9734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9735   (exit $ac_status); }; }; then
9736   ac_header_compiler=yes
9737 else
9738   echo "$as_me: failed program was:" >&5
9739 sed 's/^/| /' conftest.$ac_ext >&5
9740
9741 ac_header_compiler=no
9742 fi
9743 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9744 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9745 echo "${ECHO_T}$ac_header_compiler" >&6
9746
9747 # Is the header present?
9748 echo "$as_me:$LINENO: checking $ac_header presence" >&5
9749 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
9750 cat >conftest.$ac_ext <<_ACEOF
9751 /* confdefs.h.  */
9752 _ACEOF
9753 cat confdefs.h >>conftest.$ac_ext
9754 cat >>conftest.$ac_ext <<_ACEOF
9755 /* end confdefs.h.  */
9756 #include <$ac_header>
9757 _ACEOF
9758 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9759   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9760   ac_status=$?
9761   grep -v '^ *+' conftest.er1 >conftest.err
9762   rm -f conftest.er1
9763   cat conftest.err >&5
9764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9765   (exit $ac_status); } >/dev/null; then
9766   if test -s conftest.err; then
9767     ac_cpp_err=$ac_c_preproc_warn_flag
9768     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9769   else
9770     ac_cpp_err=
9771   fi
9772 else
9773   ac_cpp_err=yes
9774 fi
9775 if test -z "$ac_cpp_err"; then
9776   ac_header_preproc=yes
9777 else
9778   echo "$as_me: failed program was:" >&5
9779 sed 's/^/| /' conftest.$ac_ext >&5
9780
9781   ac_header_preproc=no
9782 fi
9783 rm -f conftest.err conftest.$ac_ext
9784 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9785 echo "${ECHO_T}$ac_header_preproc" >&6
9786
9787 # So?  What about this header?
9788 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9789   yes:no: )
9790     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9791 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
9792     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9793 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9794     ac_header_preproc=yes
9795     ;;
9796   no:yes:* )
9797     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9798 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9799     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
9800 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
9801     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9802 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9803     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
9804 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
9805     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9806 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
9807     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9808 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
9809     (
9810       cat <<\_ASBOX
9811 ## ---------------------------------------- ##
9812 ## Report this to pgsql-bugs@postgresql.org ##
9813 ## ---------------------------------------- ##
9814 _ASBOX
9815     ) |
9816       sed "s/^/$as_me: WARNING:     /" >&2
9817     ;;
9818 esac
9819 echo "$as_me:$LINENO: checking for $ac_header" >&5
9820 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9821 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9822   echo $ECHO_N "(cached) $ECHO_C" >&6
9823 else
9824   eval "$as_ac_Header=\$ac_header_preproc"
9825 fi
9826 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
9827 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9828
9829 fi
9830 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9831   cat >>confdefs.h <<_ACEOF
9832 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9833 _ACEOF
9834
9835 else
9836   { { echo "$as_me:$LINENO: error: history header not found
9837 If you have libedit already installed, see config.log for details on the
9838 failure.  It is possible the compiler isn't looking in the proper directory.
9839 Use --without-readline to disable libedit support." >&5
9840 echo "$as_me: error: history header not found
9841 If you have libedit already installed, see config.log for details on the
9842 failure.  It is possible the compiler isn't looking in the proper directory.
9843 Use --without-readline to disable libedit support." >&2;}
9844    { (exit 1); exit 1; }; }
9845 fi
9846
9847 done
9848
9849 fi
9850
9851 done
9852
9853 fi
9854
9855 done
9856
9857 fi
9858
9859 if test "$with_zlib" = yes; then
9860   if test "${ac_cv_header_zlib_h+set}" = set; then
9861   echo "$as_me:$LINENO: checking for zlib.h" >&5
9862 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9863 if test "${ac_cv_header_zlib_h+set}" = set; then
9864   echo $ECHO_N "(cached) $ECHO_C" >&6
9865 fi
9866 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9867 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9868 else
9869   # Is the header compilable?
9870 echo "$as_me:$LINENO: checking zlib.h usability" >&5
9871 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
9872 cat >conftest.$ac_ext <<_ACEOF
9873 /* confdefs.h.  */
9874 _ACEOF
9875 cat confdefs.h >>conftest.$ac_ext
9876 cat >>conftest.$ac_ext <<_ACEOF
9877 /* end confdefs.h.  */
9878 $ac_includes_default
9879 #include <zlib.h>
9880 _ACEOF
9881 rm -f conftest.$ac_objext
9882 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9883   (eval $ac_compile) 2>conftest.er1
9884   ac_status=$?
9885   grep -v '^ *+' conftest.er1 >conftest.err
9886   rm -f conftest.er1
9887   cat conftest.err >&5
9888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9889   (exit $ac_status); } &&
9890          { ac_try='test -z "$ac_c_werror_flag"
9891                          || test ! -s conftest.err'
9892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9893   (eval $ac_try) 2>&5
9894   ac_status=$?
9895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9896   (exit $ac_status); }; } &&
9897          { ac_try='test -s conftest.$ac_objext'
9898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9902   (exit $ac_status); }; }; then
9903   ac_header_compiler=yes
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 sed 's/^/| /' conftest.$ac_ext >&5
9907
9908 ac_header_compiler=no
9909 fi
9910 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9911 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9912 echo "${ECHO_T}$ac_header_compiler" >&6
9913
9914 # Is the header present?
9915 echo "$as_me:$LINENO: checking zlib.h presence" >&5
9916 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
9917 cat >conftest.$ac_ext <<_ACEOF
9918 /* confdefs.h.  */
9919 _ACEOF
9920 cat confdefs.h >>conftest.$ac_ext
9921 cat >>conftest.$ac_ext <<_ACEOF
9922 /* end confdefs.h.  */
9923 #include <zlib.h>
9924 _ACEOF
9925 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9926   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9927   ac_status=$?
9928   grep -v '^ *+' conftest.er1 >conftest.err
9929   rm -f conftest.er1
9930   cat conftest.err >&5
9931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9932   (exit $ac_status); } >/dev/null; then
9933   if test -s conftest.err; then
9934     ac_cpp_err=$ac_c_preproc_warn_flag
9935     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9936   else
9937     ac_cpp_err=
9938   fi
9939 else
9940   ac_cpp_err=yes
9941 fi
9942 if test -z "$ac_cpp_err"; then
9943   ac_header_preproc=yes
9944 else
9945   echo "$as_me: failed program was:" >&5
9946 sed 's/^/| /' conftest.$ac_ext >&5
9947
9948   ac_header_preproc=no
9949 fi
9950 rm -f conftest.err conftest.$ac_ext
9951 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9952 echo "${ECHO_T}$ac_header_preproc" >&6
9953
9954 # So?  What about this header?
9955 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9956   yes:no: )
9957     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
9958 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9959     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
9960 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
9961     ac_header_preproc=yes
9962     ;;
9963   no:yes:* )
9964     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
9965 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
9966     { echo "$as_me:$LINENO: WARNING: zlib.h:     check for missing prerequisite headers?" >&5
9967 echo "$as_me: WARNING: zlib.h:     check for missing prerequisite headers?" >&2;}
9968     { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
9969 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
9970     { echo "$as_me:$LINENO: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&5
9971 echo "$as_me: WARNING: zlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9972     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
9973 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
9974     { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
9975 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
9976     (
9977       cat <<\_ASBOX
9978 ## ---------------------------------------- ##
9979 ## Report this to pgsql-bugs@postgresql.org ##
9980 ## ---------------------------------------- ##
9981 _ASBOX
9982     ) |
9983       sed "s/^/$as_me: WARNING:     /" >&2
9984     ;;
9985 esac
9986 echo "$as_me:$LINENO: checking for zlib.h" >&5
9987 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
9988 if test "${ac_cv_header_zlib_h+set}" = set; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991   ac_cv_header_zlib_h=$ac_header_preproc
9992 fi
9993 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
9994 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
9995
9996 fi
9997 if test $ac_cv_header_zlib_h = yes; then
9998   :
9999 else
10000   { { echo "$as_me:$LINENO: error: zlib header not found
10001 If you have zlib already installed, see config.log for details on the
10002 failure.  It is possible the compiler isn't looking in the proper directory.
10003 Use --without-zlib to disable zlib support." >&5
10004 echo "$as_me: error: zlib header not found
10005 If you have zlib already installed, see config.log for details on the
10006 failure.  It is possible the compiler isn't looking in the proper directory.
10007 Use --without-zlib to disable zlib support." >&2;}
10008    { (exit 1); exit 1; }; }
10009 fi
10010
10011
10012 fi
10013
10014 if test "$with_krb5" = yes ; then
10015   if test "${ac_cv_header_krb5_h+set}" = set; then
10016   echo "$as_me:$LINENO: checking for krb5.h" >&5
10017 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10018 if test "${ac_cv_header_krb5_h+set}" = set; then
10019   echo $ECHO_N "(cached) $ECHO_C" >&6
10020 fi
10021 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10022 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10023 else
10024   # Is the header compilable?
10025 echo "$as_me:$LINENO: checking krb5.h usability" >&5
10026 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
10027 cat >conftest.$ac_ext <<_ACEOF
10028 /* confdefs.h.  */
10029 _ACEOF
10030 cat confdefs.h >>conftest.$ac_ext
10031 cat >>conftest.$ac_ext <<_ACEOF
10032 /* end confdefs.h.  */
10033 $ac_includes_default
10034 #include <krb5.h>
10035 _ACEOF
10036 rm -f conftest.$ac_objext
10037 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10038   (eval $ac_compile) 2>conftest.er1
10039   ac_status=$?
10040   grep -v '^ *+' conftest.er1 >conftest.err
10041   rm -f conftest.er1
10042   cat conftest.err >&5
10043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044   (exit $ac_status); } &&
10045          { ac_try='test -z "$ac_c_werror_flag"
10046                          || test ! -s conftest.err'
10047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10048   (eval $ac_try) 2>&5
10049   ac_status=$?
10050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10051   (exit $ac_status); }; } &&
10052          { ac_try='test -s conftest.$ac_objext'
10053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10054   (eval $ac_try) 2>&5
10055   ac_status=$?
10056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10057   (exit $ac_status); }; }; then
10058   ac_header_compiler=yes
10059 else
10060   echo "$as_me: failed program was:" >&5
10061 sed 's/^/| /' conftest.$ac_ext >&5
10062
10063 ac_header_compiler=no
10064 fi
10065 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10066 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10067 echo "${ECHO_T}$ac_header_compiler" >&6
10068
10069 # Is the header present?
10070 echo "$as_me:$LINENO: checking krb5.h presence" >&5
10071 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
10072 cat >conftest.$ac_ext <<_ACEOF
10073 /* confdefs.h.  */
10074 _ACEOF
10075 cat confdefs.h >>conftest.$ac_ext
10076 cat >>conftest.$ac_ext <<_ACEOF
10077 /* end confdefs.h.  */
10078 #include <krb5.h>
10079 _ACEOF
10080 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10082   ac_status=$?
10083   grep -v '^ *+' conftest.er1 >conftest.err
10084   rm -f conftest.er1
10085   cat conftest.err >&5
10086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10087   (exit $ac_status); } >/dev/null; then
10088   if test -s conftest.err; then
10089     ac_cpp_err=$ac_c_preproc_warn_flag
10090     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10091   else
10092     ac_cpp_err=
10093   fi
10094 else
10095   ac_cpp_err=yes
10096 fi
10097 if test -z "$ac_cpp_err"; then
10098   ac_header_preproc=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 sed 's/^/| /' conftest.$ac_ext >&5
10102
10103   ac_header_preproc=no
10104 fi
10105 rm -f conftest.err conftest.$ac_ext
10106 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10107 echo "${ECHO_T}$ac_header_preproc" >&6
10108
10109 # So?  What about this header?
10110 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10111   yes:no: )
10112     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
10113 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10114     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the compiler's result" >&5
10115 echo "$as_me: WARNING: krb5.h: proceeding with the compiler's result" >&2;}
10116     ac_header_preproc=yes
10117     ;;
10118   no:yes:* )
10119     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
10120 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
10121     { echo "$as_me:$LINENO: WARNING: krb5.h:     check for missing prerequisite headers?" >&5
10122 echo "$as_me: WARNING: krb5.h:     check for missing prerequisite headers?" >&2;}
10123     { echo "$as_me:$LINENO: WARNING: krb5.h: see the Autoconf documentation" >&5
10124 echo "$as_me: WARNING: krb5.h: see the Autoconf documentation" >&2;}
10125     { echo "$as_me:$LINENO: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&5
10126 echo "$as_me: WARNING: krb5.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10127     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
10128 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
10129     { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
10130 echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
10131     (
10132       cat <<\_ASBOX
10133 ## ---------------------------------------- ##
10134 ## Report this to pgsql-bugs@postgresql.org ##
10135 ## ---------------------------------------- ##
10136 _ASBOX
10137     ) |
10138       sed "s/^/$as_me: WARNING:     /" >&2
10139     ;;
10140 esac
10141 echo "$as_me:$LINENO: checking for krb5.h" >&5
10142 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
10143 if test "${ac_cv_header_krb5_h+set}" = set; then
10144   echo $ECHO_N "(cached) $ECHO_C" >&6
10145 else
10146   ac_cv_header_krb5_h=$ac_header_preproc
10147 fi
10148 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
10149 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
10150
10151 fi
10152 if test $ac_cv_header_krb5_h = yes; then
10153   :
10154 else
10155   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
10156 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
10157    { (exit 1); exit 1; }; }
10158 fi
10159
10160
10161 fi
10162
10163 if test "$with_openssl" = yes ; then
10164   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10165   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10166 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10167 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10168   echo $ECHO_N "(cached) $ECHO_C" >&6
10169 fi
10170 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10171 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10172 else
10173   # Is the header compilable?
10174 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
10175 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
10176 cat >conftest.$ac_ext <<_ACEOF
10177 /* confdefs.h.  */
10178 _ACEOF
10179 cat confdefs.h >>conftest.$ac_ext
10180 cat >>conftest.$ac_ext <<_ACEOF
10181 /* end confdefs.h.  */
10182 $ac_includes_default
10183 #include <openssl/ssl.h>
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>conftest.er1
10188   ac_status=$?
10189   grep -v '^ *+' conftest.er1 >conftest.err
10190   rm -f conftest.er1
10191   cat conftest.err >&5
10192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10193   (exit $ac_status); } &&
10194          { ac_try='test -z "$ac_c_werror_flag"
10195                          || test ! -s conftest.err'
10196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10200   (exit $ac_status); }; } &&
10201          { ac_try='test -s conftest.$ac_objext'
10202   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10203   (eval $ac_try) 2>&5
10204   ac_status=$?
10205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10206   (exit $ac_status); }; }; then
10207   ac_header_compiler=yes
10208 else
10209   echo "$as_me: failed program was:" >&5
10210 sed 's/^/| /' conftest.$ac_ext >&5
10211
10212 ac_header_compiler=no
10213 fi
10214 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10215 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10216 echo "${ECHO_T}$ac_header_compiler" >&6
10217
10218 # Is the header present?
10219 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
10220 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
10221 cat >conftest.$ac_ext <<_ACEOF
10222 /* confdefs.h.  */
10223 _ACEOF
10224 cat confdefs.h >>conftest.$ac_ext
10225 cat >>conftest.$ac_ext <<_ACEOF
10226 /* end confdefs.h.  */
10227 #include <openssl/ssl.h>
10228 _ACEOF
10229 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10231   ac_status=$?
10232   grep -v '^ *+' conftest.er1 >conftest.err
10233   rm -f conftest.er1
10234   cat conftest.err >&5
10235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10236   (exit $ac_status); } >/dev/null; then
10237   if test -s conftest.err; then
10238     ac_cpp_err=$ac_c_preproc_warn_flag
10239     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10240   else
10241     ac_cpp_err=
10242   fi
10243 else
10244   ac_cpp_err=yes
10245 fi
10246 if test -z "$ac_cpp_err"; then
10247   ac_header_preproc=yes
10248 else
10249   echo "$as_me: failed program was:" >&5
10250 sed 's/^/| /' conftest.$ac_ext >&5
10251
10252   ac_header_preproc=no
10253 fi
10254 rm -f conftest.err conftest.$ac_ext
10255 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10256 echo "${ECHO_T}$ac_header_preproc" >&6
10257
10258 # So?  What about this header?
10259 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10260   yes:no: )
10261     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10262 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10263     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
10264 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
10265     ac_header_preproc=yes
10266     ;;
10267   no:yes:* )
10268     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
10269 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
10270     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
10271 echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
10272     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
10273 echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
10274     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
10275 echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10276     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
10277 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
10278     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
10279 echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
10280     (
10281       cat <<\_ASBOX
10282 ## ---------------------------------------- ##
10283 ## Report this to pgsql-bugs@postgresql.org ##
10284 ## ---------------------------------------- ##
10285 _ASBOX
10286     ) |
10287       sed "s/^/$as_me: WARNING:     /" >&2
10288     ;;
10289 esac
10290 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
10291 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
10292 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295   ac_cv_header_openssl_ssl_h=$ac_header_preproc
10296 fi
10297 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
10298 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
10299
10300 fi
10301 if test $ac_cv_header_openssl_ssl_h = yes; then
10302   :
10303 else
10304   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
10305 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
10306    { (exit 1); exit 1; }; }
10307 fi
10308
10309
10310   if test "${ac_cv_header_openssl_err_h+set}" = set; then
10311   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10312 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10313 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10314   echo $ECHO_N "(cached) $ECHO_C" >&6
10315 fi
10316 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10317 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10318 else
10319   # Is the header compilable?
10320 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
10321 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
10322 cat >conftest.$ac_ext <<_ACEOF
10323 /* confdefs.h.  */
10324 _ACEOF
10325 cat confdefs.h >>conftest.$ac_ext
10326 cat >>conftest.$ac_ext <<_ACEOF
10327 /* end confdefs.h.  */
10328 $ac_includes_default
10329 #include <openssl/err.h>
10330 _ACEOF
10331 rm -f conftest.$ac_objext
10332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10333   (eval $ac_compile) 2>conftest.er1
10334   ac_status=$?
10335   grep -v '^ *+' conftest.er1 >conftest.err
10336   rm -f conftest.er1
10337   cat conftest.err >&5
10338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10339   (exit $ac_status); } &&
10340          { ac_try='test -z "$ac_c_werror_flag"
10341                          || test ! -s conftest.err'
10342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10343   (eval $ac_try) 2>&5
10344   ac_status=$?
10345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10346   (exit $ac_status); }; } &&
10347          { ac_try='test -s conftest.$ac_objext'
10348   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10349   (eval $ac_try) 2>&5
10350   ac_status=$?
10351   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10352   (exit $ac_status); }; }; then
10353   ac_header_compiler=yes
10354 else
10355   echo "$as_me: failed program was:" >&5
10356 sed 's/^/| /' conftest.$ac_ext >&5
10357
10358 ac_header_compiler=no
10359 fi
10360 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10361 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10362 echo "${ECHO_T}$ac_header_compiler" >&6
10363
10364 # Is the header present?
10365 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
10366 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
10367 cat >conftest.$ac_ext <<_ACEOF
10368 /* confdefs.h.  */
10369 _ACEOF
10370 cat confdefs.h >>conftest.$ac_ext
10371 cat >>conftest.$ac_ext <<_ACEOF
10372 /* end confdefs.h.  */
10373 #include <openssl/err.h>
10374 _ACEOF
10375 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10376   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10377   ac_status=$?
10378   grep -v '^ *+' conftest.er1 >conftest.err
10379   rm -f conftest.er1
10380   cat conftest.err >&5
10381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382   (exit $ac_status); } >/dev/null; then
10383   if test -s conftest.err; then
10384     ac_cpp_err=$ac_c_preproc_warn_flag
10385     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10386   else
10387     ac_cpp_err=
10388   fi
10389 else
10390   ac_cpp_err=yes
10391 fi
10392 if test -z "$ac_cpp_err"; then
10393   ac_header_preproc=yes
10394 else
10395   echo "$as_me: failed program was:" >&5
10396 sed 's/^/| /' conftest.$ac_ext >&5
10397
10398   ac_header_preproc=no
10399 fi
10400 rm -f conftest.err conftest.$ac_ext
10401 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10402 echo "${ECHO_T}$ac_header_preproc" >&6
10403
10404 # So?  What about this header?
10405 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10406   yes:no: )
10407     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
10408 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10409     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5
10410 echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;}
10411     ac_header_preproc=yes
10412     ;;
10413   no:yes:* )
10414     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
10415 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
10416     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&5
10417 echo "$as_me: WARNING: openssl/err.h:     check for missing prerequisite headers?" >&2;}
10418     { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5
10419 echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;}
10420     { echo "$as_me:$LINENO: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&5
10421 echo "$as_me: WARNING: openssl/err.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10422     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
10423 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;}
10424     { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5
10425 echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;}
10426     (
10427       cat <<\_ASBOX
10428 ## ---------------------------------------- ##
10429 ## Report this to pgsql-bugs@postgresql.org ##
10430 ## ---------------------------------------- ##
10431 _ASBOX
10432     ) |
10433       sed "s/^/$as_me: WARNING:     /" >&2
10434     ;;
10435 esac
10436 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
10437 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
10438 if test "${ac_cv_header_openssl_err_h+set}" = set; then
10439   echo $ECHO_N "(cached) $ECHO_C" >&6
10440 else
10441   ac_cv_header_openssl_err_h=$ac_header_preproc
10442 fi
10443 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
10444 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
10445
10446 fi
10447 if test $ac_cv_header_openssl_err_h = yes; then
10448   :
10449 else
10450   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
10451 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
10452    { (exit 1); exit 1; }; }
10453 fi
10454
10455
10456 fi
10457
10458 if test "$with_pam" = yes ; then
10459
10460 for ac_header in security/pam_appl.h
10461 do
10462 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10463 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10464   echo "$as_me:$LINENO: checking for $ac_header" >&5
10465 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10466 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10467   echo $ECHO_N "(cached) $ECHO_C" >&6
10468 fi
10469 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10470 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10471 else
10472   # Is the header compilable?
10473 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10474 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10475 cat >conftest.$ac_ext <<_ACEOF
10476 /* confdefs.h.  */
10477 _ACEOF
10478 cat confdefs.h >>conftest.$ac_ext
10479 cat >>conftest.$ac_ext <<_ACEOF
10480 /* end confdefs.h.  */
10481 $ac_includes_default
10482 #include <$ac_header>
10483 _ACEOF
10484 rm -f conftest.$ac_objext
10485 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10486   (eval $ac_compile) 2>conftest.er1
10487   ac_status=$?
10488   grep -v '^ *+' conftest.er1 >conftest.err
10489   rm -f conftest.er1
10490   cat conftest.err >&5
10491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -z "$ac_c_werror_flag"
10494                          || test ! -s conftest.err'
10495   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10499   (exit $ac_status); }; } &&
10500          { ac_try='test -s conftest.$ac_objext'
10501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10502   (eval $ac_try) 2>&5
10503   ac_status=$?
10504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10505   (exit $ac_status); }; }; then
10506   ac_header_compiler=yes
10507 else
10508   echo "$as_me: failed program was:" >&5
10509 sed 's/^/| /' conftest.$ac_ext >&5
10510
10511 ac_header_compiler=no
10512 fi
10513 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10514 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10515 echo "${ECHO_T}$ac_header_compiler" >&6
10516
10517 # Is the header present?
10518 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10519 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10520 cat >conftest.$ac_ext <<_ACEOF
10521 /* confdefs.h.  */
10522 _ACEOF
10523 cat confdefs.h >>conftest.$ac_ext
10524 cat >>conftest.$ac_ext <<_ACEOF
10525 /* end confdefs.h.  */
10526 #include <$ac_header>
10527 _ACEOF
10528 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10530   ac_status=$?
10531   grep -v '^ *+' conftest.er1 >conftest.err
10532   rm -f conftest.er1
10533   cat conftest.err >&5
10534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10535   (exit $ac_status); } >/dev/null; then
10536   if test -s conftest.err; then
10537     ac_cpp_err=$ac_c_preproc_warn_flag
10538     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10539   else
10540     ac_cpp_err=
10541   fi
10542 else
10543   ac_cpp_err=yes
10544 fi
10545 if test -z "$ac_cpp_err"; then
10546   ac_header_preproc=yes
10547 else
10548   echo "$as_me: failed program was:" >&5
10549 sed 's/^/| /' conftest.$ac_ext >&5
10550
10551   ac_header_preproc=no
10552 fi
10553 rm -f conftest.err conftest.$ac_ext
10554 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10555 echo "${ECHO_T}$ac_header_preproc" >&6
10556
10557 # So?  What about this header?
10558 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10559   yes:no: )
10560     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10561 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10562     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10563 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10564     ac_header_preproc=yes
10565     ;;
10566   no:yes:* )
10567     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10568 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10569     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10570 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10571     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10572 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10573     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10574 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10575     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10576 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10577     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10578 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10579     (
10580       cat <<\_ASBOX
10581 ## ---------------------------------------- ##
10582 ## Report this to pgsql-bugs@postgresql.org ##
10583 ## ---------------------------------------- ##
10584 _ASBOX
10585     ) |
10586       sed "s/^/$as_me: WARNING:     /" >&2
10587     ;;
10588 esac
10589 echo "$as_me:$LINENO: checking for $ac_header" >&5
10590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594   eval "$as_ac_Header=\$ac_header_preproc"
10595 fi
10596 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10598
10599 fi
10600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10601   cat >>confdefs.h <<_ACEOF
10602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10603 _ACEOF
10604
10605 else
10606
10607 for ac_header in pam/pam_appl.h
10608 do
10609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10610 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10611   echo "$as_me:$LINENO: checking for $ac_header" >&5
10612 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10613 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10614   echo $ECHO_N "(cached) $ECHO_C" >&6
10615 fi
10616 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10618 else
10619   # Is the header compilable?
10620 echo "$as_me:$LINENO: checking $ac_header usability" >&5
10621 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
10622 cat >conftest.$ac_ext <<_ACEOF
10623 /* confdefs.h.  */
10624 _ACEOF
10625 cat confdefs.h >>conftest.$ac_ext
10626 cat >>conftest.$ac_ext <<_ACEOF
10627 /* end confdefs.h.  */
10628 $ac_includes_default
10629 #include <$ac_header>
10630 _ACEOF
10631 rm -f conftest.$ac_objext
10632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10633   (eval $ac_compile) 2>conftest.er1
10634   ac_status=$?
10635   grep -v '^ *+' conftest.er1 >conftest.err
10636   rm -f conftest.er1
10637   cat conftest.err >&5
10638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10639   (exit $ac_status); } &&
10640          { ac_try='test -z "$ac_c_werror_flag"
10641                          || test ! -s conftest.err'
10642   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10643   (eval $ac_try) 2>&5
10644   ac_status=$?
10645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10646   (exit $ac_status); }; } &&
10647          { ac_try='test -s conftest.$ac_objext'
10648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10649   (eval $ac_try) 2>&5
10650   ac_status=$?
10651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10652   (exit $ac_status); }; }; then
10653   ac_header_compiler=yes
10654 else
10655   echo "$as_me: failed program was:" >&5
10656 sed 's/^/| /' conftest.$ac_ext >&5
10657
10658 ac_header_compiler=no
10659 fi
10660 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10661 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10662 echo "${ECHO_T}$ac_header_compiler" >&6
10663
10664 # Is the header present?
10665 echo "$as_me:$LINENO: checking $ac_header presence" >&5
10666 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
10667 cat >conftest.$ac_ext <<_ACEOF
10668 /* confdefs.h.  */
10669 _ACEOF
10670 cat confdefs.h >>conftest.$ac_ext
10671 cat >>conftest.$ac_ext <<_ACEOF
10672 /* end confdefs.h.  */
10673 #include <$ac_header>
10674 _ACEOF
10675 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10677   ac_status=$?
10678   grep -v '^ *+' conftest.er1 >conftest.err
10679   rm -f conftest.er1
10680   cat conftest.err >&5
10681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10682   (exit $ac_status); } >/dev/null; then
10683   if test -s conftest.err; then
10684     ac_cpp_err=$ac_c_preproc_warn_flag
10685     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10686   else
10687     ac_cpp_err=
10688   fi
10689 else
10690   ac_cpp_err=yes
10691 fi
10692 if test -z "$ac_cpp_err"; then
10693   ac_header_preproc=yes
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 sed 's/^/| /' conftest.$ac_ext >&5
10697
10698   ac_header_preproc=no
10699 fi
10700 rm -f conftest.err conftest.$ac_ext
10701 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10702 echo "${ECHO_T}$ac_header_preproc" >&6
10703
10704 # So?  What about this header?
10705 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10706   yes:no: )
10707     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10708 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10709     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10710 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10711     ac_header_preproc=yes
10712     ;;
10713   no:yes:* )
10714     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10715 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10716     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
10717 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
10718     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10719 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10720     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
10721 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
10722     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10723 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10724     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10725 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10726     (
10727       cat <<\_ASBOX
10728 ## ---------------------------------------- ##
10729 ## Report this to pgsql-bugs@postgresql.org ##
10730 ## ---------------------------------------- ##
10731 _ASBOX
10732     ) |
10733       sed "s/^/$as_me: WARNING:     /" >&2
10734     ;;
10735 esac
10736 echo "$as_me:$LINENO: checking for $ac_header" >&5
10737 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10738 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10739   echo $ECHO_N "(cached) $ECHO_C" >&6
10740 else
10741   eval "$as_ac_Header=\$ac_header_preproc"
10742 fi
10743 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
10744 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10745
10746 fi
10747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10748   cat >>confdefs.h <<_ACEOF
10749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10750 _ACEOF
10751
10752 else
10753   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
10754 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
10755    { (exit 1); exit 1; }; }
10756 fi
10757
10758 done
10759
10760 fi
10761
10762 done
10763
10764 fi
10765
10766 if test "$with_bonjour" = yes ; then
10767   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10768   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10769 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10770 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10771   echo $ECHO_N "(cached) $ECHO_C" >&6
10772 fi
10773 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10774 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10775 else
10776   # Is the header compilable?
10777 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
10778 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
10779 cat >conftest.$ac_ext <<_ACEOF
10780 /* confdefs.h.  */
10781 _ACEOF
10782 cat confdefs.h >>conftest.$ac_ext
10783 cat >>conftest.$ac_ext <<_ACEOF
10784 /* end confdefs.h.  */
10785 $ac_includes_default
10786 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10787 _ACEOF
10788 rm -f conftest.$ac_objext
10789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10790   (eval $ac_compile) 2>conftest.er1
10791   ac_status=$?
10792   grep -v '^ *+' conftest.er1 >conftest.err
10793   rm -f conftest.er1
10794   cat conftest.err >&5
10795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796   (exit $ac_status); } &&
10797          { ac_try='test -z "$ac_c_werror_flag"
10798                          || test ! -s conftest.err'
10799   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10800   (eval $ac_try) 2>&5
10801   ac_status=$?
10802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803   (exit $ac_status); }; } &&
10804          { ac_try='test -s conftest.$ac_objext'
10805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10806   (eval $ac_try) 2>&5
10807   ac_status=$?
10808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10809   (exit $ac_status); }; }; then
10810   ac_header_compiler=yes
10811 else
10812   echo "$as_me: failed program was:" >&5
10813 sed 's/^/| /' conftest.$ac_ext >&5
10814
10815 ac_header_compiler=no
10816 fi
10817 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10818 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10819 echo "${ECHO_T}$ac_header_compiler" >&6
10820
10821 # Is the header present?
10822 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
10823 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
10824 cat >conftest.$ac_ext <<_ACEOF
10825 /* confdefs.h.  */
10826 _ACEOF
10827 cat confdefs.h >>conftest.$ac_ext
10828 cat >>conftest.$ac_ext <<_ACEOF
10829 /* end confdefs.h.  */
10830 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
10831 _ACEOF
10832 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10833   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10834   ac_status=$?
10835   grep -v '^ *+' conftest.er1 >conftest.err
10836   rm -f conftest.er1
10837   cat conftest.err >&5
10838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10839   (exit $ac_status); } >/dev/null; then
10840   if test -s conftest.err; then
10841     ac_cpp_err=$ac_c_preproc_warn_flag
10842     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10843   else
10844     ac_cpp_err=
10845   fi
10846 else
10847   ac_cpp_err=yes
10848 fi
10849 if test -z "$ac_cpp_err"; then
10850   ac_header_preproc=yes
10851 else
10852   echo "$as_me: failed program was:" >&5
10853 sed 's/^/| /' conftest.$ac_ext >&5
10854
10855   ac_header_preproc=no
10856 fi
10857 rm -f conftest.err conftest.$ac_ext
10858 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10859 echo "${ECHO_T}$ac_header_preproc" >&6
10860
10861 # So?  What about this header?
10862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10863   yes:no: )
10864     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
10865 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10866     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&5
10867 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the compiler's result" >&2;}
10868     ac_header_preproc=yes
10869     ;;
10870   no:yes:* )
10871     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
10872 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
10873     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&5
10874 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     check for missing prerequisite headers?" >&2;}
10875     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&5
10876 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: see the Autoconf documentation" >&2;}
10877     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&5
10878 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10879     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
10880 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;}
10881     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&5
10882 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: in the future, the compiler will take precedence" >&2;}
10883     (
10884       cat <<\_ASBOX
10885 ## ---------------------------------------- ##
10886 ## Report this to pgsql-bugs@postgresql.org ##
10887 ## ---------------------------------------- ##
10888 _ASBOX
10889     ) |
10890       sed "s/^/$as_me: WARNING:     /" >&2
10891     ;;
10892 esac
10893 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
10894 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
10895 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
10896   echo $ECHO_N "(cached) $ECHO_C" >&6
10897 else
10898   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
10899 fi
10900 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
10901 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
10902
10903 fi
10904 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
10905   :
10906 else
10907   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&5
10908 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour" >&2;}
10909    { (exit 1); exit 1; }; }
10910 fi
10911
10912
10913 fi
10914
10915
10916 ##
10917 ## Types, structures, compiler characteristics
10918 ##
10919
10920  echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
10921 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10922 if test "${ac_cv_c_const+set}" = set; then
10923   echo $ECHO_N "(cached) $ECHO_C" >&6
10924 else
10925   cat >conftest.$ac_ext <<_ACEOF
10926 /* confdefs.h.  */
10927 _ACEOF
10928 cat confdefs.h >>conftest.$ac_ext
10929 cat >>conftest.$ac_ext <<_ACEOF
10930 /* end confdefs.h.  */
10931
10932 int
10933 main ()
10934 {
10935 /* FIXME: Include the comments suggested by Paul. */
10936 #ifndef __cplusplus
10937   /* Ultrix mips cc rejects this.  */
10938   typedef int charset[2];
10939   const charset x;
10940   /* SunOS 4.1.1 cc rejects this.  */
10941   char const *const *ccp;
10942   char **p;
10943   /* NEC SVR4.0.2 mips cc rejects this.  */
10944   struct point {int x, y;};
10945   static struct point const zero = {0,0};
10946   /* AIX XL C 1.02.0.0 rejects this.
10947      It does not let you subtract one const X* pointer from another in
10948      an arm of an if-expression whose if-part is not a constant
10949      expression */
10950   const char *g = "string";
10951   ccp = &g + (g ? g-g : 0);
10952   /* HPUX 7.0 cc rejects these. */
10953   ++ccp;
10954   p = (char**) ccp;
10955   ccp = (char const *const *) p;
10956   { /* SCO 3.2v4 cc rejects this.  */
10957     char *t;
10958     char const *s = 0 ? (char *) 0 : (char const *) 0;
10959
10960     *t++ = 0;
10961   }
10962   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10963     int x[] = {25, 17};
10964     const int *foo = &x[0];
10965     ++foo;
10966   }
10967   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10968     typedef const int *iptr;
10969     iptr p = 0;
10970     ++p;
10971   }
10972   { /* AIX XL C 1.02.0.0 rejects this saying
10973        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10974     struct s { int j; const int *ap[3]; };
10975     struct s *b; b->j = 5;
10976   }
10977   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10978     const int foo = 10;
10979   }
10980 #endif
10981
10982   ;
10983   return 0;
10984 }
10985 _ACEOF
10986 rm -f conftest.$ac_objext
10987 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10988   (eval $ac_compile) 2>conftest.er1
10989   ac_status=$?
10990   grep -v '^ *+' conftest.er1 >conftest.err
10991   rm -f conftest.er1
10992   cat conftest.err >&5
10993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10994   (exit $ac_status); } &&
10995          { ac_try='test -z "$ac_c_werror_flag"
10996                          || test ! -s conftest.err'
10997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001   (exit $ac_status); }; } &&
11002          { ac_try='test -s conftest.$ac_objext'
11003   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11004   (eval $ac_try) 2>&5
11005   ac_status=$?
11006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11007   (exit $ac_status); }; }; then
11008   ac_cv_c_const=yes
11009 else
11010   echo "$as_me: failed program was:" >&5
11011 sed 's/^/| /' conftest.$ac_ext >&5
11012
11013 ac_cv_c_const=no
11014 fi
11015 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11016 fi
11017 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
11018 echo "${ECHO_T}$ac_cv_c_const" >&6
11019 if test $ac_cv_c_const = no; then
11020
11021 cat >>confdefs.h <<\_ACEOF
11022 #define const
11023 _ACEOF
11024
11025 fi
11026
11027
11028 echo "$as_me:$LINENO: checking for inline" >&5
11029 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11030 if test "${ac_cv_c_inline+set}" = set; then
11031   echo $ECHO_N "(cached) $ECHO_C" >&6
11032 else
11033   ac_cv_c_inline=no
11034 for ac_kw in inline __inline__ __inline; do
11035   cat >conftest.$ac_ext <<_ACEOF
11036 /* confdefs.h.  */
11037 _ACEOF
11038 cat confdefs.h >>conftest.$ac_ext
11039 cat >>conftest.$ac_ext <<_ACEOF
11040 /* end confdefs.h.  */
11041 #ifndef __cplusplus
11042 typedef int foo_t;
11043 static $ac_kw foo_t static_foo () {return 0; }
11044 $ac_kw int foo () {return 0; }
11045 #endif
11046
11047 _ACEOF
11048 rm -f conftest.$ac_objext
11049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11050   (eval $ac_compile) 2>conftest.er1
11051   ac_status=$?
11052   grep -v '^ *+' conftest.er1 >conftest.err
11053   rm -f conftest.er1
11054   cat conftest.err >&5
11055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11056   (exit $ac_status); } &&
11057          { ac_try='test -z "$ac_c_werror_flag"
11058                          || test ! -s conftest.err'
11059   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11060   (eval $ac_try) 2>&5
11061   ac_status=$?
11062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11063   (exit $ac_status); }; } &&
11064          { ac_try='test -s conftest.$ac_objext'
11065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11066   (eval $ac_try) 2>&5
11067   ac_status=$?
11068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11069   (exit $ac_status); }; }; then
11070   ac_cv_c_inline=$ac_kw; break
11071 else
11072   echo "$as_me: failed program was:" >&5
11073 sed 's/^/| /' conftest.$ac_ext >&5
11074
11075 fi
11076 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11077 done
11078
11079 fi
11080 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
11081 echo "${ECHO_T}$ac_cv_c_inline" >&6
11082 case $ac_cv_c_inline in
11083   inline | yes) ;;
11084   no)
11085 cat >>confdefs.h <<\_ACEOF
11086 #define inline
11087 _ACEOF
11088  ;;
11089   *)  cat >>confdefs.h <<_ACEOF
11090 #define inline $ac_cv_c_inline
11091 _ACEOF
11092  ;;
11093 esac
11094
11095 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
11096 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
11097 if test "${ac_cv_c_stringize+set}" = set; then
11098   echo $ECHO_N "(cached) $ECHO_C" >&6
11099 else
11100   cat >conftest.$ac_ext <<_ACEOF
11101 /* confdefs.h.  */
11102 _ACEOF
11103 cat confdefs.h >>conftest.$ac_ext
11104 cat >>conftest.$ac_ext <<_ACEOF
11105 /* end confdefs.h.  */
11106 #define x(y) #y
11107
11108 char *s = x(teststring);
11109 _ACEOF
11110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11111   $EGREP "#teststring" >/dev/null 2>&1; then
11112   ac_cv_c_stringize=no
11113 else
11114   ac_cv_c_stringize=yes
11115 fi
11116 rm -f conftest*
11117
11118 fi
11119 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
11120 echo "${ECHO_T}$ac_cv_c_stringize" >&6
11121 if test $ac_cv_c_stringize = yes; then
11122
11123 cat >>confdefs.h <<\_ACEOF
11124 #define HAVE_STRINGIZE 1
11125 _ACEOF
11126
11127 fi
11128
11129 echo "$as_me:$LINENO: checking for signed types" >&5
11130 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
11131 if test "${pgac_cv_c_signed+set}" = set; then
11132   echo $ECHO_N "(cached) $ECHO_C" >&6
11133 else
11134   cat >conftest.$ac_ext <<_ACEOF
11135 /* confdefs.h.  */
11136 _ACEOF
11137 cat confdefs.h >>conftest.$ac_ext
11138 cat >>conftest.$ac_ext <<_ACEOF
11139 /* end confdefs.h.  */
11140
11141 int
11142 main ()
11143 {
11144 signed char c; signed short s; signed int i;
11145   ;
11146   return 0;
11147 }
11148 _ACEOF
11149 rm -f conftest.$ac_objext
11150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11151   (eval $ac_compile) 2>conftest.er1
11152   ac_status=$?
11153   grep -v '^ *+' conftest.er1 >conftest.err
11154   rm -f conftest.er1
11155   cat conftest.err >&5
11156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157   (exit $ac_status); } &&
11158          { ac_try='test -z "$ac_c_werror_flag"
11159                          || test ! -s conftest.err'
11160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11164   (exit $ac_status); }; } &&
11165          { ac_try='test -s conftest.$ac_objext'
11166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11167   (eval $ac_try) 2>&5
11168   ac_status=$?
11169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11170   (exit $ac_status); }; }; then
11171   pgac_cv_c_signed=yes
11172 else
11173   echo "$as_me: failed program was:" >&5
11174 sed 's/^/| /' conftest.$ac_ext >&5
11175
11176 pgac_cv_c_signed=no
11177 fi
11178 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11179 fi
11180 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
11181 echo "${ECHO_T}$pgac_cv_c_signed" >&6
11182 if test x"$pgac_cv_c_signed" = xno ; then
11183
11184 cat >>confdefs.h <<\_ACEOF
11185 #define signed
11186 _ACEOF
11187
11188 fi
11189 echo "$as_me:$LINENO: checking for working volatile" >&5
11190 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
11191 if test "${ac_cv_c_volatile+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194   cat >conftest.$ac_ext <<_ACEOF
11195 /* confdefs.h.  */
11196 _ACEOF
11197 cat confdefs.h >>conftest.$ac_ext
11198 cat >>conftest.$ac_ext <<_ACEOF
11199 /* end confdefs.h.  */
11200
11201 int
11202 main ()
11203 {
11204
11205 volatile int x;
11206 int * volatile y;
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 rm -f conftest.$ac_objext
11212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11213   (eval $ac_compile) 2>conftest.er1
11214   ac_status=$?
11215   grep -v '^ *+' conftest.er1 >conftest.err
11216   rm -f conftest.er1
11217   cat conftest.err >&5
11218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11219   (exit $ac_status); } &&
11220          { ac_try='test -z "$ac_c_werror_flag"
11221                          || test ! -s conftest.err'
11222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11223   (eval $ac_try) 2>&5
11224   ac_status=$?
11225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11226   (exit $ac_status); }; } &&
11227          { ac_try='test -s conftest.$ac_objext'
11228   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   ac_cv_c_volatile=yes
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 sed 's/^/| /' conftest.$ac_ext >&5
11237
11238 ac_cv_c_volatile=no
11239 fi
11240 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11241 fi
11242 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
11243 echo "${ECHO_T}$ac_cv_c_volatile" >&6
11244 if test $ac_cv_c_volatile = no; then
11245
11246 cat >>confdefs.h <<\_ACEOF
11247 #define volatile
11248 _ACEOF
11249
11250 fi
11251
11252 echo "$as_me:$LINENO: checking for __func__" >&5
11253 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
11254 if test "${pgac_cv_funcname_func_support+set}" = set; then
11255   echo $ECHO_N "(cached) $ECHO_C" >&6
11256 else
11257   cat >conftest.$ac_ext <<_ACEOF
11258 /* confdefs.h.  */
11259 _ACEOF
11260 cat confdefs.h >>conftest.$ac_ext
11261 cat >>conftest.$ac_ext <<_ACEOF
11262 /* end confdefs.h.  */
11263 #include <stdio.h>
11264 int
11265 main ()
11266 {
11267 printf("%s\n", __func__);
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f conftest.$ac_objext
11273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11274   (eval $ac_compile) 2>conftest.er1
11275   ac_status=$?
11276   grep -v '^ *+' conftest.er1 >conftest.err
11277   rm -f conftest.er1
11278   cat conftest.err >&5
11279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280   (exit $ac_status); } &&
11281          { ac_try='test -z "$ac_c_werror_flag"
11282                          || test ! -s conftest.err'
11283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284   (eval $ac_try) 2>&5
11285   ac_status=$?
11286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287   (exit $ac_status); }; } &&
11288          { ac_try='test -s conftest.$ac_objext'
11289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11290   (eval $ac_try) 2>&5
11291   ac_status=$?
11292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293   (exit $ac_status); }; }; then
11294   pgac_cv_funcname_func_support=yes
11295 else
11296   echo "$as_me: failed program was:" >&5
11297 sed 's/^/| /' conftest.$ac_ext >&5
11298
11299 pgac_cv_funcname_func_support=no
11300 fi
11301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11302 fi
11303 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
11304 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
11305 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11306
11307 cat >>confdefs.h <<\_ACEOF
11308 #define HAVE_FUNCNAME__FUNC 1
11309 _ACEOF
11310
11311 else
11312 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
11313 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
11314 if test "${pgac_cv_funcname_function_support+set}" = set; then
11315   echo $ECHO_N "(cached) $ECHO_C" >&6
11316 else
11317   cat >conftest.$ac_ext <<_ACEOF
11318 /* confdefs.h.  */
11319 _ACEOF
11320 cat confdefs.h >>conftest.$ac_ext
11321 cat >>conftest.$ac_ext <<_ACEOF
11322 /* end confdefs.h.  */
11323 #include <stdio.h>
11324 int
11325 main ()
11326 {
11327 printf("%s\n", __FUNCTION__);
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 rm -f conftest.$ac_objext
11333 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11334   (eval $ac_compile) 2>conftest.er1
11335   ac_status=$?
11336   grep -v '^ *+' conftest.er1 >conftest.err
11337   rm -f conftest.er1
11338   cat conftest.err >&5
11339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340   (exit $ac_status); } &&
11341          { ac_try='test -z "$ac_c_werror_flag"
11342                          || test ! -s conftest.err'
11343   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11344   (eval $ac_try) 2>&5
11345   ac_status=$?
11346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11347   (exit $ac_status); }; } &&
11348          { ac_try='test -s conftest.$ac_objext'
11349   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11350   (eval $ac_try) 2>&5
11351   ac_status=$?
11352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11353   (exit $ac_status); }; }; then
11354   pgac_cv_funcname_function_support=yes
11355 else
11356   echo "$as_me: failed program was:" >&5
11357 sed 's/^/| /' conftest.$ac_ext >&5
11358
11359 pgac_cv_funcname_function_support=no
11360 fi
11361 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11362 fi
11363 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
11364 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
11365 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11366
11367 cat >>confdefs.h <<\_ACEOF
11368 #define HAVE_FUNCNAME__FUNCTION 1
11369 _ACEOF
11370
11371 fi
11372 fi
11373 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11374 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11375 if test "${ac_cv_struct_tm+set}" = set; then
11376   echo $ECHO_N "(cached) $ECHO_C" >&6
11377 else
11378   cat >conftest.$ac_ext <<_ACEOF
11379 /* confdefs.h.  */
11380 _ACEOF
11381 cat confdefs.h >>conftest.$ac_ext
11382 cat >>conftest.$ac_ext <<_ACEOF
11383 /* end confdefs.h.  */
11384 #include <sys/types.h>
11385 #include <time.h>
11386
11387 int
11388 main ()
11389 {
11390 struct tm *tp; tp->tm_sec;
11391   ;
11392   return 0;
11393 }
11394 _ACEOF
11395 rm -f conftest.$ac_objext
11396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11397   (eval $ac_compile) 2>conftest.er1
11398   ac_status=$?
11399   grep -v '^ *+' conftest.er1 >conftest.err
11400   rm -f conftest.er1
11401   cat conftest.err >&5
11402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11403   (exit $ac_status); } &&
11404          { ac_try='test -z "$ac_c_werror_flag"
11405                          || test ! -s conftest.err'
11406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11407   (eval $ac_try) 2>&5
11408   ac_status=$?
11409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11410   (exit $ac_status); }; } &&
11411          { ac_try='test -s conftest.$ac_objext'
11412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11413   (eval $ac_try) 2>&5
11414   ac_status=$?
11415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11416   (exit $ac_status); }; }; then
11417   ac_cv_struct_tm=time.h
11418 else
11419   echo "$as_me: failed program was:" >&5
11420 sed 's/^/| /' conftest.$ac_ext >&5
11421
11422 ac_cv_struct_tm=sys/time.h
11423 fi
11424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11425 fi
11426 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11427 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11428 if test $ac_cv_struct_tm = sys/time.h; then
11429
11430 cat >>confdefs.h <<\_ACEOF
11431 #define TM_IN_SYS_TIME 1
11432 _ACEOF
11433
11434 fi
11435
11436 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11437 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11438 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11439   echo $ECHO_N "(cached) $ECHO_C" >&6
11440 else
11441   cat >conftest.$ac_ext <<_ACEOF
11442 /* confdefs.h.  */
11443 _ACEOF
11444 cat confdefs.h >>conftest.$ac_ext
11445 cat >>conftest.$ac_ext <<_ACEOF
11446 /* end confdefs.h.  */
11447 #include <sys/types.h>
11448 #include <$ac_cv_struct_tm>
11449
11450
11451 int
11452 main ()
11453 {
11454 static struct tm ac_aggr;
11455 if (ac_aggr.tm_zone)
11456 return 0;
11457   ;
11458   return 0;
11459 }
11460 _ACEOF
11461 rm -f conftest.$ac_objext
11462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11463   (eval $ac_compile) 2>conftest.er1
11464   ac_status=$?
11465   grep -v '^ *+' conftest.er1 >conftest.err
11466   rm -f conftest.er1
11467   cat conftest.err >&5
11468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11469   (exit $ac_status); } &&
11470          { ac_try='test -z "$ac_c_werror_flag"
11471                          || test ! -s conftest.err'
11472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11476   (exit $ac_status); }; } &&
11477          { ac_try='test -s conftest.$ac_objext'
11478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11479   (eval $ac_try) 2>&5
11480   ac_status=$?
11481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11482   (exit $ac_status); }; }; then
11483   ac_cv_member_struct_tm_tm_zone=yes
11484 else
11485   echo "$as_me: failed program was:" >&5
11486 sed 's/^/| /' conftest.$ac_ext >&5
11487
11488 cat >conftest.$ac_ext <<_ACEOF
11489 /* confdefs.h.  */
11490 _ACEOF
11491 cat confdefs.h >>conftest.$ac_ext
11492 cat >>conftest.$ac_ext <<_ACEOF
11493 /* end confdefs.h.  */
11494 #include <sys/types.h>
11495 #include <$ac_cv_struct_tm>
11496
11497
11498 int
11499 main ()
11500 {
11501 static struct tm ac_aggr;
11502 if (sizeof ac_aggr.tm_zone)
11503 return 0;
11504   ;
11505   return 0;
11506 }
11507 _ACEOF
11508 rm -f conftest.$ac_objext
11509 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11510   (eval $ac_compile) 2>conftest.er1
11511   ac_status=$?
11512   grep -v '^ *+' conftest.er1 >conftest.err
11513   rm -f conftest.er1
11514   cat conftest.err >&5
11515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516   (exit $ac_status); } &&
11517          { ac_try='test -z "$ac_c_werror_flag"
11518                          || test ! -s conftest.err'
11519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11520   (eval $ac_try) 2>&5
11521   ac_status=$?
11522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11523   (exit $ac_status); }; } &&
11524          { ac_try='test -s conftest.$ac_objext'
11525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11526   (eval $ac_try) 2>&5
11527   ac_status=$?
11528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11529   (exit $ac_status); }; }; then
11530   ac_cv_member_struct_tm_tm_zone=yes
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 sed 's/^/| /' conftest.$ac_ext >&5
11534
11535 ac_cv_member_struct_tm_tm_zone=no
11536 fi
11537 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11538 fi
11539 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11540 fi
11541 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11542 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11543 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11544
11545 cat >>confdefs.h <<_ACEOF
11546 #define HAVE_STRUCT_TM_TM_ZONE 1
11547 _ACEOF
11548
11549
11550 fi
11551
11552 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11553
11554 cat >>confdefs.h <<\_ACEOF
11555 #define HAVE_TM_ZONE 1
11556 _ACEOF
11557
11558 fi
11559 echo "$as_me:$LINENO: checking for tzname" >&5
11560 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11561 if test "${ac_cv_var_tzname+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >conftest.$ac_ext <<_ACEOF
11565 /* confdefs.h.  */
11566 _ACEOF
11567 cat confdefs.h >>conftest.$ac_ext
11568 cat >>conftest.$ac_ext <<_ACEOF
11569 /* end confdefs.h.  */
11570 #include <time.h>
11571 #ifndef tzname /* For SGI.  */
11572 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11573 #endif
11574
11575 int
11576 main ()
11577 {
11578 atoi(*tzname);
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 rm -f conftest.$ac_objext conftest$ac_exeext
11584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11585   (eval $ac_link) 2>conftest.er1
11586   ac_status=$?
11587   grep -v '^ *+' conftest.er1 >conftest.err
11588   rm -f conftest.er1
11589   cat conftest.err >&5
11590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591   (exit $ac_status); } &&
11592          { ac_try='test -z "$ac_c_werror_flag"
11593                          || test ! -s conftest.err'
11594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11595   (eval $ac_try) 2>&5
11596   ac_status=$?
11597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11598   (exit $ac_status); }; } &&
11599          { ac_try='test -s conftest$ac_exeext'
11600   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601   (eval $ac_try) 2>&5
11602   ac_status=$?
11603   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604   (exit $ac_status); }; }; then
11605   ac_cv_var_tzname=yes
11606 else
11607   echo "$as_me: failed program was:" >&5
11608 sed 's/^/| /' conftest.$ac_ext >&5
11609
11610 ac_cv_var_tzname=no
11611 fi
11612 rm -f conftest.err conftest.$ac_objext \
11613       conftest$ac_exeext conftest.$ac_ext
11614 fi
11615 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11616 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11617 if test $ac_cv_var_tzname = yes; then
11618
11619 cat >>confdefs.h <<\_ACEOF
11620 #define HAVE_TZNAME 1
11621 _ACEOF
11622
11623 fi
11624
11625 echo "$as_me:$LINENO: checking for union semun" >&5
11626 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
11627 if test "${ac_cv_type_union_semun+set}" = set; then
11628   echo $ECHO_N "(cached) $ECHO_C" >&6
11629 else
11630   cat >conftest.$ac_ext <<_ACEOF
11631 /* confdefs.h.  */
11632 _ACEOF
11633 cat confdefs.h >>conftest.$ac_ext
11634 cat >>conftest.$ac_ext <<_ACEOF
11635 /* end confdefs.h.  */
11636 #include <sys/types.h>
11637 #include <sys/ipc.h>
11638 #include <sys/sem.h>
11639
11640 int
11641 main ()
11642 {
11643 if ((union semun *) 0)
11644   return 0;
11645 if (sizeof (union semun))
11646   return 0;
11647   ;
11648   return 0;
11649 }
11650 _ACEOF
11651 rm -f conftest.$ac_objext
11652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11653   (eval $ac_compile) 2>conftest.er1
11654   ac_status=$?
11655   grep -v '^ *+' conftest.er1 >conftest.err
11656   rm -f conftest.er1
11657   cat conftest.err >&5
11658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11659   (exit $ac_status); } &&
11660          { ac_try='test -z "$ac_c_werror_flag"
11661                          || test ! -s conftest.err'
11662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11663   (eval $ac_try) 2>&5
11664   ac_status=$?
11665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11666   (exit $ac_status); }; } &&
11667          { ac_try='test -s conftest.$ac_objext'
11668   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   ac_cv_type_union_semun=yes
11674 else
11675   echo "$as_me: failed program was:" >&5
11676 sed 's/^/| /' conftest.$ac_ext >&5
11677
11678 ac_cv_type_union_semun=no
11679 fi
11680 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11681 fi
11682 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
11683 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
11684 if test $ac_cv_type_union_semun = yes; then
11685
11686 cat >>confdefs.h <<_ACEOF
11687 #define HAVE_UNION_SEMUN 1
11688 _ACEOF
11689
11690
11691 fi
11692
11693 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
11694 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
11695 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
11696   echo $ECHO_N "(cached) $ECHO_C" >&6
11697 else
11698   cat >conftest.$ac_ext <<_ACEOF
11699 /* confdefs.h.  */
11700 _ACEOF
11701 cat confdefs.h >>conftest.$ac_ext
11702 cat >>conftest.$ac_ext <<_ACEOF
11703 /* end confdefs.h.  */
11704 #include <sys/types.h>
11705 #ifdef HAVE_SYS_UN_H
11706 #include <sys/un.h>
11707 #endif
11708
11709
11710 int
11711 main ()
11712 {
11713 if ((struct sockaddr_un *) 0)
11714   return 0;
11715 if (sizeof (struct sockaddr_un))
11716   return 0;
11717   ;
11718   return 0;
11719 }
11720 _ACEOF
11721 rm -f conftest.$ac_objext
11722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11723   (eval $ac_compile) 2>conftest.er1
11724   ac_status=$?
11725   grep -v '^ *+' conftest.er1 >conftest.err
11726   rm -f conftest.er1
11727   cat conftest.err >&5
11728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11729   (exit $ac_status); } &&
11730          { ac_try='test -z "$ac_c_werror_flag"
11731                          || test ! -s conftest.err'
11732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11733   (eval $ac_try) 2>&5
11734   ac_status=$?
11735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11736   (exit $ac_status); }; } &&
11737          { ac_try='test -s conftest.$ac_objext'
11738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11742   (exit $ac_status); }; }; then
11743   ac_cv_type_struct_sockaddr_un=yes
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 sed 's/^/| /' conftest.$ac_ext >&5
11747
11748 ac_cv_type_struct_sockaddr_un=no
11749 fi
11750 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11751 fi
11752 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
11753 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
11754 if test $ac_cv_type_struct_sockaddr_un = yes; then
11755
11756 cat >>confdefs.h <<_ACEOF
11757 #define HAVE_STRUCT_SOCKADDR_UN 1
11758 _ACEOF
11759
11760
11761 cat >>confdefs.h <<\_ACEOF
11762 #define HAVE_UNIX_SOCKETS 1
11763 _ACEOF
11764
11765 fi
11766
11767 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
11768 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
11769 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
11770   echo $ECHO_N "(cached) $ECHO_C" >&6
11771 else
11772   cat >conftest.$ac_ext <<_ACEOF
11773 /* confdefs.h.  */
11774 _ACEOF
11775 cat confdefs.h >>conftest.$ac_ext
11776 cat >>conftest.$ac_ext <<_ACEOF
11777 /* end confdefs.h.  */
11778 #include <sys/types.h>
11779 #ifdef HAVE_SYS_SOCKET_H
11780 #include <sys/socket.h>
11781 #endif
11782
11783
11784 int
11785 main ()
11786 {
11787 if ((struct sockaddr_storage *) 0)
11788   return 0;
11789 if (sizeof (struct sockaddr_storage))
11790   return 0;
11791   ;
11792   return 0;
11793 }
11794 _ACEOF
11795 rm -f conftest.$ac_objext
11796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11797   (eval $ac_compile) 2>conftest.er1
11798   ac_status=$?
11799   grep -v '^ *+' conftest.er1 >conftest.err
11800   rm -f conftest.er1
11801   cat conftest.err >&5
11802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11803   (exit $ac_status); } &&
11804          { ac_try='test -z "$ac_c_werror_flag"
11805                          || test ! -s conftest.err'
11806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11807   (eval $ac_try) 2>&5
11808   ac_status=$?
11809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11810   (exit $ac_status); }; } &&
11811          { ac_try='test -s conftest.$ac_objext'
11812   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11813   (eval $ac_try) 2>&5
11814   ac_status=$?
11815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11816   (exit $ac_status); }; }; then
11817   ac_cv_type_struct_sockaddr_storage=yes
11818 else
11819   echo "$as_me: failed program was:" >&5
11820 sed 's/^/| /' conftest.$ac_ext >&5
11821
11822 ac_cv_type_struct_sockaddr_storage=no
11823 fi
11824 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11825 fi
11826 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
11827 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
11828 if test $ac_cv_type_struct_sockaddr_storage = yes; then
11829
11830 cat >>confdefs.h <<_ACEOF
11831 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11832 _ACEOF
11833
11834
11835 fi
11836
11837 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
11838 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
11839 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842   cat >conftest.$ac_ext <<_ACEOF
11843 /* confdefs.h.  */
11844 _ACEOF
11845 cat confdefs.h >>conftest.$ac_ext
11846 cat >>conftest.$ac_ext <<_ACEOF
11847 /* end confdefs.h.  */
11848 #include <sys/types.h>
11849 #ifdef HAVE_SYS_SOCKET_H
11850 #include <sys/socket.h>
11851 #endif
11852
11853
11854 int
11855 main ()
11856 {
11857 static struct sockaddr_storage ac_aggr;
11858 if (ac_aggr.ss_family)
11859 return 0;
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 rm -f conftest.$ac_objext
11865 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11866   (eval $ac_compile) 2>conftest.er1
11867   ac_status=$?
11868   grep -v '^ *+' conftest.er1 >conftest.err
11869   rm -f conftest.er1
11870   cat conftest.err >&5
11871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11872   (exit $ac_status); } &&
11873          { ac_try='test -z "$ac_c_werror_flag"
11874                          || test ! -s conftest.err'
11875   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11876   (eval $ac_try) 2>&5
11877   ac_status=$?
11878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11879   (exit $ac_status); }; } &&
11880          { ac_try='test -s conftest.$ac_objext'
11881   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11882   (eval $ac_try) 2>&5
11883   ac_status=$?
11884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11885   (exit $ac_status); }; }; then
11886   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11887 else
11888   echo "$as_me: failed program was:" >&5
11889 sed 's/^/| /' conftest.$ac_ext >&5
11890
11891 cat >conftest.$ac_ext <<_ACEOF
11892 /* confdefs.h.  */
11893 _ACEOF
11894 cat confdefs.h >>conftest.$ac_ext
11895 cat >>conftest.$ac_ext <<_ACEOF
11896 /* end confdefs.h.  */
11897 #include <sys/types.h>
11898 #ifdef HAVE_SYS_SOCKET_H
11899 #include <sys/socket.h>
11900 #endif
11901
11902
11903 int
11904 main ()
11905 {
11906 static struct sockaddr_storage ac_aggr;
11907 if (sizeof ac_aggr.ss_family)
11908 return 0;
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 rm -f conftest.$ac_objext
11914 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11915   (eval $ac_compile) 2>conftest.er1
11916   ac_status=$?
11917   grep -v '^ *+' conftest.er1 >conftest.err
11918   rm -f conftest.er1
11919   cat conftest.err >&5
11920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921   (exit $ac_status); } &&
11922          { ac_try='test -z "$ac_c_werror_flag"
11923                          || test ! -s conftest.err'
11924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11925   (eval $ac_try) 2>&5
11926   ac_status=$?
11927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11928   (exit $ac_status); }; } &&
11929          { ac_try='test -s conftest.$ac_objext'
11930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11931   (eval $ac_try) 2>&5
11932   ac_status=$?
11933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11934   (exit $ac_status); }; }; then
11935   ac_cv_member_struct_sockaddr_storage_ss_family=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 sed 's/^/| /' conftest.$ac_ext >&5
11939
11940 ac_cv_member_struct_sockaddr_storage_ss_family=no
11941 fi
11942 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11943 fi
11944 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
11947 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
11948 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
11949
11950 cat >>confdefs.h <<_ACEOF
11951 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11952 _ACEOF
11953
11954
11955 fi
11956 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
11957 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
11958 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 /* confdefs.h.  */
11963 _ACEOF
11964 cat confdefs.h >>conftest.$ac_ext
11965 cat >>conftest.$ac_ext <<_ACEOF
11966 /* end confdefs.h.  */
11967 #include <sys/types.h>
11968 #ifdef HAVE_SYS_SOCKET_H
11969 #include <sys/socket.h>
11970 #endif
11971
11972
11973 int
11974 main ()
11975 {
11976 static struct sockaddr_storage ac_aggr;
11977 if (ac_aggr.__ss_family)
11978 return 0;
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext
11984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>conftest.er1
11986   ac_status=$?
11987   grep -v '^ *+' conftest.er1 >conftest.err
11988   rm -f conftest.er1
11989   cat conftest.err >&5
11990   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11991   (exit $ac_status); } &&
11992          { ac_try='test -z "$ac_c_werror_flag"
11993                          || test ! -s conftest.err'
11994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11998   (exit $ac_status); }; } &&
11999          { ac_try='test -s conftest.$ac_objext'
12000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12006 else
12007   echo "$as_me: failed program was:" >&5
12008 sed 's/^/| /' conftest.$ac_ext >&5
12009
12010 cat >conftest.$ac_ext <<_ACEOF
12011 /* confdefs.h.  */
12012 _ACEOF
12013 cat confdefs.h >>conftest.$ac_ext
12014 cat >>conftest.$ac_ext <<_ACEOF
12015 /* end confdefs.h.  */
12016 #include <sys/types.h>
12017 #ifdef HAVE_SYS_SOCKET_H
12018 #include <sys/socket.h>
12019 #endif
12020
12021
12022 int
12023 main ()
12024 {
12025 static struct sockaddr_storage ac_aggr;
12026 if (sizeof ac_aggr.__ss_family)
12027 return 0;
12028   ;
12029   return 0;
12030 }
12031 _ACEOF
12032 rm -f conftest.$ac_objext
12033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12034   (eval $ac_compile) 2>conftest.er1
12035   ac_status=$?
12036   grep -v '^ *+' conftest.er1 >conftest.err
12037   rm -f conftest.er1
12038   cat conftest.err >&5
12039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -z "$ac_c_werror_flag"
12042                          || test ! -s conftest.err'
12043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12044   (eval $ac_try) 2>&5
12045   ac_status=$?
12046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12047   (exit $ac_status); }; } &&
12048          { ac_try='test -s conftest.$ac_objext'
12049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12050   (eval $ac_try) 2>&5
12051   ac_status=$?
12052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12053   (exit $ac_status); }; }; then
12054   ac_cv_member_struct_sockaddr_storage___ss_family=yes
12055 else
12056   echo "$as_me: failed program was:" >&5
12057 sed 's/^/| /' conftest.$ac_ext >&5
12058
12059 ac_cv_member_struct_sockaddr_storage___ss_family=no
12060 fi
12061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12062 fi
12063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12064 fi
12065 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
12066 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
12067 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
12068
12069 cat >>confdefs.h <<_ACEOF
12070 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12071 _ACEOF
12072
12073
12074 fi
12075 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
12076 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
12077 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
12078   echo $ECHO_N "(cached) $ECHO_C" >&6
12079 else
12080   cat >conftest.$ac_ext <<_ACEOF
12081 /* confdefs.h.  */
12082 _ACEOF
12083 cat confdefs.h >>conftest.$ac_ext
12084 cat >>conftest.$ac_ext <<_ACEOF
12085 /* end confdefs.h.  */
12086 #include <sys/types.h>
12087 #ifdef HAVE_SYS_SOCKET_H
12088 #include <sys/socket.h>
12089 #endif
12090
12091
12092 int
12093 main ()
12094 {
12095 static struct sockaddr_storage ac_aggr;
12096 if (ac_aggr.ss_len)
12097 return 0;
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext
12103 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12104   (eval $ac_compile) 2>conftest.er1
12105   ac_status=$?
12106   grep -v '^ *+' conftest.er1 >conftest.err
12107   rm -f conftest.er1
12108   cat conftest.err >&5
12109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12110   (exit $ac_status); } &&
12111          { ac_try='test -z "$ac_c_werror_flag"
12112                          || test ! -s conftest.err'
12113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117   (exit $ac_status); }; } &&
12118          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12124   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12125 else
12126   echo "$as_me: failed program was:" >&5
12127 sed 's/^/| /' conftest.$ac_ext >&5
12128
12129 cat >conftest.$ac_ext <<_ACEOF
12130 /* confdefs.h.  */
12131 _ACEOF
12132 cat confdefs.h >>conftest.$ac_ext
12133 cat >>conftest.$ac_ext <<_ACEOF
12134 /* end confdefs.h.  */
12135 #include <sys/types.h>
12136 #ifdef HAVE_SYS_SOCKET_H
12137 #include <sys/socket.h>
12138 #endif
12139
12140
12141 int
12142 main ()
12143 {
12144 static struct sockaddr_storage ac_aggr;
12145 if (sizeof ac_aggr.ss_len)
12146 return 0;
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext
12152 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12153   (eval $ac_compile) 2>conftest.er1
12154   ac_status=$?
12155   grep -v '^ *+' conftest.er1 >conftest.err
12156   rm -f conftest.er1
12157   cat conftest.err >&5
12158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12159   (exit $ac_status); } &&
12160          { ac_try='test -z "$ac_c_werror_flag"
12161                          || test ! -s conftest.err'
12162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166   (exit $ac_status); }; } &&
12167          { ac_try='test -s conftest.$ac_objext'
12168   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12169   (eval $ac_try) 2>&5
12170   ac_status=$?
12171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172   (exit $ac_status); }; }; then
12173   ac_cv_member_struct_sockaddr_storage_ss_len=yes
12174 else
12175   echo "$as_me: failed program was:" >&5
12176 sed 's/^/| /' conftest.$ac_ext >&5
12177
12178 ac_cv_member_struct_sockaddr_storage_ss_len=no
12179 fi
12180 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12181 fi
12182 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12183 fi
12184 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
12185 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
12186 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
12187
12188 cat >>confdefs.h <<_ACEOF
12189 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12190 _ACEOF
12191
12192
12193 fi
12194 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
12195 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
12196 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
12197   echo $ECHO_N "(cached) $ECHO_C" >&6
12198 else
12199   cat >conftest.$ac_ext <<_ACEOF
12200 /* confdefs.h.  */
12201 _ACEOF
12202 cat confdefs.h >>conftest.$ac_ext
12203 cat >>conftest.$ac_ext <<_ACEOF
12204 /* end confdefs.h.  */
12205 #include <sys/types.h>
12206 #ifdef HAVE_SYS_SOCKET_H
12207 #include <sys/socket.h>
12208 #endif
12209
12210
12211 int
12212 main ()
12213 {
12214 static struct sockaddr_storage ac_aggr;
12215 if (ac_aggr.__ss_len)
12216 return 0;
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -f conftest.$ac_objext
12222 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12223   (eval $ac_compile) 2>conftest.er1
12224   ac_status=$?
12225   grep -v '^ *+' conftest.er1 >conftest.err
12226   rm -f conftest.er1
12227   cat conftest.err >&5
12228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12229   (exit $ac_status); } &&
12230          { ac_try='test -z "$ac_c_werror_flag"
12231                          || test ! -s conftest.err'
12232   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12236   (exit $ac_status); }; } &&
12237          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12243   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12244 else
12245   echo "$as_me: failed program was:" >&5
12246 sed 's/^/| /' conftest.$ac_ext >&5
12247
12248 cat >conftest.$ac_ext <<_ACEOF
12249 /* confdefs.h.  */
12250 _ACEOF
12251 cat confdefs.h >>conftest.$ac_ext
12252 cat >>conftest.$ac_ext <<_ACEOF
12253 /* end confdefs.h.  */
12254 #include <sys/types.h>
12255 #ifdef HAVE_SYS_SOCKET_H
12256 #include <sys/socket.h>
12257 #endif
12258
12259
12260 int
12261 main ()
12262 {
12263 static struct sockaddr_storage ac_aggr;
12264 if (sizeof ac_aggr.__ss_len)
12265 return 0;
12266   ;
12267   return 0;
12268 }
12269 _ACEOF
12270 rm -f conftest.$ac_objext
12271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12272   (eval $ac_compile) 2>conftest.er1
12273   ac_status=$?
12274   grep -v '^ *+' conftest.er1 >conftest.err
12275   rm -f conftest.er1
12276   cat conftest.err >&5
12277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12278   (exit $ac_status); } &&
12279          { ac_try='test -z "$ac_c_werror_flag"
12280                          || test ! -s conftest.err'
12281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12285   (exit $ac_status); }; } &&
12286          { ac_try='test -s conftest.$ac_objext'
12287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291   (exit $ac_status); }; }; then
12292   ac_cv_member_struct_sockaddr_storage___ss_len=yes
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 sed 's/^/| /' conftest.$ac_ext >&5
12296
12297 ac_cv_member_struct_sockaddr_storage___ss_len=no
12298 fi
12299 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12300 fi
12301 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12302 fi
12303 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
12304 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
12305 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
12306
12307 cat >>confdefs.h <<_ACEOF
12308 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12309 _ACEOF
12310
12311
12312 fi
12313 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
12314 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
12315 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
12316   echo $ECHO_N "(cached) $ECHO_C" >&6
12317 else
12318   cat >conftest.$ac_ext <<_ACEOF
12319 /* confdefs.h.  */
12320 _ACEOF
12321 cat confdefs.h >>conftest.$ac_ext
12322 cat >>conftest.$ac_ext <<_ACEOF
12323 /* end confdefs.h.  */
12324 #include <sys/types.h>
12325 #ifdef HAVE_SYS_SOCKET_H
12326 #include <sys/socket.h>
12327 #endif
12328
12329
12330 int
12331 main ()
12332 {
12333 static struct sockaddr ac_aggr;
12334 if (ac_aggr.sa_len)
12335 return 0;
12336   ;
12337   return 0;
12338 }
12339 _ACEOF
12340 rm -f conftest.$ac_objext
12341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12342   (eval $ac_compile) 2>conftest.er1
12343   ac_status=$?
12344   grep -v '^ *+' conftest.er1 >conftest.err
12345   rm -f conftest.er1
12346   cat conftest.err >&5
12347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -z "$ac_c_werror_flag"
12350                          || test ! -s conftest.err'
12351   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12352   (eval $ac_try) 2>&5
12353   ac_status=$?
12354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12355   (exit $ac_status); }; } &&
12356          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
12362   ac_cv_member_struct_sockaddr_sa_len=yes
12363 else
12364   echo "$as_me: failed program was:" >&5
12365 sed 's/^/| /' conftest.$ac_ext >&5
12366
12367 cat >conftest.$ac_ext <<_ACEOF
12368 /* confdefs.h.  */
12369 _ACEOF
12370 cat confdefs.h >>conftest.$ac_ext
12371 cat >>conftest.$ac_ext <<_ACEOF
12372 /* end confdefs.h.  */
12373 #include <sys/types.h>
12374 #ifdef HAVE_SYS_SOCKET_H
12375 #include <sys/socket.h>
12376 #endif
12377
12378
12379 int
12380 main ()
12381 {
12382 static struct sockaddr ac_aggr;
12383 if (sizeof ac_aggr.sa_len)
12384 return 0;
12385   ;
12386   return 0;
12387 }
12388 _ACEOF
12389 rm -f conftest.$ac_objext
12390 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12391   (eval $ac_compile) 2>conftest.er1
12392   ac_status=$?
12393   grep -v '^ *+' conftest.er1 >conftest.err
12394   rm -f conftest.er1
12395   cat conftest.err >&5
12396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12397   (exit $ac_status); } &&
12398          { ac_try='test -z "$ac_c_werror_flag"
12399                          || test ! -s conftest.err'
12400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12401   (eval $ac_try) 2>&5
12402   ac_status=$?
12403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12404   (exit $ac_status); }; } &&
12405          { ac_try='test -s conftest.$ac_objext'
12406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12407   (eval $ac_try) 2>&5
12408   ac_status=$?
12409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410   (exit $ac_status); }; }; then
12411   ac_cv_member_struct_sockaddr_sa_len=yes
12412 else
12413   echo "$as_me: failed program was:" >&5
12414 sed 's/^/| /' conftest.$ac_ext >&5
12415
12416 ac_cv_member_struct_sockaddr_sa_len=no
12417 fi
12418 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12419 fi
12420 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12421 fi
12422 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
12423 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
12424 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
12425
12426 cat >>confdefs.h <<_ACEOF
12427 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12428 _ACEOF
12429
12430
12431 fi
12432
12433 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
12434 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
12435 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438   cat >conftest.$ac_ext <<_ACEOF
12439 /* confdefs.h.  */
12440 _ACEOF
12441 cat confdefs.h >>conftest.$ac_ext
12442 cat >>conftest.$ac_ext <<_ACEOF
12443 /* end confdefs.h.  */
12444 #include <sys/types.h>
12445 #include <sys/socket.h>
12446 #include <netdb.h>
12447
12448
12449 int
12450 main ()
12451 {
12452 if ((struct addrinfo *) 0)
12453   return 0;
12454 if (sizeof (struct addrinfo))
12455   return 0;
12456   ;
12457   return 0;
12458 }
12459 _ACEOF
12460 rm -f conftest.$ac_objext
12461 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12462   (eval $ac_compile) 2>conftest.er1
12463   ac_status=$?
12464   grep -v '^ *+' conftest.er1 >conftest.err
12465   rm -f conftest.er1
12466   cat conftest.err >&5
12467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12468   (exit $ac_status); } &&
12469          { ac_try='test -z "$ac_c_werror_flag"
12470                          || test ! -s conftest.err'
12471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12472   (eval $ac_try) 2>&5
12473   ac_status=$?
12474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475   (exit $ac_status); }; } &&
12476          { ac_try='test -s conftest.$ac_objext'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   ac_cv_type_struct_addrinfo=yes
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 sed 's/^/| /' conftest.$ac_ext >&5
12486
12487 ac_cv_type_struct_addrinfo=no
12488 fi
12489 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12490 fi
12491 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
12492 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
12493 if test $ac_cv_type_struct_addrinfo = yes; then
12494
12495 cat >>confdefs.h <<_ACEOF
12496 #define HAVE_STRUCT_ADDRINFO 1
12497 _ACEOF
12498
12499
12500 fi
12501
12502
12503 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
12504 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
12505 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
12506   echo $ECHO_N "(cached) $ECHO_C" >&6
12507 else
12508   cat >conftest.$ac_ext <<_ACEOF
12509 /* confdefs.h.  */
12510 _ACEOF
12511 cat confdefs.h >>conftest.$ac_ext
12512 cat >>conftest.$ac_ext <<_ACEOF
12513 /* end confdefs.h.  */
12514 #include <sys/param.h>
12515 #include <sys/types.h>
12516 #include <sys/socket.h>
12517 #include <sys/ucred.h>
12518
12519 int
12520 main ()
12521 {
12522 if ((struct cmsgcred *) 0)
12523   return 0;
12524 if (sizeof (struct cmsgcred))
12525   return 0;
12526   ;
12527   return 0;
12528 }
12529 _ACEOF
12530 rm -f conftest.$ac_objext
12531 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12532   (eval $ac_compile) 2>conftest.er1
12533   ac_status=$?
12534   grep -v '^ *+' conftest.er1 >conftest.err
12535   rm -f conftest.er1
12536   cat conftest.err >&5
12537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -z "$ac_c_werror_flag"
12540                          || test ! -s conftest.err'
12541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12542   (eval $ac_try) 2>&5
12543   ac_status=$?
12544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12545   (exit $ac_status); }; } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   ac_cv_type_struct_cmsgcred=yes
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 sed 's/^/| /' conftest.$ac_ext >&5
12556
12557 ac_cv_type_struct_cmsgcred=no
12558 fi
12559 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12560 fi
12561 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
12562 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
12563 if test $ac_cv_type_struct_cmsgcred = yes; then
12564
12565 cat >>confdefs.h <<_ACEOF
12566 #define HAVE_STRUCT_CMSGCRED 1
12567 _ACEOF
12568
12569
12570 fi
12571 echo "$as_me:$LINENO: checking for struct fcred" >&5
12572 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
12573 if test "${ac_cv_type_struct_fcred+set}" = set; then
12574   echo $ECHO_N "(cached) $ECHO_C" >&6
12575 else
12576   cat >conftest.$ac_ext <<_ACEOF
12577 /* confdefs.h.  */
12578 _ACEOF
12579 cat confdefs.h >>conftest.$ac_ext
12580 cat >>conftest.$ac_ext <<_ACEOF
12581 /* end confdefs.h.  */
12582 #include <sys/param.h>
12583 #include <sys/types.h>
12584 #include <sys/socket.h>
12585 #include <sys/ucred.h>
12586
12587 int
12588 main ()
12589 {
12590 if ((struct fcred *) 0)
12591   return 0;
12592 if (sizeof (struct fcred))
12593   return 0;
12594   ;
12595   return 0;
12596 }
12597 _ACEOF
12598 rm -f conftest.$ac_objext
12599 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12600   (eval $ac_compile) 2>conftest.er1
12601   ac_status=$?
12602   grep -v '^ *+' conftest.er1 >conftest.err
12603   rm -f conftest.er1
12604   cat conftest.err >&5
12605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12606   (exit $ac_status); } &&
12607          { ac_try='test -z "$ac_c_werror_flag"
12608                          || test ! -s conftest.err'
12609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12610   (eval $ac_try) 2>&5
12611   ac_status=$?
12612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12613   (exit $ac_status); }; } &&
12614          { ac_try='test -s conftest.$ac_objext'
12615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12616   (eval $ac_try) 2>&5
12617   ac_status=$?
12618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12619   (exit $ac_status); }; }; then
12620   ac_cv_type_struct_fcred=yes
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 sed 's/^/| /' conftest.$ac_ext >&5
12624
12625 ac_cv_type_struct_fcred=no
12626 fi
12627 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12628 fi
12629 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
12630 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
12631 if test $ac_cv_type_struct_fcred = yes; then
12632
12633 cat >>confdefs.h <<_ACEOF
12634 #define HAVE_STRUCT_FCRED 1
12635 _ACEOF
12636
12637
12638 fi
12639 echo "$as_me:$LINENO: checking for struct sockcred" >&5
12640 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
12641 if test "${ac_cv_type_struct_sockcred+set}" = set; then
12642   echo $ECHO_N "(cached) $ECHO_C" >&6
12643 else
12644   cat >conftest.$ac_ext <<_ACEOF
12645 /* confdefs.h.  */
12646 _ACEOF
12647 cat confdefs.h >>conftest.$ac_ext
12648 cat >>conftest.$ac_ext <<_ACEOF
12649 /* end confdefs.h.  */
12650 #include <sys/param.h>
12651 #include <sys/types.h>
12652 #include <sys/socket.h>
12653 #include <sys/ucred.h>
12654
12655 int
12656 main ()
12657 {
12658 if ((struct sockcred *) 0)
12659   return 0;
12660 if (sizeof (struct sockcred))
12661   return 0;
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext
12667 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12668   (eval $ac_compile) 2>conftest.er1
12669   ac_status=$?
12670   grep -v '^ *+' conftest.er1 >conftest.err
12671   rm -f conftest.er1
12672   cat conftest.err >&5
12673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); } &&
12675          { ac_try='test -z "$ac_c_werror_flag"
12676                          || test ! -s conftest.err'
12677   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12678   (eval $ac_try) 2>&5
12679   ac_status=$?
12680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12681   (exit $ac_status); }; } &&
12682          { ac_try='test -s conftest.$ac_objext'
12683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12684   (eval $ac_try) 2>&5
12685   ac_status=$?
12686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12687   (exit $ac_status); }; }; then
12688   ac_cv_type_struct_sockcred=yes
12689 else
12690   echo "$as_me: failed program was:" >&5
12691 sed 's/^/| /' conftest.$ac_ext >&5
12692
12693 ac_cv_type_struct_sockcred=no
12694 fi
12695 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12696 fi
12697 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
12698 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
12699 if test $ac_cv_type_struct_sockcred = yes; then
12700
12701 cat >>confdefs.h <<_ACEOF
12702 #define HAVE_STRUCT_SOCKCRED 1
12703 _ACEOF
12704
12705
12706 fi
12707
12708
12709 echo "$as_me:$LINENO: checking for struct option" >&5
12710 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
12711 if test "${ac_cv_type_struct_option+set}" = set; then
12712   echo $ECHO_N "(cached) $ECHO_C" >&6
12713 else
12714   cat >conftest.$ac_ext <<_ACEOF
12715 /* confdefs.h.  */
12716 _ACEOF
12717 cat confdefs.h >>conftest.$ac_ext
12718 cat >>conftest.$ac_ext <<_ACEOF
12719 /* end confdefs.h.  */
12720 #ifdef HAVE_GETOPT_H
12721 #include <getopt.h>
12722 #endif
12723
12724 int
12725 main ()
12726 {
12727 if ((struct option *) 0)
12728   return 0;
12729 if (sizeof (struct option))
12730   return 0;
12731   ;
12732   return 0;
12733 }
12734 _ACEOF
12735 rm -f conftest.$ac_objext
12736 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12737   (eval $ac_compile) 2>conftest.er1
12738   ac_status=$?
12739   grep -v '^ *+' conftest.er1 >conftest.err
12740   rm -f conftest.er1
12741   cat conftest.err >&5
12742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -z "$ac_c_werror_flag"
12745                          || test ! -s conftest.err'
12746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750   (exit $ac_status); }; } &&
12751          { ac_try='test -s conftest.$ac_objext'
12752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12753   (eval $ac_try) 2>&5
12754   ac_status=$?
12755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12756   (exit $ac_status); }; }; then
12757   ac_cv_type_struct_option=yes
12758 else
12759   echo "$as_me: failed program was:" >&5
12760 sed 's/^/| /' conftest.$ac_ext >&5
12761
12762 ac_cv_type_struct_option=no
12763 fi
12764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12765 fi
12766 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
12767 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
12768 if test $ac_cv_type_struct_option = yes; then
12769
12770 cat >>confdefs.h <<_ACEOF
12771 #define HAVE_STRUCT_OPTION 1
12772 _ACEOF
12773
12774
12775 fi
12776
12777
12778 if test "$with_zlib" = yes; then
12779   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12780   # did not).  While we could work around the lack of z_streamp, it
12781   # seems unwise to encourage people to use such old zlib versions...
12782   echo "$as_me:$LINENO: checking for z_streamp" >&5
12783 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
12784 if test "${ac_cv_type_z_streamp+set}" = set; then
12785   echo $ECHO_N "(cached) $ECHO_C" >&6
12786 else
12787   cat >conftest.$ac_ext <<_ACEOF
12788 /* confdefs.h.  */
12789 _ACEOF
12790 cat confdefs.h >>conftest.$ac_ext
12791 cat >>conftest.$ac_ext <<_ACEOF
12792 /* end confdefs.h.  */
12793 #include <zlib.h>
12794
12795 int
12796 main ()
12797 {
12798 if ((z_streamp *) 0)
12799   return 0;
12800 if (sizeof (z_streamp))
12801   return 0;
12802   ;
12803   return 0;
12804 }
12805 _ACEOF
12806 rm -f conftest.$ac_objext
12807 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12808   (eval $ac_compile) 2>conftest.er1
12809   ac_status=$?
12810   grep -v '^ *+' conftest.er1 >conftest.err
12811   rm -f conftest.er1
12812   cat conftest.err >&5
12813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12814   (exit $ac_status); } &&
12815          { ac_try='test -z "$ac_c_werror_flag"
12816                          || test ! -s conftest.err'
12817   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821   (exit $ac_status); }; } &&
12822          { ac_try='test -s conftest.$ac_objext'
12823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   ac_cv_type_z_streamp=yes
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 sed 's/^/| /' conftest.$ac_ext >&5
12832
12833 ac_cv_type_z_streamp=no
12834 fi
12835 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12836 fi
12837 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
12838 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
12839 if test $ac_cv_type_z_streamp = yes; then
12840   :
12841 else
12842   { { echo "$as_me:$LINENO: error: zlib version is too old
12843 Use --without-zlib to disable zlib support." >&5
12844 echo "$as_me: error: zlib version is too old
12845 Use --without-zlib to disable zlib support." >&2;}
12846    { (exit 1); exit 1; }; }
12847 fi
12848
12849 fi
12850
12851 if test "$with_krb5" = yes; then
12852 # Check for differences between MIT and Heimdal (KTH) releases
12853   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
12854 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
12855 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
12856   echo $ECHO_N "(cached) $ECHO_C" >&6
12857 else
12858   cat >conftest.$ac_ext <<_ACEOF
12859 /* confdefs.h.  */
12860 _ACEOF
12861 cat confdefs.h >>conftest.$ac_ext
12862 cat >>conftest.$ac_ext <<_ACEOF
12863 /* end confdefs.h.  */
12864 #include <krb5.h>
12865
12866 int
12867 main ()
12868 {
12869 static krb5_ticket ac_aggr;
12870 if (ac_aggr.enc_part2)
12871 return 0;
12872   ;
12873   return 0;
12874 }
12875 _ACEOF
12876 rm -f conftest.$ac_objext
12877 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12878   (eval $ac_compile) 2>conftest.er1
12879   ac_status=$?
12880   grep -v '^ *+' conftest.er1 >conftest.err
12881   rm -f conftest.er1
12882   cat conftest.err >&5
12883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12884   (exit $ac_status); } &&
12885          { ac_try='test -z "$ac_c_werror_flag"
12886                          || test ! -s conftest.err'
12887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12891   (exit $ac_status); }; } &&
12892          { ac_try='test -s conftest.$ac_objext'
12893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12894   (eval $ac_try) 2>&5
12895   ac_status=$?
12896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12897   (exit $ac_status); }; }; then
12898   ac_cv_member_krb5_ticket_enc_part2=yes
12899 else
12900   echo "$as_me: failed program was:" >&5
12901 sed 's/^/| /' conftest.$ac_ext >&5
12902
12903 cat >conftest.$ac_ext <<_ACEOF
12904 /* confdefs.h.  */
12905 _ACEOF
12906 cat confdefs.h >>conftest.$ac_ext
12907 cat >>conftest.$ac_ext <<_ACEOF
12908 /* end confdefs.h.  */
12909 #include <krb5.h>
12910
12911 int
12912 main ()
12913 {
12914 static krb5_ticket ac_aggr;
12915 if (sizeof ac_aggr.enc_part2)
12916 return 0;
12917   ;
12918   return 0;
12919 }
12920 _ACEOF
12921 rm -f conftest.$ac_objext
12922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12923   (eval $ac_compile) 2>conftest.er1
12924   ac_status=$?
12925   grep -v '^ *+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12929   (exit $ac_status); } &&
12930          { ac_try='test -z "$ac_c_werror_flag"
12931                          || test ! -s conftest.err'
12932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12936   (exit $ac_status); }; } &&
12937          { ac_try='test -s conftest.$ac_objext'
12938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12939   (eval $ac_try) 2>&5
12940   ac_status=$?
12941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12942   (exit $ac_status); }; }; then
12943   ac_cv_member_krb5_ticket_enc_part2=yes
12944 else
12945   echo "$as_me: failed program was:" >&5
12946 sed 's/^/| /' conftest.$ac_ext >&5
12947
12948 ac_cv_member_krb5_ticket_enc_part2=no
12949 fi
12950 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12951 fi
12952 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12953 fi
12954 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
12955 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
12956 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
12957
12958 cat >>confdefs.h <<_ACEOF
12959 #define HAVE_KRB5_TICKET_ENC_PART2 1
12960 _ACEOF
12961
12962
12963 else
12964   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
12965 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
12966 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969   cat >conftest.$ac_ext <<_ACEOF
12970 /* confdefs.h.  */
12971 _ACEOF
12972 cat confdefs.h >>conftest.$ac_ext
12973 cat >>conftest.$ac_ext <<_ACEOF
12974 /* end confdefs.h.  */
12975 #include <krb5.h>
12976
12977 int
12978 main ()
12979 {
12980 static krb5_ticket ac_aggr;
12981 if (ac_aggr.client)
12982 return 0;
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f conftest.$ac_objext
12988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12989   (eval $ac_compile) 2>conftest.er1
12990   ac_status=$?
12991   grep -v '^ *+' conftest.er1 >conftest.err
12992   rm -f conftest.er1
12993   cat conftest.err >&5
12994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995   (exit $ac_status); } &&
12996          { ac_try='test -z "$ac_c_werror_flag"
12997                          || test ! -s conftest.err'
12998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12999   (eval $ac_try) 2>&5
13000   ac_status=$?
13001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002   (exit $ac_status); }; } &&
13003          { ac_try='test -s conftest.$ac_objext'
13004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13005   (eval $ac_try) 2>&5
13006   ac_status=$?
13007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13008   (exit $ac_status); }; }; then
13009   ac_cv_member_krb5_ticket_client=yes
13010 else
13011   echo "$as_me: failed program was:" >&5
13012 sed 's/^/| /' conftest.$ac_ext >&5
13013
13014 cat >conftest.$ac_ext <<_ACEOF
13015 /* confdefs.h.  */
13016 _ACEOF
13017 cat confdefs.h >>conftest.$ac_ext
13018 cat >>conftest.$ac_ext <<_ACEOF
13019 /* end confdefs.h.  */
13020 #include <krb5.h>
13021
13022 int
13023 main ()
13024 {
13025 static krb5_ticket ac_aggr;
13026 if (sizeof ac_aggr.client)
13027 return 0;
13028   ;
13029   return 0;
13030 }
13031 _ACEOF
13032 rm -f conftest.$ac_objext
13033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13034   (eval $ac_compile) 2>conftest.er1
13035   ac_status=$?
13036   grep -v '^ *+' conftest.er1 >conftest.err
13037   rm -f conftest.er1
13038   cat conftest.err >&5
13039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13040   (exit $ac_status); } &&
13041          { ac_try='test -z "$ac_c_werror_flag"
13042                          || test ! -s conftest.err'
13043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13044   (eval $ac_try) 2>&5
13045   ac_status=$?
13046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13047   (exit $ac_status); }; } &&
13048          { ac_try='test -s conftest.$ac_objext'
13049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   ac_cv_member_krb5_ticket_client=yes
13055 else
13056   echo "$as_me: failed program was:" >&5
13057 sed 's/^/| /' conftest.$ac_ext >&5
13058
13059 ac_cv_member_krb5_ticket_client=no
13060 fi
13061 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13062 fi
13063 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13064 fi
13065 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
13066 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
13067 if test $ac_cv_member_krb5_ticket_client = yes; then
13068
13069 cat >>confdefs.h <<_ACEOF
13070 #define HAVE_KRB5_TICKET_CLIENT 1
13071 _ACEOF
13072
13073
13074 else
13075   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
13076 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
13077    { (exit 1); exit 1; }; }
13078 fi
13079
13080 fi
13081
13082   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
13083 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
13084 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
13085   echo $ECHO_N "(cached) $ECHO_C" >&6
13086 else
13087   cat >conftest.$ac_ext <<_ACEOF
13088 /* confdefs.h.  */
13089 _ACEOF
13090 cat confdefs.h >>conftest.$ac_ext
13091 cat >>conftest.$ac_ext <<_ACEOF
13092 /* end confdefs.h.  */
13093 #include <krb5.h>
13094
13095 int
13096 main ()
13097 {
13098 static krb5_error ac_aggr;
13099 if (ac_aggr.text.data)
13100 return 0;
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f conftest.$ac_objext
13106 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107   (eval $ac_compile) 2>conftest.er1
13108   ac_status=$?
13109   grep -v '^ *+' conftest.er1 >conftest.err
13110   rm -f conftest.er1
13111   cat conftest.err >&5
13112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13113   (exit $ac_status); } &&
13114          { ac_try='test -z "$ac_c_werror_flag"
13115                          || test ! -s conftest.err'
13116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120   (exit $ac_status); }; } &&
13121          { ac_try='test -s conftest.$ac_objext'
13122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   ac_cv_member_krb5_error_text_data=yes
13128 else
13129   echo "$as_me: failed program was:" >&5
13130 sed 's/^/| /' conftest.$ac_ext >&5
13131
13132 cat >conftest.$ac_ext <<_ACEOF
13133 /* confdefs.h.  */
13134 _ACEOF
13135 cat confdefs.h >>conftest.$ac_ext
13136 cat >>conftest.$ac_ext <<_ACEOF
13137 /* end confdefs.h.  */
13138 #include <krb5.h>
13139
13140 int
13141 main ()
13142 {
13143 static krb5_error ac_aggr;
13144 if (sizeof ac_aggr.text.data)
13145 return 0;
13146   ;
13147   return 0;
13148 }
13149 _ACEOF
13150 rm -f conftest.$ac_objext
13151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13152   (eval $ac_compile) 2>conftest.er1
13153   ac_status=$?
13154   grep -v '^ *+' conftest.er1 >conftest.err
13155   rm -f conftest.er1
13156   cat conftest.err >&5
13157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13158   (exit $ac_status); } &&
13159          { ac_try='test -z "$ac_c_werror_flag"
13160                          || test ! -s conftest.err'
13161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13162   (eval $ac_try) 2>&5
13163   ac_status=$?
13164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13165   (exit $ac_status); }; } &&
13166          { ac_try='test -s conftest.$ac_objext'
13167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13168   (eval $ac_try) 2>&5
13169   ac_status=$?
13170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171   (exit $ac_status); }; }; then
13172   ac_cv_member_krb5_error_text_data=yes
13173 else
13174   echo "$as_me: failed program was:" >&5
13175 sed 's/^/| /' conftest.$ac_ext >&5
13176
13177 ac_cv_member_krb5_error_text_data=no
13178 fi
13179 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13180 fi
13181 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13182 fi
13183 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
13184 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
13185 if test $ac_cv_member_krb5_error_text_data = yes; then
13186
13187 cat >>confdefs.h <<_ACEOF
13188 #define HAVE_KRB5_ERROR_TEXT_DATA 1
13189 _ACEOF
13190
13191
13192 else
13193   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
13194 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
13195 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   cat >conftest.$ac_ext <<_ACEOF
13199 /* confdefs.h.  */
13200 _ACEOF
13201 cat confdefs.h >>conftest.$ac_ext
13202 cat >>conftest.$ac_ext <<_ACEOF
13203 /* end confdefs.h.  */
13204 #include <krb5.h>
13205
13206 int
13207 main ()
13208 {
13209 static krb5_error ac_aggr;
13210 if (ac_aggr.e_data)
13211 return 0;
13212   ;
13213   return 0;
13214 }
13215 _ACEOF
13216 rm -f conftest.$ac_objext
13217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13218   (eval $ac_compile) 2>conftest.er1
13219   ac_status=$?
13220   grep -v '^ *+' conftest.er1 >conftest.err
13221   rm -f conftest.er1
13222   cat conftest.err >&5
13223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13224   (exit $ac_status); } &&
13225          { ac_try='test -z "$ac_c_werror_flag"
13226                          || test ! -s conftest.err'
13227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13228   (eval $ac_try) 2>&5
13229   ac_status=$?
13230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13231   (exit $ac_status); }; } &&
13232          { ac_try='test -s conftest.$ac_objext'
13233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13234   (eval $ac_try) 2>&5
13235   ac_status=$?
13236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13237   (exit $ac_status); }; }; then
13238   ac_cv_member_krb5_error_e_data=yes
13239 else
13240   echo "$as_me: failed program was:" >&5
13241 sed 's/^/| /' conftest.$ac_ext >&5
13242
13243 cat >conftest.$ac_ext <<_ACEOF
13244 /* confdefs.h.  */
13245 _ACEOF
13246 cat confdefs.h >>conftest.$ac_ext
13247 cat >>conftest.$ac_ext <<_ACEOF
13248 /* end confdefs.h.  */
13249 #include <krb5.h>
13250
13251 int
13252 main ()
13253 {
13254 static krb5_error ac_aggr;
13255 if (sizeof ac_aggr.e_data)
13256 return 0;
13257   ;
13258   return 0;
13259 }
13260 _ACEOF
13261 rm -f conftest.$ac_objext
13262 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13263   (eval $ac_compile) 2>conftest.er1
13264   ac_status=$?
13265   grep -v '^ *+' conftest.er1 >conftest.err
13266   rm -f conftest.er1
13267   cat conftest.err >&5
13268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13269   (exit $ac_status); } &&
13270          { ac_try='test -z "$ac_c_werror_flag"
13271                          || test ! -s conftest.err'
13272   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13273   (eval $ac_try) 2>&5
13274   ac_status=$?
13275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276   (exit $ac_status); }; } &&
13277          { ac_try='test -s conftest.$ac_objext'
13278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13279   (eval $ac_try) 2>&5
13280   ac_status=$?
13281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13282   (exit $ac_status); }; }; then
13283   ac_cv_member_krb5_error_e_data=yes
13284 else
13285   echo "$as_me: failed program was:" >&5
13286 sed 's/^/| /' conftest.$ac_ext >&5
13287
13288 ac_cv_member_krb5_error_e_data=no
13289 fi
13290 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13291 fi
13292 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13293 fi
13294 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
13295 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
13296 if test $ac_cv_member_krb5_error_e_data = yes; then
13297
13298 cat >>confdefs.h <<_ACEOF
13299 #define HAVE_KRB5_ERROR_E_DATA 1
13300 _ACEOF
13301
13302
13303 else
13304   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
13305 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
13306    { (exit 1); exit 1; }; }
13307 fi
13308
13309 fi
13310
13311 fi
13312
13313 ##
13314 ## Functions, global variables
13315 ##
13316
13317 echo "$as_me:$LINENO: checking for int timezone" >&5
13318 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
13319 if test "${pgac_cv_var_int_timezone+set}" = set; then
13320   echo $ECHO_N "(cached) $ECHO_C" >&6
13321 else
13322   cat >conftest.$ac_ext <<_ACEOF
13323 /* confdefs.h.  */
13324 _ACEOF
13325 cat confdefs.h >>conftest.$ac_ext
13326 cat >>conftest.$ac_ext <<_ACEOF
13327 /* end confdefs.h.  */
13328 #include <time.h>
13329 int res;
13330 int
13331 main ()
13332 {
13333 #ifndef __CYGWIN__
13334 res = timezone / 60;
13335 #else
13336 res = _timezone / 60;
13337 #endif
13338   ;
13339   return 0;
13340 }
13341 _ACEOF
13342 rm -f conftest.$ac_objext conftest$ac_exeext
13343 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13344   (eval $ac_link) 2>conftest.er1
13345   ac_status=$?
13346   grep -v '^ *+' conftest.er1 >conftest.err
13347   rm -f conftest.er1
13348   cat conftest.err >&5
13349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13350   (exit $ac_status); } &&
13351          { ac_try='test -z "$ac_c_werror_flag"
13352                          || test ! -s conftest.err'
13353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13354   (eval $ac_try) 2>&5
13355   ac_status=$?
13356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13357   (exit $ac_status); }; } &&
13358          { ac_try='test -s conftest$ac_exeext'
13359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13360   (eval $ac_try) 2>&5
13361   ac_status=$?
13362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13363   (exit $ac_status); }; }; then
13364   pgac_cv_var_int_timezone=yes
13365 else
13366   echo "$as_me: failed program was:" >&5
13367 sed 's/^/| /' conftest.$ac_ext >&5
13368
13369 pgac_cv_var_int_timezone=no
13370 fi
13371 rm -f conftest.err conftest.$ac_objext \
13372       conftest$ac_exeext conftest.$ac_ext
13373 fi
13374 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
13375 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
13376 if test x"$pgac_cv_var_int_timezone" = xyes ; then
13377
13378 cat >>confdefs.h <<\_ACEOF
13379 #define HAVE_INT_TIMEZONE
13380 _ACEOF
13381
13382 fi
13383 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
13384 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
13385  if test "${ac_cv_func_accept_return+set}" = set; then
13386   echo $ECHO_N "(cached) $ECHO_C" >&6
13387 else
13388    if test "${ac_cv_func_accept_arg1+set}" = set; then
13389   echo $ECHO_N "(cached) $ECHO_C" >&6
13390 else
13391     if test "${ac_cv_func_accept_arg2+set}" = set; then
13392   echo $ECHO_N "(cached) $ECHO_C" >&6
13393 else
13394      if test "${ac_cv_func_accept_arg3+set}" = set; then
13395   echo $ECHO_N "(cached) $ECHO_C" >&6
13396 else
13397       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
13398       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
13399        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
13400         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
13401          cat >conftest.$ac_ext <<_ACEOF
13402 /* confdefs.h.  */
13403 _ACEOF
13404 cat confdefs.h >>conftest.$ac_ext
13405 cat >>conftest.$ac_ext <<_ACEOF
13406 /* end confdefs.h.  */
13407 #ifdef HAVE_SYS_TYPES_H
13408 #include <sys/types.h>
13409 #endif
13410 #ifdef HAVE_SYS_SOCKET_H
13411 #include <sys/socket.h>
13412 #endif
13413 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
13414 int
13415 main ()
13416 {
13417
13418   ;
13419   return 0;
13420 }
13421 _ACEOF
13422 rm -f conftest.$ac_objext
13423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13424   (eval $ac_compile) 2>conftest.er1
13425   ac_status=$?
13426   grep -v '^ *+' conftest.er1 >conftest.err
13427   rm -f conftest.er1
13428   cat conftest.err >&5
13429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13430   (exit $ac_status); } &&
13431          { ac_try='test -z "$ac_c_werror_flag"
13432                          || test ! -s conftest.err'
13433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13437   (exit $ac_status); }; } &&
13438          { ac_try='test -s conftest.$ac_objext'
13439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13440   (eval $ac_try) 2>&5
13441   ac_status=$?
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); }; }; then
13444   ac_not_found=no; break 4
13445 else
13446   echo "$as_me: failed program was:" >&5
13447 sed 's/^/| /' conftest.$ac_ext >&5
13448
13449 ac_not_found=yes
13450 fi
13451 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13452        done
13453       done
13454      done
13455     done
13456     if test "$ac_not_found" = yes; then
13457       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
13458 echo "$as_me: error: could not determine argument types" >&2;}
13459    { (exit 1); exit 1; }; }
13460     fi
13461     if test "$ac_cv_func_accept_arg3" = "void"; then
13462       ac_cv_func_accept_arg3=int
13463     fi
13464
13465 fi
13466
13467 fi
13468
13469 fi
13470
13471 fi
13472  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
13473 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
13474
13475 cat >>confdefs.h <<_ACEOF
13476 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
13477 _ACEOF
13478
13479
13480 cat >>confdefs.h <<_ACEOF
13481 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
13482 _ACEOF
13483
13484
13485 cat >>confdefs.h <<_ACEOF
13486 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
13487 _ACEOF
13488
13489
13490 cat >>confdefs.h <<_ACEOF
13491 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
13492 _ACEOF
13493
13494
13495 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
13496 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
13497 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500   cat >conftest.$ac_ext <<_ACEOF
13501 /* confdefs.h.  */
13502 _ACEOF
13503 cat confdefs.h >>conftest.$ac_ext
13504 cat >>conftest.$ac_ext <<_ACEOF
13505 /* end confdefs.h.  */
13506 #include <sys/time.h>
13507 int
13508 main ()
13509 {
13510 struct timeval *tp;
13511 struct timezone *tzp;
13512 gettimeofday(tp,tzp);
13513   ;
13514   return 0;
13515 }
13516 _ACEOF
13517 rm -f conftest.$ac_objext
13518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13519   (eval $ac_compile) 2>conftest.er1
13520   ac_status=$?
13521   grep -v '^ *+' conftest.er1 >conftest.err
13522   rm -f conftest.er1
13523   cat conftest.err >&5
13524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13525   (exit $ac_status); } &&
13526          { ac_try='test -z "$ac_c_werror_flag"
13527                          || test ! -s conftest.err'
13528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13529   (eval $ac_try) 2>&5
13530   ac_status=$?
13531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532   (exit $ac_status); }; } &&
13533          { ac_try='test -s conftest.$ac_objext'
13534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13535   (eval $ac_try) 2>&5
13536   ac_status=$?
13537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538   (exit $ac_status); }; }; then
13539   pgac_cv_func_gettimeofday_1arg=no
13540 else
13541   echo "$as_me: failed program was:" >&5
13542 sed 's/^/| /' conftest.$ac_ext >&5
13543
13544 pgac_cv_func_gettimeofday_1arg=yes
13545 fi
13546 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13547 fi
13548 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
13549 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
13550 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
13551
13552 cat >>confdefs.h <<\_ACEOF
13553 #define GETTIMEOFDAY_1ARG
13554 _ACEOF
13555
13556 fi
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
13580 do
13581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13582 echo "$as_me:$LINENO: checking for $ac_func" >&5
13583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13584 if eval "test \"\${$as_ac_var+set}\" = set"; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587   cat >conftest.$ac_ext <<_ACEOF
13588 /* confdefs.h.  */
13589 _ACEOF
13590 cat confdefs.h >>conftest.$ac_ext
13591 cat >>conftest.$ac_ext <<_ACEOF
13592 /* end confdefs.h.  */
13593 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13594    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13595 #define $ac_func innocuous_$ac_func
13596
13597 /* System header to define __stub macros and hopefully few prototypes,
13598     which can conflict with char $ac_func (); below.
13599     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13600     <limits.h> exists even on freestanding compilers.  */
13601
13602 #ifdef __STDC__
13603 # include <limits.h>
13604 #else
13605 # include <assert.h>
13606 #endif
13607
13608 #undef $ac_func
13609
13610 /* Override any gcc2 internal prototype to avoid an error.  */
13611 #ifdef __cplusplus
13612 extern "C"
13613 {
13614 #endif
13615 /* We use char because int might match the return type of a gcc2
13616    builtin and then its argument prototype would still apply.  */
13617 char $ac_func ();
13618 /* The GNU C library defines this for functions which it implements
13619     to always fail with ENOSYS.  Some functions are actually named
13620     something starting with __ and the normal name is an alias.  */
13621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13622 choke me
13623 #else
13624 char (*f) () = $ac_func;
13625 #endif
13626 #ifdef __cplusplus
13627 }
13628 #endif
13629
13630 int
13631 main ()
13632 {
13633 return f != $ac_func;
13634   ;
13635   return 0;
13636 }
13637 _ACEOF
13638 rm -f conftest.$ac_objext conftest$ac_exeext
13639 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13640   (eval $ac_link) 2>conftest.er1
13641   ac_status=$?
13642   grep -v '^ *+' conftest.er1 >conftest.err
13643   rm -f conftest.er1
13644   cat conftest.err >&5
13645   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -z "$ac_c_werror_flag"
13648                          || test ! -s conftest.err'
13649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13653   (exit $ac_status); }; } &&
13654          { ac_try='test -s conftest$ac_exeext'
13655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13656   (eval $ac_try) 2>&5
13657   ac_status=$?
13658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13659   (exit $ac_status); }; }; then
13660   eval "$as_ac_var=yes"
13661 else
13662   echo "$as_me: failed program was:" >&5
13663 sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 eval "$as_ac_var=no"
13666 fi
13667 rm -f conftest.err conftest.$ac_objext \
13668       conftest$ac_exeext conftest.$ac_ext
13669 fi
13670 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13671 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13672 if test `eval echo '${'$as_ac_var'}'` = yes; then
13673   cat >>confdefs.h <<_ACEOF
13674 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13675 _ACEOF
13676
13677 fi
13678 done
13679
13680
13681 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
13682 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
13683 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
13684   echo $ECHO_N "(cached) $ECHO_C" >&6
13685 else
13686   cat >conftest.$ac_ext <<_ACEOF
13687 /* confdefs.h.  */
13688 _ACEOF
13689 cat confdefs.h >>conftest.$ac_ext
13690 cat >>conftest.$ac_ext <<_ACEOF
13691 /* end confdefs.h.  */
13692 #include <unistd.h>
13693
13694 int
13695 main ()
13696 {
13697 #ifndef fdatasync
13698   char *p = (char *) fdatasync;
13699 #endif
13700
13701   ;
13702   return 0;
13703 }
13704 _ACEOF
13705 rm -f conftest.$ac_objext
13706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13707   (eval $ac_compile) 2>conftest.er1
13708   ac_status=$?
13709   grep -v '^ *+' conftest.er1 >conftest.err
13710   rm -f conftest.er1
13711   cat conftest.err >&5
13712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713   (exit $ac_status); } &&
13714          { ac_try='test -z "$ac_c_werror_flag"
13715                          || test ! -s conftest.err'
13716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13717   (eval $ac_try) 2>&5
13718   ac_status=$?
13719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720   (exit $ac_status); }; } &&
13721          { ac_try='test -s conftest.$ac_objext'
13722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13723   (eval $ac_try) 2>&5
13724   ac_status=$?
13725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13726   (exit $ac_status); }; }; then
13727   ac_cv_have_decl_fdatasync=yes
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 sed 's/^/| /' conftest.$ac_ext >&5
13731
13732 ac_cv_have_decl_fdatasync=no
13733 fi
13734 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13735 fi
13736 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
13737 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
13738 if test $ac_cv_have_decl_fdatasync = yes; then
13739
13740 cat >>confdefs.h <<_ACEOF
13741 #define HAVE_DECL_FDATASYNC 1
13742 _ACEOF
13743
13744
13745 else
13746   cat >>confdefs.h <<_ACEOF
13747 #define HAVE_DECL_FDATASYNC 0
13748 _ACEOF
13749
13750
13751 fi
13752
13753
13754
13755 HAVE_IPV6=no
13756 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
13757 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
13758 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
13759   echo $ECHO_N "(cached) $ECHO_C" >&6
13760 else
13761   cat >conftest.$ac_ext <<_ACEOF
13762 /* confdefs.h.  */
13763 _ACEOF
13764 cat confdefs.h >>conftest.$ac_ext
13765 cat >>conftest.$ac_ext <<_ACEOF
13766 /* end confdefs.h.  */
13767 $ac_includes_default
13768 #include <netinet/in.h>
13769
13770 int
13771 main ()
13772 {
13773 if ((struct sockaddr_in6 *) 0)
13774   return 0;
13775 if (sizeof (struct sockaddr_in6))
13776   return 0;
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f conftest.$ac_objext
13782 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>conftest.er1
13784   ac_status=$?
13785   grep -v '^ *+' conftest.er1 >conftest.err
13786   rm -f conftest.er1
13787   cat conftest.err >&5
13788   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13789   (exit $ac_status); } &&
13790          { ac_try='test -z "$ac_c_werror_flag"
13791                          || test ! -s conftest.err'
13792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796   (exit $ac_status); }; } &&
13797          { ac_try='test -s conftest.$ac_objext'
13798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13799   (eval $ac_try) 2>&5
13800   ac_status=$?
13801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802   (exit $ac_status); }; }; then
13803   ac_cv_type_struct_sockaddr_in6=yes
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 sed 's/^/| /' conftest.$ac_ext >&5
13807
13808 ac_cv_type_struct_sockaddr_in6=no
13809 fi
13810 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13811 fi
13812 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
13813 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
13814 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
13815
13816 cat >>confdefs.h <<\_ACEOF
13817 #define HAVE_IPV6 1
13818 _ACEOF
13819
13820          HAVE_IPV6=yes
13821 fi
13822
13823
13824
13825 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
13826 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
13827 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
13828   echo $ECHO_N "(cached) $ECHO_C" >&6
13829 else
13830   cat >conftest.$ac_ext <<_ACEOF
13831 /* confdefs.h.  */
13832 _ACEOF
13833 cat confdefs.h >>conftest.$ac_ext
13834 cat >>conftest.$ac_ext <<_ACEOF
13835 /* end confdefs.h.  */
13836 #include <machine/vmparam.h>
13837 #include <sys/exec.h>
13838
13839 int
13840 main ()
13841 {
13842 PS_STRINGS->ps_nargvstr = 1;
13843 PS_STRINGS->ps_argvstr = "foo";
13844   ;
13845   return 0;
13846 }
13847 _ACEOF
13848 rm -f conftest.$ac_objext conftest$ac_exeext
13849 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13850   (eval $ac_link) 2>conftest.er1
13851   ac_status=$?
13852   grep -v '^ *+' conftest.er1 >conftest.err
13853   rm -f conftest.er1
13854   cat conftest.err >&5
13855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856   (exit $ac_status); } &&
13857          { ac_try='test -z "$ac_c_werror_flag"
13858                          || test ! -s conftest.err'
13859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13860   (eval $ac_try) 2>&5
13861   ac_status=$?
13862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13863   (exit $ac_status); }; } &&
13864          { ac_try='test -s conftest$ac_exeext'
13865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13866   (eval $ac_try) 2>&5
13867   ac_status=$?
13868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13869   (exit $ac_status); }; }; then
13870   pgac_cv_var_PS_STRINGS=yes
13871 else
13872   echo "$as_me: failed program was:" >&5
13873 sed 's/^/| /' conftest.$ac_ext >&5
13874
13875 pgac_cv_var_PS_STRINGS=no
13876 fi
13877 rm -f conftest.err conftest.$ac_objext \
13878       conftest$ac_exeext conftest.$ac_ext
13879 fi
13880 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
13881 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
13882 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13883
13884 cat >>confdefs.h <<\_ACEOF
13885 #define HAVE_PS_STRINGS
13886 _ACEOF
13887
13888 fi
13889
13890
13891 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13892 # is missing.  Yes, there are machines that have only one.  We may
13893 # also decide to use snprintf.c if snprintf() is present but does not
13894 # have all the features we need --- see below.
13895
13896 pgac_need_repl_snprintf=no
13897
13898 for ac_func in snprintf
13899 do
13900 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13901 echo "$as_me:$LINENO: checking for $ac_func" >&5
13902 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13903 if eval "test \"\${$as_ac_var+set}\" = set"; then
13904   echo $ECHO_N "(cached) $ECHO_C" >&6
13905 else
13906   cat >conftest.$ac_ext <<_ACEOF
13907 /* confdefs.h.  */
13908 _ACEOF
13909 cat confdefs.h >>conftest.$ac_ext
13910 cat >>conftest.$ac_ext <<_ACEOF
13911 /* end confdefs.h.  */
13912 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13913    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13914 #define $ac_func innocuous_$ac_func
13915
13916 /* System header to define __stub macros and hopefully few prototypes,
13917     which can conflict with char $ac_func (); below.
13918     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13919     <limits.h> exists even on freestanding compilers.  */
13920
13921 #ifdef __STDC__
13922 # include <limits.h>
13923 #else
13924 # include <assert.h>
13925 #endif
13926
13927 #undef $ac_func
13928
13929 /* Override any gcc2 internal prototype to avoid an error.  */
13930 #ifdef __cplusplus
13931 extern "C"
13932 {
13933 #endif
13934 /* We use char because int might match the return type of a gcc2
13935    builtin and then its argument prototype would still apply.  */
13936 char $ac_func ();
13937 /* The GNU C library defines this for functions which it implements
13938     to always fail with ENOSYS.  Some functions are actually named
13939     something starting with __ and the normal name is an alias.  */
13940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13941 choke me
13942 #else
13943 char (*f) () = $ac_func;
13944 #endif
13945 #ifdef __cplusplus
13946 }
13947 #endif
13948
13949 int
13950 main ()
13951 {
13952 return f != $ac_func;
13953   ;
13954   return 0;
13955 }
13956 _ACEOF
13957 rm -f conftest.$ac_objext conftest$ac_exeext
13958 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13959   (eval $ac_link) 2>conftest.er1
13960   ac_status=$?
13961   grep -v '^ *+' conftest.er1 >conftest.err
13962   rm -f conftest.er1
13963   cat conftest.err >&5
13964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13965   (exit $ac_status); } &&
13966          { ac_try='test -z "$ac_c_werror_flag"
13967                          || test ! -s conftest.err'
13968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13969   (eval $ac_try) 2>&5
13970   ac_status=$?
13971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13972   (exit $ac_status); }; } &&
13973          { ac_try='test -s conftest$ac_exeext'
13974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   eval "$as_ac_var=yes"
13980 else
13981   echo "$as_me: failed program was:" >&5
13982 sed 's/^/| /' conftest.$ac_ext >&5
13983
13984 eval "$as_ac_var=no"
13985 fi
13986 rm -f conftest.err conftest.$ac_objext \
13987       conftest$ac_exeext conftest.$ac_ext
13988 fi
13989 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13990 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13991 if test `eval echo '${'$as_ac_var'}'` = yes; then
13992   cat >>confdefs.h <<_ACEOF
13993 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13994 _ACEOF
13995
13996 else
13997   pgac_need_repl_snprintf=yes
13998 fi
13999 done
14000
14001
14002 for ac_func in vsnprintf
14003 do
14004 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14005 echo "$as_me:$LINENO: checking for $ac_func" >&5
14006 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14007 if eval "test \"\${$as_ac_var+set}\" = set"; then
14008   echo $ECHO_N "(cached) $ECHO_C" >&6
14009 else
14010   cat >conftest.$ac_ext <<_ACEOF
14011 /* confdefs.h.  */
14012 _ACEOF
14013 cat confdefs.h >>conftest.$ac_ext
14014 cat >>conftest.$ac_ext <<_ACEOF
14015 /* end confdefs.h.  */
14016 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14017    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14018 #define $ac_func innocuous_$ac_func
14019
14020 /* System header to define __stub macros and hopefully few prototypes,
14021     which can conflict with char $ac_func (); below.
14022     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14023     <limits.h> exists even on freestanding compilers.  */
14024
14025 #ifdef __STDC__
14026 # include <limits.h>
14027 #else
14028 # include <assert.h>
14029 #endif
14030
14031 #undef $ac_func
14032
14033 /* Override any gcc2 internal prototype to avoid an error.  */
14034 #ifdef __cplusplus
14035 extern "C"
14036 {
14037 #endif
14038 /* We use char because int might match the return type of a gcc2
14039    builtin and then its argument prototype would still apply.  */
14040 char $ac_func ();
14041 /* The GNU C library defines this for functions which it implements
14042     to always fail with ENOSYS.  Some functions are actually named
14043     something starting with __ and the normal name is an alias.  */
14044 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14045 choke me
14046 #else
14047 char (*f) () = $ac_func;
14048 #endif
14049 #ifdef __cplusplus
14050 }
14051 #endif
14052
14053 int
14054 main ()
14055 {
14056 return f != $ac_func;
14057   ;
14058   return 0;
14059 }
14060 _ACEOF
14061 rm -f conftest.$ac_objext conftest$ac_exeext
14062 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14063   (eval $ac_link) 2>conftest.er1
14064   ac_status=$?
14065   grep -v '^ *+' conftest.er1 >conftest.err
14066   rm -f conftest.er1
14067   cat conftest.err >&5
14068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14069   (exit $ac_status); } &&
14070          { ac_try='test -z "$ac_c_werror_flag"
14071                          || test ! -s conftest.err'
14072   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14076   (exit $ac_status); }; } &&
14077          { ac_try='test -s conftest$ac_exeext'
14078   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14079   (eval $ac_try) 2>&5
14080   ac_status=$?
14081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14082   (exit $ac_status); }; }; then
14083   eval "$as_ac_var=yes"
14084 else
14085   echo "$as_me: failed program was:" >&5
14086 sed 's/^/| /' conftest.$ac_ext >&5
14087
14088 eval "$as_ac_var=no"
14089 fi
14090 rm -f conftest.err conftest.$ac_objext \
14091       conftest$ac_exeext conftest.$ac_ext
14092 fi
14093 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14094 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14095 if test `eval echo '${'$as_ac_var'}'` = yes; then
14096   cat >>confdefs.h <<_ACEOF
14097 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14098 _ACEOF
14099
14100 else
14101   pgac_need_repl_snprintf=yes
14102 fi
14103 done
14104
14105
14106
14107 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
14108 # include/c.h will provide declarations.  Note this is a separate test
14109 # from whether the functions exist in the C library --- there are
14110 # systems that have the functions but don't bother to declare them :-(
14111
14112 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
14113 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
14114 if test "${ac_cv_have_decl_snprintf+set}" = set; then
14115   echo $ECHO_N "(cached) $ECHO_C" >&6
14116 else
14117   cat >conftest.$ac_ext <<_ACEOF
14118 /* confdefs.h.  */
14119 _ACEOF
14120 cat confdefs.h >>conftest.$ac_ext
14121 cat >>conftest.$ac_ext <<_ACEOF
14122 /* end confdefs.h.  */
14123 $ac_includes_default
14124 int
14125 main ()
14126 {
14127 #ifndef snprintf
14128   char *p = (char *) snprintf;
14129 #endif
14130
14131   ;
14132   return 0;
14133 }
14134 _ACEOF
14135 rm -f conftest.$ac_objext
14136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14137   (eval $ac_compile) 2>conftest.er1
14138   ac_status=$?
14139   grep -v '^ *+' conftest.er1 >conftest.err
14140   rm -f conftest.er1
14141   cat conftest.err >&5
14142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14143   (exit $ac_status); } &&
14144          { ac_try='test -z "$ac_c_werror_flag"
14145                          || test ! -s conftest.err'
14146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147   (eval $ac_try) 2>&5
14148   ac_status=$?
14149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150   (exit $ac_status); }; } &&
14151          { ac_try='test -s conftest.$ac_objext'
14152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14153   (eval $ac_try) 2>&5
14154   ac_status=$?
14155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14156   (exit $ac_status); }; }; then
14157   ac_cv_have_decl_snprintf=yes
14158 else
14159   echo "$as_me: failed program was:" >&5
14160 sed 's/^/| /' conftest.$ac_ext >&5
14161
14162 ac_cv_have_decl_snprintf=no
14163 fi
14164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14165 fi
14166 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
14167 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
14168 if test $ac_cv_have_decl_snprintf = yes; then
14169
14170 cat >>confdefs.h <<_ACEOF
14171 #define HAVE_DECL_SNPRINTF 1
14172 _ACEOF
14173
14174
14175 else
14176   cat >>confdefs.h <<_ACEOF
14177 #define HAVE_DECL_SNPRINTF 0
14178 _ACEOF
14179
14180
14181 fi
14182 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
14183 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
14184 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
14185   echo $ECHO_N "(cached) $ECHO_C" >&6
14186 else
14187   cat >conftest.$ac_ext <<_ACEOF
14188 /* confdefs.h.  */
14189 _ACEOF
14190 cat confdefs.h >>conftest.$ac_ext
14191 cat >>conftest.$ac_ext <<_ACEOF
14192 /* end confdefs.h.  */
14193 $ac_includes_default
14194 int
14195 main ()
14196 {
14197 #ifndef vsnprintf
14198   char *p = (char *) vsnprintf;
14199 #endif
14200
14201   ;
14202   return 0;
14203 }
14204 _ACEOF
14205 rm -f conftest.$ac_objext
14206 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14207   (eval $ac_compile) 2>conftest.er1
14208   ac_status=$?
14209   grep -v '^ *+' conftest.er1 >conftest.err
14210   rm -f conftest.er1
14211   cat conftest.err >&5
14212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213   (exit $ac_status); } &&
14214          { ac_try='test -z "$ac_c_werror_flag"
14215                          || test ! -s conftest.err'
14216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14217   (eval $ac_try) 2>&5
14218   ac_status=$?
14219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14220   (exit $ac_status); }; } &&
14221          { ac_try='test -s conftest.$ac_objext'
14222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14223   (eval $ac_try) 2>&5
14224   ac_status=$?
14225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14226   (exit $ac_status); }; }; then
14227   ac_cv_have_decl_vsnprintf=yes
14228 else
14229   echo "$as_me: failed program was:" >&5
14230 sed 's/^/| /' conftest.$ac_ext >&5
14231
14232 ac_cv_have_decl_vsnprintf=no
14233 fi
14234 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14235 fi
14236 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
14237 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
14238 if test $ac_cv_have_decl_vsnprintf = yes; then
14239
14240 cat >>confdefs.h <<_ACEOF
14241 #define HAVE_DECL_VSNPRINTF 1
14242 _ACEOF
14243
14244
14245 else
14246   cat >>confdefs.h <<_ACEOF
14247 #define HAVE_DECL_VSNPRINTF 0
14248 _ACEOF
14249
14250
14251 fi
14252
14253
14254
14255
14256 # do this one the hard way in case isinf() is a macro
14257 echo "$as_me:$LINENO: checking for isinf" >&5
14258 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
14259 if test "${ac_cv_func_isinf+set}" = set; then
14260   echo $ECHO_N "(cached) $ECHO_C" >&6
14261 else
14262   cat >conftest.$ac_ext <<_ACEOF
14263 /* confdefs.h.  */
14264 _ACEOF
14265 cat confdefs.h >>conftest.$ac_ext
14266 cat >>conftest.$ac_ext <<_ACEOF
14267 /* end confdefs.h.  */
14268 #include <math.h>
14269
14270 int
14271 main ()
14272 {
14273 double x = 0.0; int res = isinf(x);
14274   ;
14275   return 0;
14276 }
14277 _ACEOF
14278 rm -f conftest.$ac_objext conftest$ac_exeext
14279 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14280   (eval $ac_link) 2>conftest.er1
14281   ac_status=$?
14282   grep -v '^ *+' conftest.er1 >conftest.err
14283   rm -f conftest.er1
14284   cat conftest.err >&5
14285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286   (exit $ac_status); } &&
14287          { ac_try='test -z "$ac_c_werror_flag"
14288                          || test ! -s conftest.err'
14289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14290   (eval $ac_try) 2>&5
14291   ac_status=$?
14292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14293   (exit $ac_status); }; } &&
14294          { ac_try='test -s conftest$ac_exeext'
14295   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14299   (exit $ac_status); }; }; then
14300   ac_cv_func_isinf=yes
14301 else
14302   echo "$as_me: failed program was:" >&5
14303 sed 's/^/| /' conftest.$ac_ext >&5
14304
14305 ac_cv_func_isinf=no
14306 fi
14307 rm -f conftest.err conftest.$ac_objext \
14308       conftest$ac_exeext conftest.$ac_ext
14309 fi
14310 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
14311 echo "${ECHO_T}$ac_cv_func_isinf" >&6
14312
14313 if test $ac_cv_func_isinf = yes ; then
14314
14315 cat >>confdefs.h <<\_ACEOF
14316 #define HAVE_ISINF 1
14317 _ACEOF
14318
14319 else
14320   case $LIBOBJS in
14321     "isinf.$ac_objext"   | \
14322   *" isinf.$ac_objext"   | \
14323     "isinf.$ac_objext "* | \
14324   *" isinf.$ac_objext "* ) ;;
14325   *) LIBOBJS="$LIBOBJS isinf.$ac_objext" ;;
14326 esac
14327
14328   # Look for a way to implement a substitute for isinf()
14329
14330
14331
14332
14333 for ac_func in fpclass fp_class fp_class_d class
14334 do
14335 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14336 echo "$as_me:$LINENO: checking for $ac_func" >&5
14337 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14338 if eval "test \"\${$as_ac_var+set}\" = set"; then
14339   echo $ECHO_N "(cached) $ECHO_C" >&6
14340 else
14341   cat >conftest.$ac_ext <<_ACEOF
14342 /* confdefs.h.  */
14343 _ACEOF
14344 cat confdefs.h >>conftest.$ac_ext
14345 cat >>conftest.$ac_ext <<_ACEOF
14346 /* end confdefs.h.  */
14347 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14348    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14349 #define $ac_func innocuous_$ac_func
14350
14351 /* System header to define __stub macros and hopefully few prototypes,
14352     which can conflict with char $ac_func (); below.
14353     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14354     <limits.h> exists even on freestanding compilers.  */
14355
14356 #ifdef __STDC__
14357 # include <limits.h>
14358 #else
14359 # include <assert.h>
14360 #endif
14361
14362 #undef $ac_func
14363
14364 /* Override any gcc2 internal prototype to avoid an error.  */
14365 #ifdef __cplusplus
14366 extern "C"
14367 {
14368 #endif
14369 /* We use char because int might match the return type of a gcc2
14370    builtin and then its argument prototype would still apply.  */
14371 char $ac_func ();
14372 /* The GNU C library defines this for functions which it implements
14373     to always fail with ENOSYS.  Some functions are actually named
14374     something starting with __ and the normal name is an alias.  */
14375 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14376 choke me
14377 #else
14378 char (*f) () = $ac_func;
14379 #endif
14380 #ifdef __cplusplus
14381 }
14382 #endif
14383
14384 int
14385 main ()
14386 {
14387 return f != $ac_func;
14388   ;
14389   return 0;
14390 }
14391 _ACEOF
14392 rm -f conftest.$ac_objext conftest$ac_exeext
14393 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14394   (eval $ac_link) 2>conftest.er1
14395   ac_status=$?
14396   grep -v '^ *+' conftest.er1 >conftest.err
14397   rm -f conftest.er1
14398   cat conftest.err >&5
14399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14400   (exit $ac_status); } &&
14401          { ac_try='test -z "$ac_c_werror_flag"
14402                          || test ! -s conftest.err'
14403   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14404   (eval $ac_try) 2>&5
14405   ac_status=$?
14406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14407   (exit $ac_status); }; } &&
14408          { ac_try='test -s conftest$ac_exeext'
14409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14410   (eval $ac_try) 2>&5
14411   ac_status=$?
14412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14413   (exit $ac_status); }; }; then
14414   eval "$as_ac_var=yes"
14415 else
14416   echo "$as_me: failed program was:" >&5
14417 sed 's/^/| /' conftest.$ac_ext >&5
14418
14419 eval "$as_ac_var=no"
14420 fi
14421 rm -f conftest.err conftest.$ac_objext \
14422       conftest$ac_exeext conftest.$ac_ext
14423 fi
14424 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14425 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14426 if test `eval echo '${'$as_ac_var'}'` = yes; then
14427   cat >>confdefs.h <<_ACEOF
14428 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14429 _ACEOF
14430  break
14431 fi
14432 done
14433
14434 fi
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
14450 do
14451 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14452 echo "$as_me:$LINENO: checking for $ac_func" >&5
14453 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14454 if eval "test \"\${$as_ac_var+set}\" = set"; then
14455   echo $ECHO_N "(cached) $ECHO_C" >&6
14456 else
14457   cat >conftest.$ac_ext <<_ACEOF
14458 /* confdefs.h.  */
14459 _ACEOF
14460 cat confdefs.h >>conftest.$ac_ext
14461 cat >>conftest.$ac_ext <<_ACEOF
14462 /* end confdefs.h.  */
14463 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14464    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14465 #define $ac_func innocuous_$ac_func
14466
14467 /* System header to define __stub macros and hopefully few prototypes,
14468     which can conflict with char $ac_func (); below.
14469     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14470     <limits.h> exists even on freestanding compilers.  */
14471
14472 #ifdef __STDC__
14473 # include <limits.h>
14474 #else
14475 # include <assert.h>
14476 #endif
14477
14478 #undef $ac_func
14479
14480 /* Override any gcc2 internal prototype to avoid an error.  */
14481 #ifdef __cplusplus
14482 extern "C"
14483 {
14484 #endif
14485 /* We use char because int might match the return type of a gcc2
14486    builtin and then its argument prototype would still apply.  */
14487 char $ac_func ();
14488 /* The GNU C library defines this for functions which it implements
14489     to always fail with ENOSYS.  Some functions are actually named
14490     something starting with __ and the normal name is an alias.  */
14491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14492 choke me
14493 #else
14494 char (*f) () = $ac_func;
14495 #endif
14496 #ifdef __cplusplus
14497 }
14498 #endif
14499
14500 int
14501 main ()
14502 {
14503 return f != $ac_func;
14504   ;
14505   return 0;
14506 }
14507 _ACEOF
14508 rm -f conftest.$ac_objext conftest$ac_exeext
14509 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14510   (eval $ac_link) 2>conftest.er1
14511   ac_status=$?
14512   grep -v '^ *+' conftest.er1 >conftest.err
14513   rm -f conftest.er1
14514   cat conftest.err >&5
14515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -z "$ac_c_werror_flag"
14518                          || test ! -s conftest.err'
14519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14520   (eval $ac_try) 2>&5
14521   ac_status=$?
14522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14523   (exit $ac_status); }; } &&
14524          { ac_try='test -s conftest$ac_exeext'
14525   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14526   (eval $ac_try) 2>&5
14527   ac_status=$?
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); }; }; then
14530   eval "$as_ac_var=yes"
14531 else
14532   echo "$as_me: failed program was:" >&5
14533 sed 's/^/| /' conftest.$ac_ext >&5
14534
14535 eval "$as_ac_var=no"
14536 fi
14537 rm -f conftest.err conftest.$ac_objext \
14538       conftest$ac_exeext conftest.$ac_ext
14539 fi
14540 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14541 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14542 if test `eval echo '${'$as_ac_var'}'` = yes; then
14543   cat >>confdefs.h <<_ACEOF
14544 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14545 _ACEOF
14546
14547 else
14548   case $LIBOBJS in
14549     "$ac_func.$ac_objext"   | \
14550   *" $ac_func.$ac_objext"   | \
14551     "$ac_func.$ac_objext "* | \
14552   *" $ac_func.$ac_objext "* ) ;;
14553   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14554 esac
14555
14556 fi
14557 done
14558
14559
14560
14561 # System's version of getaddrinfo(), if any, may be used only if we found
14562 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
14563 # (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
14564 # versions of getaddrinfo don't follow normal C call protocol.  This is OK
14565 # because we want to use our own getaddrinfo.c on Windows anyway.)
14566 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
14567
14568 for ac_func in getaddrinfo
14569 do
14570 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14571 echo "$as_me:$LINENO: checking for $ac_func" >&5
14572 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14573 if eval "test \"\${$as_ac_var+set}\" = set"; then
14574   echo $ECHO_N "(cached) $ECHO_C" >&6
14575 else
14576   cat >conftest.$ac_ext <<_ACEOF
14577 /* confdefs.h.  */
14578 _ACEOF
14579 cat confdefs.h >>conftest.$ac_ext
14580 cat >>conftest.$ac_ext <<_ACEOF
14581 /* end confdefs.h.  */
14582 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14583    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14584 #define $ac_func innocuous_$ac_func
14585
14586 /* System header to define __stub macros and hopefully few prototypes,
14587     which can conflict with char $ac_func (); below.
14588     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14589     <limits.h> exists even on freestanding compilers.  */
14590
14591 #ifdef __STDC__
14592 # include <limits.h>
14593 #else
14594 # include <assert.h>
14595 #endif
14596
14597 #undef $ac_func
14598
14599 /* Override any gcc2 internal prototype to avoid an error.  */
14600 #ifdef __cplusplus
14601 extern "C"
14602 {
14603 #endif
14604 /* We use char because int might match the return type of a gcc2
14605    builtin and then its argument prototype would still apply.  */
14606 char $ac_func ();
14607 /* The GNU C library defines this for functions which it implements
14608     to always fail with ENOSYS.  Some functions are actually named
14609     something starting with __ and the normal name is an alias.  */
14610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14611 choke me
14612 #else
14613 char (*f) () = $ac_func;
14614 #endif
14615 #ifdef __cplusplus
14616 }
14617 #endif
14618
14619 int
14620 main ()
14621 {
14622 return f != $ac_func;
14623   ;
14624   return 0;
14625 }
14626 _ACEOF
14627 rm -f conftest.$ac_objext conftest$ac_exeext
14628 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14629   (eval $ac_link) 2>conftest.er1
14630   ac_status=$?
14631   grep -v '^ *+' conftest.er1 >conftest.err
14632   rm -f conftest.er1
14633   cat conftest.err >&5
14634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14635   (exit $ac_status); } &&
14636          { ac_try='test -z "$ac_c_werror_flag"
14637                          || test ! -s conftest.err'
14638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14639   (eval $ac_try) 2>&5
14640   ac_status=$?
14641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14642   (exit $ac_status); }; } &&
14643          { ac_try='test -s conftest$ac_exeext'
14644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14645   (eval $ac_try) 2>&5
14646   ac_status=$?
14647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14648   (exit $ac_status); }; }; then
14649   eval "$as_ac_var=yes"
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 sed 's/^/| /' conftest.$ac_ext >&5
14653
14654 eval "$as_ac_var=no"
14655 fi
14656 rm -f conftest.err conftest.$ac_objext \
14657       conftest$ac_exeext conftest.$ac_ext
14658 fi
14659 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14660 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14661 if test `eval echo '${'$as_ac_var'}'` = yes; then
14662   cat >>confdefs.h <<_ACEOF
14663 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14664 _ACEOF
14665
14666 else
14667   case $LIBOBJS in
14668     "$ac_func.$ac_objext"   | \
14669   *" $ac_func.$ac_objext"   | \
14670     "$ac_func.$ac_objext "* | \
14671   *" $ac_func.$ac_objext "* ) ;;
14672   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14673 esac
14674
14675 fi
14676 done
14677
14678
14679 else
14680   case $LIBOBJS in
14681     "getaddrinfo.$ac_objext"   | \
14682   *" getaddrinfo.$ac_objext"   | \
14683     "getaddrinfo.$ac_objext "* | \
14684   *" getaddrinfo.$ac_objext "* ) ;;
14685   *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" ;;
14686 esac
14687
14688 fi
14689
14690 # similarly, use system's getopt_long() only if system provides struct option.
14691 if test x"$ac_cv_type_struct_option" = xyes ; then
14692
14693 for ac_func in getopt_long
14694 do
14695 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14696 echo "$as_me:$LINENO: checking for $ac_func" >&5
14697 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14698 if eval "test \"\${$as_ac_var+set}\" = set"; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   cat >conftest.$ac_ext <<_ACEOF
14702 /* confdefs.h.  */
14703 _ACEOF
14704 cat confdefs.h >>conftest.$ac_ext
14705 cat >>conftest.$ac_ext <<_ACEOF
14706 /* end confdefs.h.  */
14707 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14708    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14709 #define $ac_func innocuous_$ac_func
14710
14711 /* System header to define __stub macros and hopefully few prototypes,
14712     which can conflict with char $ac_func (); below.
14713     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14714     <limits.h> exists even on freestanding compilers.  */
14715
14716 #ifdef __STDC__
14717 # include <limits.h>
14718 #else
14719 # include <assert.h>
14720 #endif
14721
14722 #undef $ac_func
14723
14724 /* Override any gcc2 internal prototype to avoid an error.  */
14725 #ifdef __cplusplus
14726 extern "C"
14727 {
14728 #endif
14729 /* We use char because int might match the return type of a gcc2
14730    builtin and then its argument prototype would still apply.  */
14731 char $ac_func ();
14732 /* The GNU C library defines this for functions which it implements
14733     to always fail with ENOSYS.  Some functions are actually named
14734     something starting with __ and the normal name is an alias.  */
14735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14736 choke me
14737 #else
14738 char (*f) () = $ac_func;
14739 #endif
14740 #ifdef __cplusplus
14741 }
14742 #endif
14743
14744 int
14745 main ()
14746 {
14747 return f != $ac_func;
14748   ;
14749   return 0;
14750 }
14751 _ACEOF
14752 rm -f conftest.$ac_objext conftest$ac_exeext
14753 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14754   (eval $ac_link) 2>conftest.er1
14755   ac_status=$?
14756   grep -v '^ *+' conftest.er1 >conftest.err
14757   rm -f conftest.er1
14758   cat conftest.err >&5
14759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14760   (exit $ac_status); } &&
14761          { ac_try='test -z "$ac_c_werror_flag"
14762                          || test ! -s conftest.err'
14763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14764   (eval $ac_try) 2>&5
14765   ac_status=$?
14766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14767   (exit $ac_status); }; } &&
14768          { ac_try='test -s conftest$ac_exeext'
14769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14770   (eval $ac_try) 2>&5
14771   ac_status=$?
14772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14773   (exit $ac_status); }; }; then
14774   eval "$as_ac_var=yes"
14775 else
14776   echo "$as_me: failed program was:" >&5
14777 sed 's/^/| /' conftest.$ac_ext >&5
14778
14779 eval "$as_ac_var=no"
14780 fi
14781 rm -f conftest.err conftest.$ac_objext \
14782       conftest$ac_exeext conftest.$ac_ext
14783 fi
14784 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14785 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14786 if test `eval echo '${'$as_ac_var'}'` = yes; then
14787   cat >>confdefs.h <<_ACEOF
14788 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14789 _ACEOF
14790
14791 else
14792   case $LIBOBJS in
14793     "$ac_func.$ac_objext"   | \
14794   *" $ac_func.$ac_objext"   | \
14795     "$ac_func.$ac_objext "* | \
14796   *" $ac_func.$ac_objext "* ) ;;
14797   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14798 esac
14799
14800 fi
14801 done
14802
14803
14804 else
14805   case $LIBOBJS in
14806     "getopt_long.$ac_objext"   | \
14807   *" getopt_long.$ac_objext"   | \
14808     "getopt_long.$ac_objext "* | \
14809   *" getopt_long.$ac_objext "* ) ;;
14810   *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;;
14811 esac
14812
14813 fi
14814
14815 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
14816 # We override the previous test that said fseeko/ftello didn't exist
14817 # OS tests are also done in include/c.h and port/fseeko.c
14818 case $host_os in bsdi*|netbsd*)
14819 ac_cv_func_fseeko=yes
14820 esac
14821
14822 # Solaris has a very slow qsort in certain cases, so we replace it.
14823 if test "$PORTNAME" = "solaris"; then
14824 case $LIBOBJS in
14825     "qsort.$ac_objext"   | \
14826   *" qsort.$ac_objext"   | \
14827     "qsort.$ac_objext "* | \
14828   *" qsort.$ac_objext "* ) ;;
14829   *) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
14830 esac
14831
14832 fi
14833
14834 # Win32 support
14835 if test "$PORTNAME" = "win32"; then
14836 case $LIBOBJS in
14837     "gettimeofday.$ac_objext"   | \
14838   *" gettimeofday.$ac_objext"   | \
14839     "gettimeofday.$ac_objext "* | \
14840   *" gettimeofday.$ac_objext "* ) ;;
14841   *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
14842 esac
14843
14844 case $LIBOBJS in
14845     "kill.$ac_objext"   | \
14846   *" kill.$ac_objext"   | \
14847     "kill.$ac_objext "* | \
14848   *" kill.$ac_objext "* ) ;;
14849   *) LIBOBJS="$LIBOBJS kill.$ac_objext" ;;
14850 esac
14851
14852 case $LIBOBJS in
14853     "open.$ac_objext"   | \
14854   *" open.$ac_objext"   | \
14855     "open.$ac_objext "* | \
14856   *" open.$ac_objext "* ) ;;
14857   *) LIBOBJS="$LIBOBJS open.$ac_objext" ;;
14858 esac
14859
14860 case $LIBOBJS in
14861     "rand.$ac_objext"   | \
14862   *" rand.$ac_objext"   | \
14863     "rand.$ac_objext "* | \
14864   *" rand.$ac_objext "* ) ;;
14865   *) LIBOBJS="$LIBOBJS rand.$ac_objext" ;;
14866 esac
14867
14868
14869 cat >>confdefs.h <<\_ACEOF
14870 #define HAVE_SYMLINK 1
14871 _ACEOF
14872
14873 fi
14874
14875 if test "$with_readline" = yes; then
14876   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
14877 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
14878 cat >conftest.$ac_ext <<_ACEOF
14879 /* confdefs.h.  */
14880 _ACEOF
14881 cat confdefs.h >>conftest.$ac_ext
14882 cat >>conftest.$ac_ext <<_ACEOF
14883 /* end confdefs.h.  */
14884 #include <stdio.h>
14885 #ifdef HAVE_READLINE_READLINE_H
14886 # include <readline/readline.h>
14887 #elif defined(HAVE_READLINE_H)
14888 # include <readline.h>
14889 #endif
14890
14891 int
14892 main ()
14893 {
14894 rl_completion_append_character = 'x';
14895   ;
14896   return 0;
14897 }
14898 _ACEOF
14899 rm -f conftest.$ac_objext conftest$ac_exeext
14900 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14901   (eval $ac_link) 2>conftest.er1
14902   ac_status=$?
14903   grep -v '^ *+' conftest.er1 >conftest.err
14904   rm -f conftest.er1
14905   cat conftest.err >&5
14906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907   (exit $ac_status); } &&
14908          { ac_try='test -z "$ac_c_werror_flag"
14909                          || test ! -s conftest.err'
14910   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14911   (eval $ac_try) 2>&5
14912   ac_status=$?
14913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14914   (exit $ac_status); }; } &&
14915          { ac_try='test -s conftest$ac_exeext'
14916   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14917   (eval $ac_try) 2>&5
14918   ac_status=$?
14919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14920   (exit $ac_status); }; }; then
14921   echo "$as_me:$LINENO: result: yes" >&5
14922 echo "${ECHO_T}yes" >&6
14923
14924 cat >>confdefs.h <<\_ACEOF
14925 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
14926 _ACEOF
14927
14928 else
14929   echo "$as_me: failed program was:" >&5
14930 sed 's/^/| /' conftest.$ac_ext >&5
14931
14932 echo "$as_me:$LINENO: result: no" >&5
14933 echo "${ECHO_T}no" >&6
14934 fi
14935 rm -f conftest.err conftest.$ac_objext \
14936       conftest$ac_exeext conftest.$ac_ext
14937
14938
14939 for ac_func in rl_completion_matches rl_filename_completion_function
14940 do
14941 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14942 echo "$as_me:$LINENO: checking for $ac_func" >&5
14943 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14944 if eval "test \"\${$as_ac_var+set}\" = set"; then
14945   echo $ECHO_N "(cached) $ECHO_C" >&6
14946 else
14947   cat >conftest.$ac_ext <<_ACEOF
14948 /* confdefs.h.  */
14949 _ACEOF
14950 cat confdefs.h >>conftest.$ac_ext
14951 cat >>conftest.$ac_ext <<_ACEOF
14952 /* end confdefs.h.  */
14953 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14954    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14955 #define $ac_func innocuous_$ac_func
14956
14957 /* System header to define __stub macros and hopefully few prototypes,
14958     which can conflict with char $ac_func (); below.
14959     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14960     <limits.h> exists even on freestanding compilers.  */
14961
14962 #ifdef __STDC__
14963 # include <limits.h>
14964 #else
14965 # include <assert.h>
14966 #endif
14967
14968 #undef $ac_func
14969
14970 /* Override any gcc2 internal prototype to avoid an error.  */
14971 #ifdef __cplusplus
14972 extern "C"
14973 {
14974 #endif
14975 /* We use char because int might match the return type of a gcc2
14976    builtin and then its argument prototype would still apply.  */
14977 char $ac_func ();
14978 /* The GNU C library defines this for functions which it implements
14979     to always fail with ENOSYS.  Some functions are actually named
14980     something starting with __ and the normal name is an alias.  */
14981 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14982 choke me
14983 #else
14984 char (*f) () = $ac_func;
14985 #endif
14986 #ifdef __cplusplus
14987 }
14988 #endif
14989
14990 int
14991 main ()
14992 {
14993 return f != $ac_func;
14994   ;
14995   return 0;
14996 }
14997 _ACEOF
14998 rm -f conftest.$ac_objext conftest$ac_exeext
14999 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15000   (eval $ac_link) 2>conftest.er1
15001   ac_status=$?
15002   grep -v '^ *+' conftest.er1 >conftest.err
15003   rm -f conftest.er1
15004   cat conftest.err >&5
15005   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15006   (exit $ac_status); } &&
15007          { ac_try='test -z "$ac_c_werror_flag"
15008                          || test ! -s conftest.err'
15009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15013   (exit $ac_status); }; } &&
15014          { ac_try='test -s conftest$ac_exeext'
15015   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15016   (eval $ac_try) 2>&5
15017   ac_status=$?
15018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15019   (exit $ac_status); }; }; then
15020   eval "$as_ac_var=yes"
15021 else
15022   echo "$as_me: failed program was:" >&5
15023 sed 's/^/| /' conftest.$ac_ext >&5
15024
15025 eval "$as_ac_var=no"
15026 fi
15027 rm -f conftest.err conftest.$ac_objext \
15028       conftest$ac_exeext conftest.$ac_ext
15029 fi
15030 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15031 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15032 if test `eval echo '${'$as_ac_var'}'` = yes; then
15033   cat >>confdefs.h <<_ACEOF
15034 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15035 _ACEOF
15036
15037 fi
15038 done
15039
15040
15041 for ac_func in replace_history_entry
15042 do
15043 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15044 echo "$as_me:$LINENO: checking for $ac_func" >&5
15045 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15046 if eval "test \"\${$as_ac_var+set}\" = set"; then
15047   echo $ECHO_N "(cached) $ECHO_C" >&6
15048 else
15049   cat >conftest.$ac_ext <<_ACEOF
15050 /* confdefs.h.  */
15051 _ACEOF
15052 cat confdefs.h >>conftest.$ac_ext
15053 cat >>conftest.$ac_ext <<_ACEOF
15054 /* end confdefs.h.  */
15055 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15056    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15057 #define $ac_func innocuous_$ac_func
15058
15059 /* System header to define __stub macros and hopefully few prototypes,
15060     which can conflict with char $ac_func (); below.
15061     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15062     <limits.h> exists even on freestanding compilers.  */
15063
15064 #ifdef __STDC__
15065 # include <limits.h>
15066 #else
15067 # include <assert.h>
15068 #endif
15069
15070 #undef $ac_func
15071
15072 /* Override any gcc2 internal prototype to avoid an error.  */
15073 #ifdef __cplusplus
15074 extern "C"
15075 {
15076 #endif
15077 /* We use char because int might match the return type of a gcc2
15078    builtin and then its argument prototype would still apply.  */
15079 char $ac_func ();
15080 /* The GNU C library defines this for functions which it implements
15081     to always fail with ENOSYS.  Some functions are actually named
15082     something starting with __ and the normal name is an alias.  */
15083 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15084 choke me
15085 #else
15086 char (*f) () = $ac_func;
15087 #endif
15088 #ifdef __cplusplus
15089 }
15090 #endif
15091
15092 int
15093 main ()
15094 {
15095 return f != $ac_func;
15096   ;
15097   return 0;
15098 }
15099 _ACEOF
15100 rm -f conftest.$ac_objext conftest$ac_exeext
15101 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15102   (eval $ac_link) 2>conftest.er1
15103   ac_status=$?
15104   grep -v '^ *+' conftest.er1 >conftest.err
15105   rm -f conftest.er1
15106   cat conftest.err >&5
15107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108   (exit $ac_status); } &&
15109          { ac_try='test -z "$ac_c_werror_flag"
15110                          || test ! -s conftest.err'
15111   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15112   (eval $ac_try) 2>&5
15113   ac_status=$?
15114   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15115   (exit $ac_status); }; } &&
15116          { ac_try='test -s conftest$ac_exeext'
15117   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15118   (eval $ac_try) 2>&5
15119   ac_status=$?
15120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15121   (exit $ac_status); }; }; then
15122   eval "$as_ac_var=yes"
15123 else
15124   echo "$as_me: failed program was:" >&5
15125 sed 's/^/| /' conftest.$ac_ext >&5
15126
15127 eval "$as_ac_var=no"
15128 fi
15129 rm -f conftest.err conftest.$ac_objext \
15130       conftest$ac_exeext conftest.$ac_ext
15131 fi
15132 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15133 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15134 if test `eval echo '${'$as_ac_var'}'` = yes; then
15135   cat >>confdefs.h <<_ACEOF
15136 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15137 _ACEOF
15138
15139 fi
15140 done
15141
15142 fi
15143
15144
15145 echo "$as_me:$LINENO: checking for finite" >&5
15146 echo $ECHO_N "checking for finite... $ECHO_C" >&6
15147 cat >conftest.$ac_ext <<_ACEOF
15148 /* confdefs.h.  */
15149 _ACEOF
15150 cat confdefs.h >>conftest.$ac_ext
15151 cat >>conftest.$ac_ext <<_ACEOF
15152 /* end confdefs.h.  */
15153 #include <math.h>
15154 int
15155 main ()
15156 {
15157 int dummy=finite(1.0);
15158   ;
15159   return 0;
15160 }
15161 _ACEOF
15162 rm -f conftest.$ac_objext conftest$ac_exeext
15163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15164   (eval $ac_link) 2>conftest.er1
15165   ac_status=$?
15166   grep -v '^ *+' conftest.er1 >conftest.err
15167   rm -f conftest.er1
15168   cat conftest.err >&5
15169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15170   (exit $ac_status); } &&
15171          { ac_try='test -z "$ac_c_werror_flag"
15172                          || test ! -s conftest.err'
15173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15174   (eval $ac_try) 2>&5
15175   ac_status=$?
15176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15177   (exit $ac_status); }; } &&
15178          { ac_try='test -s conftest$ac_exeext'
15179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15180   (eval $ac_try) 2>&5
15181   ac_status=$?
15182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183   (exit $ac_status); }; }; then
15184
15185 cat >>confdefs.h <<\_ACEOF
15186 #define HAVE_FINITE 1
15187 _ACEOF
15188
15189 echo "$as_me:$LINENO: result: yes" >&5
15190 echo "${ECHO_T}yes" >&6
15191 else
15192   echo "$as_me: failed program was:" >&5
15193 sed 's/^/| /' conftest.$ac_ext >&5
15194
15195 echo "$as_me:$LINENO: result: no" >&5
15196 echo "${ECHO_T}no" >&6
15197 fi
15198 rm -f conftest.err conftest.$ac_objext \
15199       conftest$ac_exeext conftest.$ac_ext
15200
15201 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
15202 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
15203 cat >conftest.$ac_ext <<_ACEOF
15204 /* confdefs.h.  */
15205 _ACEOF
15206 cat confdefs.h >>conftest.$ac_ext
15207 cat >>conftest.$ac_ext <<_ACEOF
15208 /* end confdefs.h.  */
15209 #include <setjmp.h>
15210 int
15211 main ()
15212 {
15213 sigjmp_buf x; sigsetjmp(x, 1);
15214   ;
15215   return 0;
15216 }
15217 _ACEOF
15218 rm -f conftest.$ac_objext conftest$ac_exeext
15219 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15220   (eval $ac_link) 2>conftest.er1
15221   ac_status=$?
15222   grep -v '^ *+' conftest.er1 >conftest.err
15223   rm -f conftest.er1
15224   cat conftest.err >&5
15225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226   (exit $ac_status); } &&
15227          { ac_try='test -z "$ac_c_werror_flag"
15228                          || test ! -s conftest.err'
15229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15230   (eval $ac_try) 2>&5
15231   ac_status=$?
15232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15233   (exit $ac_status); }; } &&
15234          { ac_try='test -s conftest$ac_exeext'
15235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15236   (eval $ac_try) 2>&5
15237   ac_status=$?
15238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15239   (exit $ac_status); }; }; then
15240
15241 cat >>confdefs.h <<\_ACEOF
15242 #define HAVE_SIGSETJMP 1
15243 _ACEOF
15244
15245 echo "$as_me:$LINENO: result: yes" >&5
15246 echo "${ECHO_T}yes" >&6
15247 else
15248   echo "$as_me: failed program was:" >&5
15249 sed 's/^/| /' conftest.$ac_ext >&5
15250
15251 echo "$as_me:$LINENO: result: no" >&5
15252 echo "${ECHO_T}no" >&6
15253 fi
15254 rm -f conftest.err conftest.$ac_objext \
15255       conftest$ac_exeext conftest.$ac_ext
15256
15257 echo "$as_me:$LINENO: checking for syslog" >&5
15258 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
15259 if test "${ac_cv_func_syslog+set}" = set; then
15260   echo $ECHO_N "(cached) $ECHO_C" >&6
15261 else
15262   cat >conftest.$ac_ext <<_ACEOF
15263 /* confdefs.h.  */
15264 _ACEOF
15265 cat confdefs.h >>conftest.$ac_ext
15266 cat >>conftest.$ac_ext <<_ACEOF
15267 /* end confdefs.h.  */
15268 /* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
15269    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15270 #define syslog innocuous_syslog
15271
15272 /* System header to define __stub macros and hopefully few prototypes,
15273     which can conflict with char syslog (); below.
15274     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15275     <limits.h> exists even on freestanding compilers.  */
15276
15277 #ifdef __STDC__
15278 # include <limits.h>
15279 #else
15280 # include <assert.h>
15281 #endif
15282
15283 #undef syslog
15284
15285 /* Override any gcc2 internal prototype to avoid an error.  */
15286 #ifdef __cplusplus
15287 extern "C"
15288 {
15289 #endif
15290 /* We use char because int might match the return type of a gcc2
15291    builtin and then its argument prototype would still apply.  */
15292 char syslog ();
15293 /* The GNU C library defines this for functions which it implements
15294     to always fail with ENOSYS.  Some functions are actually named
15295     something starting with __ and the normal name is an alias.  */
15296 #if defined (__stub_syslog) || defined (__stub___syslog)
15297 choke me
15298 #else
15299 char (*f) () = syslog;
15300 #endif
15301 #ifdef __cplusplus
15302 }
15303 #endif
15304
15305 int
15306 main ()
15307 {
15308 return f != syslog;
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 rm -f conftest.$ac_objext conftest$ac_exeext
15314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15315   (eval $ac_link) 2>conftest.er1
15316   ac_status=$?
15317   grep -v '^ *+' conftest.er1 >conftest.err
15318   rm -f conftest.er1
15319   cat conftest.err >&5
15320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15321   (exit $ac_status); } &&
15322          { ac_try='test -z "$ac_c_werror_flag"
15323                          || test ! -s conftest.err'
15324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15325   (eval $ac_try) 2>&5
15326   ac_status=$?
15327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15328   (exit $ac_status); }; } &&
15329          { ac_try='test -s conftest$ac_exeext'
15330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15331   (eval $ac_try) 2>&5
15332   ac_status=$?
15333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15334   (exit $ac_status); }; }; then
15335   ac_cv_func_syslog=yes
15336 else
15337   echo "$as_me: failed program was:" >&5
15338 sed 's/^/| /' conftest.$ac_ext >&5
15339
15340 ac_cv_func_syslog=no
15341 fi
15342 rm -f conftest.err conftest.$ac_objext \
15343       conftest$ac_exeext conftest.$ac_ext
15344 fi
15345 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
15346 echo "${ECHO_T}$ac_cv_func_syslog" >&6
15347 if test $ac_cv_func_syslog = yes; then
15348   if test "${ac_cv_header_syslog_h+set}" = set; then
15349   echo "$as_me:$LINENO: checking for syslog.h" >&5
15350 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15351 if test "${ac_cv_header_syslog_h+set}" = set; then
15352   echo $ECHO_N "(cached) $ECHO_C" >&6
15353 fi
15354 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15355 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15356 else
15357   # Is the header compilable?
15358 echo "$as_me:$LINENO: checking syslog.h usability" >&5
15359 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
15360 cat >conftest.$ac_ext <<_ACEOF
15361 /* confdefs.h.  */
15362 _ACEOF
15363 cat confdefs.h >>conftest.$ac_ext
15364 cat >>conftest.$ac_ext <<_ACEOF
15365 /* end confdefs.h.  */
15366 $ac_includes_default
15367 #include <syslog.h>
15368 _ACEOF
15369 rm -f conftest.$ac_objext
15370 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15371   (eval $ac_compile) 2>conftest.er1
15372   ac_status=$?
15373   grep -v '^ *+' conftest.er1 >conftest.err
15374   rm -f conftest.er1
15375   cat conftest.err >&5
15376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15377   (exit $ac_status); } &&
15378          { ac_try='test -z "$ac_c_werror_flag"
15379                          || test ! -s conftest.err'
15380   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15381   (eval $ac_try) 2>&5
15382   ac_status=$?
15383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15384   (exit $ac_status); }; } &&
15385          { ac_try='test -s conftest.$ac_objext'
15386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15387   (eval $ac_try) 2>&5
15388   ac_status=$?
15389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15390   (exit $ac_status); }; }; then
15391   ac_header_compiler=yes
15392 else
15393   echo "$as_me: failed program was:" >&5
15394 sed 's/^/| /' conftest.$ac_ext >&5
15395
15396 ac_header_compiler=no
15397 fi
15398 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15399 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15400 echo "${ECHO_T}$ac_header_compiler" >&6
15401
15402 # Is the header present?
15403 echo "$as_me:$LINENO: checking syslog.h presence" >&5
15404 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
15405 cat >conftest.$ac_ext <<_ACEOF
15406 /* confdefs.h.  */
15407 _ACEOF
15408 cat confdefs.h >>conftest.$ac_ext
15409 cat >>conftest.$ac_ext <<_ACEOF
15410 /* end confdefs.h.  */
15411 #include <syslog.h>
15412 _ACEOF
15413 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15415   ac_status=$?
15416   grep -v '^ *+' conftest.er1 >conftest.err
15417   rm -f conftest.er1
15418   cat conftest.err >&5
15419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420   (exit $ac_status); } >/dev/null; then
15421   if test -s conftest.err; then
15422     ac_cpp_err=$ac_c_preproc_warn_flag
15423     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
15424   else
15425     ac_cpp_err=
15426   fi
15427 else
15428   ac_cpp_err=yes
15429 fi
15430 if test -z "$ac_cpp_err"; then
15431   ac_header_preproc=yes
15432 else
15433   echo "$as_me: failed program was:" >&5
15434 sed 's/^/| /' conftest.$ac_ext >&5
15435
15436   ac_header_preproc=no
15437 fi
15438 rm -f conftest.err conftest.$ac_ext
15439 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15440 echo "${ECHO_T}$ac_header_preproc" >&6
15441
15442 # So?  What about this header?
15443 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15444   yes:no: )
15445     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
15446 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15447     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
15448 echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
15449     ac_header_preproc=yes
15450     ;;
15451   no:yes:* )
15452     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
15453 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
15454     { echo "$as_me:$LINENO: WARNING: syslog.h:     check for missing prerequisite headers?" >&5
15455 echo "$as_me: WARNING: syslog.h:     check for missing prerequisite headers?" >&2;}
15456     { echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
15457 echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
15458     { echo "$as_me:$LINENO: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&5
15459 echo "$as_me: WARNING: syslog.h:     section \"Present But Cannot Be Compiled\"" >&2;}
15460     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
15461 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
15462     { echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
15463 echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
15464     (
15465       cat <<\_ASBOX
15466 ## ---------------------------------------- ##
15467 ## Report this to pgsql-bugs@postgresql.org ##
15468 ## ---------------------------------------- ##
15469 _ASBOX
15470     ) |
15471       sed "s/^/$as_me: WARNING:     /" >&2
15472     ;;
15473 esac
15474 echo "$as_me:$LINENO: checking for syslog.h" >&5
15475 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
15476 if test "${ac_cv_header_syslog_h+set}" = set; then
15477   echo $ECHO_N "(cached) $ECHO_C" >&6
15478 else
15479   ac_cv_header_syslog_h=$ac_header_preproc
15480 fi
15481 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
15482 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
15483
15484 fi
15485 if test $ac_cv_header_syslog_h = yes; then
15486
15487 cat >>confdefs.h <<\_ACEOF
15488 #define HAVE_SYSLOG 1
15489 _ACEOF
15490
15491 fi
15492
15493
15494 fi
15495
15496
15497 echo "$as_me:$LINENO: checking for optreset" >&5
15498 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
15499 if test "${pgac_cv_var_int_optreset+set}" = set; then
15500   echo $ECHO_N "(cached) $ECHO_C" >&6
15501 else
15502   cat >conftest.$ac_ext <<_ACEOF
15503 /* confdefs.h.  */
15504 _ACEOF
15505 cat confdefs.h >>conftest.$ac_ext
15506 cat >>conftest.$ac_ext <<_ACEOF
15507 /* end confdefs.h.  */
15508 #include <unistd.h>
15509 int
15510 main ()
15511 {
15512 extern int optreset; optreset = 1;
15513   ;
15514   return 0;
15515 }
15516 _ACEOF
15517 rm -f conftest.$ac_objext conftest$ac_exeext
15518 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15519   (eval $ac_link) 2>conftest.er1
15520   ac_status=$?
15521   grep -v '^ *+' conftest.er1 >conftest.err
15522   rm -f conftest.er1
15523   cat conftest.err >&5
15524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525   (exit $ac_status); } &&
15526          { ac_try='test -z "$ac_c_werror_flag"
15527                          || test ! -s conftest.err'
15528   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15529   (eval $ac_try) 2>&5
15530   ac_status=$?
15531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15532   (exit $ac_status); }; } &&
15533          { ac_try='test -s conftest$ac_exeext'
15534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15535   (eval $ac_try) 2>&5
15536   ac_status=$?
15537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15538   (exit $ac_status); }; }; then
15539   pgac_cv_var_int_optreset=yes
15540 else
15541   echo "$as_me: failed program was:" >&5
15542 sed 's/^/| /' conftest.$ac_ext >&5
15543
15544 pgac_cv_var_int_optreset=no
15545 fi
15546 rm -f conftest.err conftest.$ac_objext \
15547       conftest$ac_exeext conftest.$ac_ext
15548 fi
15549 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
15550 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
15551 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15552
15553 cat >>confdefs.h <<\_ACEOF
15554 #define HAVE_INT_OPTRESET 1
15555 _ACEOF
15556
15557 fi
15558
15559
15560
15561 for ac_func in strtoll strtoq
15562 do
15563 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15564 echo "$as_me:$LINENO: checking for $ac_func" >&5
15565 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15566 if eval "test \"\${$as_ac_var+set}\" = set"; then
15567   echo $ECHO_N "(cached) $ECHO_C" >&6
15568 else
15569   cat >conftest.$ac_ext <<_ACEOF
15570 /* confdefs.h.  */
15571 _ACEOF
15572 cat confdefs.h >>conftest.$ac_ext
15573 cat >>conftest.$ac_ext <<_ACEOF
15574 /* end confdefs.h.  */
15575 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15576    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15577 #define $ac_func innocuous_$ac_func
15578
15579 /* System header to define __stub macros and hopefully few prototypes,
15580     which can conflict with char $ac_func (); below.
15581     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15582     <limits.h> exists even on freestanding compilers.  */
15583
15584 #ifdef __STDC__
15585 # include <limits.h>
15586 #else
15587 # include <assert.h>
15588 #endif
15589
15590 #undef $ac_func
15591
15592 /* Override any gcc2 internal prototype to avoid an error.  */
15593 #ifdef __cplusplus
15594 extern "C"
15595 {
15596 #endif
15597 /* We use char because int might match the return type of a gcc2
15598    builtin and then its argument prototype would still apply.  */
15599 char $ac_func ();
15600 /* The GNU C library defines this for functions which it implements
15601     to always fail with ENOSYS.  Some functions are actually named
15602     something starting with __ and the normal name is an alias.  */
15603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15604 choke me
15605 #else
15606 char (*f) () = $ac_func;
15607 #endif
15608 #ifdef __cplusplus
15609 }
15610 #endif
15611
15612 int
15613 main ()
15614 {
15615 return f != $ac_func;
15616   ;
15617   return 0;
15618 }
15619 _ACEOF
15620 rm -f conftest.$ac_objext conftest$ac_exeext
15621 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15622   (eval $ac_link) 2>conftest.er1
15623   ac_status=$?
15624   grep -v '^ *+' conftest.er1 >conftest.err
15625   rm -f conftest.er1
15626   cat conftest.err >&5
15627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15628   (exit $ac_status); } &&
15629          { ac_try='test -z "$ac_c_werror_flag"
15630                          || test ! -s conftest.err'
15631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15632   (eval $ac_try) 2>&5
15633   ac_status=$?
15634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635   (exit $ac_status); }; } &&
15636          { ac_try='test -s conftest$ac_exeext'
15637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15638   (eval $ac_try) 2>&5
15639   ac_status=$?
15640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15641   (exit $ac_status); }; }; then
15642   eval "$as_ac_var=yes"
15643 else
15644   echo "$as_me: failed program was:" >&5
15645 sed 's/^/| /' conftest.$ac_ext >&5
15646
15647 eval "$as_ac_var=no"
15648 fi
15649 rm -f conftest.err conftest.$ac_objext \
15650       conftest$ac_exeext conftest.$ac_ext
15651 fi
15652 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15653 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15654 if test `eval echo '${'$as_ac_var'}'` = yes; then
15655   cat >>confdefs.h <<_ACEOF
15656 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15657 _ACEOF
15658  break
15659 fi
15660 done
15661
15662
15663
15664 for ac_func in strtoull strtouq
15665 do
15666 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15667 echo "$as_me:$LINENO: checking for $ac_func" >&5
15668 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15669 if eval "test \"\${$as_ac_var+set}\" = set"; then
15670   echo $ECHO_N "(cached) $ECHO_C" >&6
15671 else
15672   cat >conftest.$ac_ext <<_ACEOF
15673 /* confdefs.h.  */
15674 _ACEOF
15675 cat confdefs.h >>conftest.$ac_ext
15676 cat >>conftest.$ac_ext <<_ACEOF
15677 /* end confdefs.h.  */
15678 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15679    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15680 #define $ac_func innocuous_$ac_func
15681
15682 /* System header to define __stub macros and hopefully few prototypes,
15683     which can conflict with char $ac_func (); below.
15684     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15685     <limits.h> exists even on freestanding compilers.  */
15686
15687 #ifdef __STDC__
15688 # include <limits.h>
15689 #else
15690 # include <assert.h>
15691 #endif
15692
15693 #undef $ac_func
15694
15695 /* Override any gcc2 internal prototype to avoid an error.  */
15696 #ifdef __cplusplus
15697 extern "C"
15698 {
15699 #endif
15700 /* We use char because int might match the return type of a gcc2
15701    builtin and then its argument prototype would still apply.  */
15702 char $ac_func ();
15703 /* The GNU C library defines this for functions which it implements
15704     to always fail with ENOSYS.  Some functions are actually named
15705     something starting with __ and the normal name is an alias.  */
15706 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15707 choke me
15708 #else
15709 char (*f) () = $ac_func;
15710 #endif
15711 #ifdef __cplusplus
15712 }
15713 #endif
15714
15715 int
15716 main ()
15717 {
15718 return f != $ac_func;
15719   ;
15720   return 0;
15721 }
15722 _ACEOF
15723 rm -f conftest.$ac_objext conftest$ac_exeext
15724 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15725   (eval $ac_link) 2>conftest.er1
15726   ac_status=$?
15727   grep -v '^ *+' conftest.er1 >conftest.err
15728   rm -f conftest.er1
15729   cat conftest.err >&5
15730   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15731   (exit $ac_status); } &&
15732          { ac_try='test -z "$ac_c_werror_flag"
15733                          || test ! -s conftest.err'
15734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15735   (eval $ac_try) 2>&5
15736   ac_status=$?
15737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15738   (exit $ac_status); }; } &&
15739          { ac_try='test -s conftest$ac_exeext'
15740   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15741   (eval $ac_try) 2>&5
15742   ac_status=$?
15743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744   (exit $ac_status); }; }; then
15745   eval "$as_ac_var=yes"
15746 else
15747   echo "$as_me: failed program was:" >&5
15748 sed 's/^/| /' conftest.$ac_ext >&5
15749
15750 eval "$as_ac_var=no"
15751 fi
15752 rm -f conftest.err conftest.$ac_objext \
15753       conftest$ac_exeext conftest.$ac_ext
15754 fi
15755 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15756 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15757 if test `eval echo '${'$as_ac_var'}'` = yes; then
15758   cat >>confdefs.h <<_ACEOF
15759 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15760 _ACEOF
15761  break
15762 fi
15763 done
15764
15765
15766 # Check for one of atexit() or on_exit()
15767
15768 for ac_func in atexit
15769 do
15770 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15771 echo "$as_me:$LINENO: checking for $ac_func" >&5
15772 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15773 if eval "test \"\${$as_ac_var+set}\" = set"; then
15774   echo $ECHO_N "(cached) $ECHO_C" >&6
15775 else
15776   cat >conftest.$ac_ext <<_ACEOF
15777 /* confdefs.h.  */
15778 _ACEOF
15779 cat confdefs.h >>conftest.$ac_ext
15780 cat >>conftest.$ac_ext <<_ACEOF
15781 /* end confdefs.h.  */
15782 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15783    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15784 #define $ac_func innocuous_$ac_func
15785
15786 /* System header to define __stub macros and hopefully few prototypes,
15787     which can conflict with char $ac_func (); below.
15788     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15789     <limits.h> exists even on freestanding compilers.  */
15790
15791 #ifdef __STDC__
15792 # include <limits.h>
15793 #else
15794 # include <assert.h>
15795 #endif
15796
15797 #undef $ac_func
15798
15799 /* Override any gcc2 internal prototype to avoid an error.  */
15800 #ifdef __cplusplus
15801 extern "C"
15802 {
15803 #endif
15804 /* We use char because int might match the return type of a gcc2
15805    builtin and then its argument prototype would still apply.  */
15806 char $ac_func ();
15807 /* The GNU C library defines this for functions which it implements
15808     to always fail with ENOSYS.  Some functions are actually named
15809     something starting with __ and the normal name is an alias.  */
15810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15811 choke me
15812 #else
15813 char (*f) () = $ac_func;
15814 #endif
15815 #ifdef __cplusplus
15816 }
15817 #endif
15818
15819 int
15820 main ()
15821 {
15822 return f != $ac_func;
15823   ;
15824   return 0;
15825 }
15826 _ACEOF
15827 rm -f conftest.$ac_objext conftest$ac_exeext
15828 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15829   (eval $ac_link) 2>conftest.er1
15830   ac_status=$?
15831   grep -v '^ *+' conftest.er1 >conftest.err
15832   rm -f conftest.er1
15833   cat conftest.err >&5
15834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15835   (exit $ac_status); } &&
15836          { ac_try='test -z "$ac_c_werror_flag"
15837                          || test ! -s conftest.err'
15838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15839   (eval $ac_try) 2>&5
15840   ac_status=$?
15841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15842   (exit $ac_status); }; } &&
15843          { ac_try='test -s conftest$ac_exeext'
15844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15845   (eval $ac_try) 2>&5
15846   ac_status=$?
15847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15848   (exit $ac_status); }; }; then
15849   eval "$as_ac_var=yes"
15850 else
15851   echo "$as_me: failed program was:" >&5
15852 sed 's/^/| /' conftest.$ac_ext >&5
15853
15854 eval "$as_ac_var=no"
15855 fi
15856 rm -f conftest.err conftest.$ac_objext \
15857       conftest$ac_exeext conftest.$ac_ext
15858 fi
15859 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15860 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15861 if test `eval echo '${'$as_ac_var'}'` = yes; then
15862   cat >>confdefs.h <<_ACEOF
15863 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15864 _ACEOF
15865
15866 else
15867
15868 for ac_func in on_exit
15869 do
15870 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15871 echo "$as_me:$LINENO: checking for $ac_func" >&5
15872 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15873 if eval "test \"\${$as_ac_var+set}\" = set"; then
15874   echo $ECHO_N "(cached) $ECHO_C" >&6
15875 else
15876   cat >conftest.$ac_ext <<_ACEOF
15877 /* confdefs.h.  */
15878 _ACEOF
15879 cat confdefs.h >>conftest.$ac_ext
15880 cat >>conftest.$ac_ext <<_ACEOF
15881 /* end confdefs.h.  */
15882 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15883    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15884 #define $ac_func innocuous_$ac_func
15885
15886 /* System header to define __stub macros and hopefully few prototypes,
15887     which can conflict with char $ac_func (); below.
15888     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15889     <limits.h> exists even on freestanding compilers.  */
15890
15891 #ifdef __STDC__
15892 # include <limits.h>
15893 #else
15894 # include <assert.h>
15895 #endif
15896
15897 #undef $ac_func
15898
15899 /* Override any gcc2 internal prototype to avoid an error.  */
15900 #ifdef __cplusplus
15901 extern "C"
15902 {
15903 #endif
15904 /* We use char because int might match the return type of a gcc2
15905    builtin and then its argument prototype would still apply.  */
15906 char $ac_func ();
15907 /* The GNU C library defines this for functions which it implements
15908     to always fail with ENOSYS.  Some functions are actually named
15909     something starting with __ and the normal name is an alias.  */
15910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15911 choke me
15912 #else
15913 char (*f) () = $ac_func;
15914 #endif
15915 #ifdef __cplusplus
15916 }
15917 #endif
15918
15919 int
15920 main ()
15921 {
15922 return f != $ac_func;
15923   ;
15924   return 0;
15925 }
15926 _ACEOF
15927 rm -f conftest.$ac_objext conftest$ac_exeext
15928 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15929   (eval $ac_link) 2>conftest.er1
15930   ac_status=$?
15931   grep -v '^ *+' conftest.er1 >conftest.err
15932   rm -f conftest.er1
15933   cat conftest.err >&5
15934   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15935   (exit $ac_status); } &&
15936          { ac_try='test -z "$ac_c_werror_flag"
15937                          || test ! -s conftest.err'
15938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15939   (eval $ac_try) 2>&5
15940   ac_status=$?
15941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15942   (exit $ac_status); }; } &&
15943          { ac_try='test -s conftest$ac_exeext'
15944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945   (eval $ac_try) 2>&5
15946   ac_status=$?
15947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948   (exit $ac_status); }; }; then
15949   eval "$as_ac_var=yes"
15950 else
15951   echo "$as_me: failed program was:" >&5
15952 sed 's/^/| /' conftest.$ac_ext >&5
15953
15954 eval "$as_ac_var=no"
15955 fi
15956 rm -f conftest.err conftest.$ac_objext \
15957       conftest$ac_exeext conftest.$ac_ext
15958 fi
15959 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15960 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15961 if test `eval echo '${'$as_ac_var'}'` = yes; then
15962   cat >>confdefs.h <<_ACEOF
15963 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15964 _ACEOF
15965
15966 else
15967   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
15968 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
15969    { (exit 1); exit 1; }; }
15970 fi
15971 done
15972
15973 fi
15974 done
15975
15976
15977 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15978 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
15979 if test "${ac_cv_sys_largefile_source+set}" = set; then
15980   echo $ECHO_N "(cached) $ECHO_C" >&6
15981 else
15982   while :; do
15983   ac_cv_sys_largefile_source=no
15984   cat >conftest.$ac_ext <<_ACEOF
15985 /* confdefs.h.  */
15986 _ACEOF
15987 cat confdefs.h >>conftest.$ac_ext
15988 cat >>conftest.$ac_ext <<_ACEOF
15989 /* end confdefs.h.  */
15990 #include <stdio.h>
15991 int
15992 main ()
15993 {
15994 return !fseeko;
15995   ;
15996   return 0;
15997 }
15998 _ACEOF
15999 rm -f conftest.$ac_objext
16000 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16001   (eval $ac_compile) 2>conftest.er1
16002   ac_status=$?
16003   grep -v '^ *+' conftest.er1 >conftest.err
16004   rm -f conftest.er1
16005   cat conftest.err >&5
16006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16007   (exit $ac_status); } &&
16008          { ac_try='test -z "$ac_c_werror_flag"
16009                          || test ! -s conftest.err'
16010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16011   (eval $ac_try) 2>&5
16012   ac_status=$?
16013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014   (exit $ac_status); }; } &&
16015          { ac_try='test -s conftest.$ac_objext'
16016   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16017   (eval $ac_try) 2>&5
16018   ac_status=$?
16019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16020   (exit $ac_status); }; }; then
16021   break
16022 else
16023   echo "$as_me: failed program was:" >&5
16024 sed 's/^/| /' conftest.$ac_ext >&5
16025
16026 fi
16027 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16028   cat >conftest.$ac_ext <<_ACEOF
16029 /* confdefs.h.  */
16030 _ACEOF
16031 cat confdefs.h >>conftest.$ac_ext
16032 cat >>conftest.$ac_ext <<_ACEOF
16033 /* end confdefs.h.  */
16034 #define _LARGEFILE_SOURCE 1
16035 #include <stdio.h>
16036 int
16037 main ()
16038 {
16039 return !fseeko;
16040   ;
16041   return 0;
16042 }
16043 _ACEOF
16044 rm -f conftest.$ac_objext
16045 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16046   (eval $ac_compile) 2>conftest.er1
16047   ac_status=$?
16048   grep -v '^ *+' conftest.er1 >conftest.err
16049   rm -f conftest.er1
16050   cat conftest.err >&5
16051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052   (exit $ac_status); } &&
16053          { ac_try='test -z "$ac_c_werror_flag"
16054                          || test ! -s conftest.err'
16055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16056   (eval $ac_try) 2>&5
16057   ac_status=$?
16058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16059   (exit $ac_status); }; } &&
16060          { ac_try='test -s conftest.$ac_objext'
16061   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16062   (eval $ac_try) 2>&5
16063   ac_status=$?
16064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16065   (exit $ac_status); }; }; then
16066   ac_cv_sys_largefile_source=1; break
16067 else
16068   echo "$as_me: failed program was:" >&5
16069 sed 's/^/| /' conftest.$ac_ext >&5
16070
16071 fi
16072 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16073   break
16074 done
16075 fi
16076 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
16077 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16078 if test "$ac_cv_sys_largefile_source" != no; then
16079
16080 cat >>confdefs.h <<_ACEOF
16081 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16082 _ACEOF
16083
16084 fi
16085 rm -f conftest*
16086
16087 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16088 # in glibc 2.1.3, but that breaks too many other things.
16089 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16090 echo "$as_me:$LINENO: checking for fseeko" >&5
16091 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16092 if test "${ac_cv_func_fseeko+set}" = set; then
16093   echo $ECHO_N "(cached) $ECHO_C" >&6
16094 else
16095   cat >conftest.$ac_ext <<_ACEOF
16096 /* confdefs.h.  */
16097 _ACEOF
16098 cat confdefs.h >>conftest.$ac_ext
16099 cat >>conftest.$ac_ext <<_ACEOF
16100 /* end confdefs.h.  */
16101 #include <stdio.h>
16102 int
16103 main ()
16104 {
16105 return fseeko && fseeko (stdin, 0, 0);
16106   ;
16107   return 0;
16108 }
16109 _ACEOF
16110 rm -f conftest.$ac_objext conftest$ac_exeext
16111 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16112   (eval $ac_link) 2>conftest.er1
16113   ac_status=$?
16114   grep -v '^ *+' conftest.er1 >conftest.err
16115   rm -f conftest.er1
16116   cat conftest.err >&5
16117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16118   (exit $ac_status); } &&
16119          { ac_try='test -z "$ac_c_werror_flag"
16120                          || test ! -s conftest.err'
16121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16122   (eval $ac_try) 2>&5
16123   ac_status=$?
16124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16125   (exit $ac_status); }; } &&
16126          { ac_try='test -s conftest$ac_exeext'
16127   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16128   (eval $ac_try) 2>&5
16129   ac_status=$?
16130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16131   (exit $ac_status); }; }; then
16132   ac_cv_func_fseeko=yes
16133 else
16134   echo "$as_me: failed program was:" >&5
16135 sed 's/^/| /' conftest.$ac_ext >&5
16136
16137 ac_cv_func_fseeko=no
16138 fi
16139 rm -f conftest.err conftest.$ac_objext \
16140       conftest$ac_exeext conftest.$ac_ext
16141 fi
16142 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
16143 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16144 if test $ac_cv_func_fseeko = yes; then
16145
16146 cat >>confdefs.h <<\_ACEOF
16147 #define HAVE_FSEEKO 1
16148 _ACEOF
16149
16150 fi
16151
16152
16153 #
16154 # Pthreads
16155 #
16156 # For each platform, we need to know about any special compile and link
16157 # libraries, and whether the normal C function names are thread-safe.
16158 # See the comment at the top of src/port/thread.c for more information.
16159 #
16160 if test "$enable_thread_safety" = yes; then
16161
16162
16163
16164
16165 ac_ext=c
16166 ac_cpp='$CPP $CPPFLAGS'
16167 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16168 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16169 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16170
16171 acx_pthread_ok=no
16172
16173 # We used to check for pthread.h first, but this fails if pthread.h
16174 # requires special compiler flags (e.g. on True64 or Sequent).
16175 # It gets checked for in the link test anyway.
16176
16177 # First of all, check if the user has set any of the PTHREAD_LIBS,
16178 # etcetera environment variables, and if threads linking works using
16179 # them:
16180 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
16181         save_CFLAGS="$CFLAGS"
16182         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16183         save_LIBS="$LIBS"
16184         LIBS="$PTHREAD_LIBS $LIBS"
16185         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
16186 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
16187         cat >conftest.$ac_ext <<_ACEOF
16188 /* confdefs.h.  */
16189 _ACEOF
16190 cat confdefs.h >>conftest.$ac_ext
16191 cat >>conftest.$ac_ext <<_ACEOF
16192 /* end confdefs.h.  */
16193
16194 /* Override any gcc2 internal prototype to avoid an error.  */
16195 #ifdef __cplusplus
16196 extern "C"
16197 #endif
16198 /* We use char because int might match the return type of a gcc2
16199    builtin and then its argument prototype would still apply.  */
16200 char pthread_join ();
16201 int
16202 main ()
16203 {
16204 pthread_join ();
16205   ;
16206   return 0;
16207 }
16208 _ACEOF
16209 rm -f conftest.$ac_objext conftest$ac_exeext
16210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16211   (eval $ac_link) 2>conftest.er1
16212   ac_status=$?
16213   grep -v '^ *+' conftest.er1 >conftest.err
16214   rm -f conftest.er1
16215   cat conftest.err >&5
16216   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217   (exit $ac_status); } &&
16218          { ac_try='test -z "$ac_c_werror_flag"
16219                          || test ! -s conftest.err'
16220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16221   (eval $ac_try) 2>&5
16222   ac_status=$?
16223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16224   (exit $ac_status); }; } &&
16225          { ac_try='test -s conftest$ac_exeext'
16226   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16227   (eval $ac_try) 2>&5
16228   ac_status=$?
16229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16230   (exit $ac_status); }; }; then
16231   acx_pthread_ok=yes
16232 else
16233   echo "$as_me: failed program was:" >&5
16234 sed 's/^/| /' conftest.$ac_ext >&5
16235
16236 fi
16237 rm -f conftest.err conftest.$ac_objext \
16238       conftest$ac_exeext conftest.$ac_ext
16239         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16240 echo "${ECHO_T}$acx_pthread_ok" >&6
16241         if test x"$acx_pthread_ok" = xno; then
16242                 PTHREAD_LIBS=""
16243                 PTHREAD_CFLAGS=""
16244         fi
16245         LIBS="$save_LIBS"
16246         CFLAGS="$save_CFLAGS"
16247 fi
16248
16249 # We must check for the threads library under a number of different
16250 # names; the ordering is very important because some systems
16251 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
16252 # libraries is broken (non-POSIX).
16253
16254 # Create a list of thread flags to try.  Items starting with a "-" are
16255 # C compiler flags, and other items are library names, except for "none"
16256 # which indicates that we try without any flags at all, and "pthread-config"
16257 # which is a program returning the flags for the Pth emulation library.
16258
16259 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
16260
16261 # The ordering *is* (sometimes) important.  Some notes on the
16262 # individual items follow:
16263
16264 # pthreads: AIX (must check this before -lpthread)
16265 # none: in case threads are in libc; should be tried before -Kthread and
16266 #       other compiler flags to prevent continual compiler warnings
16267 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
16268 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
16269 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
16270 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
16271 # -pthreads: Solaris/gcc
16272 # -mthreads: Mingw32/gcc, Lynx/gcc
16273 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
16274 #      doesn't hurt to check since this sometimes defines pthreads too;
16275 #      also defines -D_REENTRANT)
16276 # pthread: Linux, etcetera
16277 # --thread-safe: KAI C++
16278 # pthread-config: use pthread-config program (for GNU Pth library)
16279
16280 case "${host_cpu}-${host_os}" in
16281         *solaris*)
16282
16283         # On Solaris (at least, for some versions), libc contains stubbed
16284         # (non-functional) versions of the pthreads routines, so link-based
16285         # tests will erroneously succeed.  (We need to link with -pthread or
16286         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
16287         # a function called by this macro, so we could check for that, but
16288         # who knows whether they'll stub that too in a future libc.)  So,
16289         # we'll just look for -pthreads and -lpthread first:
16290
16291         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
16292         ;;
16293 esac
16294
16295 if test x"$acx_pthread_ok" = xno; then
16296 for flag in $acx_pthread_flags; do
16297
16298         tryPTHREAD_CFLAGS=""
16299         tryPTHREAD_LIBS=""
16300         case $flag in
16301                 none)
16302                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
16303 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
16304                 ;;
16305
16306                 -*)
16307                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
16308 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
16309                 tryPTHREAD_CFLAGS="$flag"
16310                 ;;
16311
16312                 pthread-config)
16313                 # skip this if we already have flags defined, for PostgreSQL
16314                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
16315                 # Extract the first word of "pthread-config", so it can be a program name with args.
16316 set dummy pthread-config; ac_word=$2
16317 echo "$as_me:$LINENO: checking for $ac_word" >&5
16318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16319 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
16320   echo $ECHO_N "(cached) $ECHO_C" >&6
16321 else
16322   if test -n "$acx_pthread_config"; then
16323   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
16324 else
16325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16326 for as_dir in $PATH
16327 do
16328   IFS=$as_save_IFS
16329   test -z "$as_dir" && as_dir=.
16330   for ac_exec_ext in '' $ac_executable_extensions; do
16331   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16332     ac_cv_prog_acx_pthread_config="yes"
16333     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16334     break 2
16335   fi
16336 done
16337 done
16338
16339   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
16340 fi
16341 fi
16342 acx_pthread_config=$ac_cv_prog_acx_pthread_config
16343 if test -n "$acx_pthread_config"; then
16344   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
16345 echo "${ECHO_T}$acx_pthread_config" >&6
16346 else
16347   echo "$as_me:$LINENO: result: no" >&5
16348 echo "${ECHO_T}no" >&6
16349 fi
16350
16351                 if test x"$acx_pthread_config" = xno; then continue; fi
16352                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
16353                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
16354                 ;;
16355
16356                 *)
16357                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
16358 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
16359                 tryPTHREAD_LIBS="-l$flag"
16360                 ;;
16361         esac
16362
16363         save_LIBS="$LIBS"
16364         save_CFLAGS="$CFLAGS"
16365         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
16366         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16367
16368         # Check for various functions.  We must include pthread.h,
16369         # since some functions may be macros.  (On the Sequent, we
16370         # need a special flag -Kthread to make this header compile.)
16371         # We check for pthread_join because it is in -lpthread on IRIX
16372         # while pthread_create is in libc.  We check for pthread_attr_init
16373         # due to DEC craziness with -lpthreads.  We check for
16374         # pthread_cleanup_push because it is one of the few pthread
16375         # functions on Solaris that doesn't have a non-functional libc stub.
16376         # We try pthread_create on general principles.
16377         cat >conftest.$ac_ext <<_ACEOF
16378 /* confdefs.h.  */
16379 _ACEOF
16380 cat confdefs.h >>conftest.$ac_ext
16381 cat >>conftest.$ac_ext <<_ACEOF
16382 /* end confdefs.h.  */
16383 #include <pthread.h>
16384 int
16385 main ()
16386 {
16387 pthread_t th; pthread_join(th, 0);
16388                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
16389                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
16390   ;
16391   return 0;
16392 }
16393 _ACEOF
16394 rm -f conftest.$ac_objext conftest$ac_exeext
16395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16396   (eval $ac_link) 2>conftest.er1
16397   ac_status=$?
16398   grep -v '^ *+' conftest.er1 >conftest.err
16399   rm -f conftest.er1
16400   cat conftest.err >&5
16401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16402   (exit $ac_status); } &&
16403          { ac_try='test -z "$ac_c_werror_flag"
16404                          || test ! -s conftest.err'
16405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16406   (eval $ac_try) 2>&5
16407   ac_status=$?
16408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16409   (exit $ac_status); }; } &&
16410          { ac_try='test -s conftest$ac_exeext'
16411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16412   (eval $ac_try) 2>&5
16413   ac_status=$?
16414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16415   (exit $ac_status); }; }; then
16416   acx_pthread_ok=yes
16417 else
16418   echo "$as_me: failed program was:" >&5
16419 sed 's/^/| /' conftest.$ac_ext >&5
16420
16421 acx_pthread_ok=no
16422 fi
16423 rm -f conftest.err conftest.$ac_objext \
16424       conftest$ac_exeext conftest.$ac_ext
16425
16426         if test "x$acx_pthread_ok" = xyes; then
16427             # Don't use options that are ignored by the compiler.
16428             # We find them by checking stderror.
16429             cat >conftest.$ac_ext <<_ACEOF
16430 int
16431 main (int argc, char **argv)
16432 {
16433   (void) argc;
16434   (void) argv;
16435   return 0;
16436 }
16437 _ACEOF
16438             rm -f conftest.$ac_objext conftest$ac_exeext
16439             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
16440                 # we continue with more flags because Linux needs -lpthread
16441                 # for libpq builds on PostgreSQL.  The test above only
16442                 # tests for building binaries, not shared libraries.
16443                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
16444                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
16445             else   acx_pthread_ok=no
16446             fi
16447         fi
16448
16449         LIBS="$save_LIBS"
16450         CFLAGS="$save_CFLAGS"
16451
16452         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
16453 echo "${ECHO_T}$acx_pthread_ok" >&6
16454 done
16455 fi
16456
16457 # Various other checks:
16458 if test "x$acx_pthread_ok" = xyes; then
16459         save_LIBS="$LIBS"
16460         LIBS="$PTHREAD_LIBS $LIBS"
16461         save_CFLAGS="$CFLAGS"
16462         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16463
16464         # Detect AIX lossage: threads are created detached by default
16465         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
16466         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
16467 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
16468         cat >conftest.$ac_ext <<_ACEOF
16469 /* confdefs.h.  */
16470 _ACEOF
16471 cat confdefs.h >>conftest.$ac_ext
16472 cat >>conftest.$ac_ext <<_ACEOF
16473 /* end confdefs.h.  */
16474 #include <pthread.h>
16475 int
16476 main ()
16477 {
16478 int attr=PTHREAD_CREATE_JOINABLE;
16479   ;
16480   return 0;
16481 }
16482 _ACEOF
16483 rm -f conftest.$ac_objext conftest$ac_exeext
16484 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16485   (eval $ac_link) 2>conftest.er1
16486   ac_status=$?
16487   grep -v '^ *+' conftest.er1 >conftest.err
16488   rm -f conftest.er1
16489   cat conftest.err >&5
16490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16491   (exit $ac_status); } &&
16492          { ac_try='test -z "$ac_c_werror_flag"
16493                          || test ! -s conftest.err'
16494   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16495   (eval $ac_try) 2>&5
16496   ac_status=$?
16497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498   (exit $ac_status); }; } &&
16499          { ac_try='test -s conftest$ac_exeext'
16500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16501   (eval $ac_try) 2>&5
16502   ac_status=$?
16503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504   (exit $ac_status); }; }; then
16505   ok=PTHREAD_CREATE_JOINABLE
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 sed 's/^/| /' conftest.$ac_ext >&5
16509
16510 ok=unknown
16511 fi
16512 rm -f conftest.err conftest.$ac_objext \
16513       conftest$ac_exeext conftest.$ac_ext
16514         if test x"$ok" = xunknown; then
16515                 cat >conftest.$ac_ext <<_ACEOF
16516 /* confdefs.h.  */
16517 _ACEOF
16518 cat confdefs.h >>conftest.$ac_ext
16519 cat >>conftest.$ac_ext <<_ACEOF
16520 /* end confdefs.h.  */
16521 #include <pthread.h>
16522 int
16523 main ()
16524 {
16525 int attr=PTHREAD_CREATE_UNDETACHED;
16526   ;
16527   return 0;
16528 }
16529 _ACEOF
16530 rm -f conftest.$ac_objext conftest$ac_exeext
16531 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16532   (eval $ac_link) 2>conftest.er1
16533   ac_status=$?
16534   grep -v '^ *+' conftest.er1 >conftest.err
16535   rm -f conftest.er1
16536   cat conftest.err >&5
16537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16538   (exit $ac_status); } &&
16539          { ac_try='test -z "$ac_c_werror_flag"
16540                          || test ! -s conftest.err'
16541   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16542   (eval $ac_try) 2>&5
16543   ac_status=$?
16544   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545   (exit $ac_status); }; } &&
16546          { ac_try='test -s conftest$ac_exeext'
16547   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16548   (eval $ac_try) 2>&5
16549   ac_status=$?
16550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551   (exit $ac_status); }; }; then
16552   ok=PTHREAD_CREATE_UNDETACHED
16553 else
16554   echo "$as_me: failed program was:" >&5
16555 sed 's/^/| /' conftest.$ac_ext >&5
16556
16557 ok=unknown
16558 fi
16559 rm -f conftest.err conftest.$ac_objext \
16560       conftest$ac_exeext conftest.$ac_ext
16561         fi
16562         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
16563
16564 cat >>confdefs.h <<\_ACEOF
16565 #define PTHREAD_CREATE_JOINABLE $ok
16566 _ACEOF
16567
16568         fi
16569         echo "$as_me:$LINENO: result: ${ok}" >&5
16570 echo "${ECHO_T}${ok}" >&6
16571         if test x"$ok" = xunknown; then
16572                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
16573 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
16574         fi
16575
16576         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
16577 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
16578         flag=no
16579 # We always add these in PostgreSQL
16580 #       case "${host_cpu}-${host_os}" in
16581 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
16582 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
16583 #       esac
16584         echo "$as_me:$LINENO: result: ${flag}" >&5
16585 echo "${ECHO_T}${flag}" >&6
16586         if test "x$flag" != xno; then
16587                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
16588         fi
16589
16590         LIBS="$save_LIBS"
16591         CFLAGS="$save_CFLAGS"
16592
16593 # Supporting cc_r would require a special CC in all places that
16594 # use libpq, and that is ugly, so we don't do it.  Users can still
16595 # define their compiler as cc_r to do thread builds of everything.
16596         # More AIX lossage: must compile with cc_r
16597         # Extract the first word of "cc_r", so it can be a program name with args.
16598 set dummy cc_r; ac_word=$2
16599 echo "$as_me:$LINENO: checking for $ac_word" >&5
16600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16601 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
16602   echo $ECHO_N "(cached) $ECHO_C" >&6
16603 else
16604   if test -n "$PTHREAD_CC"; then
16605   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
16606 else
16607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16608 for as_dir in $PATH
16609 do
16610   IFS=$as_save_IFS
16611   test -z "$as_dir" && as_dir=.
16612   for ac_exec_ext in '' $ac_executable_extensions; do
16613   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16614     ac_cv_prog_PTHREAD_CC="cc_r"
16615     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16616     break 2
16617   fi
16618 done
16619 done
16620
16621   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
16622 fi
16623 fi
16624 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
16625 if test -n "$PTHREAD_CC"; then
16626   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
16627 echo "${ECHO_T}$PTHREAD_CC" >&6
16628 else
16629   echo "$as_me:$LINENO: result: no" >&5
16630 echo "${ECHO_T}no" >&6
16631 fi
16632
16633 else
16634         PTHREAD_CC="$CC"
16635 fi
16636
16637
16638
16639
16640
16641 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
16642 if test x"$acx_pthread_ok" = xyes; then
16643
16644 cat >>confdefs.h <<\_ACEOF
16645 #define HAVE_PTHREAD 1
16646 _ACEOF
16647
16648         :
16649 else
16650         acx_pthread_ok=no
16651
16652 fi
16653 ac_ext=c
16654 ac_cpp='$CPP $CPPFLAGS'
16655 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16656 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16657 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16658
16659         # set thread flags
16660
16661 # Some platforms use these, so just defineed them.  They can't hurt if they
16662 # are not supported.
16663 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
16664
16665
16666 # At this point, we don't want to muck with the compiler name for threading.
16667 # Let's see who fails, perhaps AIX.  2004-04-23
16668 if test "$PTHREAD_CC" != "$CC"; then
16669 { { echo "$as_me:$LINENO: error:
16670 PostgreSQL does not support platforms that require a special
16671 compiler binary for thread-safety.
16672 " >&5
16673 echo "$as_me: error:
16674 PostgreSQL does not support platforms that require a special
16675 compiler binary for thread-safety.
16676 " >&2;}
16677    { (exit 1); exit 1; }; }
16678 fi
16679
16680 if test "$THREAD_SUPPORT" = no; then
16681 { { echo "$as_me:$LINENO: error:
16682 Cannot enable threads on your platform.
16683 Your platform is known to not support thread-safe programs.
16684 For details, compile and run src/bin/pg_thread_test.
16685 " >&5
16686 echo "$as_me: error:
16687 Cannot enable threads on your platform.
16688 Your platform is known to not support thread-safe programs.
16689 For details, compile and run src/bin/pg_thread_test.
16690 " >&2;}
16691    { (exit 1); exit 1; }; }
16692 fi
16693
16694 # Check for *_r functions
16695 _CFLAGS="$CFLAGS"
16696 _LIBS="$LIBS"
16697 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
16698 LIBS="$LIBS $PTHREAD_LIBS"
16699
16700 if test "${ac_cv_header_pthread_h+set}" = set; then
16701   echo "$as_me:$LINENO: checking for pthread.h" >&5
16702 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16703 if test "${ac_cv_header_pthread_h+set}" = set; then
16704   echo $ECHO_N "(cached) $ECHO_C" >&6
16705 fi
16706 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16707 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16708 else
16709   # Is the header compilable?
16710 echo "$as_me:$LINENO: checking pthread.h usability" >&5
16711 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
16712 cat >conftest.$ac_ext <<_ACEOF
16713 /* confdefs.h.  */
16714 _ACEOF
16715 cat confdefs.h >>conftest.$ac_ext
16716 cat >>conftest.$ac_ext <<_ACEOF
16717 /* end confdefs.h.  */
16718 $ac_includes_default
16719 #include <pthread.h>
16720 _ACEOF
16721 rm -f conftest.$ac_objext
16722 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16723   (eval $ac_compile) 2>conftest.er1
16724   ac_status=$?
16725   grep -v '^ *+' conftest.er1 >conftest.err
16726   rm -f conftest.er1
16727   cat conftest.err >&5
16728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729   (exit $ac_status); } &&
16730          { ac_try='test -z "$ac_c_werror_flag"
16731                          || test ! -s conftest.err'
16732   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16736   (exit $ac_status); }; } &&
16737          { ac_try='test -s conftest.$ac_objext'
16738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16739   (eval $ac_try) 2>&5
16740   ac_status=$?
16741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16742   (exit $ac_status); }; }; then
16743   ac_header_compiler=yes
16744 else
16745   echo "$as_me: failed program was:" >&5
16746 sed 's/^/| /' conftest.$ac_ext >&5
16747
16748 ac_header_compiler=no
16749 fi
16750 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
16751 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16752 echo "${ECHO_T}$ac_header_compiler" >&6
16753
16754 # Is the header present?
16755 echo "$as_me:$LINENO: checking pthread.h presence" >&5
16756 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
16757 cat >conftest.$ac_ext <<_ACEOF
16758 /* confdefs.h.  */
16759 _ACEOF
16760 cat confdefs.h >>conftest.$ac_ext
16761 cat >>conftest.$ac_ext <<_ACEOF
16762 /* end confdefs.h.  */
16763 #include <pthread.h>
16764 _ACEOF
16765 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16766   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16767   ac_status=$?
16768   grep -v '^ *+' conftest.er1 >conftest.err
16769   rm -f conftest.er1
16770   cat conftest.err >&5
16771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772   (exit $ac_status); } >/dev/null; then
16773   if test -s conftest.err; then
16774     ac_cpp_err=$ac_c_preproc_warn_flag
16775     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
16776   else
16777     ac_cpp_err=
16778   fi
16779 else
16780   ac_cpp_err=yes
16781 fi
16782 if test -z "$ac_cpp_err"; then
16783   ac_header_preproc=yes
16784 else
16785   echo "$as_me: failed program was:" >&5
16786 sed 's/^/| /' conftest.$ac_ext >&5
16787
16788   ac_header_preproc=no
16789 fi
16790 rm -f conftest.err conftest.$ac_ext
16791 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16792 echo "${ECHO_T}$ac_header_preproc" >&6
16793
16794 # So?  What about this header?
16795 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16796   yes:no: )
16797     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
16798 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16799     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
16800 echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
16801     ac_header_preproc=yes
16802     ;;
16803   no:yes:* )
16804     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
16805 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
16806     { echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
16807 echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
16808     { echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
16809 echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
16810     { echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
16811 echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
16812     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
16813 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
16814     { echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
16815 echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
16816     (
16817       cat <<\_ASBOX
16818 ## ---------------------------------------- ##
16819 ## Report this to pgsql-bugs@postgresql.org ##
16820 ## ---------------------------------------- ##
16821 _ASBOX
16822     ) |
16823       sed "s/^/$as_me: WARNING:     /" >&2
16824     ;;
16825 esac
16826 echo "$as_me:$LINENO: checking for pthread.h" >&5
16827 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16828 if test "${ac_cv_header_pthread_h+set}" = set; then
16829   echo $ECHO_N "(cached) $ECHO_C" >&6
16830 else
16831   ac_cv_header_pthread_h=$ac_header_preproc
16832 fi
16833 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
16834 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16835
16836 fi
16837 if test $ac_cv_header_pthread_h = yes; then
16838   :
16839 else
16840   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
16841 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
16842    { (exit 1); exit 1; }; }
16843 fi
16844
16845
16846
16847
16848
16849
16850 for ac_func in strerror_r getpwuid_r gethostbyname_r
16851 do
16852 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16853 echo "$as_me:$LINENO: checking for $ac_func" >&5
16854 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16855 if eval "test \"\${$as_ac_var+set}\" = set"; then
16856   echo $ECHO_N "(cached) $ECHO_C" >&6
16857 else
16858   cat >conftest.$ac_ext <<_ACEOF
16859 /* confdefs.h.  */
16860 _ACEOF
16861 cat confdefs.h >>conftest.$ac_ext
16862 cat >>conftest.$ac_ext <<_ACEOF
16863 /* end confdefs.h.  */
16864 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16865    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16866 #define $ac_func innocuous_$ac_func
16867
16868 /* System header to define __stub macros and hopefully few prototypes,
16869     which can conflict with char $ac_func (); below.
16870     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16871     <limits.h> exists even on freestanding compilers.  */
16872
16873 #ifdef __STDC__
16874 # include <limits.h>
16875 #else
16876 # include <assert.h>
16877 #endif
16878
16879 #undef $ac_func
16880
16881 /* Override any gcc2 internal prototype to avoid an error.  */
16882 #ifdef __cplusplus
16883 extern "C"
16884 {
16885 #endif
16886 /* We use char because int might match the return type of a gcc2
16887    builtin and then its argument prototype would still apply.  */
16888 char $ac_func ();
16889 /* The GNU C library defines this for functions which it implements
16890     to always fail with ENOSYS.  Some functions are actually named
16891     something starting with __ and the normal name is an alias.  */
16892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16893 choke me
16894 #else
16895 char (*f) () = $ac_func;
16896 #endif
16897 #ifdef __cplusplus
16898 }
16899 #endif
16900
16901 int
16902 main ()
16903 {
16904 return f != $ac_func;
16905   ;
16906   return 0;
16907 }
16908 _ACEOF
16909 rm -f conftest.$ac_objext conftest$ac_exeext
16910 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16911   (eval $ac_link) 2>conftest.er1
16912   ac_status=$?
16913   grep -v '^ *+' conftest.er1 >conftest.err
16914   rm -f conftest.er1
16915   cat conftest.err >&5
16916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16917   (exit $ac_status); } &&
16918          { ac_try='test -z "$ac_c_werror_flag"
16919                          || test ! -s conftest.err'
16920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16921   (eval $ac_try) 2>&5
16922   ac_status=$?
16923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16924   (exit $ac_status); }; } &&
16925          { ac_try='test -s conftest$ac_exeext'
16926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16927   (eval $ac_try) 2>&5
16928   ac_status=$?
16929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16930   (exit $ac_status); }; }; then
16931   eval "$as_ac_var=yes"
16932 else
16933   echo "$as_me: failed program was:" >&5
16934 sed 's/^/| /' conftest.$ac_ext >&5
16935
16936 eval "$as_ac_var=no"
16937 fi
16938 rm -f conftest.err conftest.$ac_objext \
16939       conftest$ac_exeext conftest.$ac_ext
16940 fi
16941 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16942 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16943 if test `eval echo '${'$as_ac_var'}'` = yes; then
16944   cat >>confdefs.h <<_ACEOF
16945 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16946 _ACEOF
16947
16948 fi
16949 done
16950
16951
16952 # Do test here with the proper thread flags
16953 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
16954 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
16955 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
16956   echo $ECHO_N "(cached) $ECHO_C" >&6
16957 else
16958   cat >conftest.$ac_ext <<_ACEOF
16959 /* confdefs.h.  */
16960 _ACEOF
16961 cat confdefs.h >>conftest.$ac_ext
16962 cat >>conftest.$ac_ext <<_ACEOF
16963 /* end confdefs.h.  */
16964 #include <sys/types.h>
16965 #include <pwd.h>
16966 int
16967 main ()
16968 {
16969 uid_t uid;
16970 struct passwd *space;
16971 char *buf;
16972 size_t bufsize;
16973 struct passwd **result;
16974 getpwuid_r(uid, space, buf, bufsize, result);
16975   ;
16976   return 0;
16977 }
16978 _ACEOF
16979 rm -f conftest.$ac_objext
16980 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16981   (eval $ac_compile) 2>conftest.er1
16982   ac_status=$?
16983   grep -v '^ *+' conftest.er1 >conftest.err
16984   rm -f conftest.er1
16985   cat conftest.err >&5
16986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16987   (exit $ac_status); } &&
16988          { ac_try='test -z "$ac_c_werror_flag"
16989                          || test ! -s conftest.err'
16990   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16991   (eval $ac_try) 2>&5
16992   ac_status=$?
16993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994   (exit $ac_status); }; } &&
16995          { ac_try='test -s conftest.$ac_objext'
16996   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16997   (eval $ac_try) 2>&5
16998   ac_status=$?
16999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000   (exit $ac_status); }; }; then
17001   pgac_func_getpwuid_r_5arg=yes
17002 else
17003   echo "$as_me: failed program was:" >&5
17004 sed 's/^/| /' conftest.$ac_ext >&5
17005
17006 pgac_func_getpwuid_r_5arg=no
17007 fi
17008 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17009 fi
17010 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
17011 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
17012 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
17013
17014 cat >>confdefs.h <<\_ACEOF
17015 #define GETPWUID_R_5ARG
17016 _ACEOF
17017
17018 fi
17019
17020 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
17021 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
17022 if test "${pgac_func_strerror_r_int+set}" = set; then
17023   echo $ECHO_N "(cached) $ECHO_C" >&6
17024 else
17025   cat >conftest.$ac_ext <<_ACEOF
17026 /* confdefs.h.  */
17027 _ACEOF
17028 cat confdefs.h >>conftest.$ac_ext
17029 cat >>conftest.$ac_ext <<_ACEOF
17030 /* end confdefs.h.  */
17031 #include <string.h>
17032 int
17033 main ()
17034 {
17035 #ifndef _AIX
17036 int strerror_r(int, char *, size_t);
17037 #else
17038 /* Older AIX has 'int' for the third argument so we don't test the args. */
17039 int strerror_r();
17040 #endif
17041   ;
17042   return 0;
17043 }
17044 _ACEOF
17045 rm -f conftest.$ac_objext
17046 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17047   (eval $ac_compile) 2>conftest.er1
17048   ac_status=$?
17049   grep -v '^ *+' conftest.er1 >conftest.err
17050   rm -f conftest.er1
17051   cat conftest.err >&5
17052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17053   (exit $ac_status); } &&
17054          { ac_try='test -z "$ac_c_werror_flag"
17055                          || test ! -s conftest.err'
17056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17057   (eval $ac_try) 2>&5
17058   ac_status=$?
17059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17060   (exit $ac_status); }; } &&
17061          { ac_try='test -s conftest.$ac_objext'
17062   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17063   (eval $ac_try) 2>&5
17064   ac_status=$?
17065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17066   (exit $ac_status); }; }; then
17067   pgac_func_strerror_r_int=yes
17068 else
17069   echo "$as_me: failed program was:" >&5
17070 sed 's/^/| /' conftest.$ac_ext >&5
17071
17072 pgac_func_strerror_r_int=no
17073 fi
17074 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17075 fi
17076 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
17077 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
17078 if test x"$pgac_func_strerror_r_int" = xyes ; then
17079
17080 cat >>confdefs.h <<\_ACEOF
17081 #define STRERROR_R_INT
17082 _ACEOF
17083
17084 fi
17085
17086
17087 CFLAGS="$_CFLAGS"
17088 LIBS="$_LIBS"
17089
17090 else
17091 # do not use values from template file
17092 PTHREAD_CFLAGS=
17093 PTHREAD_LIBS=
17094 fi
17095
17096
17097
17098
17099
17100 # This test makes sure that run tests work at all.  Sometimes a shared
17101 # library is found by the linker, but the runtime linker can't find it.
17102 # This check should come after all modifications of compiler or linker
17103 # variables, and before any other run tests.
17104 echo "$as_me:$LINENO: checking test program" >&5
17105 echo $ECHO_N "checking test program... $ECHO_C" >&6
17106 if test "$cross_compiling" = yes; then
17107   echo "$as_me:$LINENO: result: cross-compiling" >&5
17108 echo "${ECHO_T}cross-compiling" >&6
17109 else
17110   cat >conftest.$ac_ext <<_ACEOF
17111 /* confdefs.h.  */
17112 _ACEOF
17113 cat confdefs.h >>conftest.$ac_ext
17114 cat >>conftest.$ac_ext <<_ACEOF
17115 /* end confdefs.h.  */
17116 int main() { return 0; }
17117 _ACEOF
17118 rm -f conftest$ac_exeext
17119 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17120   (eval $ac_link) 2>&5
17121   ac_status=$?
17122   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17123   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17124   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17125   (eval $ac_try) 2>&5
17126   ac_status=$?
17127   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17128   (exit $ac_status); }; }; then
17129   echo "$as_me:$LINENO: result: ok" >&5
17130 echo "${ECHO_T}ok" >&6
17131 else
17132   echo "$as_me: program exited with status $ac_status" >&5
17133 echo "$as_me: failed program was:" >&5
17134 sed 's/^/| /' conftest.$ac_ext >&5
17135
17136 ( exit $ac_status )
17137 echo "$as_me:$LINENO: result: failed" >&5
17138 echo "${ECHO_T}failed" >&6
17139 { { echo "$as_me:$LINENO: error:
17140 *** Could not execute a simple test program.  This may be a problem
17141 *** related to locating shared libraries.  Check the file 'config.log'
17142 *** for the exact reason." >&5
17143 echo "$as_me: error:
17144 *** Could not execute a simple test program.  This may be a problem
17145 *** related to locating shared libraries.  Check the file 'config.log'
17146 *** for the exact reason." >&2;}
17147    { (exit 1); exit 1; }; }
17148 fi
17149 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17150 fi
17151
17152
17153 # Force use of our snprintf if system's doesn't do arg control
17154 # This feature is used by NLS
17155 if test "$enable_nls" = yes &&
17156    test $pgac_need_repl_snprintf = no &&
17157 # On Win32, libintl replaces snprintf() with its own version that
17158 # understands arg control, so we don't need our own.  In fact, it
17159 # also uses macros that conflict with ours, so we _can't_ use
17160 # our own.
17161    test "$PORTNAME" != "win32"; then
17162   echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
17163 echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
17164 if test "${pgac_cv_printf_arg_control+set}" = set; then
17165   echo $ECHO_N "(cached) $ECHO_C" >&6
17166 else
17167   if test "$cross_compiling" = yes; then
17168   pgac_cv_printf_arg_control=cross
17169 else
17170   cat >conftest.$ac_ext <<_ACEOF
17171 /* confdefs.h.  */
17172 _ACEOF
17173 cat confdefs.h >>conftest.$ac_ext
17174 cat >>conftest.$ac_ext <<_ACEOF
17175 /* end confdefs.h.  */
17176 #include <stdio.h>
17177 #include <string.h>
17178
17179 int main()
17180 {
17181   char buf[100];
17182
17183   /* can it swap arguments? */
17184   snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
17185   if (strcmp(buf, "4 3") != 0)
17186     return 1;
17187   return 0;
17188 }
17189 _ACEOF
17190 rm -f conftest$ac_exeext
17191 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17192   (eval $ac_link) 2>&5
17193   ac_status=$?
17194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17195   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17197   (eval $ac_try) 2>&5
17198   ac_status=$?
17199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17200   (exit $ac_status); }; }; then
17201   pgac_cv_printf_arg_control=yes
17202 else
17203   echo "$as_me: program exited with status $ac_status" >&5
17204 echo "$as_me: failed program was:" >&5
17205 sed 's/^/| /' conftest.$ac_ext >&5
17206
17207 ( exit $ac_status )
17208 pgac_cv_printf_arg_control=no
17209 fi
17210 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17211 fi
17212
17213 fi
17214 echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
17215 echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
17216
17217   if test $pgac_cv_printf_arg_control != yes ; then
17218     pgac_need_repl_snprintf=yes
17219   fi
17220 fi
17221
17222
17223
17224 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
17225 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
17226 if test "${pgac_cv_type_long_int_64+set}" = set; then
17227   echo $ECHO_N "(cached) $ECHO_C" >&6
17228 else
17229   if test "$cross_compiling" = yes; then
17230   # If cross-compiling, check the size reported by the compiler and
17231 # trust that the arithmetic works.
17232 cat >conftest.$ac_ext <<_ACEOF
17233 /* confdefs.h.  */
17234 _ACEOF
17235 cat confdefs.h >>conftest.$ac_ext
17236 cat >>conftest.$ac_ext <<_ACEOF
17237 /* end confdefs.h.  */
17238
17239 int
17240 main ()
17241 {
17242 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17243 test_array [0] = 0
17244
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 rm -f conftest.$ac_objext
17250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17251   (eval $ac_compile) 2>conftest.er1
17252   ac_status=$?
17253   grep -v '^ *+' conftest.er1 >conftest.err
17254   rm -f conftest.er1
17255   cat conftest.err >&5
17256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17257   (exit $ac_status); } &&
17258          { ac_try='test -z "$ac_c_werror_flag"
17259                          || test ! -s conftest.err'
17260   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17261   (eval $ac_try) 2>&5
17262   ac_status=$?
17263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17264   (exit $ac_status); }; } &&
17265          { ac_try='test -s conftest.$ac_objext'
17266   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17267   (eval $ac_try) 2>&5
17268   ac_status=$?
17269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17270   (exit $ac_status); }; }; then
17271   pgac_cv_type_long_int_64=yes
17272 else
17273   echo "$as_me: failed program was:" >&5
17274 sed 's/^/| /' conftest.$ac_ext >&5
17275
17276 pgac_cv_type_long_int_64=no
17277 fi
17278 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17279 else
17280   cat >conftest.$ac_ext <<_ACEOF
17281 /* confdefs.h.  */
17282 _ACEOF
17283 cat confdefs.h >>conftest.$ac_ext
17284 cat >>conftest.$ac_ext <<_ACEOF
17285 /* end confdefs.h.  */
17286 typedef long int ac_int64;
17287
17288 /*
17289  * These are globals to discourage the compiler from folding all the
17290  * arithmetic tests down to compile-time constants.
17291  */
17292 ac_int64 a = 20000001;
17293 ac_int64 b = 40000005;
17294
17295 int does_int64_work()
17296 {
17297   ac_int64 c,d;
17298
17299   if (sizeof(ac_int64) != 8)
17300     return 0;                   /* definitely not the right size */
17301
17302   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17303   c = a * b;
17304   d = (c + b) / b;
17305   if (d != a+1)
17306     return 0;
17307   return 1;
17308 }
17309 main() {
17310   exit(! does_int64_work());
17311 }
17312 _ACEOF
17313 rm -f conftest$ac_exeext
17314 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17315   (eval $ac_link) 2>&5
17316   ac_status=$?
17317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324   pgac_cv_type_long_int_64=yes
17325 else
17326   echo "$as_me: program exited with status $ac_status" >&5
17327 echo "$as_me: failed program was:" >&5
17328 sed 's/^/| /' conftest.$ac_ext >&5
17329
17330 ( exit $ac_status )
17331 pgac_cv_type_long_int_64=no
17332 fi
17333 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17334 fi
17335 fi
17336 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
17337 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
17338
17339 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17340 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17341
17342 cat >>confdefs.h <<\_ACEOF
17343 #define HAVE_LONG_INT_64
17344 _ACEOF
17345
17346 fi
17347
17348
17349 if test x"$HAVE_LONG_INT_64" = x"no" ; then
17350   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
17351 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
17352 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
17353   echo $ECHO_N "(cached) $ECHO_C" >&6
17354 else
17355   if test "$cross_compiling" = yes; then
17356   # If cross-compiling, check the size reported by the compiler and
17357 # trust that the arithmetic works.
17358 cat >conftest.$ac_ext <<_ACEOF
17359 /* confdefs.h.  */
17360 _ACEOF
17361 cat confdefs.h >>conftest.$ac_ext
17362 cat >>conftest.$ac_ext <<_ACEOF
17363 /* end confdefs.h.  */
17364
17365 int
17366 main ()
17367 {
17368 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17369 test_array [0] = 0
17370
17371   ;
17372   return 0;
17373 }
17374 _ACEOF
17375 rm -f conftest.$ac_objext
17376 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17377   (eval $ac_compile) 2>conftest.er1
17378   ac_status=$?
17379   grep -v '^ *+' conftest.er1 >conftest.err
17380   rm -f conftest.er1
17381   cat conftest.err >&5
17382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17383   (exit $ac_status); } &&
17384          { ac_try='test -z "$ac_c_werror_flag"
17385                          || test ! -s conftest.err'
17386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17387   (eval $ac_try) 2>&5
17388   ac_status=$?
17389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390   (exit $ac_status); }; } &&
17391          { ac_try='test -s conftest.$ac_objext'
17392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17396   (exit $ac_status); }; }; then
17397   pgac_cv_type_long_long_int_64=yes
17398 else
17399   echo "$as_me: failed program was:" >&5
17400 sed 's/^/| /' conftest.$ac_ext >&5
17401
17402 pgac_cv_type_long_long_int_64=no
17403 fi
17404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17405 else
17406   cat >conftest.$ac_ext <<_ACEOF
17407 /* confdefs.h.  */
17408 _ACEOF
17409 cat confdefs.h >>conftest.$ac_ext
17410 cat >>conftest.$ac_ext <<_ACEOF
17411 /* end confdefs.h.  */
17412 typedef long long int ac_int64;
17413
17414 /*
17415  * These are globals to discourage the compiler from folding all the
17416  * arithmetic tests down to compile-time constants.
17417  */
17418 ac_int64 a = 20000001;
17419 ac_int64 b = 40000005;
17420
17421 int does_int64_work()
17422 {
17423   ac_int64 c,d;
17424
17425   if (sizeof(ac_int64) != 8)
17426     return 0;                   /* definitely not the right size */
17427
17428   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17429   c = a * b;
17430   d = (c + b) / b;
17431   if (d != a+1)
17432     return 0;
17433   return 1;
17434 }
17435 main() {
17436   exit(! does_int64_work());
17437 }
17438 _ACEOF
17439 rm -f conftest$ac_exeext
17440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17441   (eval $ac_link) 2>&5
17442   ac_status=$?
17443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17446   (eval $ac_try) 2>&5
17447   ac_status=$?
17448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17449   (exit $ac_status); }; }; then
17450   pgac_cv_type_long_long_int_64=yes
17451 else
17452   echo "$as_me: program exited with status $ac_status" >&5
17453 echo "$as_me: failed program was:" >&5
17454 sed 's/^/| /' conftest.$ac_ext >&5
17455
17456 ( exit $ac_status )
17457 pgac_cv_type_long_long_int_64=no
17458 fi
17459 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17460 fi
17461 fi
17462 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
17463 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
17464
17465 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17466 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17467
17468 cat >>confdefs.h <<\_ACEOF
17469 #define HAVE_LONG_LONG_INT_64
17470 _ACEOF
17471
17472 fi
17473
17474 fi
17475
17476
17477
17478 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
17479   cat >conftest.$ac_ext <<_ACEOF
17480 /* confdefs.h.  */
17481 _ACEOF
17482 cat confdefs.h >>conftest.$ac_ext
17483 cat >>conftest.$ac_ext <<_ACEOF
17484 /* end confdefs.h.  */
17485
17486 #define INT64CONST(x)  x##LL
17487 long long int foo = INT64CONST(0x1234567890123456);
17488
17489 int
17490 main ()
17491 {
17492
17493   ;
17494   return 0;
17495 }
17496 _ACEOF
17497 rm -f conftest.$ac_objext
17498 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17499   (eval $ac_compile) 2>conftest.er1
17500   ac_status=$?
17501   grep -v '^ *+' conftest.er1 >conftest.err
17502   rm -f conftest.er1
17503   cat conftest.err >&5
17504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17505   (exit $ac_status); } &&
17506          { ac_try='test -z "$ac_c_werror_flag"
17507                          || test ! -s conftest.err'
17508   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17512   (exit $ac_status); }; } &&
17513          { ac_try='test -s conftest.$ac_objext'
17514   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17515   (eval $ac_try) 2>&5
17516   ac_status=$?
17517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17518   (exit $ac_status); }; }; then
17519
17520 cat >>confdefs.h <<\_ACEOF
17521 #define HAVE_LL_CONSTANTS 1
17522 _ACEOF
17523
17524 else
17525   echo "$as_me: failed program was:" >&5
17526 sed 's/^/| /' conftest.$ac_ext >&5
17527
17528 fi
17529 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17530 fi
17531
17532
17533 # If we found "long int" is 64 bits, assume snprintf handles it.  If
17534 # we found we need to use "long long int", better check.  We cope with
17535 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
17536 # work, fall back to our own snprintf emulation (which we know uses %lld).
17537
17538 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
17539   if test $pgac_need_repl_snprintf = no; then
17540     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
17541 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
17542 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
17543   echo $ECHO_N "(cached) $ECHO_C" >&6
17544 else
17545   for pgac_format in '%lld' '%qd' '%I64d'; do
17546 if test "$cross_compiling" = yes; then
17547   pgac_cv_snprintf_long_long_int_format=cross; break
17548 else
17549   cat >conftest.$ac_ext <<_ACEOF
17550 /* confdefs.h.  */
17551 _ACEOF
17552 cat confdefs.h >>conftest.$ac_ext
17553 cat >>conftest.$ac_ext <<_ACEOF
17554 /* end confdefs.h.  */
17555 #include <stdio.h>
17556 typedef long long int ac_int64;
17557 #define INT64_FORMAT "$pgac_format"
17558
17559 ac_int64 a = 20000001;
17560 ac_int64 b = 40000005;
17561
17562 int does_int64_snprintf_work()
17563 {
17564   ac_int64 c;
17565   char buf[100];
17566
17567   if (sizeof(ac_int64) != 8)
17568     return 0;                   /* doesn't look like the right size */
17569
17570   c = a * b;
17571   snprintf(buf, 100, INT64_FORMAT, c);
17572   if (strcmp(buf, "800000140000005") != 0)
17573     return 0;                   /* either multiply or snprintf is busted */
17574   return 1;
17575 }
17576 main() {
17577   exit(! does_int64_snprintf_work());
17578 }
17579 _ACEOF
17580 rm -f conftest$ac_exeext
17581 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17582   (eval $ac_link) 2>&5
17583   ac_status=$?
17584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17585   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17586   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17590   (exit $ac_status); }; }; then
17591   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
17592 else
17593   echo "$as_me: program exited with status $ac_status" >&5
17594 echo "$as_me: failed program was:" >&5
17595 sed 's/^/| /' conftest.$ac_ext >&5
17596
17597 fi
17598 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17599 fi
17600 done
17601 fi
17602
17603 LONG_LONG_INT_FORMAT=''
17604
17605 case $pgac_cv_snprintf_long_long_int_format in
17606   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
17607 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
17608   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
17609 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
17610          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
17611   *)     echo "$as_me:$LINENO: result: none" >&5
17612 echo "${ECHO_T}none" >&6;;
17613 esac
17614     if test "$LONG_LONG_INT_FORMAT" = ""; then
17615       # Force usage of our own snprintf, since system snprintf is broken
17616       pgac_need_repl_snprintf=yes
17617       LONG_LONG_INT_FORMAT='%lld'
17618     fi
17619   else
17620     # Here if we previously decided we needed to use our own snprintf
17621     LONG_LONG_INT_FORMAT='%lld'
17622   fi
17623   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
17624   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
17625   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
17626 else
17627   # Here if we are not using 'long long int' at all
17628   INT64_FORMAT='"%ld"'
17629   UINT64_FORMAT='"%lu"'
17630 fi
17631
17632
17633 cat >>confdefs.h <<_ACEOF
17634 #define INT64_FORMAT $INT64_FORMAT
17635 _ACEOF
17636
17637
17638
17639 cat >>confdefs.h <<_ACEOF
17640 #define UINT64_FORMAT $UINT64_FORMAT
17641 _ACEOF
17642
17643
17644 # Now we have checked all the reasons to replace snprintf
17645 if test $pgac_need_repl_snprintf = yes; then
17646
17647 cat >>confdefs.h <<\_ACEOF
17648 #define USE_SNPRINTF 1
17649 _ACEOF
17650
17651   case $LIBOBJS in
17652     "snprintf.$ac_objext"   | \
17653   *" snprintf.$ac_objext"   | \
17654     "snprintf.$ac_objext "* | \
17655   *" snprintf.$ac_objext "* ) ;;
17656   *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" ;;
17657 esac
17658
17659 fi
17660
17661 # Need a #define for the size of Datum (unsigned long)
17662 echo "$as_me:$LINENO: checking for unsigned long" >&5
17663 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
17664 if test "${ac_cv_type_unsigned_long+set}" = set; then
17665   echo $ECHO_N "(cached) $ECHO_C" >&6
17666 else
17667   cat >conftest.$ac_ext <<_ACEOF
17668 /* confdefs.h.  */
17669 _ACEOF
17670 cat confdefs.h >>conftest.$ac_ext
17671 cat >>conftest.$ac_ext <<_ACEOF
17672 /* end confdefs.h.  */
17673 $ac_includes_default
17674 int
17675 main ()
17676 {
17677 if ((unsigned long *) 0)
17678   return 0;
17679 if (sizeof (unsigned long))
17680   return 0;
17681   ;
17682   return 0;
17683 }
17684 _ACEOF
17685 rm -f conftest.$ac_objext
17686 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17687   (eval $ac_compile) 2>conftest.er1
17688   ac_status=$?
17689   grep -v '^ *+' conftest.er1 >conftest.err
17690   rm -f conftest.er1
17691   cat conftest.err >&5
17692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17693   (exit $ac_status); } &&
17694          { ac_try='test -z "$ac_c_werror_flag"
17695                          || test ! -s conftest.err'
17696   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17697   (eval $ac_try) 2>&5
17698   ac_status=$?
17699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17700   (exit $ac_status); }; } &&
17701          { ac_try='test -s conftest.$ac_objext'
17702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17703   (eval $ac_try) 2>&5
17704   ac_status=$?
17705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17706   (exit $ac_status); }; }; then
17707   ac_cv_type_unsigned_long=yes
17708 else
17709   echo "$as_me: failed program was:" >&5
17710 sed 's/^/| /' conftest.$ac_ext >&5
17711
17712 ac_cv_type_unsigned_long=no
17713 fi
17714 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17715 fi
17716 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
17717 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
17718
17719 echo "$as_me:$LINENO: checking size of unsigned long" >&5
17720 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
17721 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
17722   echo $ECHO_N "(cached) $ECHO_C" >&6
17723 else
17724   if test "$ac_cv_type_unsigned_long" = yes; then
17725   # The cast to unsigned long works around a bug in the HP C Compiler
17726   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17727   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17728   # This bug is HP SR number 8606223364.
17729   if test "$cross_compiling" = yes; then
17730   # Depending upon the size, compute the lo and hi bounds.
17731 cat >conftest.$ac_ext <<_ACEOF
17732 /* confdefs.h.  */
17733 _ACEOF
17734 cat confdefs.h >>conftest.$ac_ext
17735 cat >>conftest.$ac_ext <<_ACEOF
17736 /* end confdefs.h.  */
17737 $ac_includes_default
17738 int
17739 main ()
17740 {
17741 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
17742 test_array [0] = 0
17743
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 rm -f conftest.$ac_objext
17749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17750   (eval $ac_compile) 2>conftest.er1
17751   ac_status=$?
17752   grep -v '^ *+' conftest.er1 >conftest.err
17753   rm -f conftest.er1
17754   cat conftest.err >&5
17755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17756   (exit $ac_status); } &&
17757          { ac_try='test -z "$ac_c_werror_flag"
17758                          || test ! -s conftest.err'
17759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17763   (exit $ac_status); }; } &&
17764          { ac_try='test -s conftest.$ac_objext'
17765   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17766   (eval $ac_try) 2>&5
17767   ac_status=$?
17768   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17769   (exit $ac_status); }; }; then
17770   ac_lo=0 ac_mid=0
17771   while :; do
17772     cat >conftest.$ac_ext <<_ACEOF
17773 /* confdefs.h.  */
17774 _ACEOF
17775 cat confdefs.h >>conftest.$ac_ext
17776 cat >>conftest.$ac_ext <<_ACEOF
17777 /* end confdefs.h.  */
17778 $ac_includes_default
17779 int
17780 main ()
17781 {
17782 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17783 test_array [0] = 0
17784
17785   ;
17786   return 0;
17787 }
17788 _ACEOF
17789 rm -f conftest.$ac_objext
17790 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17791   (eval $ac_compile) 2>conftest.er1
17792   ac_status=$?
17793   grep -v '^ *+' conftest.er1 >conftest.err
17794   rm -f conftest.er1
17795   cat conftest.err >&5
17796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17797   (exit $ac_status); } &&
17798          { ac_try='test -z "$ac_c_werror_flag"
17799                          || test ! -s conftest.err'
17800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17801   (eval $ac_try) 2>&5
17802   ac_status=$?
17803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17804   (exit $ac_status); }; } &&
17805          { ac_try='test -s conftest.$ac_objext'
17806   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17810   (exit $ac_status); }; }; then
17811   ac_hi=$ac_mid; break
17812 else
17813   echo "$as_me: failed program was:" >&5
17814 sed 's/^/| /' conftest.$ac_ext >&5
17815
17816 ac_lo=`expr $ac_mid + 1`
17817                     if test $ac_lo -le $ac_mid; then
17818                       ac_lo= ac_hi=
17819                       break
17820                     fi
17821                     ac_mid=`expr 2 '*' $ac_mid + 1`
17822 fi
17823 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17824   done
17825 else
17826   echo "$as_me: failed program was:" >&5
17827 sed 's/^/| /' conftest.$ac_ext >&5
17828
17829 cat >conftest.$ac_ext <<_ACEOF
17830 /* confdefs.h.  */
17831 _ACEOF
17832 cat confdefs.h >>conftest.$ac_ext
17833 cat >>conftest.$ac_ext <<_ACEOF
17834 /* end confdefs.h.  */
17835 $ac_includes_default
17836 int
17837 main ()
17838 {
17839 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
17840 test_array [0] = 0
17841
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext
17847 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17848   (eval $ac_compile) 2>conftest.er1
17849   ac_status=$?
17850   grep -v '^ *+' conftest.er1 >conftest.err
17851   rm -f conftest.er1
17852   cat conftest.err >&5
17853   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854   (exit $ac_status); } &&
17855          { ac_try='test -z "$ac_c_werror_flag"
17856                          || test ! -s conftest.err'
17857   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17858   (eval $ac_try) 2>&5
17859   ac_status=$?
17860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17861   (exit $ac_status); }; } &&
17862          { ac_try='test -s conftest.$ac_objext'
17863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17864   (eval $ac_try) 2>&5
17865   ac_status=$?
17866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867   (exit $ac_status); }; }; then
17868   ac_hi=-1 ac_mid=-1
17869   while :; do
17870     cat >conftest.$ac_ext <<_ACEOF
17871 /* confdefs.h.  */
17872 _ACEOF
17873 cat confdefs.h >>conftest.$ac_ext
17874 cat >>conftest.$ac_ext <<_ACEOF
17875 /* end confdefs.h.  */
17876 $ac_includes_default
17877 int
17878 main ()
17879 {
17880 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
17881 test_array [0] = 0
17882
17883   ;
17884   return 0;
17885 }
17886 _ACEOF
17887 rm -f conftest.$ac_objext
17888 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17889   (eval $ac_compile) 2>conftest.er1
17890   ac_status=$?
17891   grep -v '^ *+' conftest.er1 >conftest.err
17892   rm -f conftest.er1
17893   cat conftest.err >&5
17894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17895   (exit $ac_status); } &&
17896          { ac_try='test -z "$ac_c_werror_flag"
17897                          || test ! -s conftest.err'
17898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17899   (eval $ac_try) 2>&5
17900   ac_status=$?
17901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17902   (exit $ac_status); }; } &&
17903          { ac_try='test -s conftest.$ac_objext'
17904   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17905   (eval $ac_try) 2>&5
17906   ac_status=$?
17907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908   (exit $ac_status); }; }; then
17909   ac_lo=$ac_mid; break
17910 else
17911   echo "$as_me: failed program was:" >&5
17912 sed 's/^/| /' conftest.$ac_ext >&5
17913
17914 ac_hi=`expr '(' $ac_mid ')' - 1`
17915                        if test $ac_mid -le $ac_hi; then
17916                          ac_lo= ac_hi=
17917                          break
17918                        fi
17919                        ac_mid=`expr 2 '*' $ac_mid`
17920 fi
17921 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17922   done
17923 else
17924   echo "$as_me: failed program was:" >&5
17925 sed 's/^/| /' conftest.$ac_ext >&5
17926
17927 ac_lo= ac_hi=
17928 fi
17929 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17930 fi
17931 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17932 # Binary search between lo and hi bounds.
17933 while test "x$ac_lo" != "x$ac_hi"; do
17934   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
17935   cat >conftest.$ac_ext <<_ACEOF
17936 /* confdefs.h.  */
17937 _ACEOF
17938 cat confdefs.h >>conftest.$ac_ext
17939 cat >>conftest.$ac_ext <<_ACEOF
17940 /* end confdefs.h.  */
17941 $ac_includes_default
17942 int
17943 main ()
17944 {
17945 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
17946 test_array [0] = 0
17947
17948   ;
17949   return 0;
17950 }
17951 _ACEOF
17952 rm -f conftest.$ac_objext
17953 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17954   (eval $ac_compile) 2>conftest.er1
17955   ac_status=$?
17956   grep -v '^ *+' conftest.er1 >conftest.err
17957   rm -f conftest.er1
17958   cat conftest.err >&5
17959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17960   (exit $ac_status); } &&
17961          { ac_try='test -z "$ac_c_werror_flag"
17962                          || test ! -s conftest.err'
17963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17964   (eval $ac_try) 2>&5
17965   ac_status=$?
17966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17967   (exit $ac_status); }; } &&
17968          { ac_try='test -s conftest.$ac_objext'
17969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17970   (eval $ac_try) 2>&5
17971   ac_status=$?
17972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17973   (exit $ac_status); }; }; then
17974   ac_hi=$ac_mid
17975 else
17976   echo "$as_me: failed program was:" >&5
17977 sed 's/^/| /' conftest.$ac_ext >&5
17978
17979 ac_lo=`expr '(' $ac_mid ')' + 1`
17980 fi
17981 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
17982 done
17983 case $ac_lo in
17984 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
17985 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
17986 See \`config.log' for more details." >&5
17987 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
17988 See \`config.log' for more details." >&2;}
17989    { (exit 1); exit 1; }; } ;;
17990 esac
17991 else
17992   if test "$cross_compiling" = yes; then
17993   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17994 See \`config.log' for more details." >&5
17995 echo "$as_me: error: cannot run test program while cross compiling
17996 See \`config.log' for more details." >&2;}
17997    { (exit 1); exit 1; }; }
17998 else
17999   cat >conftest.$ac_ext <<_ACEOF
18000 /* confdefs.h.  */
18001 _ACEOF
18002 cat confdefs.h >>conftest.$ac_ext
18003 cat >>conftest.$ac_ext <<_ACEOF
18004 /* end confdefs.h.  */
18005 $ac_includes_default
18006 long longval () { return (long) (sizeof (unsigned long)); }
18007 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
18008 #include <stdio.h>
18009 #include <stdlib.h>
18010 int
18011 main ()
18012 {
18013
18014   FILE *f = fopen ("conftest.val", "w");
18015   if (! f)
18016     exit (1);
18017   if (((long) (sizeof (unsigned long))) < 0)
18018     {
18019       long i = longval ();
18020       if (i != ((long) (sizeof (unsigned long))))
18021         exit (1);
18022       fprintf (f, "%ld\n", i);
18023     }
18024   else
18025     {
18026       unsigned long i = ulongval ();
18027       if (i != ((long) (sizeof (unsigned long))))
18028         exit (1);
18029       fprintf (f, "%lu\n", i);
18030     }
18031   exit (ferror (f) || fclose (f) != 0);
18032
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest$ac_exeext
18038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18039   (eval $ac_link) 2>&5
18040   ac_status=$?
18041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18042   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18044   (eval $ac_try) 2>&5
18045   ac_status=$?
18046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18047   (exit $ac_status); }; }; then
18048   ac_cv_sizeof_unsigned_long=`cat conftest.val`
18049 else
18050   echo "$as_me: program exited with status $ac_status" >&5
18051 echo "$as_me: failed program was:" >&5
18052 sed 's/^/| /' conftest.$ac_ext >&5
18053
18054 ( exit $ac_status )
18055 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77
18056 See \`config.log' for more details." >&5
18057 echo "$as_me: error: cannot compute sizeof (unsigned long), 77
18058 See \`config.log' for more details." >&2;}
18059    { (exit 1); exit 1; }; }
18060 fi
18061 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18062 fi
18063 fi
18064 rm -f conftest.val
18065 else
18066   ac_cv_sizeof_unsigned_long=0
18067 fi
18068 fi
18069 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
18070 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
18071 cat >>confdefs.h <<_ACEOF
18072 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
18073 _ACEOF
18074
18075
18076
18077 # And one for the size of size_t (enables tweaks for > 32bit address space)
18078 echo "$as_me:$LINENO: checking for size_t" >&5
18079 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
18080 if test "${ac_cv_type_size_t+set}" = set; then
18081   echo $ECHO_N "(cached) $ECHO_C" >&6
18082 else
18083   cat >conftest.$ac_ext <<_ACEOF
18084 /* confdefs.h.  */
18085 _ACEOF
18086 cat confdefs.h >>conftest.$ac_ext
18087 cat >>conftest.$ac_ext <<_ACEOF
18088 /* end confdefs.h.  */
18089 $ac_includes_default
18090 int
18091 main ()
18092 {
18093 if ((size_t *) 0)
18094   return 0;
18095 if (sizeof (size_t))
18096   return 0;
18097   ;
18098   return 0;
18099 }
18100 _ACEOF
18101 rm -f conftest.$ac_objext
18102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18103   (eval $ac_compile) 2>conftest.er1
18104   ac_status=$?
18105   grep -v '^ *+' conftest.er1 >conftest.err
18106   rm -f conftest.er1
18107   cat conftest.err >&5
18108   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18109   (exit $ac_status); } &&
18110          { ac_try='test -z "$ac_c_werror_flag"
18111                          || test ! -s conftest.err'
18112   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18113   (eval $ac_try) 2>&5
18114   ac_status=$?
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); }; } &&
18117          { ac_try='test -s conftest.$ac_objext'
18118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18119   (eval $ac_try) 2>&5
18120   ac_status=$?
18121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18122   (exit $ac_status); }; }; then
18123   ac_cv_type_size_t=yes
18124 else
18125   echo "$as_me: failed program was:" >&5
18126 sed 's/^/| /' conftest.$ac_ext >&5
18127
18128 ac_cv_type_size_t=no
18129 fi
18130 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18131 fi
18132 echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18133 echo "${ECHO_T}$ac_cv_type_size_t" >&6
18134
18135 echo "$as_me:$LINENO: checking size of size_t" >&5
18136 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
18137 if test "${ac_cv_sizeof_size_t+set}" = set; then
18138   echo $ECHO_N "(cached) $ECHO_C" >&6
18139 else
18140   if test "$ac_cv_type_size_t" = yes; then
18141   # The cast to unsigned long works around a bug in the HP C Compiler
18142   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18143   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18144   # This bug is HP SR number 8606223364.
18145   if test "$cross_compiling" = yes; then
18146   # Depending upon the size, compute the lo and hi bounds.
18147 cat >conftest.$ac_ext <<_ACEOF
18148 /* confdefs.h.  */
18149 _ACEOF
18150 cat confdefs.h >>conftest.$ac_ext
18151 cat >>conftest.$ac_ext <<_ACEOF
18152 /* end confdefs.h.  */
18153 $ac_includes_default
18154 int
18155 main ()
18156 {
18157 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
18158 test_array [0] = 0
18159
18160   ;
18161   return 0;
18162 }
18163 _ACEOF
18164 rm -f conftest.$ac_objext
18165 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18166   (eval $ac_compile) 2>conftest.er1
18167   ac_status=$?
18168   grep -v '^ *+' conftest.er1 >conftest.err
18169   rm -f conftest.er1
18170   cat conftest.err >&5
18171   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172   (exit $ac_status); } &&
18173          { ac_try='test -z "$ac_c_werror_flag"
18174                          || test ! -s conftest.err'
18175   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18176   (eval $ac_try) 2>&5
18177   ac_status=$?
18178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18179   (exit $ac_status); }; } &&
18180          { ac_try='test -s conftest.$ac_objext'
18181   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18182   (eval $ac_try) 2>&5
18183   ac_status=$?
18184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18185   (exit $ac_status); }; }; then
18186   ac_lo=0 ac_mid=0
18187   while :; do
18188     cat >conftest.$ac_ext <<_ACEOF
18189 /* confdefs.h.  */
18190 _ACEOF
18191 cat confdefs.h >>conftest.$ac_ext
18192 cat >>conftest.$ac_ext <<_ACEOF
18193 /* end confdefs.h.  */
18194 $ac_includes_default
18195 int
18196 main ()
18197 {
18198 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18199 test_array [0] = 0
18200
18201   ;
18202   return 0;
18203 }
18204 _ACEOF
18205 rm -f conftest.$ac_objext
18206 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18207   (eval $ac_compile) 2>conftest.er1
18208   ac_status=$?
18209   grep -v '^ *+' conftest.er1 >conftest.err
18210   rm -f conftest.er1
18211   cat conftest.err >&5
18212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18213   (exit $ac_status); } &&
18214          { ac_try='test -z "$ac_c_werror_flag"
18215                          || test ! -s conftest.err'
18216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18217   (eval $ac_try) 2>&5
18218   ac_status=$?
18219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18220   (exit $ac_status); }; } &&
18221          { ac_try='test -s conftest.$ac_objext'
18222   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18223   (eval $ac_try) 2>&5
18224   ac_status=$?
18225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18226   (exit $ac_status); }; }; then
18227   ac_hi=$ac_mid; break
18228 else
18229   echo "$as_me: failed program was:" >&5
18230 sed 's/^/| /' conftest.$ac_ext >&5
18231
18232 ac_lo=`expr $ac_mid + 1`
18233                     if test $ac_lo -le $ac_mid; then
18234                       ac_lo= ac_hi=
18235                       break
18236                     fi
18237                     ac_mid=`expr 2 '*' $ac_mid + 1`
18238 fi
18239 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18240   done
18241 else
18242   echo "$as_me: failed program was:" >&5
18243 sed 's/^/| /' conftest.$ac_ext >&5
18244
18245 cat >conftest.$ac_ext <<_ACEOF
18246 /* confdefs.h.  */
18247 _ACEOF
18248 cat confdefs.h >>conftest.$ac_ext
18249 cat >>conftest.$ac_ext <<_ACEOF
18250 /* end confdefs.h.  */
18251 $ac_includes_default
18252 int
18253 main ()
18254 {
18255 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
18256 test_array [0] = 0
18257
18258   ;
18259   return 0;
18260 }
18261 _ACEOF
18262 rm -f conftest.$ac_objext
18263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18264   (eval $ac_compile) 2>conftest.er1
18265   ac_status=$?
18266   grep -v '^ *+' conftest.er1 >conftest.err
18267   rm -f conftest.er1
18268   cat conftest.err >&5
18269   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270   (exit $ac_status); } &&
18271          { ac_try='test -z "$ac_c_werror_flag"
18272                          || test ! -s conftest.err'
18273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18274   (eval $ac_try) 2>&5
18275   ac_status=$?
18276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18277   (exit $ac_status); }; } &&
18278          { ac_try='test -s conftest.$ac_objext'
18279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18283   (exit $ac_status); }; }; then
18284   ac_hi=-1 ac_mid=-1
18285   while :; do
18286     cat >conftest.$ac_ext <<_ACEOF
18287 /* confdefs.h.  */
18288 _ACEOF
18289 cat confdefs.h >>conftest.$ac_ext
18290 cat >>conftest.$ac_ext <<_ACEOF
18291 /* end confdefs.h.  */
18292 $ac_includes_default
18293 int
18294 main ()
18295 {
18296 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
18297 test_array [0] = 0
18298
18299   ;
18300   return 0;
18301 }
18302 _ACEOF
18303 rm -f conftest.$ac_objext
18304 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18305   (eval $ac_compile) 2>conftest.er1
18306   ac_status=$?
18307   grep -v '^ *+' conftest.er1 >conftest.err
18308   rm -f conftest.er1
18309   cat conftest.err >&5
18310   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18311   (exit $ac_status); } &&
18312          { ac_try='test -z "$ac_c_werror_flag"
18313                          || test ! -s conftest.err'
18314   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18315   (eval $ac_try) 2>&5
18316   ac_status=$?
18317   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18318   (exit $ac_status); }; } &&
18319          { ac_try='test -s conftest.$ac_objext'
18320   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18321   (eval $ac_try) 2>&5
18322   ac_status=$?
18323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18324   (exit $ac_status); }; }; then
18325   ac_lo=$ac_mid; break
18326 else
18327   echo "$as_me: failed program was:" >&5
18328 sed 's/^/| /' conftest.$ac_ext >&5
18329
18330 ac_hi=`expr '(' $ac_mid ')' - 1`
18331                        if test $ac_mid -le $ac_hi; then
18332                          ac_lo= ac_hi=
18333                          break
18334                        fi
18335                        ac_mid=`expr 2 '*' $ac_mid`
18336 fi
18337 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18338   done
18339 else
18340   echo "$as_me: failed program was:" >&5
18341 sed 's/^/| /' conftest.$ac_ext >&5
18342
18343 ac_lo= ac_hi=
18344 fi
18345 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18346 fi
18347 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18348 # Binary search between lo and hi bounds.
18349 while test "x$ac_lo" != "x$ac_hi"; do
18350   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18351   cat >conftest.$ac_ext <<_ACEOF
18352 /* confdefs.h.  */
18353 _ACEOF
18354 cat confdefs.h >>conftest.$ac_ext
18355 cat >>conftest.$ac_ext <<_ACEOF
18356 /* end confdefs.h.  */
18357 $ac_includes_default
18358 int
18359 main ()
18360 {
18361 static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
18362 test_array [0] = 0
18363
18364   ;
18365   return 0;
18366 }
18367 _ACEOF
18368 rm -f conftest.$ac_objext
18369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18370   (eval $ac_compile) 2>conftest.er1
18371   ac_status=$?
18372   grep -v '^ *+' conftest.er1 >conftest.err
18373   rm -f conftest.er1
18374   cat conftest.err >&5
18375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18376   (exit $ac_status); } &&
18377          { ac_try='test -z "$ac_c_werror_flag"
18378                          || test ! -s conftest.err'
18379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18380   (eval $ac_try) 2>&5
18381   ac_status=$?
18382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18383   (exit $ac_status); }; } &&
18384          { ac_try='test -s conftest.$ac_objext'
18385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18386   (eval $ac_try) 2>&5
18387   ac_status=$?
18388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18389   (exit $ac_status); }; }; then
18390   ac_hi=$ac_mid
18391 else
18392   echo "$as_me: failed program was:" >&5
18393 sed 's/^/| /' conftest.$ac_ext >&5
18394
18395 ac_lo=`expr '(' $ac_mid ')' + 1`
18396 fi
18397 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18398 done
18399 case $ac_lo in
18400 ?*) ac_cv_sizeof_size_t=$ac_lo;;
18401 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18402 See \`config.log' for more details." >&5
18403 echo "$as_me: error: cannot compute sizeof (size_t), 77
18404 See \`config.log' for more details." >&2;}
18405    { (exit 1); exit 1; }; } ;;
18406 esac
18407 else
18408   if test "$cross_compiling" = yes; then
18409   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18410 See \`config.log' for more details." >&5
18411 echo "$as_me: error: cannot run test program while cross compiling
18412 See \`config.log' for more details." >&2;}
18413    { (exit 1); exit 1; }; }
18414 else
18415   cat >conftest.$ac_ext <<_ACEOF
18416 /* confdefs.h.  */
18417 _ACEOF
18418 cat confdefs.h >>conftest.$ac_ext
18419 cat >>conftest.$ac_ext <<_ACEOF
18420 /* end confdefs.h.  */
18421 $ac_includes_default
18422 long longval () { return (long) (sizeof (size_t)); }
18423 unsigned long ulongval () { return (long) (sizeof (size_t)); }
18424 #include <stdio.h>
18425 #include <stdlib.h>
18426 int
18427 main ()
18428 {
18429
18430   FILE *f = fopen ("conftest.val", "w");
18431   if (! f)
18432     exit (1);
18433   if (((long) (sizeof (size_t))) < 0)
18434     {
18435       long i = longval ();
18436       if (i != ((long) (sizeof (size_t))))
18437         exit (1);
18438       fprintf (f, "%ld\n", i);
18439     }
18440   else
18441     {
18442       unsigned long i = ulongval ();
18443       if (i != ((long) (sizeof (size_t))))
18444         exit (1);
18445       fprintf (f, "%lu\n", i);
18446     }
18447   exit (ferror (f) || fclose (f) != 0);
18448
18449   ;
18450   return 0;
18451 }
18452 _ACEOF
18453 rm -f conftest$ac_exeext
18454 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18455   (eval $ac_link) 2>&5
18456   ac_status=$?
18457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18458   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18459   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18460   (eval $ac_try) 2>&5
18461   ac_status=$?
18462   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18463   (exit $ac_status); }; }; then
18464   ac_cv_sizeof_size_t=`cat conftest.val`
18465 else
18466   echo "$as_me: program exited with status $ac_status" >&5
18467 echo "$as_me: failed program was:" >&5
18468 sed 's/^/| /' conftest.$ac_ext >&5
18469
18470 ( exit $ac_status )
18471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
18472 See \`config.log' for more details." >&5
18473 echo "$as_me: error: cannot compute sizeof (size_t), 77
18474 See \`config.log' for more details." >&2;}
18475    { (exit 1); exit 1; }; }
18476 fi
18477 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18478 fi
18479 fi
18480 rm -f conftest.val
18481 else
18482   ac_cv_sizeof_size_t=0
18483 fi
18484 fi
18485 echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
18486 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
18487 cat >>confdefs.h <<_ACEOF
18488 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
18489 _ACEOF
18490
18491
18492
18493 # Determine memory alignment requirements for the basic C data types.
18494
18495 echo "$as_me:$LINENO: checking for short" >&5
18496 echo $ECHO_N "checking for short... $ECHO_C" >&6
18497 if test "${ac_cv_type_short+set}" = set; then
18498   echo $ECHO_N "(cached) $ECHO_C" >&6
18499 else
18500   cat >conftest.$ac_ext <<_ACEOF
18501 /* confdefs.h.  */
18502 _ACEOF
18503 cat confdefs.h >>conftest.$ac_ext
18504 cat >>conftest.$ac_ext <<_ACEOF
18505 /* end confdefs.h.  */
18506 $ac_includes_default
18507 int
18508 main ()
18509 {
18510 if ((short *) 0)
18511   return 0;
18512 if (sizeof (short))
18513   return 0;
18514   ;
18515   return 0;
18516 }
18517 _ACEOF
18518 rm -f conftest.$ac_objext
18519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18520   (eval $ac_compile) 2>conftest.er1
18521   ac_status=$?
18522   grep -v '^ *+' conftest.er1 >conftest.err
18523   rm -f conftest.er1
18524   cat conftest.err >&5
18525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18526   (exit $ac_status); } &&
18527          { ac_try='test -z "$ac_c_werror_flag"
18528                          || test ! -s conftest.err'
18529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533   (exit $ac_status); }; } &&
18534          { ac_try='test -s conftest.$ac_objext'
18535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18536   (eval $ac_try) 2>&5
18537   ac_status=$?
18538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539   (exit $ac_status); }; }; then
18540   ac_cv_type_short=yes
18541 else
18542   echo "$as_me: failed program was:" >&5
18543 sed 's/^/| /' conftest.$ac_ext >&5
18544
18545 ac_cv_type_short=no
18546 fi
18547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18548 fi
18549 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
18550 echo "${ECHO_T}$ac_cv_type_short" >&6
18551
18552 echo "$as_me:$LINENO: checking alignment of short" >&5
18553 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
18554 if test "${pgac_cv_alignof_short+set}" = set; then
18555   echo $ECHO_N "(cached) $ECHO_C" >&6
18556 else
18557   if test "$ac_cv_type_short" = yes; then
18558   if test "$cross_compiling" = yes; then
18559   # Depending upon the size, compute the lo and hi bounds.
18560 cat >conftest.$ac_ext <<_ACEOF
18561 /* confdefs.h.  */
18562 _ACEOF
18563 cat confdefs.h >>conftest.$ac_ext
18564 cat >>conftest.$ac_ext <<_ACEOF
18565 /* end confdefs.h.  */
18566 $ac_includes_default
18567 struct { char filler; short field; } pgac_struct;
18568 int
18569 main ()
18570 {
18571 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18572 test_array [0] = 0
18573
18574   ;
18575   return 0;
18576 }
18577 _ACEOF
18578 rm -f conftest.$ac_objext
18579 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18580   (eval $ac_compile) 2>conftest.er1
18581   ac_status=$?
18582   grep -v '^ *+' conftest.er1 >conftest.err
18583   rm -f conftest.er1
18584   cat conftest.err >&5
18585   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18586   (exit $ac_status); } &&
18587          { ac_try='test -z "$ac_c_werror_flag"
18588                          || test ! -s conftest.err'
18589   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18590   (eval $ac_try) 2>&5
18591   ac_status=$?
18592   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18593   (exit $ac_status); }; } &&
18594          { ac_try='test -s conftest.$ac_objext'
18595   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18596   (eval $ac_try) 2>&5
18597   ac_status=$?
18598   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18599   (exit $ac_status); }; }; then
18600   ac_lo=0 ac_mid=0
18601   while :; do
18602     cat >conftest.$ac_ext <<_ACEOF
18603 /* confdefs.h.  */
18604 _ACEOF
18605 cat confdefs.h >>conftest.$ac_ext
18606 cat >>conftest.$ac_ext <<_ACEOF
18607 /* end confdefs.h.  */
18608 $ac_includes_default
18609 struct { char filler; short field; } pgac_struct;
18610 int
18611 main ()
18612 {
18613 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18614 test_array [0] = 0
18615
18616   ;
18617   return 0;
18618 }
18619 _ACEOF
18620 rm -f conftest.$ac_objext
18621 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18622   (eval $ac_compile) 2>conftest.er1
18623   ac_status=$?
18624   grep -v '^ *+' conftest.er1 >conftest.err
18625   rm -f conftest.er1
18626   cat conftest.err >&5
18627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18628   (exit $ac_status); } &&
18629          { ac_try='test -z "$ac_c_werror_flag"
18630                          || test ! -s conftest.err'
18631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18632   (eval $ac_try) 2>&5
18633   ac_status=$?
18634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18635   (exit $ac_status); }; } &&
18636          { ac_try='test -s conftest.$ac_objext'
18637   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18638   (eval $ac_try) 2>&5
18639   ac_status=$?
18640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641   (exit $ac_status); }; }; then
18642   ac_hi=$ac_mid; break
18643 else
18644   echo "$as_me: failed program was:" >&5
18645 sed 's/^/| /' conftest.$ac_ext >&5
18646
18647 ac_lo=`expr $ac_mid + 1`
18648                     if test $ac_lo -le $ac_mid; then
18649                       ac_lo= ac_hi=
18650                       break
18651                     fi
18652                     ac_mid=`expr 2 '*' $ac_mid + 1`
18653 fi
18654 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18655   done
18656 else
18657   echo "$as_me: failed program was:" >&5
18658 sed 's/^/| /' conftest.$ac_ext >&5
18659
18660 cat >conftest.$ac_ext <<_ACEOF
18661 /* confdefs.h.  */
18662 _ACEOF
18663 cat confdefs.h >>conftest.$ac_ext
18664 cat >>conftest.$ac_ext <<_ACEOF
18665 /* end confdefs.h.  */
18666 $ac_includes_default
18667 struct { char filler; short field; } pgac_struct;
18668 int
18669 main ()
18670 {
18671 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
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_hi=-1 ac_mid=-1
18701   while :; do
18702     cat >conftest.$ac_ext <<_ACEOF
18703 /* confdefs.h.  */
18704 _ACEOF
18705 cat confdefs.h >>conftest.$ac_ext
18706 cat >>conftest.$ac_ext <<_ACEOF
18707 /* end confdefs.h.  */
18708 $ac_includes_default
18709 struct { char filler; short field; } pgac_struct;
18710 int
18711 main ()
18712 {
18713 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
18714 test_array [0] = 0
18715
18716   ;
18717   return 0;
18718 }
18719 _ACEOF
18720 rm -f conftest.$ac_objext
18721 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18722   (eval $ac_compile) 2>conftest.er1
18723   ac_status=$?
18724   grep -v '^ *+' conftest.er1 >conftest.err
18725   rm -f conftest.er1
18726   cat conftest.err >&5
18727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18728   (exit $ac_status); } &&
18729          { ac_try='test -z "$ac_c_werror_flag"
18730                          || test ! -s conftest.err'
18731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18732   (eval $ac_try) 2>&5
18733   ac_status=$?
18734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18735   (exit $ac_status); }; } &&
18736          { ac_try='test -s conftest.$ac_objext'
18737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18738   (eval $ac_try) 2>&5
18739   ac_status=$?
18740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18741   (exit $ac_status); }; }; then
18742   ac_lo=$ac_mid; break
18743 else
18744   echo "$as_me: failed program was:" >&5
18745 sed 's/^/| /' conftest.$ac_ext >&5
18746
18747 ac_hi=`expr '(' $ac_mid ')' - 1`
18748                        if test $ac_mid -le $ac_hi; then
18749                          ac_lo= ac_hi=
18750                          break
18751                        fi
18752                        ac_mid=`expr 2 '*' $ac_mid`
18753 fi
18754 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18755   done
18756 else
18757   echo "$as_me: failed program was:" >&5
18758 sed 's/^/| /' conftest.$ac_ext >&5
18759
18760 ac_lo= ac_hi=
18761 fi
18762 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18763 fi
18764 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18765 # Binary search between lo and hi bounds.
18766 while test "x$ac_lo" != "x$ac_hi"; do
18767   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18768   cat >conftest.$ac_ext <<_ACEOF
18769 /* confdefs.h.  */
18770 _ACEOF
18771 cat confdefs.h >>conftest.$ac_ext
18772 cat >>conftest.$ac_ext <<_ACEOF
18773 /* end confdefs.h.  */
18774 $ac_includes_default
18775 struct { char filler; short field; } pgac_struct;
18776 int
18777 main ()
18778 {
18779 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
18780 test_array [0] = 0
18781
18782   ;
18783   return 0;
18784 }
18785 _ACEOF
18786 rm -f conftest.$ac_objext
18787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18788   (eval $ac_compile) 2>conftest.er1
18789   ac_status=$?
18790   grep -v '^ *+' conftest.er1 >conftest.err
18791   rm -f conftest.er1
18792   cat conftest.err >&5
18793   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18794   (exit $ac_status); } &&
18795          { ac_try='test -z "$ac_c_werror_flag"
18796                          || test ! -s conftest.err'
18797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18798   (eval $ac_try) 2>&5
18799   ac_status=$?
18800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18801   (exit $ac_status); }; } &&
18802          { ac_try='test -s conftest.$ac_objext'
18803   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18804   (eval $ac_try) 2>&5
18805   ac_status=$?
18806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18807   (exit $ac_status); }; }; then
18808   ac_hi=$ac_mid
18809 else
18810   echo "$as_me: failed program was:" >&5
18811 sed 's/^/| /' conftest.$ac_ext >&5
18812
18813 ac_lo=`expr '(' $ac_mid ')' + 1`
18814 fi
18815 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18816 done
18817 case $ac_lo in
18818 ?*) pgac_cv_alignof_short=$ac_lo;;
18819 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18820 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18821    { (exit 1); exit 1; }; } ;;
18822 esac
18823 else
18824   if test "$cross_compiling" = yes; then
18825   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18826 See \`config.log' for more details." >&5
18827 echo "$as_me: error: cannot run test program while cross compiling
18828 See \`config.log' for more details." >&2;}
18829    { (exit 1); exit 1; }; }
18830 else
18831   cat >conftest.$ac_ext <<_ACEOF
18832 /* confdefs.h.  */
18833 _ACEOF
18834 cat confdefs.h >>conftest.$ac_ext
18835 cat >>conftest.$ac_ext <<_ACEOF
18836 /* end confdefs.h.  */
18837 $ac_includes_default
18838 struct { char filler; short field; } pgac_struct;
18839 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18840 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
18841 #include <stdio.h>
18842 #include <stdlib.h>
18843 int
18844 main ()
18845 {
18846
18847   FILE *f = fopen ("conftest.val", "w");
18848   if (! f)
18849     exit (1);
18850   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
18851     {
18852       long i = longval ();
18853       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18854         exit (1);
18855       fprintf (f, "%ld\n", i);
18856     }
18857   else
18858     {
18859       unsigned long i = ulongval ();
18860       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
18861         exit (1);
18862       fprintf (f, "%lu\n", i);
18863     }
18864   exit (ferror (f) || fclose (f) != 0);
18865
18866   ;
18867   return 0;
18868 }
18869 _ACEOF
18870 rm -f conftest$ac_exeext
18871 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18872   (eval $ac_link) 2>&5
18873   ac_status=$?
18874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18875   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18876   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18877   (eval $ac_try) 2>&5
18878   ac_status=$?
18879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18880   (exit $ac_status); }; }; then
18881   pgac_cv_alignof_short=`cat conftest.val`
18882 else
18883   echo "$as_me: program exited with status $ac_status" >&5
18884 echo "$as_me: failed program was:" >&5
18885 sed 's/^/| /' conftest.$ac_ext >&5
18886
18887 ( exit $ac_status )
18888 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
18889 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
18890    { (exit 1); exit 1; }; }
18891 fi
18892 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18893 fi
18894 fi
18895 rm -f conftest.val
18896 else
18897   pgac_cv_alignof_short=0
18898 fi
18899 fi
18900 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
18901 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
18902 cat >>confdefs.h <<_ACEOF
18903 #define ALIGNOF_SHORT $pgac_cv_alignof_short
18904 _ACEOF
18905
18906
18907 echo "$as_me:$LINENO: checking for int" >&5
18908 echo $ECHO_N "checking for int... $ECHO_C" >&6
18909 if test "${ac_cv_type_int+set}" = set; then
18910   echo $ECHO_N "(cached) $ECHO_C" >&6
18911 else
18912   cat >conftest.$ac_ext <<_ACEOF
18913 /* confdefs.h.  */
18914 _ACEOF
18915 cat confdefs.h >>conftest.$ac_ext
18916 cat >>conftest.$ac_ext <<_ACEOF
18917 /* end confdefs.h.  */
18918 $ac_includes_default
18919 int
18920 main ()
18921 {
18922 if ((int *) 0)
18923   return 0;
18924 if (sizeof (int))
18925   return 0;
18926   ;
18927   return 0;
18928 }
18929 _ACEOF
18930 rm -f conftest.$ac_objext
18931 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18932   (eval $ac_compile) 2>conftest.er1
18933   ac_status=$?
18934   grep -v '^ *+' conftest.er1 >conftest.err
18935   rm -f conftest.er1
18936   cat conftest.err >&5
18937   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18938   (exit $ac_status); } &&
18939          { ac_try='test -z "$ac_c_werror_flag"
18940                          || test ! -s conftest.err'
18941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18942   (eval $ac_try) 2>&5
18943   ac_status=$?
18944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18945   (exit $ac_status); }; } &&
18946          { ac_try='test -s conftest.$ac_objext'
18947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18948   (eval $ac_try) 2>&5
18949   ac_status=$?
18950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18951   (exit $ac_status); }; }; then
18952   ac_cv_type_int=yes
18953 else
18954   echo "$as_me: failed program was:" >&5
18955 sed 's/^/| /' conftest.$ac_ext >&5
18956
18957 ac_cv_type_int=no
18958 fi
18959 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18960 fi
18961 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
18962 echo "${ECHO_T}$ac_cv_type_int" >&6
18963
18964 echo "$as_me:$LINENO: checking alignment of int" >&5
18965 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
18966 if test "${pgac_cv_alignof_int+set}" = set; then
18967   echo $ECHO_N "(cached) $ECHO_C" >&6
18968 else
18969   if test "$ac_cv_type_int" = yes; then
18970   if test "$cross_compiling" = yes; then
18971   # Depending upon the size, compute the lo and hi bounds.
18972 cat >conftest.$ac_ext <<_ACEOF
18973 /* confdefs.h.  */
18974 _ACEOF
18975 cat confdefs.h >>conftest.$ac_ext
18976 cat >>conftest.$ac_ext <<_ACEOF
18977 /* end confdefs.h.  */
18978 $ac_includes_default
18979 struct { char filler; int field; } pgac_struct;
18980 int
18981 main ()
18982 {
18983 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
18984 test_array [0] = 0
18985
18986   ;
18987   return 0;
18988 }
18989 _ACEOF
18990 rm -f conftest.$ac_objext
18991 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18992   (eval $ac_compile) 2>conftest.er1
18993   ac_status=$?
18994   grep -v '^ *+' conftest.er1 >conftest.err
18995   rm -f conftest.er1
18996   cat conftest.err >&5
18997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18998   (exit $ac_status); } &&
18999          { ac_try='test -z "$ac_c_werror_flag"
19000                          || test ! -s conftest.err'
19001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19002   (eval $ac_try) 2>&5
19003   ac_status=$?
19004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19005   (exit $ac_status); }; } &&
19006          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
19012   ac_lo=0 ac_mid=0
19013   while :; do
19014     cat >conftest.$ac_ext <<_ACEOF
19015 /* confdefs.h.  */
19016 _ACEOF
19017 cat confdefs.h >>conftest.$ac_ext
19018 cat >>conftest.$ac_ext <<_ACEOF
19019 /* end confdefs.h.  */
19020 $ac_includes_default
19021 struct { char filler; int field; } pgac_struct;
19022 int
19023 main ()
19024 {
19025 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19026 test_array [0] = 0
19027
19028   ;
19029   return 0;
19030 }
19031 _ACEOF
19032 rm -f conftest.$ac_objext
19033 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19034   (eval $ac_compile) 2>conftest.er1
19035   ac_status=$?
19036   grep -v '^ *+' conftest.er1 >conftest.err
19037   rm -f conftest.er1
19038   cat conftest.err >&5
19039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19040   (exit $ac_status); } &&
19041          { ac_try='test -z "$ac_c_werror_flag"
19042                          || test ! -s conftest.err'
19043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19044   (eval $ac_try) 2>&5
19045   ac_status=$?
19046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19047   (exit $ac_status); }; } &&
19048          { ac_try='test -s conftest.$ac_objext'
19049   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19050   (eval $ac_try) 2>&5
19051   ac_status=$?
19052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19053   (exit $ac_status); }; }; then
19054   ac_hi=$ac_mid; break
19055 else
19056   echo "$as_me: failed program was:" >&5
19057 sed 's/^/| /' conftest.$ac_ext >&5
19058
19059 ac_lo=`expr $ac_mid + 1`
19060                     if test $ac_lo -le $ac_mid; then
19061                       ac_lo= ac_hi=
19062                       break
19063                     fi
19064                     ac_mid=`expr 2 '*' $ac_mid + 1`
19065 fi
19066 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19067   done
19068 else
19069   echo "$as_me: failed program was:" >&5
19070 sed 's/^/| /' conftest.$ac_ext >&5
19071
19072 cat >conftest.$ac_ext <<_ACEOF
19073 /* confdefs.h.  */
19074 _ACEOF
19075 cat confdefs.h >>conftest.$ac_ext
19076 cat >>conftest.$ac_ext <<_ACEOF
19077 /* end confdefs.h.  */
19078 $ac_includes_default
19079 struct { char filler; int field; } pgac_struct;
19080 int
19081 main ()
19082 {
19083 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19084 test_array [0] = 0
19085
19086   ;
19087   return 0;
19088 }
19089 _ACEOF
19090 rm -f conftest.$ac_objext
19091 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19092   (eval $ac_compile) 2>conftest.er1
19093   ac_status=$?
19094   grep -v '^ *+' conftest.er1 >conftest.err
19095   rm -f conftest.er1
19096   cat conftest.err >&5
19097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19098   (exit $ac_status); } &&
19099          { ac_try='test -z "$ac_c_werror_flag"
19100                          || test ! -s conftest.err'
19101   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105   (exit $ac_status); }; } &&
19106          { ac_try='test -s conftest.$ac_objext'
19107   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19111   (exit $ac_status); }; }; then
19112   ac_hi=-1 ac_mid=-1
19113   while :; do
19114     cat >conftest.$ac_ext <<_ACEOF
19115 /* confdefs.h.  */
19116 _ACEOF
19117 cat confdefs.h >>conftest.$ac_ext
19118 cat >>conftest.$ac_ext <<_ACEOF
19119 /* end confdefs.h.  */
19120 $ac_includes_default
19121 struct { char filler; int field; } pgac_struct;
19122 int
19123 main ()
19124 {
19125 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19126 test_array [0] = 0
19127
19128   ;
19129   return 0;
19130 }
19131 _ACEOF
19132 rm -f conftest.$ac_objext
19133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19134   (eval $ac_compile) 2>conftest.er1
19135   ac_status=$?
19136   grep -v '^ *+' conftest.er1 >conftest.err
19137   rm -f conftest.er1
19138   cat conftest.err >&5
19139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140   (exit $ac_status); } &&
19141          { ac_try='test -z "$ac_c_werror_flag"
19142                          || test ! -s conftest.err'
19143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19144   (eval $ac_try) 2>&5
19145   ac_status=$?
19146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19147   (exit $ac_status); }; } &&
19148          { ac_try='test -s conftest.$ac_objext'
19149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19150   (eval $ac_try) 2>&5
19151   ac_status=$?
19152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19153   (exit $ac_status); }; }; then
19154   ac_lo=$ac_mid; break
19155 else
19156   echo "$as_me: failed program was:" >&5
19157 sed 's/^/| /' conftest.$ac_ext >&5
19158
19159 ac_hi=`expr '(' $ac_mid ')' - 1`
19160                        if test $ac_mid -le $ac_hi; then
19161                          ac_lo= ac_hi=
19162                          break
19163                        fi
19164                        ac_mid=`expr 2 '*' $ac_mid`
19165 fi
19166 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19167   done
19168 else
19169   echo "$as_me: failed program was:" >&5
19170 sed 's/^/| /' conftest.$ac_ext >&5
19171
19172 ac_lo= ac_hi=
19173 fi
19174 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19175 fi
19176 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19177 # Binary search between lo and hi bounds.
19178 while test "x$ac_lo" != "x$ac_hi"; do
19179   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19180   cat >conftest.$ac_ext <<_ACEOF
19181 /* confdefs.h.  */
19182 _ACEOF
19183 cat confdefs.h >>conftest.$ac_ext
19184 cat >>conftest.$ac_ext <<_ACEOF
19185 /* end confdefs.h.  */
19186 $ac_includes_default
19187 struct { char filler; int field; } pgac_struct;
19188 int
19189 main ()
19190 {
19191 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19192 test_array [0] = 0
19193
19194   ;
19195   return 0;
19196 }
19197 _ACEOF
19198 rm -f conftest.$ac_objext
19199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19200   (eval $ac_compile) 2>conftest.er1
19201   ac_status=$?
19202   grep -v '^ *+' conftest.er1 >conftest.err
19203   rm -f conftest.er1
19204   cat conftest.err >&5
19205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19206   (exit $ac_status); } &&
19207          { ac_try='test -z "$ac_c_werror_flag"
19208                          || test ! -s conftest.err'
19209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19210   (eval $ac_try) 2>&5
19211   ac_status=$?
19212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19213   (exit $ac_status); }; } &&
19214          { ac_try='test -s conftest.$ac_objext'
19215   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19216   (eval $ac_try) 2>&5
19217   ac_status=$?
19218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19219   (exit $ac_status); }; }; then
19220   ac_hi=$ac_mid
19221 else
19222   echo "$as_me: failed program was:" >&5
19223 sed 's/^/| /' conftest.$ac_ext >&5
19224
19225 ac_lo=`expr '(' $ac_mid ')' + 1`
19226 fi
19227 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19228 done
19229 case $ac_lo in
19230 ?*) pgac_cv_alignof_int=$ac_lo;;
19231 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19232 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19233    { (exit 1); exit 1; }; } ;;
19234 esac
19235 else
19236   if test "$cross_compiling" = yes; then
19237   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19238 See \`config.log' for more details." >&5
19239 echo "$as_me: error: cannot run test program while cross compiling
19240 See \`config.log' for more details." >&2;}
19241    { (exit 1); exit 1; }; }
19242 else
19243   cat >conftest.$ac_ext <<_ACEOF
19244 /* confdefs.h.  */
19245 _ACEOF
19246 cat confdefs.h >>conftest.$ac_ext
19247 cat >>conftest.$ac_ext <<_ACEOF
19248 /* end confdefs.h.  */
19249 $ac_includes_default
19250 struct { char filler; int field; } pgac_struct;
19251 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19252 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19253 #include <stdio.h>
19254 #include <stdlib.h>
19255 int
19256 main ()
19257 {
19258
19259   FILE *f = fopen ("conftest.val", "w");
19260   if (! f)
19261     exit (1);
19262   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19263     {
19264       long i = longval ();
19265       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19266         exit (1);
19267       fprintf (f, "%ld\n", i);
19268     }
19269   else
19270     {
19271       unsigned long i = ulongval ();
19272       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19273         exit (1);
19274       fprintf (f, "%lu\n", i);
19275     }
19276   exit (ferror (f) || fclose (f) != 0);
19277
19278   ;
19279   return 0;
19280 }
19281 _ACEOF
19282 rm -f conftest$ac_exeext
19283 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19284   (eval $ac_link) 2>&5
19285   ac_status=$?
19286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19289   (eval $ac_try) 2>&5
19290   ac_status=$?
19291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19292   (exit $ac_status); }; }; then
19293   pgac_cv_alignof_int=`cat conftest.val`
19294 else
19295   echo "$as_me: program exited with status $ac_status" >&5
19296 echo "$as_me: failed program was:" >&5
19297 sed 's/^/| /' conftest.$ac_ext >&5
19298
19299 ( exit $ac_status )
19300 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
19301 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
19302    { (exit 1); exit 1; }; }
19303 fi
19304 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19305 fi
19306 fi
19307 rm -f conftest.val
19308 else
19309   pgac_cv_alignof_int=0
19310 fi
19311 fi
19312 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
19313 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
19314 cat >>confdefs.h <<_ACEOF
19315 #define ALIGNOF_INT $pgac_cv_alignof_int
19316 _ACEOF
19317
19318
19319 echo "$as_me:$LINENO: checking for long" >&5
19320 echo $ECHO_N "checking for long... $ECHO_C" >&6
19321 if test "${ac_cv_type_long+set}" = set; then
19322   echo $ECHO_N "(cached) $ECHO_C" >&6
19323 else
19324   cat >conftest.$ac_ext <<_ACEOF
19325 /* confdefs.h.  */
19326 _ACEOF
19327 cat confdefs.h >>conftest.$ac_ext
19328 cat >>conftest.$ac_ext <<_ACEOF
19329 /* end confdefs.h.  */
19330 $ac_includes_default
19331 int
19332 main ()
19333 {
19334 if ((long *) 0)
19335   return 0;
19336 if (sizeof (long))
19337   return 0;
19338   ;
19339   return 0;
19340 }
19341 _ACEOF
19342 rm -f conftest.$ac_objext
19343 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19344   (eval $ac_compile) 2>conftest.er1
19345   ac_status=$?
19346   grep -v '^ *+' conftest.er1 >conftest.err
19347   rm -f conftest.er1
19348   cat conftest.err >&5
19349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19350   (exit $ac_status); } &&
19351          { ac_try='test -z "$ac_c_werror_flag"
19352                          || test ! -s conftest.err'
19353   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19354   (eval $ac_try) 2>&5
19355   ac_status=$?
19356   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19357   (exit $ac_status); }; } &&
19358          { ac_try='test -s conftest.$ac_objext'
19359   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19360   (eval $ac_try) 2>&5
19361   ac_status=$?
19362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19363   (exit $ac_status); }; }; then
19364   ac_cv_type_long=yes
19365 else
19366   echo "$as_me: failed program was:" >&5
19367 sed 's/^/| /' conftest.$ac_ext >&5
19368
19369 ac_cv_type_long=no
19370 fi
19371 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19372 fi
19373 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
19374 echo "${ECHO_T}$ac_cv_type_long" >&6
19375
19376 echo "$as_me:$LINENO: checking alignment of long" >&5
19377 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
19378 if test "${pgac_cv_alignof_long+set}" = set; then
19379   echo $ECHO_N "(cached) $ECHO_C" >&6
19380 else
19381   if test "$ac_cv_type_long" = yes; then
19382   if test "$cross_compiling" = yes; then
19383   # Depending upon the size, compute the lo and hi bounds.
19384 cat >conftest.$ac_ext <<_ACEOF
19385 /* confdefs.h.  */
19386 _ACEOF
19387 cat confdefs.h >>conftest.$ac_ext
19388 cat >>conftest.$ac_ext <<_ACEOF
19389 /* end confdefs.h.  */
19390 $ac_includes_default
19391 struct { char filler; long field; } pgac_struct;
19392 int
19393 main ()
19394 {
19395 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19396 test_array [0] = 0
19397
19398   ;
19399   return 0;
19400 }
19401 _ACEOF
19402 rm -f conftest.$ac_objext
19403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19404   (eval $ac_compile) 2>conftest.er1
19405   ac_status=$?
19406   grep -v '^ *+' conftest.er1 >conftest.err
19407   rm -f conftest.er1
19408   cat conftest.err >&5
19409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19410   (exit $ac_status); } &&
19411          { ac_try='test -z "$ac_c_werror_flag"
19412                          || test ! -s conftest.err'
19413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19414   (eval $ac_try) 2>&5
19415   ac_status=$?
19416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19417   (exit $ac_status); }; } &&
19418          { ac_try='test -s conftest.$ac_objext'
19419   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19420   (eval $ac_try) 2>&5
19421   ac_status=$?
19422   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19423   (exit $ac_status); }; }; then
19424   ac_lo=0 ac_mid=0
19425   while :; do
19426     cat >conftest.$ac_ext <<_ACEOF
19427 /* confdefs.h.  */
19428 _ACEOF
19429 cat confdefs.h >>conftest.$ac_ext
19430 cat >>conftest.$ac_ext <<_ACEOF
19431 /* end confdefs.h.  */
19432 $ac_includes_default
19433 struct { char filler; long field; } pgac_struct;
19434 int
19435 main ()
19436 {
19437 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19438 test_array [0] = 0
19439
19440   ;
19441   return 0;
19442 }
19443 _ACEOF
19444 rm -f conftest.$ac_objext
19445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19446   (eval $ac_compile) 2>conftest.er1
19447   ac_status=$?
19448   grep -v '^ *+' conftest.er1 >conftest.err
19449   rm -f conftest.er1
19450   cat conftest.err >&5
19451   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19452   (exit $ac_status); } &&
19453          { ac_try='test -z "$ac_c_werror_flag"
19454                          || test ! -s conftest.err'
19455   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19456   (eval $ac_try) 2>&5
19457   ac_status=$?
19458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19459   (exit $ac_status); }; } &&
19460          { ac_try='test -s conftest.$ac_objext'
19461   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19462   (eval $ac_try) 2>&5
19463   ac_status=$?
19464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19465   (exit $ac_status); }; }; then
19466   ac_hi=$ac_mid; break
19467 else
19468   echo "$as_me: failed program was:" >&5
19469 sed 's/^/| /' conftest.$ac_ext >&5
19470
19471 ac_lo=`expr $ac_mid + 1`
19472                     if test $ac_lo -le $ac_mid; then
19473                       ac_lo= ac_hi=
19474                       break
19475                     fi
19476                     ac_mid=`expr 2 '*' $ac_mid + 1`
19477 fi
19478 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19479   done
19480 else
19481   echo "$as_me: failed program was:" >&5
19482 sed 's/^/| /' conftest.$ac_ext >&5
19483
19484 cat >conftest.$ac_ext <<_ACEOF
19485 /* confdefs.h.  */
19486 _ACEOF
19487 cat confdefs.h >>conftest.$ac_ext
19488 cat >>conftest.$ac_ext <<_ACEOF
19489 /* end confdefs.h.  */
19490 $ac_includes_default
19491 struct { char filler; long field; } pgac_struct;
19492 int
19493 main ()
19494 {
19495 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19496 test_array [0] = 0
19497
19498   ;
19499   return 0;
19500 }
19501 _ACEOF
19502 rm -f conftest.$ac_objext
19503 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19504   (eval $ac_compile) 2>conftest.er1
19505   ac_status=$?
19506   grep -v '^ *+' conftest.er1 >conftest.err
19507   rm -f conftest.er1
19508   cat conftest.err >&5
19509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19510   (exit $ac_status); } &&
19511          { ac_try='test -z "$ac_c_werror_flag"
19512                          || test ! -s conftest.err'
19513   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19514   (eval $ac_try) 2>&5
19515   ac_status=$?
19516   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19517   (exit $ac_status); }; } &&
19518          { ac_try='test -s conftest.$ac_objext'
19519   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19520   (eval $ac_try) 2>&5
19521   ac_status=$?
19522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19523   (exit $ac_status); }; }; then
19524   ac_hi=-1 ac_mid=-1
19525   while :; do
19526     cat >conftest.$ac_ext <<_ACEOF
19527 /* confdefs.h.  */
19528 _ACEOF
19529 cat confdefs.h >>conftest.$ac_ext
19530 cat >>conftest.$ac_ext <<_ACEOF
19531 /* end confdefs.h.  */
19532 $ac_includes_default
19533 struct { char filler; long field; } pgac_struct;
19534 int
19535 main ()
19536 {
19537 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19538 test_array [0] = 0
19539
19540   ;
19541   return 0;
19542 }
19543 _ACEOF
19544 rm -f conftest.$ac_objext
19545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19546   (eval $ac_compile) 2>conftest.er1
19547   ac_status=$?
19548   grep -v '^ *+' conftest.er1 >conftest.err
19549   rm -f conftest.er1
19550   cat conftest.err >&5
19551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19552   (exit $ac_status); } &&
19553          { ac_try='test -z "$ac_c_werror_flag"
19554                          || test ! -s conftest.err'
19555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19556   (eval $ac_try) 2>&5
19557   ac_status=$?
19558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19559   (exit $ac_status); }; } &&
19560          { ac_try='test -s conftest.$ac_objext'
19561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19562   (eval $ac_try) 2>&5
19563   ac_status=$?
19564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19565   (exit $ac_status); }; }; then
19566   ac_lo=$ac_mid; break
19567 else
19568   echo "$as_me: failed program was:" >&5
19569 sed 's/^/| /' conftest.$ac_ext >&5
19570
19571 ac_hi=`expr '(' $ac_mid ')' - 1`
19572                        if test $ac_mid -le $ac_hi; then
19573                          ac_lo= ac_hi=
19574                          break
19575                        fi
19576                        ac_mid=`expr 2 '*' $ac_mid`
19577 fi
19578 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19579   done
19580 else
19581   echo "$as_me: failed program was:" >&5
19582 sed 's/^/| /' conftest.$ac_ext >&5
19583
19584 ac_lo= ac_hi=
19585 fi
19586 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19587 fi
19588 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19589 # Binary search between lo and hi bounds.
19590 while test "x$ac_lo" != "x$ac_hi"; do
19591   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19592   cat >conftest.$ac_ext <<_ACEOF
19593 /* confdefs.h.  */
19594 _ACEOF
19595 cat confdefs.h >>conftest.$ac_ext
19596 cat >>conftest.$ac_ext <<_ACEOF
19597 /* end confdefs.h.  */
19598 $ac_includes_default
19599 struct { char filler; long field; } pgac_struct;
19600 int
19601 main ()
19602 {
19603 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19604 test_array [0] = 0
19605
19606   ;
19607   return 0;
19608 }
19609 _ACEOF
19610 rm -f conftest.$ac_objext
19611 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19612   (eval $ac_compile) 2>conftest.er1
19613   ac_status=$?
19614   grep -v '^ *+' conftest.er1 >conftest.err
19615   rm -f conftest.er1
19616   cat conftest.err >&5
19617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19618   (exit $ac_status); } &&
19619          { ac_try='test -z "$ac_c_werror_flag"
19620                          || test ! -s conftest.err'
19621   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19622   (eval $ac_try) 2>&5
19623   ac_status=$?
19624   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19625   (exit $ac_status); }; } &&
19626          { ac_try='test -s conftest.$ac_objext'
19627   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19628   (eval $ac_try) 2>&5
19629   ac_status=$?
19630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19631   (exit $ac_status); }; }; then
19632   ac_hi=$ac_mid
19633 else
19634   echo "$as_me: failed program was:" >&5
19635 sed 's/^/| /' conftest.$ac_ext >&5
19636
19637 ac_lo=`expr '(' $ac_mid ')' + 1`
19638 fi
19639 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19640 done
19641 case $ac_lo in
19642 ?*) pgac_cv_alignof_long=$ac_lo;;
19643 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19644 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19645    { (exit 1); exit 1; }; } ;;
19646 esac
19647 else
19648   if test "$cross_compiling" = yes; then
19649   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
19650 See \`config.log' for more details." >&5
19651 echo "$as_me: error: cannot run test program while cross compiling
19652 See \`config.log' for more details." >&2;}
19653    { (exit 1); exit 1; }; }
19654 else
19655   cat >conftest.$ac_ext <<_ACEOF
19656 /* confdefs.h.  */
19657 _ACEOF
19658 cat confdefs.h >>conftest.$ac_ext
19659 cat >>conftest.$ac_ext <<_ACEOF
19660 /* end confdefs.h.  */
19661 $ac_includes_default
19662 struct { char filler; long field; } pgac_struct;
19663 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19664 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
19665 #include <stdio.h>
19666 #include <stdlib.h>
19667 int
19668 main ()
19669 {
19670
19671   FILE *f = fopen ("conftest.val", "w");
19672   if (! f)
19673     exit (1);
19674   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
19675     {
19676       long i = longval ();
19677       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19678         exit (1);
19679       fprintf (f, "%ld\n", i);
19680     }
19681   else
19682     {
19683       unsigned long i = ulongval ();
19684       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
19685         exit (1);
19686       fprintf (f, "%lu\n", i);
19687     }
19688   exit (ferror (f) || fclose (f) != 0);
19689
19690   ;
19691   return 0;
19692 }
19693 _ACEOF
19694 rm -f conftest$ac_exeext
19695 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19696   (eval $ac_link) 2>&5
19697   ac_status=$?
19698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19699   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19701   (eval $ac_try) 2>&5
19702   ac_status=$?
19703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19704   (exit $ac_status); }; }; then
19705   pgac_cv_alignof_long=`cat conftest.val`
19706 else
19707   echo "$as_me: program exited with status $ac_status" >&5
19708 echo "$as_me: failed program was:" >&5
19709 sed 's/^/| /' conftest.$ac_ext >&5
19710
19711 ( exit $ac_status )
19712 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
19713 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
19714    { (exit 1); exit 1; }; }
19715 fi
19716 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19717 fi
19718 fi
19719 rm -f conftest.val
19720 else
19721   pgac_cv_alignof_long=0
19722 fi
19723 fi
19724 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
19725 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
19726 cat >>confdefs.h <<_ACEOF
19727 #define ALIGNOF_LONG $pgac_cv_alignof_long
19728 _ACEOF
19729
19730
19731 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
19732   echo "$as_me:$LINENO: checking for long long int" >&5
19733 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
19734 if test "${ac_cv_type_long_long_int+set}" = set; then
19735   echo $ECHO_N "(cached) $ECHO_C" >&6
19736 else
19737   cat >conftest.$ac_ext <<_ACEOF
19738 /* confdefs.h.  */
19739 _ACEOF
19740 cat confdefs.h >>conftest.$ac_ext
19741 cat >>conftest.$ac_ext <<_ACEOF
19742 /* end confdefs.h.  */
19743 $ac_includes_default
19744 int
19745 main ()
19746 {
19747 if ((long long int *) 0)
19748   return 0;
19749 if (sizeof (long long int))
19750   return 0;
19751   ;
19752   return 0;
19753 }
19754 _ACEOF
19755 rm -f conftest.$ac_objext
19756 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19757   (eval $ac_compile) 2>conftest.er1
19758   ac_status=$?
19759   grep -v '^ *+' conftest.er1 >conftest.err
19760   rm -f conftest.er1
19761   cat conftest.err >&5
19762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19763   (exit $ac_status); } &&
19764          { ac_try='test -z "$ac_c_werror_flag"
19765                          || test ! -s conftest.err'
19766   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19767   (eval $ac_try) 2>&5
19768   ac_status=$?
19769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19770   (exit $ac_status); }; } &&
19771          { ac_try='test -s conftest.$ac_objext'
19772   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19773   (eval $ac_try) 2>&5
19774   ac_status=$?
19775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19776   (exit $ac_status); }; }; then
19777   ac_cv_type_long_long_int=yes
19778 else
19779   echo "$as_me: failed program was:" >&5
19780 sed 's/^/| /' conftest.$ac_ext >&5
19781
19782 ac_cv_type_long_long_int=no
19783 fi
19784 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19785 fi
19786 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
19787 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
19788
19789 echo "$as_me:$LINENO: checking alignment of long long int" >&5
19790 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
19791 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
19792   echo $ECHO_N "(cached) $ECHO_C" >&6
19793 else
19794   if test "$ac_cv_type_long_long_int" = yes; then
19795   if test "$cross_compiling" = yes; then
19796   # Depending upon the size, compute the lo and hi bounds.
19797 cat >conftest.$ac_ext <<_ACEOF
19798 /* confdefs.h.  */
19799 _ACEOF
19800 cat confdefs.h >>conftest.$ac_ext
19801 cat >>conftest.$ac_ext <<_ACEOF
19802 /* end confdefs.h.  */
19803 $ac_includes_default
19804 struct { char filler; long long int field; } pgac_struct;
19805 int
19806 main ()
19807 {
19808 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
19809 test_array [0] = 0
19810
19811   ;
19812   return 0;
19813 }
19814 _ACEOF
19815 rm -f conftest.$ac_objext
19816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19817   (eval $ac_compile) 2>conftest.er1
19818   ac_status=$?
19819   grep -v '^ *+' conftest.er1 >conftest.err
19820   rm -f conftest.er1
19821   cat conftest.err >&5
19822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19823   (exit $ac_status); } &&
19824          { ac_try='test -z "$ac_c_werror_flag"
19825                          || test ! -s conftest.err'
19826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19827   (eval $ac_try) 2>&5
19828   ac_status=$?
19829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19830   (exit $ac_status); }; } &&
19831          { ac_try='test -s conftest.$ac_objext'
19832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19833   (eval $ac_try) 2>&5
19834   ac_status=$?
19835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19836   (exit $ac_status); }; }; then
19837   ac_lo=0 ac_mid=0
19838   while :; do
19839     cat >conftest.$ac_ext <<_ACEOF
19840 /* confdefs.h.  */
19841 _ACEOF
19842 cat confdefs.h >>conftest.$ac_ext
19843 cat >>conftest.$ac_ext <<_ACEOF
19844 /* end confdefs.h.  */
19845 $ac_includes_default
19846 struct { char filler; long long int field; } pgac_struct;
19847 int
19848 main ()
19849 {
19850 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
19851 test_array [0] = 0
19852
19853   ;
19854   return 0;
19855 }
19856 _ACEOF
19857 rm -f conftest.$ac_objext
19858 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19859   (eval $ac_compile) 2>conftest.er1
19860   ac_status=$?
19861   grep -v '^ *+' conftest.er1 >conftest.err
19862   rm -f conftest.er1
19863   cat conftest.err >&5
19864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19865   (exit $ac_status); } &&
19866          { ac_try='test -z "$ac_c_werror_flag"
19867                          || test ! -s conftest.err'
19868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19869   (eval $ac_try) 2>&5
19870   ac_status=$?
19871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19872   (exit $ac_status); }; } &&
19873          { ac_try='test -s conftest.$ac_objext'
19874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19875   (eval $ac_try) 2>&5
19876   ac_status=$?
19877   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19878   (exit $ac_status); }; }; then
19879   ac_hi=$ac_mid; break
19880 else
19881   echo "$as_me: failed program was:" >&5
19882 sed 's/^/| /' conftest.$ac_ext >&5
19883
19884 ac_lo=`expr $ac_mid + 1`
19885                     if test $ac_lo -le $ac_mid; then
19886                       ac_lo= ac_hi=
19887                       break
19888                     fi
19889                     ac_mid=`expr 2 '*' $ac_mid + 1`
19890 fi
19891 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19892   done
19893 else
19894   echo "$as_me: failed program was:" >&5
19895 sed 's/^/| /' conftest.$ac_ext >&5
19896
19897 cat >conftest.$ac_ext <<_ACEOF
19898 /* confdefs.h.  */
19899 _ACEOF
19900 cat confdefs.h >>conftest.$ac_ext
19901 cat >>conftest.$ac_ext <<_ACEOF
19902 /* end confdefs.h.  */
19903 $ac_includes_default
19904 struct { char filler; long long int field; } pgac_struct;
19905 int
19906 main ()
19907 {
19908 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
19909 test_array [0] = 0
19910
19911   ;
19912   return 0;
19913 }
19914 _ACEOF
19915 rm -f conftest.$ac_objext
19916 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19917   (eval $ac_compile) 2>conftest.er1
19918   ac_status=$?
19919   grep -v '^ *+' conftest.er1 >conftest.err
19920   rm -f conftest.er1
19921   cat conftest.err >&5
19922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19923   (exit $ac_status); } &&
19924          { ac_try='test -z "$ac_c_werror_flag"
19925                          || test ! -s conftest.err'
19926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19927   (eval $ac_try) 2>&5
19928   ac_status=$?
19929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19930   (exit $ac_status); }; } &&
19931          { ac_try='test -s conftest.$ac_objext'
19932   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19933   (eval $ac_try) 2>&5
19934   ac_status=$?
19935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19936   (exit $ac_status); }; }; then
19937   ac_hi=-1 ac_mid=-1
19938   while :; do
19939     cat >conftest.$ac_ext <<_ACEOF
19940 /* confdefs.h.  */
19941 _ACEOF
19942 cat confdefs.h >>conftest.$ac_ext
19943 cat >>conftest.$ac_ext <<_ACEOF
19944 /* end confdefs.h.  */
19945 $ac_includes_default
19946 struct { char filler; long long int field; } pgac_struct;
19947 int
19948 main ()
19949 {
19950 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
19951 test_array [0] = 0
19952
19953   ;
19954   return 0;
19955 }
19956 _ACEOF
19957 rm -f conftest.$ac_objext
19958 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19959   (eval $ac_compile) 2>conftest.er1
19960   ac_status=$?
19961   grep -v '^ *+' conftest.er1 >conftest.err
19962   rm -f conftest.er1
19963   cat conftest.err >&5
19964   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19965   (exit $ac_status); } &&
19966          { ac_try='test -z "$ac_c_werror_flag"
19967                          || test ! -s conftest.err'
19968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19969   (eval $ac_try) 2>&5
19970   ac_status=$?
19971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19972   (exit $ac_status); }; } &&
19973          { ac_try='test -s conftest.$ac_objext'
19974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19975   (eval $ac_try) 2>&5
19976   ac_status=$?
19977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19978   (exit $ac_status); }; }; then
19979   ac_lo=$ac_mid; break
19980 else
19981   echo "$as_me: failed program was:" >&5
19982 sed 's/^/| /' conftest.$ac_ext >&5
19983
19984 ac_hi=`expr '(' $ac_mid ')' - 1`
19985                        if test $ac_mid -le $ac_hi; then
19986                          ac_lo= ac_hi=
19987                          break
19988                        fi
19989                        ac_mid=`expr 2 '*' $ac_mid`
19990 fi
19991 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19992   done
19993 else
19994   echo "$as_me: failed program was:" >&5
19995 sed 's/^/| /' conftest.$ac_ext >&5
19996
19997 ac_lo= ac_hi=
19998 fi
19999 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20000 fi
20001 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20002 # Binary search between lo and hi bounds.
20003 while test "x$ac_lo" != "x$ac_hi"; do
20004   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20005   cat >conftest.$ac_ext <<_ACEOF
20006 /* confdefs.h.  */
20007 _ACEOF
20008 cat confdefs.h >>conftest.$ac_ext
20009 cat >>conftest.$ac_ext <<_ACEOF
20010 /* end confdefs.h.  */
20011 $ac_includes_default
20012 struct { char filler; long long int field; } pgac_struct;
20013 int
20014 main ()
20015 {
20016 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20017 test_array [0] = 0
20018
20019   ;
20020   return 0;
20021 }
20022 _ACEOF
20023 rm -f conftest.$ac_objext
20024 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20025   (eval $ac_compile) 2>conftest.er1
20026   ac_status=$?
20027   grep -v '^ *+' conftest.er1 >conftest.err
20028   rm -f conftest.er1
20029   cat conftest.err >&5
20030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20031   (exit $ac_status); } &&
20032          { ac_try='test -z "$ac_c_werror_flag"
20033                          || test ! -s conftest.err'
20034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20035   (eval $ac_try) 2>&5
20036   ac_status=$?
20037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20038   (exit $ac_status); }; } &&
20039          { ac_try='test -s conftest.$ac_objext'
20040   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20041   (eval $ac_try) 2>&5
20042   ac_status=$?
20043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20044   (exit $ac_status); }; }; then
20045   ac_hi=$ac_mid
20046 else
20047   echo "$as_me: failed program was:" >&5
20048 sed 's/^/| /' conftest.$ac_ext >&5
20049
20050 ac_lo=`expr '(' $ac_mid ')' + 1`
20051 fi
20052 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20053 done
20054 case $ac_lo in
20055 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
20056 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20057 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20058    { (exit 1); exit 1; }; } ;;
20059 esac
20060 else
20061   if test "$cross_compiling" = yes; then
20062   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20063 See \`config.log' for more details." >&5
20064 echo "$as_me: error: cannot run test program while cross compiling
20065 See \`config.log' for more details." >&2;}
20066    { (exit 1); exit 1; }; }
20067 else
20068   cat >conftest.$ac_ext <<_ACEOF
20069 /* confdefs.h.  */
20070 _ACEOF
20071 cat confdefs.h >>conftest.$ac_ext
20072 cat >>conftest.$ac_ext <<_ACEOF
20073 /* end confdefs.h.  */
20074 $ac_includes_default
20075 struct { char filler; long long int field; } pgac_struct;
20076 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20077 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20078 #include <stdio.h>
20079 #include <stdlib.h>
20080 int
20081 main ()
20082 {
20083
20084   FILE *f = fopen ("conftest.val", "w");
20085   if (! f)
20086     exit (1);
20087   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20088     {
20089       long i = longval ();
20090       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20091         exit (1);
20092       fprintf (f, "%ld\n", i);
20093     }
20094   else
20095     {
20096       unsigned long i = ulongval ();
20097       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20098         exit (1);
20099       fprintf (f, "%lu\n", i);
20100     }
20101   exit (ferror (f) || fclose (f) != 0);
20102
20103   ;
20104   return 0;
20105 }
20106 _ACEOF
20107 rm -f conftest$ac_exeext
20108 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20109   (eval $ac_link) 2>&5
20110   ac_status=$?
20111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20112   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20113   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   pgac_cv_alignof_long_long_int=`cat conftest.val`
20119 else
20120   echo "$as_me: program exited with status $ac_status" >&5
20121 echo "$as_me: failed program was:" >&5
20122 sed 's/^/| /' conftest.$ac_ext >&5
20123
20124 ( exit $ac_status )
20125 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
20126 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
20127    { (exit 1); exit 1; }; }
20128 fi
20129 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20130 fi
20131 fi
20132 rm -f conftest.val
20133 else
20134   pgac_cv_alignof_long_long_int=0
20135 fi
20136 fi
20137 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
20138 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
20139 cat >>confdefs.h <<_ACEOF
20140 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
20141 _ACEOF
20142
20143
20144 fi
20145 echo "$as_me:$LINENO: checking for double" >&5
20146 echo $ECHO_N "checking for double... $ECHO_C" >&6
20147 if test "${ac_cv_type_double+set}" = set; then
20148   echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150   cat >conftest.$ac_ext <<_ACEOF
20151 /* confdefs.h.  */
20152 _ACEOF
20153 cat confdefs.h >>conftest.$ac_ext
20154 cat >>conftest.$ac_ext <<_ACEOF
20155 /* end confdefs.h.  */
20156 $ac_includes_default
20157 int
20158 main ()
20159 {
20160 if ((double *) 0)
20161   return 0;
20162 if (sizeof (double))
20163   return 0;
20164   ;
20165   return 0;
20166 }
20167 _ACEOF
20168 rm -f conftest.$ac_objext
20169 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20170   (eval $ac_compile) 2>conftest.er1
20171   ac_status=$?
20172   grep -v '^ *+' conftest.er1 >conftest.err
20173   rm -f conftest.er1
20174   cat conftest.err >&5
20175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20176   (exit $ac_status); } &&
20177          { ac_try='test -z "$ac_c_werror_flag"
20178                          || test ! -s conftest.err'
20179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20180   (eval $ac_try) 2>&5
20181   ac_status=$?
20182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20183   (exit $ac_status); }; } &&
20184          { ac_try='test -s conftest.$ac_objext'
20185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20186   (eval $ac_try) 2>&5
20187   ac_status=$?
20188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20189   (exit $ac_status); }; }; then
20190   ac_cv_type_double=yes
20191 else
20192   echo "$as_me: failed program was:" >&5
20193 sed 's/^/| /' conftest.$ac_ext >&5
20194
20195 ac_cv_type_double=no
20196 fi
20197 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20198 fi
20199 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
20200 echo "${ECHO_T}$ac_cv_type_double" >&6
20201
20202 echo "$as_me:$LINENO: checking alignment of double" >&5
20203 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
20204 if test "${pgac_cv_alignof_double+set}" = set; then
20205   echo $ECHO_N "(cached) $ECHO_C" >&6
20206 else
20207   if test "$ac_cv_type_double" = yes; then
20208   if test "$cross_compiling" = yes; then
20209   # Depending upon the size, compute the lo and hi bounds.
20210 cat >conftest.$ac_ext <<_ACEOF
20211 /* confdefs.h.  */
20212 _ACEOF
20213 cat confdefs.h >>conftest.$ac_ext
20214 cat >>conftest.$ac_ext <<_ACEOF
20215 /* end confdefs.h.  */
20216 $ac_includes_default
20217 struct { char filler; double field; } pgac_struct;
20218 int
20219 main ()
20220 {
20221 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
20222 test_array [0] = 0
20223
20224   ;
20225   return 0;
20226 }
20227 _ACEOF
20228 rm -f conftest.$ac_objext
20229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20230   (eval $ac_compile) 2>conftest.er1
20231   ac_status=$?
20232   grep -v '^ *+' conftest.er1 >conftest.err
20233   rm -f conftest.er1
20234   cat conftest.err >&5
20235   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20236   (exit $ac_status); } &&
20237          { ac_try='test -z "$ac_c_werror_flag"
20238                          || test ! -s conftest.err'
20239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20240   (eval $ac_try) 2>&5
20241   ac_status=$?
20242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20243   (exit $ac_status); }; } &&
20244          { ac_try='test -s conftest.$ac_objext'
20245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20246   (eval $ac_try) 2>&5
20247   ac_status=$?
20248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20249   (exit $ac_status); }; }; then
20250   ac_lo=0 ac_mid=0
20251   while :; do
20252     cat >conftest.$ac_ext <<_ACEOF
20253 /* confdefs.h.  */
20254 _ACEOF
20255 cat confdefs.h >>conftest.$ac_ext
20256 cat >>conftest.$ac_ext <<_ACEOF
20257 /* end confdefs.h.  */
20258 $ac_includes_default
20259 struct { char filler; double field; } pgac_struct;
20260 int
20261 main ()
20262 {
20263 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20264 test_array [0] = 0
20265
20266   ;
20267   return 0;
20268 }
20269 _ACEOF
20270 rm -f conftest.$ac_objext
20271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20272   (eval $ac_compile) 2>conftest.er1
20273   ac_status=$?
20274   grep -v '^ *+' conftest.er1 >conftest.err
20275   rm -f conftest.er1
20276   cat conftest.err >&5
20277   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20278   (exit $ac_status); } &&
20279          { ac_try='test -z "$ac_c_werror_flag"
20280                          || test ! -s conftest.err'
20281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20282   (eval $ac_try) 2>&5
20283   ac_status=$?
20284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20285   (exit $ac_status); }; } &&
20286          { ac_try='test -s conftest.$ac_objext'
20287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20288   (eval $ac_try) 2>&5
20289   ac_status=$?
20290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20291   (exit $ac_status); }; }; then
20292   ac_hi=$ac_mid; break
20293 else
20294   echo "$as_me: failed program was:" >&5
20295 sed 's/^/| /' conftest.$ac_ext >&5
20296
20297 ac_lo=`expr $ac_mid + 1`
20298                     if test $ac_lo -le $ac_mid; then
20299                       ac_lo= ac_hi=
20300                       break
20301                     fi
20302                     ac_mid=`expr 2 '*' $ac_mid + 1`
20303 fi
20304 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20305   done
20306 else
20307   echo "$as_me: failed program was:" >&5
20308 sed 's/^/| /' conftest.$ac_ext >&5
20309
20310 cat >conftest.$ac_ext <<_ACEOF
20311 /* confdefs.h.  */
20312 _ACEOF
20313 cat confdefs.h >>conftest.$ac_ext
20314 cat >>conftest.$ac_ext <<_ACEOF
20315 /* end confdefs.h.  */
20316 $ac_includes_default
20317 struct { char filler; double field; } pgac_struct;
20318 int
20319 main ()
20320 {
20321 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
20322 test_array [0] = 0
20323
20324   ;
20325   return 0;
20326 }
20327 _ACEOF
20328 rm -f conftest.$ac_objext
20329 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20330   (eval $ac_compile) 2>conftest.er1
20331   ac_status=$?
20332   grep -v '^ *+' conftest.er1 >conftest.err
20333   rm -f conftest.er1
20334   cat conftest.err >&5
20335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20336   (exit $ac_status); } &&
20337          { ac_try='test -z "$ac_c_werror_flag"
20338                          || test ! -s conftest.err'
20339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20340   (eval $ac_try) 2>&5
20341   ac_status=$?
20342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20343   (exit $ac_status); }; } &&
20344          { ac_try='test -s conftest.$ac_objext'
20345   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20346   (eval $ac_try) 2>&5
20347   ac_status=$?
20348   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20349   (exit $ac_status); }; }; then
20350   ac_hi=-1 ac_mid=-1
20351   while :; do
20352     cat >conftest.$ac_ext <<_ACEOF
20353 /* confdefs.h.  */
20354 _ACEOF
20355 cat confdefs.h >>conftest.$ac_ext
20356 cat >>conftest.$ac_ext <<_ACEOF
20357 /* end confdefs.h.  */
20358 $ac_includes_default
20359 struct { char filler; double field; } pgac_struct;
20360 int
20361 main ()
20362 {
20363 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
20364 test_array [0] = 0
20365
20366   ;
20367   return 0;
20368 }
20369 _ACEOF
20370 rm -f conftest.$ac_objext
20371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20372   (eval $ac_compile) 2>conftest.er1
20373   ac_status=$?
20374   grep -v '^ *+' conftest.er1 >conftest.err
20375   rm -f conftest.er1
20376   cat conftest.err >&5
20377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20378   (exit $ac_status); } &&
20379          { ac_try='test -z "$ac_c_werror_flag"
20380                          || test ! -s conftest.err'
20381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20382   (eval $ac_try) 2>&5
20383   ac_status=$?
20384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20385   (exit $ac_status); }; } &&
20386          { ac_try='test -s conftest.$ac_objext'
20387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20388   (eval $ac_try) 2>&5
20389   ac_status=$?
20390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20391   (exit $ac_status); }; }; then
20392   ac_lo=$ac_mid; break
20393 else
20394   echo "$as_me: failed program was:" >&5
20395 sed 's/^/| /' conftest.$ac_ext >&5
20396
20397 ac_hi=`expr '(' $ac_mid ')' - 1`
20398                        if test $ac_mid -le $ac_hi; then
20399                          ac_lo= ac_hi=
20400                          break
20401                        fi
20402                        ac_mid=`expr 2 '*' $ac_mid`
20403 fi
20404 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20405   done
20406 else
20407   echo "$as_me: failed program was:" >&5
20408 sed 's/^/| /' conftest.$ac_ext >&5
20409
20410 ac_lo= ac_hi=
20411 fi
20412 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20413 fi
20414 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20415 # Binary search between lo and hi bounds.
20416 while test "x$ac_lo" != "x$ac_hi"; do
20417   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20418   cat >conftest.$ac_ext <<_ACEOF
20419 /* confdefs.h.  */
20420 _ACEOF
20421 cat confdefs.h >>conftest.$ac_ext
20422 cat >>conftest.$ac_ext <<_ACEOF
20423 /* end confdefs.h.  */
20424 $ac_includes_default
20425 struct { char filler; double field; } pgac_struct;
20426 int
20427 main ()
20428 {
20429 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
20430 test_array [0] = 0
20431
20432   ;
20433   return 0;
20434 }
20435 _ACEOF
20436 rm -f conftest.$ac_objext
20437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20438   (eval $ac_compile) 2>conftest.er1
20439   ac_status=$?
20440   grep -v '^ *+' conftest.er1 >conftest.err
20441   rm -f conftest.er1
20442   cat conftest.err >&5
20443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20444   (exit $ac_status); } &&
20445          { ac_try='test -z "$ac_c_werror_flag"
20446                          || test ! -s conftest.err'
20447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20448   (eval $ac_try) 2>&5
20449   ac_status=$?
20450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20451   (exit $ac_status); }; } &&
20452          { ac_try='test -s conftest.$ac_objext'
20453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20454   (eval $ac_try) 2>&5
20455   ac_status=$?
20456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20457   (exit $ac_status); }; }; then
20458   ac_hi=$ac_mid
20459 else
20460   echo "$as_me: failed program was:" >&5
20461 sed 's/^/| /' conftest.$ac_ext >&5
20462
20463 ac_lo=`expr '(' $ac_mid ')' + 1`
20464 fi
20465 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20466 done
20467 case $ac_lo in
20468 ?*) pgac_cv_alignof_double=$ac_lo;;
20469 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20470 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20471    { (exit 1); exit 1; }; } ;;
20472 esac
20473 else
20474   if test "$cross_compiling" = yes; then
20475   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20476 See \`config.log' for more details." >&5
20477 echo "$as_me: error: cannot run test program while cross compiling
20478 See \`config.log' for more details." >&2;}
20479    { (exit 1); exit 1; }; }
20480 else
20481   cat >conftest.$ac_ext <<_ACEOF
20482 /* confdefs.h.  */
20483 _ACEOF
20484 cat confdefs.h >>conftest.$ac_ext
20485 cat >>conftest.$ac_ext <<_ACEOF
20486 /* end confdefs.h.  */
20487 $ac_includes_default
20488 struct { char filler; double field; } pgac_struct;
20489 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20490 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
20491 #include <stdio.h>
20492 #include <stdlib.h>
20493 int
20494 main ()
20495 {
20496
20497   FILE *f = fopen ("conftest.val", "w");
20498   if (! f)
20499     exit (1);
20500   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
20501     {
20502       long i = longval ();
20503       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20504         exit (1);
20505       fprintf (f, "%ld\n", i);
20506     }
20507   else
20508     {
20509       unsigned long i = ulongval ();
20510       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
20511         exit (1);
20512       fprintf (f, "%lu\n", i);
20513     }
20514   exit (ferror (f) || fclose (f) != 0);
20515
20516   ;
20517   return 0;
20518 }
20519 _ACEOF
20520 rm -f conftest$ac_exeext
20521 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20522   (eval $ac_link) 2>&5
20523   ac_status=$?
20524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20525   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20527   (eval $ac_try) 2>&5
20528   ac_status=$?
20529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20530   (exit $ac_status); }; }; then
20531   pgac_cv_alignof_double=`cat conftest.val`
20532 else
20533   echo "$as_me: program exited with status $ac_status" >&5
20534 echo "$as_me: failed program was:" >&5
20535 sed 's/^/| /' conftest.$ac_ext >&5
20536
20537 ( exit $ac_status )
20538 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
20539 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
20540    { (exit 1); exit 1; }; }
20541 fi
20542 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20543 fi
20544 fi
20545 rm -f conftest.val
20546 else
20547   pgac_cv_alignof_double=0
20548 fi
20549 fi
20550 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
20551 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
20552 cat >>confdefs.h <<_ACEOF
20553 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
20554 _ACEOF
20555
20556
20557
20558 # Compute maximum alignment of any basic type.
20559 # We assume long's alignment is at least as strong as char, short, or int;
20560 # but we must check long long (if it exists) and double.
20561
20562 MAX_ALIGNOF=$pgac_cv_alignof_long
20563 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
20564   MAX_ALIGNOF=$pgac_cv_alignof_double
20565 fi
20566 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
20567   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
20568 fi
20569
20570 cat >>confdefs.h <<_ACEOF
20571 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
20572 _ACEOF
20573
20574
20575
20576 # Some platforms predefine the types int8, int16, etc.  Only check
20577 # a (hopefully) representative subset.
20578 echo "$as_me:$LINENO: checking for int8" >&5
20579 echo $ECHO_N "checking for int8... $ECHO_C" >&6
20580 if test "${ac_cv_type_int8+set}" = set; then
20581   echo $ECHO_N "(cached) $ECHO_C" >&6
20582 else
20583   cat >conftest.$ac_ext <<_ACEOF
20584 /* confdefs.h.  */
20585 _ACEOF
20586 cat confdefs.h >>conftest.$ac_ext
20587 cat >>conftest.$ac_ext <<_ACEOF
20588 /* end confdefs.h.  */
20589 #include <stdio.h>
20590 #ifdef HAVE_SUPPORTDEFS_H
20591 #include <SupportDefs.h>
20592 #endif
20593
20594 int
20595 main ()
20596 {
20597 if ((int8 *) 0)
20598   return 0;
20599 if (sizeof (int8))
20600   return 0;
20601   ;
20602   return 0;
20603 }
20604 _ACEOF
20605 rm -f conftest.$ac_objext
20606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20607   (eval $ac_compile) 2>conftest.er1
20608   ac_status=$?
20609   grep -v '^ *+' conftest.er1 >conftest.err
20610   rm -f conftest.er1
20611   cat conftest.err >&5
20612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20613   (exit $ac_status); } &&
20614          { ac_try='test -z "$ac_c_werror_flag"
20615                          || test ! -s conftest.err'
20616   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20617   (eval $ac_try) 2>&5
20618   ac_status=$?
20619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20620   (exit $ac_status); }; } &&
20621          { ac_try='test -s conftest.$ac_objext'
20622   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20623   (eval $ac_try) 2>&5
20624   ac_status=$?
20625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20626   (exit $ac_status); }; }; then
20627   ac_cv_type_int8=yes
20628 else
20629   echo "$as_me: failed program was:" >&5
20630 sed 's/^/| /' conftest.$ac_ext >&5
20631
20632 ac_cv_type_int8=no
20633 fi
20634 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20635 fi
20636 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
20637 echo "${ECHO_T}$ac_cv_type_int8" >&6
20638 if test $ac_cv_type_int8 = yes; then
20639
20640 cat >>confdefs.h <<_ACEOF
20641 #define HAVE_INT8 1
20642 _ACEOF
20643
20644
20645 fi
20646 echo "$as_me:$LINENO: checking for uint8" >&5
20647 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
20648 if test "${ac_cv_type_uint8+set}" = set; then
20649   echo $ECHO_N "(cached) $ECHO_C" >&6
20650 else
20651   cat >conftest.$ac_ext <<_ACEOF
20652 /* confdefs.h.  */
20653 _ACEOF
20654 cat confdefs.h >>conftest.$ac_ext
20655 cat >>conftest.$ac_ext <<_ACEOF
20656 /* end confdefs.h.  */
20657 #include <stdio.h>
20658 #ifdef HAVE_SUPPORTDEFS_H
20659 #include <SupportDefs.h>
20660 #endif
20661
20662 int
20663 main ()
20664 {
20665 if ((uint8 *) 0)
20666   return 0;
20667 if (sizeof (uint8))
20668   return 0;
20669   ;
20670   return 0;
20671 }
20672 _ACEOF
20673 rm -f conftest.$ac_objext
20674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20675   (eval $ac_compile) 2>conftest.er1
20676   ac_status=$?
20677   grep -v '^ *+' conftest.er1 >conftest.err
20678   rm -f conftest.er1
20679   cat conftest.err >&5
20680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20681   (exit $ac_status); } &&
20682          { ac_try='test -z "$ac_c_werror_flag"
20683                          || test ! -s conftest.err'
20684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20685   (eval $ac_try) 2>&5
20686   ac_status=$?
20687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20688   (exit $ac_status); }; } &&
20689          { ac_try='test -s conftest.$ac_objext'
20690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20691   (eval $ac_try) 2>&5
20692   ac_status=$?
20693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20694   (exit $ac_status); }; }; then
20695   ac_cv_type_uint8=yes
20696 else
20697   echo "$as_me: failed program was:" >&5
20698 sed 's/^/| /' conftest.$ac_ext >&5
20699
20700 ac_cv_type_uint8=no
20701 fi
20702 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20703 fi
20704 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
20705 echo "${ECHO_T}$ac_cv_type_uint8" >&6
20706 if test $ac_cv_type_uint8 = yes; then
20707
20708 cat >>confdefs.h <<_ACEOF
20709 #define HAVE_UINT8 1
20710 _ACEOF
20711
20712
20713 fi
20714 echo "$as_me:$LINENO: checking for int64" >&5
20715 echo $ECHO_N "checking for int64... $ECHO_C" >&6
20716 if test "${ac_cv_type_int64+set}" = set; then
20717   echo $ECHO_N "(cached) $ECHO_C" >&6
20718 else
20719   cat >conftest.$ac_ext <<_ACEOF
20720 /* confdefs.h.  */
20721 _ACEOF
20722 cat confdefs.h >>conftest.$ac_ext
20723 cat >>conftest.$ac_ext <<_ACEOF
20724 /* end confdefs.h.  */
20725 #include <stdio.h>
20726 #ifdef HAVE_SUPPORTDEFS_H
20727 #include <SupportDefs.h>
20728 #endif
20729
20730 int
20731 main ()
20732 {
20733 if ((int64 *) 0)
20734   return 0;
20735 if (sizeof (int64))
20736   return 0;
20737   ;
20738   return 0;
20739 }
20740 _ACEOF
20741 rm -f conftest.$ac_objext
20742 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20743   (eval $ac_compile) 2>conftest.er1
20744   ac_status=$?
20745   grep -v '^ *+' conftest.er1 >conftest.err
20746   rm -f conftest.er1
20747   cat conftest.err >&5
20748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20749   (exit $ac_status); } &&
20750          { ac_try='test -z "$ac_c_werror_flag"
20751                          || test ! -s conftest.err'
20752   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20753   (eval $ac_try) 2>&5
20754   ac_status=$?
20755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20756   (exit $ac_status); }; } &&
20757          { ac_try='test -s conftest.$ac_objext'
20758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20759   (eval $ac_try) 2>&5
20760   ac_status=$?
20761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20762   (exit $ac_status); }; }; then
20763   ac_cv_type_int64=yes
20764 else
20765   echo "$as_me: failed program was:" >&5
20766 sed 's/^/| /' conftest.$ac_ext >&5
20767
20768 ac_cv_type_int64=no
20769 fi
20770 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20771 fi
20772 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
20773 echo "${ECHO_T}$ac_cv_type_int64" >&6
20774 if test $ac_cv_type_int64 = yes; then
20775
20776 cat >>confdefs.h <<_ACEOF
20777 #define HAVE_INT64 1
20778 _ACEOF
20779
20780
20781 fi
20782 echo "$as_me:$LINENO: checking for uint64" >&5
20783 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
20784 if test "${ac_cv_type_uint64+set}" = set; then
20785   echo $ECHO_N "(cached) $ECHO_C" >&6
20786 else
20787   cat >conftest.$ac_ext <<_ACEOF
20788 /* confdefs.h.  */
20789 _ACEOF
20790 cat confdefs.h >>conftest.$ac_ext
20791 cat >>conftest.$ac_ext <<_ACEOF
20792 /* end confdefs.h.  */
20793 #include <stdio.h>
20794 #ifdef HAVE_SUPPORTDEFS_H
20795 #include <SupportDefs.h>
20796 #endif
20797
20798 int
20799 main ()
20800 {
20801 if ((uint64 *) 0)
20802   return 0;
20803 if (sizeof (uint64))
20804   return 0;
20805   ;
20806   return 0;
20807 }
20808 _ACEOF
20809 rm -f conftest.$ac_objext
20810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20811   (eval $ac_compile) 2>conftest.er1
20812   ac_status=$?
20813   grep -v '^ *+' conftest.er1 >conftest.err
20814   rm -f conftest.er1
20815   cat conftest.err >&5
20816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20817   (exit $ac_status); } &&
20818          { ac_try='test -z "$ac_c_werror_flag"
20819                          || test ! -s conftest.err'
20820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20821   (eval $ac_try) 2>&5
20822   ac_status=$?
20823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20824   (exit $ac_status); }; } &&
20825          { ac_try='test -s conftest.$ac_objext'
20826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20827   (eval $ac_try) 2>&5
20828   ac_status=$?
20829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20830   (exit $ac_status); }; }; then
20831   ac_cv_type_uint64=yes
20832 else
20833   echo "$as_me: failed program was:" >&5
20834 sed 's/^/| /' conftest.$ac_ext >&5
20835
20836 ac_cv_type_uint64=no
20837 fi
20838 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20839 fi
20840 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
20841 echo "${ECHO_T}$ac_cv_type_uint64" >&6
20842 if test $ac_cv_type_uint64 = yes; then
20843
20844 cat >>confdefs.h <<_ACEOF
20845 #define HAVE_UINT64 1
20846 _ACEOF
20847
20848
20849 fi
20850
20851
20852 # We also check for sig_atomic_t, which *should* be defined per ANSI
20853 # C, but is missing on some old platforms.
20854 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
20855 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
20856 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
20857   echo $ECHO_N "(cached) $ECHO_C" >&6
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 #include <signal.h>
20866
20867 int
20868 main ()
20869 {
20870 if ((sig_atomic_t *) 0)
20871   return 0;
20872 if (sizeof (sig_atomic_t))
20873   return 0;
20874   ;
20875   return 0;
20876 }
20877 _ACEOF
20878 rm -f conftest.$ac_objext
20879 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20880   (eval $ac_compile) 2>conftest.er1
20881   ac_status=$?
20882   grep -v '^ *+' conftest.er1 >conftest.err
20883   rm -f conftest.er1
20884   cat conftest.err >&5
20885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20886   (exit $ac_status); } &&
20887          { ac_try='test -z "$ac_c_werror_flag"
20888                          || test ! -s conftest.err'
20889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20890   (eval $ac_try) 2>&5
20891   ac_status=$?
20892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20893   (exit $ac_status); }; } &&
20894          { ac_try='test -s conftest.$ac_objext'
20895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20896   (eval $ac_try) 2>&5
20897   ac_status=$?
20898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20899   (exit $ac_status); }; }; then
20900   ac_cv_type_sig_atomic_t=yes
20901 else
20902   echo "$as_me: failed program was:" >&5
20903 sed 's/^/| /' conftest.$ac_ext >&5
20904
20905 ac_cv_type_sig_atomic_t=no
20906 fi
20907 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20908 fi
20909 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
20910 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
20911 if test $ac_cv_type_sig_atomic_t = yes; then
20912
20913 cat >>confdefs.h <<_ACEOF
20914 #define HAVE_SIG_ATOMIC_T 1
20915 _ACEOF
20916
20917
20918 fi
20919
20920
20921
20922 if test x"$template" != x"win32"
20923 then
20924 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
20925 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
20926 if test "${pgac_cv_func_posix_signals+set}" = set; then
20927   echo $ECHO_N "(cached) $ECHO_C" >&6
20928 else
20929   cat >conftest.$ac_ext <<_ACEOF
20930 /* confdefs.h.  */
20931 _ACEOF
20932 cat confdefs.h >>conftest.$ac_ext
20933 cat >>conftest.$ac_ext <<_ACEOF
20934 /* end confdefs.h.  */
20935 #include <signal.h>
20936
20937 int
20938 main ()
20939 {
20940 struct sigaction act, oact;
20941 sigemptyset(&act.sa_mask);
20942 act.sa_flags = SA_RESTART;
20943 sigaction(0, &act, &oact);
20944   ;
20945   return 0;
20946 }
20947 _ACEOF
20948 rm -f conftest.$ac_objext conftest$ac_exeext
20949 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20950   (eval $ac_link) 2>conftest.er1
20951   ac_status=$?
20952   grep -v '^ *+' conftest.er1 >conftest.err
20953   rm -f conftest.er1
20954   cat conftest.err >&5
20955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20956   (exit $ac_status); } &&
20957          { ac_try='test -z "$ac_c_werror_flag"
20958                          || test ! -s conftest.err'
20959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20960   (eval $ac_try) 2>&5
20961   ac_status=$?
20962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20963   (exit $ac_status); }; } &&
20964          { ac_try='test -s conftest$ac_exeext'
20965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20966   (eval $ac_try) 2>&5
20967   ac_status=$?
20968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20969   (exit $ac_status); }; }; then
20970   pgac_cv_func_posix_signals=yes
20971 else
20972   echo "$as_me: failed program was:" >&5
20973 sed 's/^/| /' conftest.$ac_ext >&5
20974
20975 pgac_cv_func_posix_signals=no
20976 fi
20977 rm -f conftest.err conftest.$ac_objext \
20978       conftest$ac_exeext conftest.$ac_ext
20979 fi
20980 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
20981 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
20982 if test x"$pgac_cv_func_posix_signals" = xyes ; then
20983
20984 cat >>confdefs.h <<\_ACEOF
20985 #define HAVE_POSIX_SIGNALS
20986 _ACEOF
20987
20988 fi
20989 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
20990
20991 if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
20992   { { echo "$as_me:$LINENO: error:
20993 *** Thread-safety requires POSIX signals, which are not supported by your
20994 *** operating system.
20995 " >&5
20996 echo "$as_me: error:
20997 *** Thread-safety requires POSIX signals, which are not supported by your
20998 *** operating system.
20999 " >&2;}
21000    { (exit 1); exit 1; }; }
21001 fi
21002 fi
21003
21004 if test $ac_cv_func_fseeko = yes; then
21005 # Check whether --enable-largefile or --disable-largefile was given.
21006 if test "${enable_largefile+set}" = set; then
21007   enableval="$enable_largefile"
21008
21009 fi;
21010 if test "$enable_largefile" != no; then
21011
21012   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
21013 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
21014 if test "${ac_cv_sys_largefile_CC+set}" = set; then
21015   echo $ECHO_N "(cached) $ECHO_C" >&6
21016 else
21017   ac_cv_sys_largefile_CC=no
21018      if test "$GCC" != yes; then
21019        ac_save_CC=$CC
21020        while :; do
21021          # IRIX 6.2 and later do not support large files by default,
21022          # so use the C compiler's -n32 option if that helps.
21023          cat >conftest.$ac_ext <<_ACEOF
21024 /* confdefs.h.  */
21025 _ACEOF
21026 cat confdefs.h >>conftest.$ac_ext
21027 cat >>conftest.$ac_ext <<_ACEOF
21028 /* end confdefs.h.  */
21029 #include <sys/types.h>
21030  /* Check that off_t can represent 2**63 - 1 correctly.
21031     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21032     since some C++ compilers masquerading as C compilers
21033     incorrectly reject 9223372036854775807.  */
21034 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21035   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21036                        && LARGE_OFF_T % 2147483647 == 1)
21037                       ? 1 : -1];
21038 int
21039 main ()
21040 {
21041
21042   ;
21043   return 0;
21044 }
21045 _ACEOF
21046          rm -f conftest.$ac_objext
21047 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21048   (eval $ac_compile) 2>conftest.er1
21049   ac_status=$?
21050   grep -v '^ *+' conftest.er1 >conftest.err
21051   rm -f conftest.er1
21052   cat conftest.err >&5
21053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21054   (exit $ac_status); } &&
21055          { ac_try='test -z "$ac_c_werror_flag"
21056                          || test ! -s conftest.err'
21057   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21058   (eval $ac_try) 2>&5
21059   ac_status=$?
21060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21061   (exit $ac_status); }; } &&
21062          { ac_try='test -s conftest.$ac_objext'
21063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21064   (eval $ac_try) 2>&5
21065   ac_status=$?
21066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21067   (exit $ac_status); }; }; then
21068   break
21069 else
21070   echo "$as_me: failed program was:" >&5
21071 sed 's/^/| /' conftest.$ac_ext >&5
21072
21073 fi
21074 rm -f conftest.err conftest.$ac_objext
21075          CC="$CC -n32"
21076          rm -f conftest.$ac_objext
21077 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21078   (eval $ac_compile) 2>conftest.er1
21079   ac_status=$?
21080   grep -v '^ *+' conftest.er1 >conftest.err
21081   rm -f conftest.er1
21082   cat conftest.err >&5
21083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21084   (exit $ac_status); } &&
21085          { ac_try='test -z "$ac_c_werror_flag"
21086                          || test ! -s conftest.err'
21087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21088   (eval $ac_try) 2>&5
21089   ac_status=$?
21090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21091   (exit $ac_status); }; } &&
21092          { ac_try='test -s conftest.$ac_objext'
21093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21094   (eval $ac_try) 2>&5
21095   ac_status=$?
21096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21097   (exit $ac_status); }; }; then
21098   ac_cv_sys_largefile_CC=' -n32'; break
21099 else
21100   echo "$as_me: failed program was:" >&5
21101 sed 's/^/| /' conftest.$ac_ext >&5
21102
21103 fi
21104 rm -f conftest.err conftest.$ac_objext
21105          break
21106        done
21107        CC=$ac_save_CC
21108        rm -f conftest.$ac_ext
21109     fi
21110 fi
21111 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
21112 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
21113   if test "$ac_cv_sys_largefile_CC" != no; then
21114     CC=$CC$ac_cv_sys_largefile_CC
21115   fi
21116
21117   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
21118 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
21119 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
21120   echo $ECHO_N "(cached) $ECHO_C" >&6
21121 else
21122   while :; do
21123   ac_cv_sys_file_offset_bits=no
21124   cat >conftest.$ac_ext <<_ACEOF
21125 /* confdefs.h.  */
21126 _ACEOF
21127 cat confdefs.h >>conftest.$ac_ext
21128 cat >>conftest.$ac_ext <<_ACEOF
21129 /* end confdefs.h.  */
21130 #include <sys/types.h>
21131  /* Check that off_t can represent 2**63 - 1 correctly.
21132     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21133     since some C++ compilers masquerading as C compilers
21134     incorrectly reject 9223372036854775807.  */
21135 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21136   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21137                        && LARGE_OFF_T % 2147483647 == 1)
21138                       ? 1 : -1];
21139 int
21140 main ()
21141 {
21142
21143   ;
21144   return 0;
21145 }
21146 _ACEOF
21147 rm -f conftest.$ac_objext
21148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21149   (eval $ac_compile) 2>conftest.er1
21150   ac_status=$?
21151   grep -v '^ *+' conftest.er1 >conftest.err
21152   rm -f conftest.er1
21153   cat conftest.err >&5
21154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21155   (exit $ac_status); } &&
21156          { ac_try='test -z "$ac_c_werror_flag"
21157                          || test ! -s conftest.err'
21158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21159   (eval $ac_try) 2>&5
21160   ac_status=$?
21161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21162   (exit $ac_status); }; } &&
21163          { ac_try='test -s conftest.$ac_objext'
21164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21165   (eval $ac_try) 2>&5
21166   ac_status=$?
21167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21168   (exit $ac_status); }; }; then
21169   break
21170 else
21171   echo "$as_me: failed program was:" >&5
21172 sed 's/^/| /' conftest.$ac_ext >&5
21173
21174 fi
21175 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21176   cat >conftest.$ac_ext <<_ACEOF
21177 /* confdefs.h.  */
21178 _ACEOF
21179 cat confdefs.h >>conftest.$ac_ext
21180 cat >>conftest.$ac_ext <<_ACEOF
21181 /* end confdefs.h.  */
21182 #define _FILE_OFFSET_BITS 64
21183 #include <sys/types.h>
21184  /* Check that off_t can represent 2**63 - 1 correctly.
21185     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21186     since some C++ compilers masquerading as C compilers
21187     incorrectly reject 9223372036854775807.  */
21188 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21189   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21190                        && LARGE_OFF_T % 2147483647 == 1)
21191                       ? 1 : -1];
21192 int
21193 main ()
21194 {
21195
21196   ;
21197   return 0;
21198 }
21199 _ACEOF
21200 rm -f conftest.$ac_objext
21201 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21202   (eval $ac_compile) 2>conftest.er1
21203   ac_status=$?
21204   grep -v '^ *+' conftest.er1 >conftest.err
21205   rm -f conftest.er1
21206   cat conftest.err >&5
21207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21208   (exit $ac_status); } &&
21209          { ac_try='test -z "$ac_c_werror_flag"
21210                          || test ! -s conftest.err'
21211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21212   (eval $ac_try) 2>&5
21213   ac_status=$?
21214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21215   (exit $ac_status); }; } &&
21216          { ac_try='test -s conftest.$ac_objext'
21217   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21218   (eval $ac_try) 2>&5
21219   ac_status=$?
21220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21221   (exit $ac_status); }; }; then
21222   ac_cv_sys_file_offset_bits=64; break
21223 else
21224   echo "$as_me: failed program was:" >&5
21225 sed 's/^/| /' conftest.$ac_ext >&5
21226
21227 fi
21228 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21229   break
21230 done
21231 fi
21232 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
21233 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
21234 if test "$ac_cv_sys_file_offset_bits" != no; then
21235
21236 cat >>confdefs.h <<_ACEOF
21237 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
21238 _ACEOF
21239
21240 fi
21241 rm -f conftest*
21242   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
21243 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
21244 if test "${ac_cv_sys_large_files+set}" = set; then
21245   echo $ECHO_N "(cached) $ECHO_C" >&6
21246 else
21247   while :; do
21248   ac_cv_sys_large_files=no
21249   cat >conftest.$ac_ext <<_ACEOF
21250 /* confdefs.h.  */
21251 _ACEOF
21252 cat confdefs.h >>conftest.$ac_ext
21253 cat >>conftest.$ac_ext <<_ACEOF
21254 /* end confdefs.h.  */
21255 #include <sys/types.h>
21256  /* Check that off_t can represent 2**63 - 1 correctly.
21257     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21258     since some C++ compilers masquerading as C compilers
21259     incorrectly reject 9223372036854775807.  */
21260 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21261   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21262                        && LARGE_OFF_T % 2147483647 == 1)
21263                       ? 1 : -1];
21264 int
21265 main ()
21266 {
21267
21268   ;
21269   return 0;
21270 }
21271 _ACEOF
21272 rm -f conftest.$ac_objext
21273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21274   (eval $ac_compile) 2>conftest.er1
21275   ac_status=$?
21276   grep -v '^ *+' conftest.er1 >conftest.err
21277   rm -f conftest.er1
21278   cat conftest.err >&5
21279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21280   (exit $ac_status); } &&
21281          { ac_try='test -z "$ac_c_werror_flag"
21282                          || test ! -s conftest.err'
21283   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21284   (eval $ac_try) 2>&5
21285   ac_status=$?
21286   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287   (exit $ac_status); }; } &&
21288          { ac_try='test -s conftest.$ac_objext'
21289   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21290   (eval $ac_try) 2>&5
21291   ac_status=$?
21292   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21293   (exit $ac_status); }; }; then
21294   break
21295 else
21296   echo "$as_me: failed program was:" >&5
21297 sed 's/^/| /' conftest.$ac_ext >&5
21298
21299 fi
21300 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21301   cat >conftest.$ac_ext <<_ACEOF
21302 /* confdefs.h.  */
21303 _ACEOF
21304 cat confdefs.h >>conftest.$ac_ext
21305 cat >>conftest.$ac_ext <<_ACEOF
21306 /* end confdefs.h.  */
21307 #define _LARGE_FILES 1
21308 #include <sys/types.h>
21309  /* Check that off_t can represent 2**63 - 1 correctly.
21310     We can't simply define LARGE_OFF_T to be 9223372036854775807,
21311     since some C++ compilers masquerading as C compilers
21312     incorrectly reject 9223372036854775807.  */
21313 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
21314   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
21315                        && LARGE_OFF_T % 2147483647 == 1)
21316                       ? 1 : -1];
21317 int
21318 main ()
21319 {
21320
21321   ;
21322   return 0;
21323 }
21324 _ACEOF
21325 rm -f conftest.$ac_objext
21326 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21327   (eval $ac_compile) 2>conftest.er1
21328   ac_status=$?
21329   grep -v '^ *+' conftest.er1 >conftest.err
21330   rm -f conftest.er1
21331   cat conftest.err >&5
21332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21333   (exit $ac_status); } &&
21334          { ac_try='test -z "$ac_c_werror_flag"
21335                          || test ! -s conftest.err'
21336   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21337   (eval $ac_try) 2>&5
21338   ac_status=$?
21339   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21340   (exit $ac_status); }; } &&
21341          { ac_try='test -s conftest.$ac_objext'
21342   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21343   (eval $ac_try) 2>&5
21344   ac_status=$?
21345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21346   (exit $ac_status); }; }; then
21347   ac_cv_sys_large_files=1; break
21348 else
21349   echo "$as_me: failed program was:" >&5
21350 sed 's/^/| /' conftest.$ac_ext >&5
21351
21352 fi
21353 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21354   break
21355 done
21356 fi
21357 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
21358 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
21359 if test "$ac_cv_sys_large_files" != no; then
21360
21361 cat >>confdefs.h <<_ACEOF
21362 #define _LARGE_FILES $ac_cv_sys_large_files
21363 _ACEOF
21364
21365 fi
21366 rm -f conftest*
21367 fi
21368
21369 fi
21370
21371 # SunOS doesn't handle negative byte comparisons properly with +/- return
21372 echo "$as_me:$LINENO: checking for working memcmp" >&5
21373 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
21374 if test "${ac_cv_func_memcmp_working+set}" = set; then
21375   echo $ECHO_N "(cached) $ECHO_C" >&6
21376 else
21377   if test "$cross_compiling" = yes; then
21378   ac_cv_func_memcmp_working=no
21379 else
21380   cat >conftest.$ac_ext <<_ACEOF
21381 /* confdefs.h.  */
21382 _ACEOF
21383 cat confdefs.h >>conftest.$ac_ext
21384 cat >>conftest.$ac_ext <<_ACEOF
21385 /* end confdefs.h.  */
21386 $ac_includes_default
21387 int
21388 main ()
21389 {
21390
21391   /* Some versions of memcmp are not 8-bit clean.  */
21392   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21393   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
21394     exit (1);
21395
21396   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
21397      or more and with at least one buffer not starting on a 4-byte boundary.
21398      William Lewis provided this test program.   */
21399   {
21400     char foo[21];
21401     char bar[21];
21402     int i;
21403     for (i = 0; i < 4; i++)
21404       {
21405         char *a = foo + i;
21406         char *b = bar + i;
21407         strcpy (a, "--------01111111");
21408         strcpy (b, "--------10000000");
21409         if (memcmp (a, b, 16) >= 0)
21410           exit (1);
21411       }
21412     exit (0);
21413   }
21414
21415   ;
21416   return 0;
21417 }
21418 _ACEOF
21419 rm -f conftest$ac_exeext
21420 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21421   (eval $ac_link) 2>&5
21422   ac_status=$?
21423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21425   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21426   (eval $ac_try) 2>&5
21427   ac_status=$?
21428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21429   (exit $ac_status); }; }; then
21430   ac_cv_func_memcmp_working=yes
21431 else
21432   echo "$as_me: program exited with status $ac_status" >&5
21433 echo "$as_me: failed program was:" >&5
21434 sed 's/^/| /' conftest.$ac_ext >&5
21435
21436 ( exit $ac_status )
21437 ac_cv_func_memcmp_working=no
21438 fi
21439 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21440 fi
21441 fi
21442 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
21443 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
21444 test $ac_cv_func_memcmp_working = no && case $LIBOBJS in
21445     "memcmp.$ac_objext"   | \
21446   *" memcmp.$ac_objext"   | \
21447     "memcmp.$ac_objext "* | \
21448   *" memcmp.$ac_objext "* ) ;;
21449   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;;
21450 esac
21451
21452
21453
21454
21455 # Select semaphore implementation type.
21456 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21457
21458 cat >>confdefs.h <<\_ACEOF
21459 #define USE_NAMED_POSIX_SEMAPHORES 1
21460 _ACEOF
21461
21462   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21463 else
21464   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21465
21466 cat >>confdefs.h <<\_ACEOF
21467 #define USE_UNNAMED_POSIX_SEMAPHORES 1
21468 _ACEOF
21469
21470     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21471   else
21472
21473 cat >>confdefs.h <<\_ACEOF
21474 #define USE_SYSV_SEMAPHORES 1
21475 _ACEOF
21476
21477     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21478   fi
21479 fi
21480
21481
21482 # Select shared-memory implementation type.
21483
21484 cat >>confdefs.h <<\_ACEOF
21485 #define USE_SYSV_SHARED_MEMORY 1
21486 _ACEOF
21487
21488 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
21489
21490
21491 if test "$enable_nls" = yes ; then
21492
21493   echo "$as_me:$LINENO: checking for library containing gettext" >&5
21494 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
21495 if test "${ac_cv_search_gettext+set}" = set; then
21496   echo $ECHO_N "(cached) $ECHO_C" >&6
21497 else
21498   ac_func_search_save_LIBS=$LIBS
21499 ac_cv_search_gettext=no
21500 cat >conftest.$ac_ext <<_ACEOF
21501 /* confdefs.h.  */
21502 _ACEOF
21503 cat confdefs.h >>conftest.$ac_ext
21504 cat >>conftest.$ac_ext <<_ACEOF
21505 /* end confdefs.h.  */
21506
21507 /* Override any gcc2 internal prototype to avoid an error.  */
21508 #ifdef __cplusplus
21509 extern "C"
21510 #endif
21511 /* We use char because int might match the return type of a gcc2
21512    builtin and then its argument prototype would still apply.  */
21513 char gettext ();
21514 int
21515 main ()
21516 {
21517 gettext ();
21518   ;
21519   return 0;
21520 }
21521 _ACEOF
21522 rm -f conftest.$ac_objext conftest$ac_exeext
21523 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21524   (eval $ac_link) 2>conftest.er1
21525   ac_status=$?
21526   grep -v '^ *+' conftest.er1 >conftest.err
21527   rm -f conftest.er1
21528   cat conftest.err >&5
21529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21530   (exit $ac_status); } &&
21531          { ac_try='test -z "$ac_c_werror_flag"
21532                          || test ! -s conftest.err'
21533   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21534   (eval $ac_try) 2>&5
21535   ac_status=$?
21536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21537   (exit $ac_status); }; } &&
21538          { ac_try='test -s conftest$ac_exeext'
21539   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21540   (eval $ac_try) 2>&5
21541   ac_status=$?
21542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21543   (exit $ac_status); }; }; then
21544   ac_cv_search_gettext="none required"
21545 else
21546   echo "$as_me: failed program was:" >&5
21547 sed 's/^/| /' conftest.$ac_ext >&5
21548
21549 fi
21550 rm -f conftest.err conftest.$ac_objext \
21551       conftest$ac_exeext conftest.$ac_ext
21552 if test "$ac_cv_search_gettext" = no; then
21553   for ac_lib in intl; do
21554     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
21555     cat >conftest.$ac_ext <<_ACEOF
21556 /* confdefs.h.  */
21557 _ACEOF
21558 cat confdefs.h >>conftest.$ac_ext
21559 cat >>conftest.$ac_ext <<_ACEOF
21560 /* end confdefs.h.  */
21561
21562 /* Override any gcc2 internal prototype to avoid an error.  */
21563 #ifdef __cplusplus
21564 extern "C"
21565 #endif
21566 /* We use char because int might match the return type of a gcc2
21567    builtin and then its argument prototype would still apply.  */
21568 char gettext ();
21569 int
21570 main ()
21571 {
21572 gettext ();
21573   ;
21574   return 0;
21575 }
21576 _ACEOF
21577 rm -f conftest.$ac_objext conftest$ac_exeext
21578 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21579   (eval $ac_link) 2>conftest.er1
21580   ac_status=$?
21581   grep -v '^ *+' conftest.er1 >conftest.err
21582   rm -f conftest.er1
21583   cat conftest.err >&5
21584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21585   (exit $ac_status); } &&
21586          { ac_try='test -z "$ac_c_werror_flag"
21587                          || test ! -s conftest.err'
21588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21589   (eval $ac_try) 2>&5
21590   ac_status=$?
21591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21592   (exit $ac_status); }; } &&
21593          { ac_try='test -s conftest$ac_exeext'
21594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21595   (eval $ac_try) 2>&5
21596   ac_status=$?
21597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21598   (exit $ac_status); }; }; then
21599   ac_cv_search_gettext="-l$ac_lib"
21600 break
21601 else
21602   echo "$as_me: failed program was:" >&5
21603 sed 's/^/| /' conftest.$ac_ext >&5
21604
21605 fi
21606 rm -f conftest.err conftest.$ac_objext \
21607       conftest$ac_exeext conftest.$ac_ext
21608   done
21609 fi
21610 LIBS=$ac_func_search_save_LIBS
21611 fi
21612 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
21613 echo "${ECHO_T}$ac_cv_search_gettext" >&6
21614 if test "$ac_cv_search_gettext" != no; then
21615   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
21616
21617 else
21618   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
21619 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
21620    { (exit 1); exit 1; }; }
21621 fi
21622
21623   if test "${ac_cv_header_libintl_h+set}" = set; then
21624   echo "$as_me:$LINENO: checking for libintl.h" >&5
21625 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21626 if test "${ac_cv_header_libintl_h+set}" = set; then
21627   echo $ECHO_N "(cached) $ECHO_C" >&6
21628 fi
21629 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21630 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21631 else
21632   # Is the header compilable?
21633 echo "$as_me:$LINENO: checking libintl.h usability" >&5
21634 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
21635 cat >conftest.$ac_ext <<_ACEOF
21636 /* confdefs.h.  */
21637 _ACEOF
21638 cat confdefs.h >>conftest.$ac_ext
21639 cat >>conftest.$ac_ext <<_ACEOF
21640 /* end confdefs.h.  */
21641 $ac_includes_default
21642 #include <libintl.h>
21643 _ACEOF
21644 rm -f conftest.$ac_objext
21645 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21646   (eval $ac_compile) 2>conftest.er1
21647   ac_status=$?
21648   grep -v '^ *+' conftest.er1 >conftest.err
21649   rm -f conftest.er1
21650   cat conftest.err >&5
21651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21652   (exit $ac_status); } &&
21653          { ac_try='test -z "$ac_c_werror_flag"
21654                          || test ! -s conftest.err'
21655   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21656   (eval $ac_try) 2>&5
21657   ac_status=$?
21658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21659   (exit $ac_status); }; } &&
21660          { ac_try='test -s conftest.$ac_objext'
21661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21662   (eval $ac_try) 2>&5
21663   ac_status=$?
21664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21665   (exit $ac_status); }; }; then
21666   ac_header_compiler=yes
21667 else
21668   echo "$as_me: failed program was:" >&5
21669 sed 's/^/| /' conftest.$ac_ext >&5
21670
21671 ac_header_compiler=no
21672 fi
21673 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
21674 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21675 echo "${ECHO_T}$ac_header_compiler" >&6
21676
21677 # Is the header present?
21678 echo "$as_me:$LINENO: checking libintl.h presence" >&5
21679 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
21680 cat >conftest.$ac_ext <<_ACEOF
21681 /* confdefs.h.  */
21682 _ACEOF
21683 cat confdefs.h >>conftest.$ac_ext
21684 cat >>conftest.$ac_ext <<_ACEOF
21685 /* end confdefs.h.  */
21686 #include <libintl.h>
21687 _ACEOF
21688 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21689   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21690   ac_status=$?
21691   grep -v '^ *+' conftest.er1 >conftest.err
21692   rm -f conftest.er1
21693   cat conftest.err >&5
21694   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21695   (exit $ac_status); } >/dev/null; then
21696   if test -s conftest.err; then
21697     ac_cpp_err=$ac_c_preproc_warn_flag
21698     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21699   else
21700     ac_cpp_err=
21701   fi
21702 else
21703   ac_cpp_err=yes
21704 fi
21705 if test -z "$ac_cpp_err"; then
21706   ac_header_preproc=yes
21707 else
21708   echo "$as_me: failed program was:" >&5
21709 sed 's/^/| /' conftest.$ac_ext >&5
21710
21711   ac_header_preproc=no
21712 fi
21713 rm -f conftest.err conftest.$ac_ext
21714 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21715 echo "${ECHO_T}$ac_header_preproc" >&6
21716
21717 # So?  What about this header?
21718 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21719   yes:no: )
21720     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
21721 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
21722     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
21723 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
21724     ac_header_preproc=yes
21725     ;;
21726   no:yes:* )
21727     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
21728 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
21729     { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
21730 echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
21731     { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
21732 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
21733     { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
21734 echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
21735     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
21736 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
21737     { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
21738 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
21739     (
21740       cat <<\_ASBOX
21741 ## ---------------------------------------- ##
21742 ## Report this to pgsql-bugs@postgresql.org ##
21743 ## ---------------------------------------- ##
21744 _ASBOX
21745     ) |
21746       sed "s/^/$as_me: WARNING:     /" >&2
21747     ;;
21748 esac
21749 echo "$as_me:$LINENO: checking for libintl.h" >&5
21750 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
21751 if test "${ac_cv_header_libintl_h+set}" = set; then
21752   echo $ECHO_N "(cached) $ECHO_C" >&6
21753 else
21754   ac_cv_header_libintl_h=$ac_header_preproc
21755 fi
21756 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
21757 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
21758
21759 fi
21760 if test $ac_cv_header_libintl_h = yes; then
21761   :
21762 else
21763   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
21764 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
21765    { (exit 1); exit 1; }; }
21766 fi
21767
21768
21769   for ac_prog in msgfmt
21770 do
21771   # Extract the first word of "$ac_prog", so it can be a program name with args.
21772 set dummy $ac_prog; ac_word=$2
21773 echo "$as_me:$LINENO: checking for $ac_word" >&5
21774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21775 if test "${ac_cv_prog_MSGFMT+set}" = set; then
21776   echo $ECHO_N "(cached) $ECHO_C" >&6
21777 else
21778   if test -n "$MSGFMT"; then
21779   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
21780 else
21781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21782 for as_dir in $PATH
21783 do
21784   IFS=$as_save_IFS
21785   test -z "$as_dir" && as_dir=.
21786   for ac_exec_ext in '' $ac_executable_extensions; do
21787   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21788     ac_cv_prog_MSGFMT="$ac_prog"
21789     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21790     break 2
21791   fi
21792 done
21793 done
21794
21795 fi
21796 fi
21797 MSGFMT=$ac_cv_prog_MSGFMT
21798 if test -n "$MSGFMT"; then
21799   echo "$as_me:$LINENO: result: $MSGFMT" >&5
21800 echo "${ECHO_T}$MSGFMT" >&6
21801 else
21802   echo "$as_me:$LINENO: result: no" >&5
21803 echo "${ECHO_T}no" >&6
21804 fi
21805
21806   test -n "$MSGFMT" && break
21807 done
21808
21809   if test -z "$MSGFMT"; then
21810     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
21811 echo "$as_me: error: msgfmt is required for NLS" >&2;}
21812    { (exit 1); exit 1; }; }
21813   fi
21814   for ac_prog in msgmerge
21815 do
21816   # Extract the first word of "$ac_prog", so it can be a program name with args.
21817 set dummy $ac_prog; ac_word=$2
21818 echo "$as_me:$LINENO: checking for $ac_word" >&5
21819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21820 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
21821   echo $ECHO_N "(cached) $ECHO_C" >&6
21822 else
21823   if test -n "$MSGMERGE"; then
21824   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
21825 else
21826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21827 for as_dir in $PATH
21828 do
21829   IFS=$as_save_IFS
21830   test -z "$as_dir" && as_dir=.
21831   for ac_exec_ext in '' $ac_executable_extensions; do
21832   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21833     ac_cv_prog_MSGMERGE="$ac_prog"
21834     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21835     break 2
21836   fi
21837 done
21838 done
21839
21840 fi
21841 fi
21842 MSGMERGE=$ac_cv_prog_MSGMERGE
21843 if test -n "$MSGMERGE"; then
21844   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
21845 echo "${ECHO_T}$MSGMERGE" >&6
21846 else
21847   echo "$as_me:$LINENO: result: no" >&5
21848 echo "${ECHO_T}no" >&6
21849 fi
21850
21851   test -n "$MSGMERGE" && break
21852 done
21853
21854   for ac_prog in xgettext
21855 do
21856   # Extract the first word of "$ac_prog", so it can be a program name with args.
21857 set dummy $ac_prog; ac_word=$2
21858 echo "$as_me:$LINENO: checking for $ac_word" >&5
21859 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21860 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
21861   echo $ECHO_N "(cached) $ECHO_C" >&6
21862 else
21863   if test -n "$XGETTEXT"; then
21864   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
21865 else
21866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21867 for as_dir in $PATH
21868 do
21869   IFS=$as_save_IFS
21870   test -z "$as_dir" && as_dir=.
21871   for ac_exec_ext in '' $ac_executable_extensions; do
21872   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21873     ac_cv_prog_XGETTEXT="$ac_prog"
21874     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21875     break 2
21876   fi
21877 done
21878 done
21879
21880 fi
21881 fi
21882 XGETTEXT=$ac_cv_prog_XGETTEXT
21883 if test -n "$XGETTEXT"; then
21884   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21885 echo "${ECHO_T}$XGETTEXT" >&6
21886 else
21887   echo "$as_me:$LINENO: result: no" >&5
21888 echo "${ECHO_T}no" >&6
21889 fi
21890
21891   test -n "$XGETTEXT" && break
21892 done
21893
21894
21895   # Note: share/locale is always the default, independent of $datadir
21896   localedir='${prefix}/share/locale'
21897   if test x"$prefix" = x"NONE"; then
21898     exp_localedir="$ac_default_prefix/share/locale"
21899   else
21900     exp_localedir="$prefix/share/locale"
21901   fi
21902
21903
21904
21905 cat >>confdefs.h <<_ACEOF
21906 #define LOCALEDIR "$exp_localedir"
21907 _ACEOF
21908
21909
21910 fi
21911
21912 # Check for Tcl configuration script tclConfig.sh
21913 if test "$with_tcl" = yes; then
21914     for ac_prog in tclsh tcl
21915 do
21916   # Extract the first word of "$ac_prog", so it can be a program name with args.
21917 set dummy $ac_prog; ac_word=$2
21918 echo "$as_me:$LINENO: checking for $ac_word" >&5
21919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21920 if test "${ac_cv_path_TCLSH+set}" = set; then
21921   echo $ECHO_N "(cached) $ECHO_C" >&6
21922 else
21923   case $TCLSH in
21924   [\\/]* | ?:[\\/]*)
21925   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
21926   ;;
21927   *)
21928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21929 for as_dir in $PATH
21930 do
21931   IFS=$as_save_IFS
21932   test -z "$as_dir" && as_dir=.
21933   for ac_exec_ext in '' $ac_executable_extensions; do
21934   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21935     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
21936     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21937     break 2
21938   fi
21939 done
21940 done
21941
21942   ;;
21943 esac
21944 fi
21945 TCLSH=$ac_cv_path_TCLSH
21946
21947 if test -n "$TCLSH"; then
21948   echo "$as_me:$LINENO: result: $TCLSH" >&5
21949 echo "${ECHO_T}$TCLSH" >&6
21950 else
21951   echo "$as_me:$LINENO: result: no" >&5
21952 echo "${ECHO_T}no" >&6
21953 fi
21954
21955   test -n "$TCLSH" && break
21956 done
21957
21958 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
21959 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
21960 # Let user override test
21961 if test -z "$TCL_CONFIG_SH"; then
21962     pgac_test_dirs="$with_tclconfig"
21963
21964     set X $pgac_test_dirs; shift
21965     if test $# -eq 0; then
21966         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
21967 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
21968    { (exit 1); exit 1; }; }
21969         set X `echo 'puts $auto_path' | $TCLSH`; shift
21970     fi
21971
21972     for pgac_dir do
21973         if test -r "$pgac_dir/tclConfig.sh"; then
21974             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
21975             break
21976         fi
21977     done
21978 fi
21979
21980 if test -z "$TCL_CONFIG_SH"; then
21981     echo "$as_me:$LINENO: result: no" >&5
21982 echo "${ECHO_T}no" >&6
21983     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
21984 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
21985    { (exit 1); exit 1; }; }
21986 else
21987     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
21988 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
21989 fi
21990
21991
21992
21993     . "$TCL_CONFIG_SH"
21994 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
21995 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
21996 eval TCL_LIBS=\"$TCL_LIBS\"
21997 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
21998 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
21999
22000         # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
22001     ac_save_CPPFLAGS=$CPPFLAGS
22002     CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
22003     if test "${ac_cv_header_tcl_h+set}" = set; then
22004   echo "$as_me:$LINENO: checking for tcl.h" >&5
22005 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22006 if test "${ac_cv_header_tcl_h+set}" = set; then
22007   echo $ECHO_N "(cached) $ECHO_C" >&6
22008 fi
22009 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22010 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22011 else
22012   # Is the header compilable?
22013 echo "$as_me:$LINENO: checking tcl.h usability" >&5
22014 echo $ECHO_N "checking tcl.h usability... $ECHO_C" >&6
22015 cat >conftest.$ac_ext <<_ACEOF
22016 /* confdefs.h.  */
22017 _ACEOF
22018 cat confdefs.h >>conftest.$ac_ext
22019 cat >>conftest.$ac_ext <<_ACEOF
22020 /* end confdefs.h.  */
22021 $ac_includes_default
22022 #include <tcl.h>
22023 _ACEOF
22024 rm -f conftest.$ac_objext
22025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22026   (eval $ac_compile) 2>conftest.er1
22027   ac_status=$?
22028   grep -v '^ *+' conftest.er1 >conftest.err
22029   rm -f conftest.er1
22030   cat conftest.err >&5
22031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22032   (exit $ac_status); } &&
22033          { ac_try='test -z "$ac_c_werror_flag"
22034                          || test ! -s conftest.err'
22035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22036   (eval $ac_try) 2>&5
22037   ac_status=$?
22038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22039   (exit $ac_status); }; } &&
22040          { ac_try='test -s conftest.$ac_objext'
22041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22042   (eval $ac_try) 2>&5
22043   ac_status=$?
22044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22045   (exit $ac_status); }; }; then
22046   ac_header_compiler=yes
22047 else
22048   echo "$as_me: failed program was:" >&5
22049 sed 's/^/| /' conftest.$ac_ext >&5
22050
22051 ac_header_compiler=no
22052 fi
22053 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
22054 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22055 echo "${ECHO_T}$ac_header_compiler" >&6
22056
22057 # Is the header present?
22058 echo "$as_me:$LINENO: checking tcl.h presence" >&5
22059 echo $ECHO_N "checking tcl.h presence... $ECHO_C" >&6
22060 cat >conftest.$ac_ext <<_ACEOF
22061 /* confdefs.h.  */
22062 _ACEOF
22063 cat confdefs.h >>conftest.$ac_ext
22064 cat >>conftest.$ac_ext <<_ACEOF
22065 /* end confdefs.h.  */
22066 #include <tcl.h>
22067 _ACEOF
22068 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
22069   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22070   ac_status=$?
22071   grep -v '^ *+' conftest.er1 >conftest.err
22072   rm -f conftest.er1
22073   cat conftest.err >&5
22074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22075   (exit $ac_status); } >/dev/null; then
22076   if test -s conftest.err; then
22077     ac_cpp_err=$ac_c_preproc_warn_flag
22078     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
22079   else
22080     ac_cpp_err=
22081   fi
22082 else
22083   ac_cpp_err=yes
22084 fi
22085 if test -z "$ac_cpp_err"; then
22086   ac_header_preproc=yes
22087 else
22088   echo "$as_me: failed program was:" >&5
22089 sed 's/^/| /' conftest.$ac_ext >&5
22090
22091   ac_header_preproc=no
22092 fi
22093 rm -f conftest.err conftest.$ac_ext
22094 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22095 echo "${ECHO_T}$ac_header_preproc" >&6
22096
22097 # So?  What about this header?
22098 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22099   yes:no: )
22100     { echo "$as_me:$LINENO: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&5
22101 echo "$as_me: WARNING: tcl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22102     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the compiler's result" >&5
22103 echo "$as_me: WARNING: tcl.h: proceeding with the compiler's result" >&2;}
22104     ac_header_preproc=yes
22105     ;;
22106   no:yes:* )
22107     { echo "$as_me:$LINENO: WARNING: tcl.h: present but cannot be compiled" >&5
22108 echo "$as_me: WARNING: tcl.h: present but cannot be compiled" >&2;}
22109     { echo "$as_me:$LINENO: WARNING: tcl.h:     check for missing prerequisite headers?" >&5
22110 echo "$as_me: WARNING: tcl.h:     check for missing prerequisite headers?" >&2;}
22111     { echo "$as_me:$LINENO: WARNING: tcl.h: see the Autoconf documentation" >&5
22112 echo "$as_me: WARNING: tcl.h: see the Autoconf documentation" >&2;}
22113     { echo "$as_me:$LINENO: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&5
22114 echo "$as_me: WARNING: tcl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
22115     { echo "$as_me:$LINENO: WARNING: tcl.h: proceeding with the preprocessor's result" >&5
22116 echo "$as_me: WARNING: tcl.h: proceeding with the preprocessor's result" >&2;}
22117     { echo "$as_me:$LINENO: WARNING: tcl.h: in the future, the compiler will take precedence" >&5
22118 echo "$as_me: WARNING: tcl.h: in the future, the compiler will take precedence" >&2;}
22119     (
22120       cat <<\_ASBOX
22121 ## ---------------------------------------- ##
22122 ## Report this to pgsql-bugs@postgresql.org ##
22123 ## ---------------------------------------- ##
22124 _ASBOX
22125     ) |
22126       sed "s/^/$as_me: WARNING:     /" >&2
22127     ;;
22128 esac
22129 echo "$as_me:$LINENO: checking for tcl.h" >&5
22130 echo $ECHO_N "checking for tcl.h... $ECHO_C" >&6
22131 if test "${ac_cv_header_tcl_h+set}" = set; then
22132   echo $ECHO_N "(cached) $ECHO_C" >&6
22133 else
22134   ac_cv_header_tcl_h=$ac_header_preproc
22135 fi
22136 echo "$as_me:$LINENO: result: $ac_cv_header_tcl_h" >&5
22137 echo "${ECHO_T}$ac_cv_header_tcl_h" >&6
22138
22139 fi
22140 if test $ac_cv_header_tcl_h = yes; then
22141   :
22142 else
22143   { { echo "$as_me:$LINENO: error: header file <tcl.h> is required for Tcl" >&5
22144 echo "$as_me: error: header file <tcl.h> is required for Tcl" >&2;}
22145    { (exit 1); exit 1; }; }
22146 fi
22147
22148
22149     CPPFLAGS=$ac_save_CPPFLAGS
22150 fi
22151
22152 #
22153 # Check for DocBook and tools
22154 #
22155 for ac_prog in onsgmls nsgmls
22156 do
22157   # Extract the first word of "$ac_prog", so it can be a program name with args.
22158 set dummy $ac_prog; ac_word=$2
22159 echo "$as_me:$LINENO: checking for $ac_word" >&5
22160 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22161 if test "${ac_cv_prog_NSGMLS+set}" = set; then
22162   echo $ECHO_N "(cached) $ECHO_C" >&6
22163 else
22164   if test -n "$NSGMLS"; then
22165   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
22166 else
22167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22168 for as_dir in $PATH
22169 do
22170   IFS=$as_save_IFS
22171   test -z "$as_dir" && as_dir=.
22172   for ac_exec_ext in '' $ac_executable_extensions; do
22173   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22174     ac_cv_prog_NSGMLS="$ac_prog"
22175     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22176     break 2
22177   fi
22178 done
22179 done
22180
22181 fi
22182 fi
22183 NSGMLS=$ac_cv_prog_NSGMLS
22184 if test -n "$NSGMLS"; then
22185   echo "$as_me:$LINENO: result: $NSGMLS" >&5
22186 echo "${ECHO_T}$NSGMLS" >&6
22187 else
22188   echo "$as_me:$LINENO: result: no" >&5
22189 echo "${ECHO_T}no" >&6
22190 fi
22191
22192   test -n "$NSGMLS" && break
22193 done
22194
22195 for ac_prog in openjade jade
22196 do
22197   # Extract the first word of "$ac_prog", so it can be a program name with args.
22198 set dummy $ac_prog; ac_word=$2
22199 echo "$as_me:$LINENO: checking for $ac_word" >&5
22200 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22201 if test "${ac_cv_prog_JADE+set}" = set; then
22202   echo $ECHO_N "(cached) $ECHO_C" >&6
22203 else
22204   if test -n "$JADE"; then
22205   ac_cv_prog_JADE="$JADE" # Let the user override the test.
22206 else
22207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22208 for as_dir in $PATH
22209 do
22210   IFS=$as_save_IFS
22211   test -z "$as_dir" && as_dir=.
22212   for ac_exec_ext in '' $ac_executable_extensions; do
22213   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22214     ac_cv_prog_JADE="$ac_prog"
22215     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22216     break 2
22217   fi
22218 done
22219 done
22220
22221 fi
22222 fi
22223 JADE=$ac_cv_prog_JADE
22224 if test -n "$JADE"; then
22225   echo "$as_me:$LINENO: result: $JADE" >&5
22226 echo "${ECHO_T}$JADE" >&6
22227 else
22228   echo "$as_me:$LINENO: result: no" >&5
22229 echo "${ECHO_T}no" >&6
22230 fi
22231
22232   test -n "$JADE" && break
22233 done
22234
22235
22236 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
22237 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
22238 if test "${pgac_cv_check_docbook+set}" = set; then
22239   echo $ECHO_N "(cached) $ECHO_C" >&6
22240 else
22241   cat >conftest.sgml <<EOF
22242 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
22243 <book>
22244  <title>test</title>
22245  <chapter>
22246   <title>random</title>
22247    <sect1>
22248     <title>testsect</title>
22249     <para>text</para>
22250   </sect1>
22251  </chapter>
22252 </book>
22253 EOF
22254
22255 pgac_cv_check_docbook=no
22256
22257 if test -n "$NSGMLS"; then
22258   $NSGMLS -s conftest.sgml 1>&5 2>&1
22259   if test $? -eq 0; then
22260     pgac_cv_check_docbook=yes
22261   fi
22262 fi
22263 rm -f conftest.sgml
22264 fi
22265 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
22266 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
22267
22268 have_docbook=$pgac_cv_check_docbook
22269
22270
22271 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
22272 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
22273 if test "${pgac_cv_path_stylesheets+set}" = set; then
22274   echo $ECHO_N "(cached) $ECHO_C" >&6
22275 else
22276   if test -n "$DOCBOOKSTYLE"; then
22277   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
22278 else
22279   for pgac_prefix in /usr /usr/local /opt; do
22280     for pgac_infix in share lib; do
22281       for pgac_postfix in \
22282         sgml/stylesheets/nwalsh-modular \
22283         sgml/stylesheets/docbook \
22284                 sgml/docbook-dsssl \
22285         sgml/docbook/dsssl/modular \
22286         sgml/docbook/stylesheet/dsssl/modular \
22287         sgml/docbook/dsssl-stylesheets
22288       do
22289         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
22290         if test -r "$pgac_candidate/html/docbook.dsl" \
22291            && test -r "$pgac_candidate/print/docbook.dsl"
22292         then
22293           pgac_cv_path_stylesheets=$pgac_candidate
22294           break 3
22295         fi
22296       done
22297     done
22298   done
22299 fi
22300 fi
22301
22302 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
22303
22304 if test -n "$DOCBOOKSTYLE"; then
22305   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
22306 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
22307 else
22308   echo "$as_me:$LINENO: result: no" >&5
22309 echo "${ECHO_T}no" >&6
22310 fi
22311 if test -n "$DOCBOOKSTYLE"; then
22312   for ac_prog in collateindex.pl
22313 do
22314   # Extract the first word of "$ac_prog", so it can be a program name with args.
22315 set dummy $ac_prog; ac_word=$2
22316 echo "$as_me:$LINENO: checking for $ac_word" >&5
22317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22318 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22319   echo $ECHO_N "(cached) $ECHO_C" >&6
22320 else
22321   case $COLLATEINDEX in
22322   [\\/]* | ?:[\\/]*)
22323   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22324   ;;
22325   *)
22326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22327 for as_dir in $DOCBOOKSTYLE/bin $PATH
22328 do
22329   IFS=$as_save_IFS
22330   test -z "$as_dir" && as_dir=.
22331   for ac_exec_ext in '' $ac_executable_extensions; do
22332   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22333     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22334     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22335     break 2
22336   fi
22337 done
22338 done
22339
22340   ;;
22341 esac
22342 fi
22343 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22344
22345 if test -n "$COLLATEINDEX"; then
22346   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22347 echo "${ECHO_T}$COLLATEINDEX" >&6
22348 else
22349   echo "$as_me:$LINENO: result: no" >&5
22350 echo "${ECHO_T}no" >&6
22351 fi
22352
22353   test -n "$COLLATEINDEX" && break
22354 done
22355
22356 else
22357   for ac_prog in collateindex.pl
22358 do
22359   # Extract the first word of "$ac_prog", so it can be a program name with args.
22360 set dummy $ac_prog; ac_word=$2
22361 echo "$as_me:$LINENO: checking for $ac_word" >&5
22362 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22363 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
22364   echo $ECHO_N "(cached) $ECHO_C" >&6
22365 else
22366   case $COLLATEINDEX in
22367   [\\/]* | ?:[\\/]*)
22368   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
22369   ;;
22370   *)
22371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22372 for as_dir in $PATH
22373 do
22374   IFS=$as_save_IFS
22375   test -z "$as_dir" && as_dir=.
22376   for ac_exec_ext in '' $ac_executable_extensions; do
22377   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22378     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
22379     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22380     break 2
22381   fi
22382 done
22383 done
22384
22385   ;;
22386 esac
22387 fi
22388 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
22389
22390 if test -n "$COLLATEINDEX"; then
22391   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
22392 echo "${ECHO_T}$COLLATEINDEX" >&6
22393 else
22394   echo "$as_me:$LINENO: result: no" >&5
22395 echo "${ECHO_T}no" >&6
22396 fi
22397
22398   test -n "$COLLATEINDEX" && break
22399 done
22400
22401 fi
22402 for ac_prog in sgmlspl
22403 do
22404   # Extract the first word of "$ac_prog", so it can be a program name with args.
22405 set dummy $ac_prog; ac_word=$2
22406 echo "$as_me:$LINENO: checking for $ac_word" >&5
22407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22408 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
22409   echo $ECHO_N "(cached) $ECHO_C" >&6
22410 else
22411   if test -n "$SGMLSPL"; then
22412   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
22413 else
22414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415 for as_dir in $PATH
22416 do
22417   IFS=$as_save_IFS
22418   test -z "$as_dir" && as_dir=.
22419   for ac_exec_ext in '' $ac_executable_extensions; do
22420   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421     ac_cv_prog_SGMLSPL="$ac_prog"
22422     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
22423     break 2
22424   fi
22425 done
22426 done
22427
22428 fi
22429 fi
22430 SGMLSPL=$ac_cv_prog_SGMLSPL
22431 if test -n "$SGMLSPL"; then
22432   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
22433 echo "${ECHO_T}$SGMLSPL" >&6
22434 else
22435   echo "$as_me:$LINENO: result: no" >&5
22436 echo "${ECHO_T}no" >&6
22437 fi
22438
22439   test -n "$SGMLSPL" && break
22440 done
22441
22442
22443 # Thread testing
22444
22445 # We have to run the thread test near the end so we have all our symbols
22446 # defined.  Cross compiling throws a warning.
22447 #
22448 if test "$enable_thread_safety_force" = yes; then
22449 if test x"$template" != x"win32"
22450 then
22451   { echo "$as_me:$LINENO: WARNING:
22452 *** Skipping thread test program.  --enable-thread-safety-force was used.
22453 *** Run the program in src/tools/thread on the your machine and add
22454 proper locking function calls to your applications to guarantee thread
22455 safety.
22456 " >&5
22457 echo "$as_me: WARNING:
22458 *** Skipping thread test program.  --enable-thread-safety-force was used.
22459 *** Run the program in src/tools/thread on the your machine and add
22460 proper locking function calls to your applications to guarantee thread
22461 safety.
22462 " >&2;}
22463 else
22464 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22465 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22466 fi
22467 elif test "$enable_thread_safety" = yes; then
22468 if test x"$template" != x"win32"
22469 then
22470 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
22471 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
22472
22473 _CFLAGS="$CFLAGS"
22474 _LIBS="$LIBS"
22475 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
22476 LIBS="$LIBS $PTHREAD_LIBS"
22477 if test "$cross_compiling" = yes; then
22478   echo "$as_me:$LINENO: result: maybe" >&5
22479 echo "${ECHO_T}maybe" >&6
22480   { echo "$as_me:$LINENO: WARNING:
22481 *** Skipping thread test program because of cross-compile build.
22482 *** Run the program in src/tools/thread on the target machine.
22483 " >&5
22484 echo "$as_me: WARNING:
22485 *** Skipping thread test program because of cross-compile build.
22486 *** Run the program in src/tools/thread on the target machine.
22487 " >&2;}
22488 else
22489   cat >conftest.$ac_ext <<_ACEOF
22490 /* confdefs.h.  */
22491 _ACEOF
22492 cat confdefs.h >>conftest.$ac_ext
22493 cat >>conftest.$ac_ext <<_ACEOF
22494 /* end confdefs.h.  */
22495 #include "$srcdir/src/tools/thread/thread_test.c"
22496 _ACEOF
22497 rm -f conftest$ac_exeext
22498 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22499   (eval $ac_link) 2>&5
22500   ac_status=$?
22501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22502   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22504   (eval $ac_try) 2>&5
22505   ac_status=$?
22506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22507   (exit $ac_status); }; }; then
22508   echo "$as_me:$LINENO: result: yes" >&5
22509 echo "${ECHO_T}yes" >&6
22510 else
22511   echo "$as_me: program exited with status $ac_status" >&5
22512 echo "$as_me: failed program was:" >&5
22513 sed 's/^/| /' conftest.$ac_ext >&5
22514
22515 ( exit $ac_status )
22516 echo "$as_me:$LINENO: result: no" >&5
22517 echo "${ECHO_T}no" >&6
22518   { { echo "$as_me:$LINENO: error:
22519 *** Thread test program failed.  Your platform is not thread-safe.
22520 *** Check the file 'config.log'for the exact reason.
22521 ***
22522 *** You can use the configure option --enable-thread-safety-force
22523 *** to force threads to be enabled.  However, you must then run
22524 *** the program in src/tools/thread and add locking function calls
22525 *** to your applications to guarantee thread safety.
22526 " >&5
22527 echo "$as_me: error:
22528 *** Thread test program failed.  Your platform is not thread-safe.
22529 *** Check the file 'config.log'for the exact reason.
22530 ***
22531 *** You can use the configure option --enable-thread-safety-force
22532 *** to force threads to be enabled.  However, you must then run
22533 *** the program in src/tools/thread and add locking function calls
22534 *** to your applications to guarantee thread safety.
22535 " >&2;}
22536    { (exit 1); exit 1; }; }
22537 fi
22538 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22539 fi
22540 CFLAGS="$_CFLAGS"
22541 LIBS="$_LIBS"
22542 else
22543 { echo "$as_me:$LINENO: WARNING: *** Skipping thread test on Win32" >&5
22544 echo "$as_me: WARNING: *** Skipping thread test on Win32" >&2;}
22545 fi
22546 fi
22547
22548 # prepare build tree if outside source tree
22549 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
22550 # Note 2: /bin/pwd might be better than shell's built-in at getting
22551 #         a symlink-free name.
22552 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
22553   vpath_build=no
22554 else
22555   vpath_build=yes
22556   if test "$no_create" != yes; then
22557     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
22558     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
22559     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
22560       || { { echo "$as_me:$LINENO: error: failed" >&5
22561 echo "$as_me: error: failed" >&2;}
22562    { (exit 1); exit 1; }; }
22563     echo "$as_me:$LINENO: result: done" >&5
22564 echo "${ECHO_T}done" >&6
22565   fi
22566 fi
22567
22568
22569
22570                     ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
22571
22572
22573                                                             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}"
22574
22575
22576 if test "$PORTNAME" = "win32"; then
22577           ac_config_commands="$ac_config_commands check_win32_symlinks"
22578
22579 fi
22580
22581           ac_config_headers="$ac_config_headers src/include/pg_config.h"
22582
22583
22584 cat >confcache <<\_ACEOF
22585 # This file is a shell script that caches the results of configure
22586 # tests run on this system so they can be shared between configure
22587 # scripts and configure runs, see configure's option --config-cache.
22588 # It is not useful on other systems.  If it contains results you don't
22589 # want to keep, you may remove or edit it.
22590 #
22591 # config.status only pays attention to the cache file if you give it
22592 # the --recheck option to rerun configure.
22593 #
22594 # `ac_cv_env_foo' variables (set or unset) will be overridden when
22595 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22596 # following values.
22597
22598 _ACEOF
22599
22600 # The following way of writing the cache mishandles newlines in values,
22601 # but we know of no workaround that is simple, portable, and efficient.
22602 # So, don't put newlines in cache variables' values.
22603 # Ultrix sh set writes to stderr and can't be redirected directly,
22604 # and sets the high bit in the cache file unless we assign to the vars.
22605 {
22606   (set) 2>&1 |
22607     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22608     *ac_space=\ *)
22609       # `set' does not quote correctly, so add quotes (double-quote
22610       # substitution turns \\\\ into \\, and sed turns \\ into \).
22611       sed -n \
22612         "s/'/'\\\\''/g;
22613           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22614       ;;
22615     *)
22616       # `set' quotes correctly as required by POSIX, so do not add quotes.
22617       sed -n \
22618         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22619       ;;
22620     esac;
22621 } |
22622   sed '
22623      t clear
22624      : clear
22625      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22626      t end
22627      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22628      : end' >>confcache
22629 if diff $cache_file confcache >/dev/null 2>&1; then :; else
22630   if test -w $cache_file; then
22631     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22632     cat confcache >$cache_file
22633   else
22634     echo "not updating unwritable cache $cache_file"
22635   fi
22636 fi
22637 rm -f confcache
22638
22639 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22640 # Let make expand exec_prefix.
22641 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22642
22643 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22644 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22645 # trailing colons and then remove the whole line if VPATH becomes empty
22646 # (actually we leave an empty line to preserve line numbers).
22647 if test "x$srcdir" = x.; then
22648   ac_vpsub='/^[  ]*VPATH[        ]*=/{
22649 s/:*\$(srcdir):*/:/;
22650 s/:*\${srcdir}:*/:/;
22651 s/:*@srcdir@:*/:/;
22652 s/^\([^=]*=[     ]*\):*/\1/;
22653 s/:*$//;
22654 s/^[^=]*=[       ]*$//;
22655 }'
22656 fi
22657
22658 DEFS=-DHAVE_CONFIG_H
22659
22660 ac_libobjs=
22661 ac_ltlibobjs=
22662 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22663   # 1. Remove the extension, and $U if already installed.
22664   ac_i=`echo "$ac_i" |
22665          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22666   # 2. Add them.
22667   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22668   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
22669 done
22670 LIBOBJS=$ac_libobjs
22671
22672 LTLIBOBJS=$ac_ltlibobjs
22673
22674
22675
22676 : ${CONFIG_STATUS=./config.status}
22677 ac_clean_files_save=$ac_clean_files
22678 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22679 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22680 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22681 cat >$CONFIG_STATUS <<_ACEOF
22682 #! $SHELL
22683 # Generated by $as_me.
22684 # Run this file to recreate the current configuration.
22685 # Compiler output produced by configure, useful for debugging
22686 # configure, is in config.log if it exists.
22687
22688 debug=false
22689 ac_cs_recheck=false
22690 ac_cs_silent=false
22691 SHELL=\${CONFIG_SHELL-$SHELL}
22692 _ACEOF
22693
22694 cat >>$CONFIG_STATUS <<\_ACEOF
22695 ## --------------------- ##
22696 ## M4sh Initialization.  ##
22697 ## --------------------- ##
22698
22699 # Be Bourne compatible
22700 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22701   emulate sh
22702   NULLCMD=:
22703   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22704   # is contrary to our usage.  Disable this feature.
22705   alias -g '${1+"$@"}'='"$@"'
22706 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22707   set -o posix
22708 fi
22709 DUALCASE=1; export DUALCASE # for MKS sh
22710
22711 # Support unset when possible.
22712 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22713   as_unset=unset
22714 else
22715   as_unset=false
22716 fi
22717
22718
22719 # Work around bugs in pre-3.0 UWIN ksh.
22720 $as_unset ENV MAIL MAILPATH
22721 PS1='$ '
22722 PS2='> '
22723 PS4='+ '
22724
22725 # NLS nuisances.
22726 for as_var in \
22727   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22728   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22729   LC_TELEPHONE LC_TIME
22730 do
22731   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22732     eval $as_var=C; export $as_var
22733   else
22734     $as_unset $as_var
22735   fi
22736 done
22737
22738 # Required to use basename.
22739 if expr a : '\(a\)' >/dev/null 2>&1; then
22740   as_expr=expr
22741 else
22742   as_expr=false
22743 fi
22744
22745 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22746   as_basename=basename
22747 else
22748   as_basename=false
22749 fi
22750
22751
22752 # Name of the executable.
22753 as_me=`$as_basename "$0" ||
22754 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22755          X"$0" : 'X\(//\)$' \| \
22756          X"$0" : 'X\(/\)$' \| \
22757          .     : '\(.\)' 2>/dev/null ||
22758 echo X/"$0" |
22759     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22760           /^X\/\(\/\/\)$/{ s//\1/; q; }
22761           /^X\/\(\/\).*/{ s//\1/; q; }
22762           s/.*/./; q'`
22763
22764
22765 # PATH needs CR, and LINENO needs CR and PATH.
22766 # Avoid depending upon Character Ranges.
22767 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22768 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22769 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22770 as_cr_digits='0123456789'
22771 as_cr_alnum=$as_cr_Letters$as_cr_digits
22772
22773 # The user is always right.
22774 if test "${PATH_SEPARATOR+set}" != set; then
22775   echo "#! /bin/sh" >conf$$.sh
22776   echo  "exit 0"   >>conf$$.sh
22777   chmod +x conf$$.sh
22778   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22779     PATH_SEPARATOR=';'
22780   else
22781     PATH_SEPARATOR=:
22782   fi
22783   rm -f conf$$.sh
22784 fi
22785
22786
22787   as_lineno_1=$LINENO
22788   as_lineno_2=$LINENO
22789   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22790   test "x$as_lineno_1" != "x$as_lineno_2" &&
22791   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
22792   # Find who we are.  Look in the path if we contain no path at all
22793   # relative or not.
22794   case $0 in
22795     *[\\/]* ) as_myself=$0 ;;
22796     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22797 for as_dir in $PATH
22798 do
22799   IFS=$as_save_IFS
22800   test -z "$as_dir" && as_dir=.
22801   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22802 done
22803
22804        ;;
22805   esac
22806   # We did not find ourselves, most probably we were run as `sh COMMAND'
22807   # in which case we are not to be found in the path.
22808   if test "x$as_myself" = x; then
22809     as_myself=$0
22810   fi
22811   if test ! -f "$as_myself"; then
22812     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22813 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22814    { (exit 1); exit 1; }; }
22815   fi
22816   case $CONFIG_SHELL in
22817   '')
22818     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22819 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22820 do
22821   IFS=$as_save_IFS
22822   test -z "$as_dir" && as_dir=.
22823   for as_base in sh bash ksh sh5; do
22824          case $as_dir in
22825          /*)
22826            if ("$as_dir/$as_base" -c '
22827   as_lineno_1=$LINENO
22828   as_lineno_2=$LINENO
22829   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22830   test "x$as_lineno_1" != "x$as_lineno_2" &&
22831   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
22832              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22833              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22834              CONFIG_SHELL=$as_dir/$as_base
22835              export CONFIG_SHELL
22836              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22837            fi;;
22838          esac
22839        done
22840 done
22841 ;;
22842   esac
22843
22844   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22845   # uniformly replaced by the line number.  The first 'sed' inserts a
22846   # line-number line before each line; the second 'sed' does the real
22847   # work.  The second script uses 'N' to pair each line-number line
22848   # with the numbered line, and appends trailing '-' during
22849   # substitution so that $LINENO is not a special case at line end.
22850   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22851   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
22852   sed '=' <$as_myself |
22853     sed '
22854       N
22855       s,$,-,
22856       : loop
22857       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
22858       t loop
22859       s,-$,,
22860       s,^['$as_cr_digits']*\n,,
22861     ' >$as_me.lineno &&
22862   chmod +x $as_me.lineno ||
22863     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22864 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
22865    { (exit 1); exit 1; }; }
22866
22867   # Don't try to exec as it changes $[0], causing all sort of problems
22868   # (the dirname of $[0] is not the place where we might find the
22869   # original and so on.  Autoconf is especially sensible to this).
22870   . ./$as_me.lineno
22871   # Exit status is that of the last command.
22872   exit
22873 }
22874
22875
22876 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22877   *c*,-n*) ECHO_N= ECHO_C='
22878 ' ECHO_T='      ' ;;
22879   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22880   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
22881 esac
22882
22883 if expr a : '\(a\)' >/dev/null 2>&1; then
22884   as_expr=expr
22885 else
22886   as_expr=false
22887 fi
22888
22889 rm -f conf$$ conf$$.exe conf$$.file
22890 echo >conf$$.file
22891 if ln -s conf$$.file conf$$ 2>/dev/null; then
22892   # We could just check for DJGPP; but this test a) works b) is more generic
22893   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22894   if test -f conf$$.exe; then
22895     # Don't use ln at all; we don't have any links
22896     as_ln_s='cp -p'
22897   else
22898     as_ln_s='ln -s'
22899   fi
22900 elif ln conf$$.file conf$$ 2>/dev/null; then
22901   as_ln_s=ln
22902 else
22903   as_ln_s='cp -p'
22904 fi
22905 rm -f conf$$ conf$$.exe conf$$.file
22906
22907 if mkdir -p . 2>/dev/null; then
22908   as_mkdir_p=:
22909 else
22910   test -d ./-p && rmdir ./-p
22911   as_mkdir_p=false
22912 fi
22913
22914 as_executable_p="test -f"
22915
22916 # Sed expression to map a string onto a valid CPP name.
22917 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22918
22919 # Sed expression to map a string onto a valid variable name.
22920 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22921
22922
22923 # IFS
22924 # We need space, tab and new line, in precisely that order.
22925 as_nl='
22926 '
22927 IFS="   $as_nl"
22928
22929 # CDPATH.
22930 $as_unset CDPATH
22931
22932 exec 6>&1
22933
22934 # Open the log real soon, to keep \$[0] and so on meaningful, and to
22935 # report actual input values of CONFIG_FILES etc. instead of their
22936 # values after options handling.  Logging --version etc. is OK.
22937 exec 5>>config.log
22938 {
22939   echo
22940   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22941 ## Running $as_me. ##
22942 _ASBOX
22943 } >&5
22944 cat >&5 <<_CSEOF
22945
22946 This file was extended by PostgreSQL $as_me 8.2devel, which was
22947 generated by GNU Autoconf 2.59.  Invocation command line was
22948
22949   CONFIG_FILES    = $CONFIG_FILES
22950   CONFIG_HEADERS  = $CONFIG_HEADERS
22951   CONFIG_LINKS    = $CONFIG_LINKS
22952   CONFIG_COMMANDS = $CONFIG_COMMANDS
22953   $ $0 $@
22954
22955 _CSEOF
22956 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22957 echo >&5
22958 _ACEOF
22959
22960 # Files that config.status was made for.
22961 if test -n "$ac_config_files"; then
22962   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22963 fi
22964
22965 if test -n "$ac_config_headers"; then
22966   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22967 fi
22968
22969 if test -n "$ac_config_links"; then
22970   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22971 fi
22972
22973 if test -n "$ac_config_commands"; then
22974   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22975 fi
22976
22977 cat >>$CONFIG_STATUS <<\_ACEOF
22978
22979 ac_cs_usage="\
22980 \`$as_me' instantiates files from templates according to the
22981 current configuration.
22982
22983 Usage: $0 [OPTIONS] [FILE]...
22984
22985   -h, --help       print this help, then exit
22986   -V, --version    print version number, then exit
22987   -q, --quiet      do not print progress messages
22988   -d, --debug      don't remove temporary files
22989       --recheck    update $as_me by reconfiguring in the same conditions
22990   --file=FILE[:TEMPLATE]
22991                    instantiate the configuration file FILE
22992   --header=FILE[:TEMPLATE]
22993                    instantiate the configuration header FILE
22994
22995 Configuration files:
22996 $config_files
22997
22998 Configuration headers:
22999 $config_headers
23000
23001 Configuration links:
23002 $config_links
23003
23004 Configuration commands:
23005 $config_commands
23006
23007 Report bugs to <bug-autoconf@gnu.org>."
23008 _ACEOF
23009
23010 cat >>$CONFIG_STATUS <<_ACEOF
23011 ac_cs_version="\\
23012 PostgreSQL config.status 8.2devel
23013 configured by $0, generated by GNU Autoconf 2.59,
23014   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23015
23016 Copyright (C) 2003 Free Software Foundation, Inc.
23017 This config.status script is free software; the Free Software Foundation
23018 gives unlimited permission to copy, distribute and modify it."
23019 srcdir=$srcdir
23020 _ACEOF
23021
23022 cat >>$CONFIG_STATUS <<\_ACEOF
23023 # If no file are specified by the user, then we need to provide default
23024 # value.  By we need to know if files were specified by the user.
23025 ac_need_defaults=:
23026 while test $# != 0
23027 do
23028   case $1 in
23029   --*=*)
23030     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23031     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23032     ac_shift=:
23033     ;;
23034   -*)
23035     ac_option=$1
23036     ac_optarg=$2
23037     ac_shift=shift
23038     ;;
23039   *) # This is not an option, so the user has probably given explicit
23040      # arguments.
23041      ac_option=$1
23042      ac_need_defaults=false;;
23043   esac
23044
23045   case $ac_option in
23046   # Handling of the options.
23047 _ACEOF
23048 cat >>$CONFIG_STATUS <<\_ACEOF
23049   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23050     ac_cs_recheck=: ;;
23051   --version | --vers* | -V )
23052     echo "$ac_cs_version"; exit 0 ;;
23053   --he | --h)
23054     # Conflict between --help and --header
23055     { { echo "$as_me:$LINENO: error: ambiguous option: $1
23056 Try \`$0 --help' for more information." >&5
23057 echo "$as_me: error: ambiguous option: $1
23058 Try \`$0 --help' for more information." >&2;}
23059    { (exit 1); exit 1; }; };;
23060   --help | --hel | -h )
23061     echo "$ac_cs_usage"; exit 0 ;;
23062   --debug | --d* | -d )
23063     debug=: ;;
23064   --file | --fil | --fi | --f )
23065     $ac_shift
23066     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
23067     ac_need_defaults=false;;
23068   --header | --heade | --head | --hea )
23069     $ac_shift
23070     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
23071     ac_need_defaults=false;;
23072   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23073   | -silent | --silent | --silen | --sile | --sil | --si | --s)
23074     ac_cs_silent=: ;;
23075
23076   # This is an error.
23077   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23078 Try \`$0 --help' for more information." >&5
23079 echo "$as_me: error: unrecognized option: $1
23080 Try \`$0 --help' for more information." >&2;}
23081    { (exit 1); exit 1; }; } ;;
23082
23083   *) ac_config_targets="$ac_config_targets $1" ;;
23084
23085   esac
23086   shift
23087 done
23088
23089 ac_configure_extra_args=
23090
23091 if $ac_cs_silent; then
23092   exec 6>/dev/null
23093   ac_configure_extra_args="$ac_configure_extra_args --silent"
23094 fi
23095
23096 _ACEOF
23097 cat >>$CONFIG_STATUS <<_ACEOF
23098 if \$ac_cs_recheck; then
23099   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23100   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
23101 fi
23102
23103 _ACEOF
23104
23105
23106
23107
23108
23109 cat >>$CONFIG_STATUS <<\_ACEOF
23110 for ac_config_target in $ac_config_targets
23111 do
23112   case "$ac_config_target" in
23113   # Handling of arguments.
23114   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
23115   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
23116   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
23117   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
23118   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
23119   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
23120   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
23121   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
23122   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
23123   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
23124   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
23125   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23126 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23127    { (exit 1); exit 1; }; };;
23128   esac
23129 done
23130
23131 # If the user did not use the arguments to specify the items to instantiate,
23132 # then the envvar interface is used.  Set only those that are not.
23133 # We use the long form for the default assignment because of an extremely
23134 # bizarre bug on SunOS 4.1.3.
23135 if $ac_need_defaults; then
23136   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23137   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23138   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
23139   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23140 fi
23141
23142 # Have a temporary directory for convenience.  Make it in the build tree
23143 # simply because there is no reason to put it here, and in addition,
23144 # creating and moving files from /tmp can sometimes cause problems.
23145 # Create a temporary directory, and hook for its removal unless debugging.
23146 $debug ||
23147 {
23148   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23149   trap '{ (exit 1); exit 1; }' 1 2 13 15
23150 }
23151
23152 # Create a (secure) tmp directory for tmp files.
23153
23154 {
23155   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
23156   test -n "$tmp" && test -d "$tmp"
23157 }  ||
23158 {
23159   tmp=./confstat$$-$RANDOM
23160   (umask 077 && mkdir $tmp)
23161 } ||
23162 {
23163    echo "$me: cannot create a temporary directory in ." >&2
23164    { (exit 1); exit 1; }
23165 }
23166
23167 _ACEOF
23168
23169 cat >>$CONFIG_STATUS <<_ACEOF
23170
23171 #
23172 # CONFIG_FILES section.
23173 #
23174
23175 # No need to generate the scripts if there are no CONFIG_FILES.
23176 # This happens for instance when ./config.status config.h
23177 if test -n "\$CONFIG_FILES"; then
23178   # Protect against being on the right side of a sed subst in config.status.
23179   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23180    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23181 s,@SHELL@,$SHELL,;t t
23182 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23183 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23184 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23185 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23186 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23187 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23188 s,@exec_prefix@,$exec_prefix,;t t
23189 s,@prefix@,$prefix,;t t
23190 s,@program_transform_name@,$program_transform_name,;t t
23191 s,@bindir@,$bindir,;t t
23192 s,@sbindir@,$sbindir,;t t
23193 s,@libexecdir@,$libexecdir,;t t
23194 s,@datadir@,$datadir,;t t
23195 s,@sysconfdir@,$sysconfdir,;t t
23196 s,@sharedstatedir@,$sharedstatedir,;t t
23197 s,@localstatedir@,$localstatedir,;t t
23198 s,@libdir@,$libdir,;t t
23199 s,@includedir@,$includedir,;t t
23200 s,@oldincludedir@,$oldincludedir,;t t
23201 s,@infodir@,$infodir,;t t
23202 s,@mandir@,$mandir,;t t
23203 s,@build_alias@,$build_alias,;t t
23204 s,@host_alias@,$host_alias,;t t
23205 s,@target_alias@,$target_alias,;t t
23206 s,@DEFS@,$DEFS,;t t
23207 s,@ECHO_C@,$ECHO_C,;t t
23208 s,@ECHO_N@,$ECHO_N,;t t
23209 s,@ECHO_T@,$ECHO_T,;t t
23210 s,@LIBS@,$LIBS,;t t
23211 s,@configure_args@,$configure_args,;t t
23212 s,@build@,$build,;t t
23213 s,@build_cpu@,$build_cpu,;t t
23214 s,@build_vendor@,$build_vendor,;t t
23215 s,@build_os@,$build_os,;t t
23216 s,@host@,$host,;t t
23217 s,@host_cpu@,$host_cpu,;t t
23218 s,@host_vendor@,$host_vendor,;t t
23219 s,@host_os@,$host_os,;t t
23220 s,@PORTNAME@,$PORTNAME,;t t
23221 s,@docdir@,$docdir,;t t
23222 s,@enable_nls@,$enable_nls,;t t
23223 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
23224 s,@default_port@,$default_port,;t t
23225 s,@enable_shared@,$enable_shared,;t t
23226 s,@enable_rpath@,$enable_rpath,;t t
23227 s,@enable_debug@,$enable_debug,;t t
23228 s,@CC@,$CC,;t t
23229 s,@CFLAGS@,$CFLAGS,;t t
23230 s,@LDFLAGS@,$LDFLAGS,;t t
23231 s,@CPPFLAGS@,$CPPFLAGS,;t t
23232 s,@ac_ct_CC@,$ac_ct_CC,;t t
23233 s,@EXEEXT@,$EXEEXT,;t t
23234 s,@OBJEXT@,$OBJEXT,;t t
23235 s,@CPP@,$CPP,;t t
23236 s,@GCC@,$GCC,;t t
23237 s,@TAS@,$TAS,;t t
23238 s,@autodepend@,$autodepend,;t t
23239 s,@INCLUDES@,$INCLUDES,;t t
23240 s,@enable_thread_safety@,$enable_thread_safety,;t t
23241 s,@with_tcl@,$with_tcl,;t t
23242 s,@with_perl@,$with_perl,;t t
23243 s,@with_python@,$with_python,;t t
23244 s,@with_krb5@,$with_krb5,;t t
23245 s,@krb_srvtab@,$krb_srvtab,;t t
23246 s,@with_pam@,$with_pam,;t t
23247 s,@with_bonjour@,$with_bonjour,;t t
23248 s,@with_openssl@,$with_openssl,;t t
23249 s,@with_zlib@,$with_zlib,;t t
23250 s,@EGREP@,$EGREP,;t t
23251 s,@ELF_SYS@,$ELF_SYS,;t t
23252 s,@LDFLAGS_SL@,$LDFLAGS_SL,;t t
23253 s,@AWK@,$AWK,;t t
23254 s,@FLEX@,$FLEX,;t t
23255 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
23256 s,@LN_S@,$LN_S,;t t
23257 s,@LD@,$LD,;t t
23258 s,@with_gnu_ld@,$with_gnu_ld,;t t
23259 s,@ld_R_works@,$ld_R_works,;t t
23260 s,@RANLIB@,$RANLIB,;t t
23261 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23262 s,@LORDER@,$LORDER,;t t
23263 s,@TAR@,$TAR,;t t
23264 s,@STRIP@,$STRIP,;t t
23265 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
23266 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
23267 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
23268 s,@YACC@,$YACC,;t t
23269 s,@YFLAGS@,$YFLAGS,;t t
23270 s,@PERL@,$PERL,;t t
23271 s,@perl_archlibexp@,$perl_archlibexp,;t t
23272 s,@perl_privlibexp@,$perl_privlibexp,;t t
23273 s,@perl_useshrplib@,$perl_useshrplib,;t t
23274 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
23275 s,@PYTHON@,$PYTHON,;t t
23276 s,@python_version@,$python_version,;t t
23277 s,@python_configdir@,$python_configdir,;t t
23278 s,@python_includespec@,$python_includespec,;t t
23279 s,@python_libdir@,$python_libdir,;t t
23280 s,@python_libspec@,$python_libspec,;t t
23281 s,@python_additional_libs@,$python_additional_libs,;t t
23282 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
23283 s,@LIBOBJS@,$LIBOBJS,;t t
23284 s,@acx_pthread_config@,$acx_pthread_config,;t t
23285 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
23286 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
23287 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
23288 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
23289 s,@MSGFMT@,$MSGFMT,;t t
23290 s,@MSGMERGE@,$MSGMERGE,;t t
23291 s,@XGETTEXT@,$XGETTEXT,;t t
23292 s,@localedir@,$localedir,;t t
23293 s,@TCLSH@,$TCLSH,;t t
23294 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
23295 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
23296 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
23297 s,@TCL_LIBS@,$TCL_LIBS,;t t
23298 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
23299 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
23300 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
23301 s,@NSGMLS@,$NSGMLS,;t t
23302 s,@JADE@,$JADE,;t t
23303 s,@have_docbook@,$have_docbook,;t t
23304 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
23305 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
23306 s,@SGMLSPL@,$SGMLSPL,;t t
23307 s,@vpath_build@,$vpath_build,;t t
23308 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23309 CEOF
23310
23311 _ACEOF
23312
23313   cat >>$CONFIG_STATUS <<\_ACEOF
23314   # Split the substitutions into bite-sized pieces for seds with
23315   # small command number limits, like on Digital OSF/1 and HP-UX.
23316   ac_max_sed_lines=48
23317   ac_sed_frag=1 # Number of current file.
23318   ac_beg=1 # First line for current file.
23319   ac_end=$ac_max_sed_lines # Line after last line for current file.
23320   ac_more_lines=:
23321   ac_sed_cmds=
23322   while $ac_more_lines; do
23323     if test $ac_beg -gt 1; then
23324       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23325     else
23326       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23327     fi
23328     if test ! -s $tmp/subs.frag; then
23329       ac_more_lines=false
23330     else
23331       # The purpose of the label and of the branching condition is to
23332       # speed up the sed processing (if there are no `@' at all, there
23333       # is no need to browse any of the substitutions).
23334       # These are the two extra sed commands mentioned above.
23335       (echo ':t
23336   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23337       if test -z "$ac_sed_cmds"; then
23338         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23339       else
23340         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23341       fi
23342       ac_sed_frag=`expr $ac_sed_frag + 1`
23343       ac_beg=$ac_end
23344       ac_end=`expr $ac_end + $ac_max_sed_lines`
23345     fi
23346   done
23347   if test -z "$ac_sed_cmds"; then
23348     ac_sed_cmds=cat
23349   fi
23350 fi # test -n "$CONFIG_FILES"
23351
23352 _ACEOF
23353 cat >>$CONFIG_STATUS <<\_ACEOF
23354 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23355   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23356   case $ac_file in
23357   - | *:- | *:-:* ) # input from stdin
23358         cat >$tmp/stdin
23359         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23360         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23361   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23362         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23363   * )   ac_file_in=$ac_file.in ;;
23364   esac
23365
23366   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23367   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23368 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23369          X"$ac_file" : 'X\(//\)[^/]' \| \
23370          X"$ac_file" : 'X\(//\)$' \| \
23371          X"$ac_file" : 'X\(/\)' \| \
23372          .     : '\(.\)' 2>/dev/null ||
23373 echo X"$ac_file" |
23374     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23375           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23376           /^X\(\/\/\)$/{ s//\1/; q; }
23377           /^X\(\/\).*/{ s//\1/; q; }
23378           s/.*/./; q'`
23379   { if $as_mkdir_p; then
23380     mkdir -p "$ac_dir"
23381   else
23382     as_dir="$ac_dir"
23383     as_dirs=
23384     while test ! -d "$as_dir"; do
23385       as_dirs="$as_dir $as_dirs"
23386       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23387 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23388          X"$as_dir" : 'X\(//\)[^/]' \| \
23389          X"$as_dir" : 'X\(//\)$' \| \
23390          X"$as_dir" : 'X\(/\)' \| \
23391          .     : '\(.\)' 2>/dev/null ||
23392 echo X"$as_dir" |
23393     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23394           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23395           /^X\(\/\/\)$/{ s//\1/; q; }
23396           /^X\(\/\).*/{ s//\1/; q; }
23397           s/.*/./; q'`
23398     done
23399     test ! -n "$as_dirs" || mkdir $as_dirs
23400   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23401 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23402    { (exit 1); exit 1; }; }; }
23403
23404   ac_builddir=.
23405
23406 if test "$ac_dir" != .; then
23407   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23408   # A "../" for each directory in $ac_dir_suffix.
23409   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23410 else
23411   ac_dir_suffix= ac_top_builddir=
23412 fi
23413
23414 case $srcdir in
23415   .)  # No --srcdir option.  We are building in place.
23416     ac_srcdir=.
23417     if test -z "$ac_top_builddir"; then
23418        ac_top_srcdir=.
23419     else
23420        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23421     fi ;;
23422   [\\/]* | ?:[\\/]* )  # Absolute path.
23423     ac_srcdir=$srcdir$ac_dir_suffix;
23424     ac_top_srcdir=$srcdir ;;
23425   *) # Relative path.
23426     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23427     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23428 esac
23429
23430 # Do not use `cd foo && pwd` to compute absolute paths, because
23431 # the directories may not exist.
23432 case `pwd` in
23433 .) ac_abs_builddir="$ac_dir";;
23434 *)
23435   case "$ac_dir" in
23436   .) ac_abs_builddir=`pwd`;;
23437   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23438   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23439   esac;;
23440 esac
23441 case $ac_abs_builddir in
23442 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23443 *)
23444   case ${ac_top_builddir}. in
23445   .) ac_abs_top_builddir=$ac_abs_builddir;;
23446   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23447   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23448   esac;;
23449 esac
23450 case $ac_abs_builddir in
23451 .) ac_abs_srcdir=$ac_srcdir;;
23452 *)
23453   case $ac_srcdir in
23454   .) ac_abs_srcdir=$ac_abs_builddir;;
23455   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23456   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23457   esac;;
23458 esac
23459 case $ac_abs_builddir in
23460 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23461 *)
23462   case $ac_top_srcdir in
23463   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23464   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23465   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23466   esac;;
23467 esac
23468
23469
23470
23471   if test x"$ac_file" != x-; then
23472     { echo "$as_me:$LINENO: creating $ac_file" >&5
23473 echo "$as_me: creating $ac_file" >&6;}
23474     rm -f "$ac_file"
23475   fi
23476   # Let's still pretend it is `configure' which instantiates (i.e., don't
23477   # use $as_me), people would be surprised to read:
23478   #    /* config.h.  Generated by config.status.  */
23479   if test x"$ac_file" = x-; then
23480     configure_input=
23481   else
23482     configure_input="$ac_file.  "
23483   fi
23484   configure_input=$configure_input"Generated from `echo $ac_file_in |
23485                                      sed 's,.*/,,'` by configure."
23486
23487   # First look for the input files in the build tree, otherwise in the
23488   # src tree.
23489   ac_file_inputs=`IFS=:
23490     for f in $ac_file_in; do
23491       case $f in
23492       -) echo $tmp/stdin ;;
23493       [\\/$]*)
23494          # Absolute (can't be DOS-style, as IFS=:)
23495          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23496 echo "$as_me: error: cannot find input file: $f" >&2;}
23497    { (exit 1); exit 1; }; }
23498          echo "$f";;
23499       *) # Relative
23500          if test -f "$f"; then
23501            # Build tree
23502            echo "$f"
23503          elif test -f "$srcdir/$f"; then
23504            # Source tree
23505            echo "$srcdir/$f"
23506          else
23507            # /dev/null tree
23508            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23509 echo "$as_me: error: cannot find input file: $f" >&2;}
23510    { (exit 1); exit 1; }; }
23511          fi;;
23512       esac
23513     done` || { (exit 1); exit 1; }
23514 _ACEOF
23515 cat >>$CONFIG_STATUS <<_ACEOF
23516   sed "$ac_vpsub
23517 $extrasub
23518 _ACEOF
23519 cat >>$CONFIG_STATUS <<\_ACEOF
23520 :t
23521 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23522 s,@configure_input@,$configure_input,;t t
23523 s,@srcdir@,$ac_srcdir,;t t
23524 s,@abs_srcdir@,$ac_abs_srcdir,;t t
23525 s,@top_srcdir@,$ac_top_srcdir,;t t
23526 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23527 s,@builddir@,$ac_builddir,;t t
23528 s,@abs_builddir@,$ac_abs_builddir,;t t
23529 s,@top_builddir@,$ac_top_builddir,;t t
23530 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23531 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23532   rm -f $tmp/stdin
23533   if test x"$ac_file" != x-; then
23534     mv $tmp/out $ac_file
23535   else
23536     cat $tmp/out
23537     rm -f $tmp/out
23538   fi
23539
23540 done
23541 _ACEOF
23542 cat >>$CONFIG_STATUS <<\_ACEOF
23543
23544 #
23545 # CONFIG_HEADER section.
23546 #
23547
23548 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23549 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23550 #
23551 # ac_d sets the value in "#define NAME VALUE" lines.
23552 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
23553 ac_dB='[         ].*$,\1#\2'
23554 ac_dC=' '
23555 ac_dD=',;t'
23556 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23557 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23558 ac_uB='$,\1#\2define\3'
23559 ac_uC=' '
23560 ac_uD=',;t'
23561
23562 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23563   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23564   case $ac_file in
23565   - | *:- | *:-:* ) # input from stdin
23566         cat >$tmp/stdin
23567         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23568         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23569   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23570         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23571   * )   ac_file_in=$ac_file.in ;;
23572   esac
23573
23574   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23575 echo "$as_me: creating $ac_file" >&6;}
23576
23577   # First look for the input files in the build tree, otherwise in the
23578   # src tree.
23579   ac_file_inputs=`IFS=:
23580     for f in $ac_file_in; do
23581       case $f in
23582       -) echo $tmp/stdin ;;
23583       [\\/$]*)
23584          # Absolute (can't be DOS-style, as IFS=:)
23585          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23586 echo "$as_me: error: cannot find input file: $f" >&2;}
23587    { (exit 1); exit 1; }; }
23588          # Do quote $f, to prevent DOS paths from being IFS'd.
23589          echo "$f";;
23590       *) # Relative
23591          if test -f "$f"; then
23592            # Build tree
23593            echo "$f"
23594          elif test -f "$srcdir/$f"; then
23595            # Source tree
23596            echo "$srcdir/$f"
23597          else
23598            # /dev/null tree
23599            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23600 echo "$as_me: error: cannot find input file: $f" >&2;}
23601    { (exit 1); exit 1; }; }
23602          fi;;
23603       esac
23604     done` || { (exit 1); exit 1; }
23605   # Remove the trailing spaces.
23606   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
23607
23608 _ACEOF
23609
23610 # Transform confdefs.h into two sed scripts, `conftest.defines' and
23611 # `conftest.undefs', that substitutes the proper values into
23612 # config.h.in to produce config.h.  The first handles `#define'
23613 # templates, and the second `#undef' templates.
23614 # And first: Protect against being on the right side of a sed subst in
23615 # config.status.  Protect against being in an unquoted here document
23616 # in config.status.
23617 rm -f conftest.defines conftest.undefs
23618 # Using a here document instead of a string reduces the quoting nightmare.
23619 # Putting comments in sed scripts is not portable.
23620 #
23621 # `end' is used to avoid that the second main sed command (meant for
23622 # 0-ary CPP macros) applies to n-ary macro definitions.
23623 # See the Autoconf documentation for `clear'.
23624 cat >confdef2sed.sed <<\_ACEOF
23625 s/[\\&,]/\\&/g
23626 s,[\\$`],\\&,g
23627 t clear
23628 : clear
23629 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23630 t end
23631 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23632 : end
23633 _ACEOF
23634 # If some macros were called several times there might be several times
23635 # the same #defines, which is useless.  Nevertheless, we may not want to
23636 # sort them, since we want the *last* AC-DEFINE to be honored.
23637 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23638 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23639 rm -f confdef2sed.sed
23640
23641 # This sed command replaces #undef with comments.  This is necessary, for
23642 # example, in the case of _POSIX_SOURCE, which is predefined and required
23643 # on some systems where configure will not decide to define it.
23644 cat >>conftest.undefs <<\_ACEOF
23645 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
23646 _ACEOF
23647
23648 # Break up conftest.defines because some shells have a limit on the size
23649 # of here documents, and old seds have small limits too (100 cmds).
23650 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23651 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23652 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23653 echo '  :' >>$CONFIG_STATUS
23654 rm -f conftest.tail
23655 while grep . conftest.defines >/dev/null
23656 do
23657   # Write a limited-size here document to $tmp/defines.sed.
23658   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23659   # Speed up: don't consider the non `#define' lines.
23660   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
23661   # Work around the forget-to-reset-the-flag bug.
23662   echo 't clr' >>$CONFIG_STATUS
23663   echo ': clr' >>$CONFIG_STATUS
23664   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
23665   echo 'CEOF
23666   sed -f $tmp/defines.sed $tmp/in >$tmp/out
23667   rm -f $tmp/in
23668   mv $tmp/out $tmp/in
23669 ' >>$CONFIG_STATUS
23670   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
23671   rm -f conftest.defines
23672   mv conftest.tail conftest.defines
23673 done
23674 rm -f conftest.defines
23675 echo '  fi # grep' >>$CONFIG_STATUS
23676 echo >>$CONFIG_STATUS
23677
23678 # Break up conftest.undefs because some shells have a limit on the size
23679 # of here documents, and old seds have small limits too (100 cmds).
23680 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
23681 rm -f conftest.tail
23682 while grep . conftest.undefs >/dev/null
23683 do
23684   # Write a limited-size here document to $tmp/undefs.sed.
23685   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23686   # Speed up: don't consider the non `#undef'
23687   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
23688   # Work around the forget-to-reset-the-flag bug.
23689   echo 't clr' >>$CONFIG_STATUS
23690   echo ': clr' >>$CONFIG_STATUS
23691   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23692   echo 'CEOF
23693   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23694   rm -f $tmp/in
23695   mv $tmp/out $tmp/in
23696 ' >>$CONFIG_STATUS
23697   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23698   rm -f conftest.undefs
23699   mv conftest.tail conftest.undefs
23700 done
23701 rm -f conftest.undefs
23702
23703 cat >>$CONFIG_STATUS <<\_ACEOF
23704   # Let's still pretend it is `configure' which instantiates (i.e., don't
23705   # use $as_me), people would be surprised to read:
23706   #    /* config.h.  Generated by config.status.  */
23707   if test x"$ac_file" = x-; then
23708     echo "/* Generated by configure.  */" >$tmp/config.h
23709   else
23710     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
23711   fi
23712   cat $tmp/in >>$tmp/config.h
23713   rm -f $tmp/in
23714   if test x"$ac_file" != x-; then
23715     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
23716       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23717 echo "$as_me: $ac_file is unchanged" >&6;}
23718     else
23719       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23720 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23721          X"$ac_file" : 'X\(//\)[^/]' \| \
23722          X"$ac_file" : 'X\(//\)$' \| \
23723          X"$ac_file" : 'X\(/\)' \| \
23724          .     : '\(.\)' 2>/dev/null ||
23725 echo X"$ac_file" |
23726     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23727           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23728           /^X\(\/\/\)$/{ s//\1/; q; }
23729           /^X\(\/\).*/{ s//\1/; q; }
23730           s/.*/./; q'`
23731       { if $as_mkdir_p; then
23732     mkdir -p "$ac_dir"
23733   else
23734     as_dir="$ac_dir"
23735     as_dirs=
23736     while test ! -d "$as_dir"; do
23737       as_dirs="$as_dir $as_dirs"
23738       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23739 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23740          X"$as_dir" : 'X\(//\)[^/]' \| \
23741          X"$as_dir" : 'X\(//\)$' \| \
23742          X"$as_dir" : 'X\(/\)' \| \
23743          .     : '\(.\)' 2>/dev/null ||
23744 echo X"$as_dir" |
23745     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23746           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23747           /^X\(\/\/\)$/{ s//\1/; q; }
23748           /^X\(\/\).*/{ s//\1/; q; }
23749           s/.*/./; q'`
23750     done
23751     test ! -n "$as_dirs" || mkdir $as_dirs
23752   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23753 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23754    { (exit 1); exit 1; }; }; }
23755
23756       rm -f $ac_file
23757       mv $tmp/config.h $ac_file
23758     fi
23759   else
23760     cat $tmp/config.h
23761     rm -f $tmp/config.h
23762   fi
23763   # Run the commands associated with the file.
23764   case $ac_file in
23765     src/include/pg_config.h )
23766 # Update timestamp for pg_config.h (see Makefile.global)
23767 echo >src/include/stamp-h
23768  ;;
23769   esac
23770 done
23771 _ACEOF
23772 cat >>$CONFIG_STATUS <<\_ACEOF
23773
23774 #
23775 # CONFIG_LINKS section.
23776 #
23777
23778 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
23779   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23780   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23781
23782   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
23783 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
23784
23785   if test ! -r $srcdir/$ac_source; then
23786     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
23787 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
23788    { (exit 1); exit 1; }; }
23789   fi
23790   rm -f $ac_dest
23791
23792   # Make relative symlinks.
23793   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
23794 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23795          X"$ac_dest" : 'X\(//\)[^/]' \| \
23796          X"$ac_dest" : 'X\(//\)$' \| \
23797          X"$ac_dest" : 'X\(/\)' \| \
23798          .     : '\(.\)' 2>/dev/null ||
23799 echo X"$ac_dest" |
23800     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23801           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23802           /^X\(\/\/\)$/{ s//\1/; q; }
23803           /^X\(\/\).*/{ s//\1/; q; }
23804           s/.*/./; q'`
23805   { if $as_mkdir_p; then
23806     mkdir -p "$ac_dest_dir"
23807   else
23808     as_dir="$ac_dest_dir"
23809     as_dirs=
23810     while test ! -d "$as_dir"; do
23811       as_dirs="$as_dir $as_dirs"
23812       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23813 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23814          X"$as_dir" : 'X\(//\)[^/]' \| \
23815          X"$as_dir" : 'X\(//\)$' \| \
23816          X"$as_dir" : 'X\(/\)' \| \
23817          .     : '\(.\)' 2>/dev/null ||
23818 echo X"$as_dir" |
23819     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23820           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23821           /^X\(\/\/\)$/{ s//\1/; q; }
23822           /^X\(\/\).*/{ s//\1/; q; }
23823           s/.*/./; q'`
23824     done
23825     test ! -n "$as_dirs" || mkdir $as_dirs
23826   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
23827 echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
23828    { (exit 1); exit 1; }; }; }
23829
23830   ac_builddir=.
23831
23832 if test "$ac_dest_dir" != .; then
23833   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
23834   # A "../" for each directory in $ac_dir_suffix.
23835   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23836 else
23837   ac_dir_suffix= ac_top_builddir=
23838 fi
23839
23840 case $srcdir in
23841   .)  # No --srcdir option.  We are building in place.
23842     ac_srcdir=.
23843     if test -z "$ac_top_builddir"; then
23844        ac_top_srcdir=.
23845     else
23846        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23847     fi ;;
23848   [\\/]* | ?:[\\/]* )  # Absolute path.
23849     ac_srcdir=$srcdir$ac_dir_suffix;
23850     ac_top_srcdir=$srcdir ;;
23851   *) # Relative path.
23852     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23853     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23854 esac
23855
23856 # Do not use `cd foo && pwd` to compute absolute paths, because
23857 # the directories may not exist.
23858 case `pwd` in
23859 .) ac_abs_builddir="$ac_dest_dir";;
23860 *)
23861   case "$ac_dest_dir" in
23862   .) ac_abs_builddir=`pwd`;;
23863   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
23864   *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
23865   esac;;
23866 esac
23867 case $ac_abs_builddir in
23868 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23869 *)
23870   case ${ac_top_builddir}. in
23871   .) ac_abs_top_builddir=$ac_abs_builddir;;
23872   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23873   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23874   esac;;
23875 esac
23876 case $ac_abs_builddir in
23877 .) ac_abs_srcdir=$ac_srcdir;;
23878 *)
23879   case $ac_srcdir in
23880   .) ac_abs_srcdir=$ac_abs_builddir;;
23881   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23882   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23883   esac;;
23884 esac
23885 case $ac_abs_builddir in
23886 .) ac_abs_top_srcdir=$ac_top_srcdir;;
23887 *)
23888   case $ac_top_srcdir in
23889   .) ac_abs_top_srcdir=$ac_abs_builddir;;
23890   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23891   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23892   esac;;
23893 esac
23894
23895
23896   case $srcdir in
23897   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
23898       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
23899   esac
23900
23901   # Try a symlink, then a hard link, then a copy.
23902   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
23903     ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
23904     cp -p $srcdir/$ac_source $ac_dest ||
23905     { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
23906 echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
23907    { (exit 1); exit 1; }; }
23908 done
23909 _ACEOF
23910 cat >>$CONFIG_STATUS <<\_ACEOF
23911
23912 #
23913 # CONFIG_COMMANDS section.
23914 #
23915 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23916   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23917   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23918   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
23919 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23920          X"$ac_dest" : 'X\(//\)[^/]' \| \
23921          X"$ac_dest" : 'X\(//\)$' \| \
23922          X"$ac_dest" : 'X\(/\)' \| \
23923          .     : '\(.\)' 2>/dev/null ||
23924 echo X"$ac_dest" |
23925     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23926           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23927           /^X\(\/\/\)$/{ s//\1/; q; }
23928           /^X\(\/\).*/{ s//\1/; q; }
23929           s/.*/./; q'`
23930   { if $as_mkdir_p; then
23931     mkdir -p "$ac_dir"
23932   else
23933     as_dir="$ac_dir"
23934     as_dirs=
23935     while test ! -d "$as_dir"; do
23936       as_dirs="$as_dir $as_dirs"
23937       as_dir=`(dirname "$as_dir") 2>/dev/null ||
23938 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23939          X"$as_dir" : 'X\(//\)[^/]' \| \
23940          X"$as_dir" : 'X\(//\)$' \| \
23941          X"$as_dir" : 'X\(/\)' \| \
23942          .     : '\(.\)' 2>/dev/null ||
23943 echo X"$as_dir" |
23944     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23945           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23946           /^X\(\/\/\)$/{ s//\1/; q; }
23947           /^X\(\/\).*/{ s//\1/; q; }
23948           s/.*/./; q'`
23949     done
23950     test ! -n "$as_dirs" || mkdir $as_dirs
23951   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23952 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23953    { (exit 1); exit 1; }; }; }
23954
23955   ac_builddir=.
23956
23957 if test "$ac_dir" != .; then
23958   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23959   # A "../" for each directory in $ac_dir_suffix.
23960   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23961 else
23962   ac_dir_suffix= ac_top_builddir=
23963 fi
23964
23965 case $srcdir in
23966   .)  # No --srcdir option.  We are building in place.
23967     ac_srcdir=.
23968     if test -z "$ac_top_builddir"; then
23969        ac_top_srcdir=.
23970     else
23971        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23972     fi ;;
23973   [\\/]* | ?:[\\/]* )  # Absolute path.
23974     ac_srcdir=$srcdir$ac_dir_suffix;
23975     ac_top_srcdir=$srcdir ;;
23976   *) # Relative path.
23977     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23978     ac_top_srcdir=$ac_top_builddir$srcdir ;;
23979 esac
23980
23981 # Do not use `cd foo && pwd` to compute absolute paths, because
23982 # the directories may not exist.
23983 case `pwd` in
23984 .) ac_abs_builddir="$ac_dir";;
23985 *)
23986   case "$ac_dir" in
23987   .) ac_abs_builddir=`pwd`;;
23988   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23989   *) ac_abs_builddir=`pwd`/"$ac_dir";;
23990   esac;;
23991 esac
23992 case $ac_abs_builddir in
23993 .) ac_abs_top_builddir=${ac_top_builddir}.;;
23994 *)
23995   case ${ac_top_builddir}. in
23996   .) ac_abs_top_builddir=$ac_abs_builddir;;
23997   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23998   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23999   esac;;
24000 esac
24001 case $ac_abs_builddir in
24002 .) ac_abs_srcdir=$ac_srcdir;;
24003 *)
24004   case $ac_srcdir in
24005   .) ac_abs_srcdir=$ac_abs_builddir;;
24006   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
24007   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
24008   esac;;
24009 esac
24010 case $ac_abs_builddir in
24011 .) ac_abs_top_srcdir=$ac_top_srcdir;;
24012 *)
24013   case $ac_top_srcdir in
24014   .) ac_abs_top_srcdir=$ac_abs_builddir;;
24015   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
24016   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
24017   esac;;
24018 esac
24019
24020
24021   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
24022 echo "$as_me: executing $ac_dest commands" >&6;}
24023   case $ac_dest in
24024     check_win32_symlinks )
24025 # Links sometimes fail undetected on Mingw -
24026 # so here we detect it and warn the user
24027 for FILE in $CONFIG_LINKS
24028  do
24029         # test -e works for symlinks in the MinGW console
24030         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
24031 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
24032  done
24033  ;;
24034   esac
24035 done
24036 _ACEOF
24037
24038 cat >>$CONFIG_STATUS <<\_ACEOF
24039
24040 { (exit 0); exit 0; }
24041 _ACEOF
24042 chmod +x $CONFIG_STATUS
24043 ac_clean_files=$ac_clean_files_save
24044
24045
24046 # configure is writing to config.log, and then calls config.status.
24047 # config.status does its own redirection, appending to config.log.
24048 # Unfortunately, on DOS this fails, as config.log is still kept open
24049 # by configure, so config.status won't be able to write to it; its
24050 # output is simply discarded.  So we exec the FD to /dev/null,
24051 # effectively closing config.log, so it can be properly (re)opened and
24052 # appended to by config.status.  When coming back to configure, we
24053 # need to make the FD available again.
24054 if test "$no_create" != yes; then
24055   ac_cs_success=:
24056   ac_config_status_args=
24057   test "$silent" = yes &&
24058     ac_config_status_args="$ac_config_status_args --quiet"
24059   exec 5>/dev/null
24060   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
24061   exec 5>>config.log
24062   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24063   # would make configure fail if this is the last instruction.
24064   $ac_cs_success || { (exit 1); exit 1; }
24065 fi
24066
24067