]> granicus.if.org Git - postgresql/blob - configure
828e6a7cb94905b2d0c332e19d59965ccbde0cb3
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.53 for PostgreSQL 8.0.0beta3.
4 #
5 # Report bugs to <pgsql-bugs@postgresql.org>.
6 #
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 #
12 # Copyright 2004 PostgreSQL Global Development Group
13
14 if expr a : '\(a\)' >/dev/null 2>&1; then
15   as_expr=expr
16 else
17   as_expr=false
18 fi
19
20
21 ## --------------------- ##
22 ## M4sh Initialization.  ##
23 ## --------------------- ##
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # NLS nuisances.
34 # Support unset when possible.
35 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
36   as_unset=unset
37 else
38   as_unset=false
39 fi
40
41 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
42     { $as_unset LANG || test "${LANG+set}" != set; } ||
43       { LANG=C; export LANG; }
44 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
45     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
46       { LC_ALL=C; export LC_ALL; }
47 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
48     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
49       { LC_TIME=C; export LC_TIME; }
50 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
51     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
52       { LC_CTYPE=C; export LC_CTYPE; }
53 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
54     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
55       { LANGUAGE=C; export LANGUAGE; }
56 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
57     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
58       { LC_COLLATE=C; export LC_COLLATE; }
59 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
60     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
61       { LC_NUMERIC=C; export LC_NUMERIC; }
62 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
63     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
64       { LC_MESSAGES=C; export LC_MESSAGES; }
65
66
67 # Name of the executable.
68 as_me=`(basename "$0") 2>/dev/null ||
69 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
70          X"$0" : 'X\(//\)$' \| \
71          X"$0" : 'X\(/\)$' \| \
72          .     : '\(.\)' 2>/dev/null ||
73 echo X/"$0" |
74     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
75           /^X\/\(\/\/\)$/{ s//\1/; q; }
76           /^X\/\(\/\).*/{ s//\1/; q; }
77           s/.*/./; q'`
78
79 # PATH needs CR, and LINENO needs CR and PATH.
80 # Avoid depending upon Character Ranges.
81 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84 as_cr_digits='0123456789'
85 as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87 # The user is always right.
88 if test "${PATH_SEPARATOR+set}" != set; then
89   echo "#! /bin/sh" >conftest.sh
90   echo  "exit 0"   >>conftest.sh
91   chmod +x conftest.sh
92   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
93     PATH_SEPARATOR=';'
94   else
95     PATH_SEPARATOR=:
96   fi
97   rm -f conftest.sh
98 fi
99
100
101   as_lineno_1=$LINENO
102   as_lineno_2=$LINENO
103   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104   test "x$as_lineno_1" != "x$as_lineno_2" &&
105   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
106   # Find who we are.  Look in the path if we contain no path at all
107   # relative or not.
108   case $0 in
109     *[\\/]* ) as_myself=$0 ;;
110     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111 for as_dir in $PATH
112 do
113   IFS=$as_save_IFS
114   test -z "$as_dir" && as_dir=.
115   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116 done
117
118        ;;
119   esac
120   # We did not find ourselves, most probably we were run as `sh COMMAND'
121   # in which case we are not to be found in the path.
122   if test "x$as_myself" = x; then
123     as_myself=$0
124   fi
125   if test ! -f "$as_myself"; then
126     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127    { (exit 1); exit 1; }; }
128   fi
129   case $CONFIG_SHELL in
130   '')
131     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133 do
134   IFS=$as_save_IFS
135   test -z "$as_dir" && as_dir=.
136   for as_base in sh bash ksh sh5; do
137          case $as_dir in
138          /*)
139            if ("$as_dir/$as_base" -c '
140   as_lineno_1=$LINENO
141   as_lineno_2=$LINENO
142   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143   test "x$as_lineno_1" != "x$as_lineno_2" &&
144   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
145              CONFIG_SHELL=$as_dir/$as_base
146              export CONFIG_SHELL
147              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
148            fi;;
149          esac
150        done
151 done
152 ;;
153   esac
154
155   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
156   # uniformly replaced by the line number.  The first 'sed' inserts a
157   # line-number line before each line; the second 'sed' does the real
158   # work.  The second script uses 'N' to pair each line-number line
159   # with the numbered line, and appends trailing '-' during
160   # substitution so that $LINENO is not a special case at line end.
161   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
162   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
163   sed '=' <$as_myself |
164     sed '
165       N
166       s,$,-,
167       : loop
168       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
169       t loop
170       s,-$,,
171       s,^['$as_cr_digits']*\n,,
172     ' >$as_me.lineno &&
173   chmod +x $as_me.lineno ||
174     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
175    { (exit 1); exit 1; }; }
176
177   # Don't try to exec as it changes $[0], causing all sort of problems
178   # (the dirname of $[0] is not the place where we might find the
179   # original and so on.  Autoconf is especially sensible to this).
180   . ./$as_me.lineno
181   # Exit status is that of the last command.
182   exit
183 }
184
185
186 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
187   *c*,-n*) ECHO_N= ECHO_C='
188 ' ECHO_T='      ' ;;
189   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
190   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
191 esac
192
193 if expr a : '\(a\)' >/dev/null 2>&1; then
194   as_expr=expr
195 else
196   as_expr=false
197 fi
198
199 rm -f conf$$ conf$$.exe conf$$.file
200 echo >conf$$.file
201 if ln -s conf$$.file conf$$ 2>/dev/null; then
202   # We could just check for DJGPP; but this test a) works b) is more generic
203   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
204   if test -f conf$$.exe; then
205     # Don't use ln at all; we don't have any links
206     as_ln_s='cp -p'
207   else
208     as_ln_s='ln -s'
209   fi
210 elif ln conf$$.file conf$$ 2>/dev/null; then
211   as_ln_s=ln
212 else
213   as_ln_s='cp -p'
214 fi
215 rm -f conf$$ conf$$.exe conf$$.file
216
217 as_executable_p="test -f"
218
219 # Sed expression to map a string onto a valid CPP name.
220 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
221
222 # Sed expression to map a string onto a valid variable name.
223 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
224
225
226 # IFS
227 # We need space, tab and new line, in precisely that order.
228 as_nl='
229 '
230 IFS="   $as_nl"
231
232 # CDPATH.
233 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
234
235
236 # Name of the host.
237 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
238 # so uname gets run too.
239 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
240
241 exec 6>&1
242
243 #
244 # Initializations.
245 #
246 ac_default_prefix=/usr/local
247 cross_compiling=no
248 subdirs=
249 MFLAGS=
250 MAKEFLAGS=
251 SHELL=${CONFIG_SHELL-/bin/sh}
252
253 # Maximum number of lines to put in a shell here document.
254 # This variable seems obsolete.  It should probably be removed, and
255 # only ac_max_sed_lines should be used.
256 : ${ac_max_here_lines=38}
257
258 # Identity of this package.
259 PACKAGE_NAME='PostgreSQL'
260 PACKAGE_TARNAME='postgresql'
261 PACKAGE_VERSION='8.0.0beta3'
262 PACKAGE_STRING='PostgreSQL 8.0.0beta3'
263 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
264
265 ac_unique_file="src/backend/access/common/heaptuple.c"
266 ac_default_prefix=/usr/local/pgsql
267 # Factoring default headers for most tests.
268 ac_includes_default="\
269 #include <stdio.h>
270 #if HAVE_SYS_TYPES_H
271 # include <sys/types.h>
272 #endif
273 #if HAVE_SYS_STAT_H
274 # include <sys/stat.h>
275 #endif
276 #if STDC_HEADERS
277 # include <stdlib.h>
278 # include <stddef.h>
279 #else
280 # if HAVE_STDLIB_H
281 #  include <stdlib.h>
282 # endif
283 #endif
284 #if HAVE_STRING_H
285 # if !STDC_HEADERS && HAVE_MEMORY_H
286 #  include <memory.h>
287 # endif
288 # include <string.h>
289 #endif
290 #if HAVE_STRINGS_H
291 # include <strings.h>
292 #endif
293 #if HAVE_INTTYPES_H
294 # include <inttypes.h>
295 #else
296 # if HAVE_STDINT_H
297 #  include <stdint.h>
298 # endif
299 #endif
300 #if HAVE_UNISTD_H
301 # include <unistd.h>
302 #endif"
303
304
305 # Initialize some variables set by options.
306 ac_init_help=
307 ac_init_version=false
308 # The variables have the same names as the options, with
309 # dashes changed to underlines.
310 cache_file=/dev/null
311 exec_prefix=NONE
312 no_create=
313 no_recursion=
314 prefix=NONE
315 program_prefix=NONE
316 program_suffix=NONE
317 program_transform_name=s,x,x,
318 silent=
319 site=
320 srcdir=
321 verbose=
322 x_includes=NONE
323 x_libraries=NONE
324
325 # Installation directory options.
326 # These are left unexpanded so users can "make install exec_prefix=/foo"
327 # and all the variables that are supposed to be based on exec_prefix
328 # by default will actually change.
329 # Use braces instead of parens because sh, perl, etc. also accept them.
330 bindir='${exec_prefix}/bin'
331 sbindir='${exec_prefix}/sbin'
332 libexecdir='${exec_prefix}/libexec'
333 datadir='${prefix}/share'
334 sysconfdir='${prefix}/etc'
335 sharedstatedir='${prefix}/com'
336 localstatedir='${prefix}/var'
337 libdir='${exec_prefix}/lib'
338 includedir='${prefix}/include'
339 oldincludedir='/usr/include'
340 infodir='${prefix}/info'
341 mandir='${prefix}/man'
342
343 ac_prev=
344 for ac_option
345 do
346   # If the previous option needs an argument, assign it.
347   if test -n "$ac_prev"; then
348     eval "$ac_prev=\$ac_option"
349     ac_prev=
350     continue
351   fi
352
353   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
354
355   # Accept the important Cygnus configure options, so we can diagnose typos.
356
357   case $ac_option in
358
359   -bindir | --bindir | --bindi | --bind | --bin | --bi)
360     ac_prev=bindir ;;
361   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
362     bindir=$ac_optarg ;;
363
364   -build | --build | --buil | --bui | --bu)
365     ac_prev=build_alias ;;
366   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
367     build_alias=$ac_optarg ;;
368
369   -cache-file | --cache-file | --cache-fil | --cache-fi \
370   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
371     ac_prev=cache_file ;;
372   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
373   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
374     cache_file=$ac_optarg ;;
375
376   --config-cache | -C)
377     cache_file=config.cache ;;
378
379   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
380     ac_prev=datadir ;;
381   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
382   | --da=*)
383     datadir=$ac_optarg ;;
384
385   -disable-* | --disable-*)
386     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
387     # Reject names that are not valid shell variable names.
388     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
389       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
390    { (exit 1); exit 1; }; }
391     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
392     eval "enable_$ac_feature=no" ;;
393
394   -enable-* | --enable-*)
395     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
396     # Reject names that are not valid shell variable names.
397     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
398       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
399    { (exit 1); exit 1; }; }
400     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
401     case $ac_option in
402       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
403       *) ac_optarg=yes ;;
404     esac
405     eval "enable_$ac_feature='$ac_optarg'" ;;
406
407   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
408   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
409   | --exec | --exe | --ex)
410     ac_prev=exec_prefix ;;
411   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
412   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
413   | --exec=* | --exe=* | --ex=*)
414     exec_prefix=$ac_optarg ;;
415
416   -gas | --gas | --ga | --g)
417     # Obsolete; use --with-gas.
418     with_gas=yes ;;
419
420   -help | --help | --hel | --he | -h)
421     ac_init_help=long ;;
422   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
423     ac_init_help=recursive ;;
424   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
425     ac_init_help=short ;;
426
427   -host | --host | --hos | --ho)
428     ac_prev=host_alias ;;
429   -host=* | --host=* | --hos=* | --ho=*)
430     host_alias=$ac_optarg ;;
431
432   -includedir | --includedir | --includedi | --included | --include \
433   | --includ | --inclu | --incl | --inc)
434     ac_prev=includedir ;;
435   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
436   | --includ=* | --inclu=* | --incl=* | --inc=*)
437     includedir=$ac_optarg ;;
438
439   -infodir | --infodir | --infodi | --infod | --info | --inf)
440     ac_prev=infodir ;;
441   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
442     infodir=$ac_optarg ;;
443
444   -libdir | --libdir | --libdi | --libd)
445     ac_prev=libdir ;;
446   -libdir=* | --libdir=* | --libdi=* | --libd=*)
447     libdir=$ac_optarg ;;
448
449   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
450   | --libexe | --libex | --libe)
451     ac_prev=libexecdir ;;
452   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
453   | --libexe=* | --libex=* | --libe=*)
454     libexecdir=$ac_optarg ;;
455
456   -localstatedir | --localstatedir | --localstatedi | --localstated \
457   | --localstate | --localstat | --localsta | --localst \
458   | --locals | --local | --loca | --loc | --lo)
459     ac_prev=localstatedir ;;
460   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
461   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
462   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
463     localstatedir=$ac_optarg ;;
464
465   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
466     ac_prev=mandir ;;
467   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
468     mandir=$ac_optarg ;;
469
470   -nfp | --nfp | --nf)
471     # Obsolete; use --without-fp.
472     with_fp=no ;;
473
474   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475   | --no-cr | --no-c | -n)
476     no_create=yes ;;
477
478   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
480     no_recursion=yes ;;
481
482   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
483   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
484   | --oldin | --oldi | --old | --ol | --o)
485     ac_prev=oldincludedir ;;
486   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
487   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
488   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
489     oldincludedir=$ac_optarg ;;
490
491   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
492     ac_prev=prefix ;;
493   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
494     prefix=$ac_optarg ;;
495
496   -program-prefix | --program-prefix | --program-prefi | --program-pref \
497   | --program-pre | --program-pr | --program-p)
498     ac_prev=program_prefix ;;
499   -program-prefix=* | --program-prefix=* | --program-prefi=* \
500   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
501     program_prefix=$ac_optarg ;;
502
503   -program-suffix | --program-suffix | --program-suffi | --program-suff \
504   | --program-suf | --program-su | --program-s)
505     ac_prev=program_suffix ;;
506   -program-suffix=* | --program-suffix=* | --program-suffi=* \
507   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
508     program_suffix=$ac_optarg ;;
509
510   -program-transform-name | --program-transform-name \
511   | --program-transform-nam | --program-transform-na \
512   | --program-transform-n | --program-transform- \
513   | --program-transform | --program-transfor \
514   | --program-transfo | --program-transf \
515   | --program-trans | --program-tran \
516   | --progr-tra | --program-tr | --program-t)
517     ac_prev=program_transform_name ;;
518   -program-transform-name=* | --program-transform-name=* \
519   | --program-transform-nam=* | --program-transform-na=* \
520   | --program-transform-n=* | --program-transform-=* \
521   | --program-transform=* | --program-transfor=* \
522   | --program-transfo=* | --program-transf=* \
523   | --program-trans=* | --program-tran=* \
524   | --progr-tra=* | --program-tr=* | --program-t=*)
525     program_transform_name=$ac_optarg ;;
526
527   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
528   | -silent | --silent | --silen | --sile | --sil)
529     silent=yes ;;
530
531   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
532     ac_prev=sbindir ;;
533   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
534   | --sbi=* | --sb=*)
535     sbindir=$ac_optarg ;;
536
537   -sharedstatedir | --sharedstatedir | --sharedstatedi \
538   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
539   | --sharedst | --shareds | --shared | --share | --shar \
540   | --sha | --sh)
541     ac_prev=sharedstatedir ;;
542   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
543   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
544   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
545   | --sha=* | --sh=*)
546     sharedstatedir=$ac_optarg ;;
547
548   -site | --site | --sit)
549     ac_prev=site ;;
550   -site=* | --site=* | --sit=*)
551     site=$ac_optarg ;;
552
553   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
554     ac_prev=srcdir ;;
555   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
556     srcdir=$ac_optarg ;;
557
558   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
559   | --syscon | --sysco | --sysc | --sys | --sy)
560     ac_prev=sysconfdir ;;
561   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
562   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
563     sysconfdir=$ac_optarg ;;
564
565   -target | --target | --targe | --targ | --tar | --ta | --t)
566     ac_prev=target_alias ;;
567   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
568     target_alias=$ac_optarg ;;
569
570   -v | -verbose | --verbose | --verbos | --verbo | --verb)
571     verbose=yes ;;
572
573   -version | --version | --versio | --versi | --vers | -V)
574     ac_init_version=: ;;
575
576   -with-* | --with-*)
577     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
578     # Reject names that are not valid shell variable names.
579     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
580       { echo "$as_me: error: invalid package name: $ac_package" >&2
581    { (exit 1); exit 1; }; }
582     ac_package=`echo $ac_package| sed 's/-/_/g'`
583     case $ac_option in
584       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
585       *) ac_optarg=yes ;;
586     esac
587     eval "with_$ac_package='$ac_optarg'" ;;
588
589   -without-* | --without-*)
590     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
591     # Reject names that are not valid shell variable names.
592     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593       { echo "$as_me: error: invalid package name: $ac_package" >&2
594    { (exit 1); exit 1; }; }
595     ac_package=`echo $ac_package | sed 's/-/_/g'`
596     eval "with_$ac_package=no" ;;
597
598   --x)
599     # Obsolete; use --with-x.
600     with_x=yes ;;
601
602   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
603   | --x-incl | --x-inc | --x-in | --x-i)
604     ac_prev=x_includes ;;
605   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
606   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
607     x_includes=$ac_optarg ;;
608
609   -x-libraries | --x-libraries | --x-librarie | --x-librari \
610   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
611     ac_prev=x_libraries ;;
612   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
613   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
614     x_libraries=$ac_optarg ;;
615
616   -*) { echo "$as_me: error: unrecognized option: $ac_option
617 Try \`$0 --help' for more information." >&2
618    { (exit 1); exit 1; }; }
619     ;;
620
621   *=*)
622     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
623     # Reject names that are not valid shell variable names.
624     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
625       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
626    { (exit 1); exit 1; }; }
627     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
628     eval "$ac_envvar='$ac_optarg'"
629     export $ac_envvar ;;
630
631   *)
632     # FIXME: should be removed in autoconf 3.0.
633     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
634     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
635       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
636     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
637     ;;
638
639   esac
640 done
641
642 if test -n "$ac_prev"; then
643   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
644   { echo "$as_me: error: missing argument to $ac_option" >&2
645    { (exit 1); exit 1; }; }
646 fi
647
648 # Be sure to have absolute paths.
649 for ac_var in exec_prefix prefix
650 do
651   eval ac_val=$`echo $ac_var`
652   case $ac_val in
653     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
654     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
655    { (exit 1); exit 1; }; };;
656   esac
657 done
658
659 # Be sure to have absolute paths.
660 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
661               localstatedir libdir includedir oldincludedir infodir mandir
662 do
663   eval ac_val=$`echo $ac_var`
664   case $ac_val in
665     [\\/$]* | ?:[\\/]* ) ;;
666     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
667    { (exit 1); exit 1; }; };;
668   esac
669 done
670
671 # There might be people who depend on the old broken behavior: `$host'
672 # used to hold the argument of --host etc.
673 # FIXME: To remove some day.
674 build=$build_alias
675 host=$host_alias
676 target=$target_alias
677
678 # FIXME: To remove some day.
679 if test "x$host_alias" != x; then
680   if test "x$build_alias" = x; then
681     cross_compiling=maybe
682     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
683     If a cross compiler is detected then cross compile mode will be used." >&2
684   elif test "x$build_alias" != "x$host_alias"; then
685     cross_compiling=yes
686   fi
687 fi
688
689 ac_tool_prefix=
690 test -n "$host_alias" && ac_tool_prefix=$host_alias-
691
692 test "$silent" = yes && exec 6>/dev/null
693
694
695 # Find the source files, if location was not specified.
696 if test -z "$srcdir"; then
697   ac_srcdir_defaulted=yes
698   # Try the directory containing this script, then its parent.
699   ac_confdir=`(dirname "$0") 2>/dev/null ||
700 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
701          X"$0" : 'X\(//\)[^/]' \| \
702          X"$0" : 'X\(//\)$' \| \
703          X"$0" : 'X\(/\)' \| \
704          .     : '\(.\)' 2>/dev/null ||
705 echo X"$0" |
706     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
707           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
708           /^X\(\/\/\)$/{ s//\1/; q; }
709           /^X\(\/\).*/{ s//\1/; q; }
710           s/.*/./; q'`
711   srcdir=$ac_confdir
712   if test ! -r $srcdir/$ac_unique_file; then
713     srcdir=..
714   fi
715 else
716   ac_srcdir_defaulted=no
717 fi
718 if test ! -r $srcdir/$ac_unique_file; then
719   if test "$ac_srcdir_defaulted" = yes; then
720     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
721    { (exit 1); exit 1; }; }
722   else
723     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
724    { (exit 1); exit 1; }; }
725   fi
726 fi
727 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
728 ac_env_build_alias_set=${build_alias+set}
729 ac_env_build_alias_value=$build_alias
730 ac_cv_env_build_alias_set=${build_alias+set}
731 ac_cv_env_build_alias_value=$build_alias
732 ac_env_host_alias_set=${host_alias+set}
733 ac_env_host_alias_value=$host_alias
734 ac_cv_env_host_alias_set=${host_alias+set}
735 ac_cv_env_host_alias_value=$host_alias
736 ac_env_target_alias_set=${target_alias+set}
737 ac_env_target_alias_value=$target_alias
738 ac_cv_env_target_alias_set=${target_alias+set}
739 ac_cv_env_target_alias_value=$target_alias
740 ac_env_CC_set=${CC+set}
741 ac_env_CC_value=$CC
742 ac_cv_env_CC_set=${CC+set}
743 ac_cv_env_CC_value=$CC
744 ac_env_CFLAGS_set=${CFLAGS+set}
745 ac_env_CFLAGS_value=$CFLAGS
746 ac_cv_env_CFLAGS_set=${CFLAGS+set}
747 ac_cv_env_CFLAGS_value=$CFLAGS
748 ac_env_LDFLAGS_set=${LDFLAGS+set}
749 ac_env_LDFLAGS_value=$LDFLAGS
750 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
751 ac_cv_env_LDFLAGS_value=$LDFLAGS
752 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
753 ac_env_CPPFLAGS_value=$CPPFLAGS
754 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
755 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
756 ac_env_CPP_set=${CPP+set}
757 ac_env_CPP_value=$CPP
758 ac_cv_env_CPP_set=${CPP+set}
759 ac_cv_env_CPP_value=$CPP
760 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
761 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
762 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
763 ac_cv_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
764
765 #
766 # Report the --help message.
767 #
768 if test "$ac_init_help" = "long"; then
769   # Omit some internal or obsolete options to make the list less imposing.
770   # This message is too long to be a string in the A/UX 3.1 sh.
771   cat <<_ACEOF
772 \`configure' configures PostgreSQL 8.0.0beta3 to adapt to many kinds of systems.
773
774 Usage: $0 [OPTION]... [VAR=VALUE]...
775
776 To assign environment variables (e.g., CC, CFLAGS...), specify them as
777 VAR=VALUE.  See below for descriptions of some of the useful variables.
778
779 Defaults for the options are specified in brackets.
780
781 Configuration:
782   -h, --help              display this help and exit
783       --help=short        display options specific to this package
784       --help=recursive    display the short help of all the included packages
785   -V, --version           display version information and exit
786   -q, --quiet, --silent   do not print \`checking...' messages
787       --cache-file=FILE   cache test results in FILE [disabled]
788   -C, --config-cache      alias for \`--cache-file=config.cache'
789   -n, --no-create         do not create output files
790       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
791
792 _ACEOF
793
794   cat <<_ACEOF
795 Installation directories:
796   --prefix=PREFIX         install architecture-independent files in PREFIX
797                           [$ac_default_prefix]
798   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
799                           [PREFIX]
800
801 By default, \`make install' will install all the files in
802 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
803 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
804 for instance \`--prefix=\$HOME'.
805
806 For better control, use the options below.
807
808 Fine tuning of the installation directories:
809   --bindir=DIR           user executables [EPREFIX/bin]
810   --sbindir=DIR          system admin executables [EPREFIX/sbin]
811   --libexecdir=DIR       program executables [EPREFIX/libexec]
812   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
813   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
814   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
815   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
816   --libdir=DIR           object code libraries [EPREFIX/lib]
817   --includedir=DIR       C header files [PREFIX/include]
818   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
819   --infodir=DIR          info documentation [PREFIX/info]
820   --mandir=DIR           man documentation [PREFIX/man]
821 _ACEOF
822
823   cat <<\_ACEOF
824
825 System types:
826   --build=BUILD     configure for building on BUILD [guessed]
827   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
828 _ACEOF
829 fi
830
831 if test -n "$ac_init_help"; then
832   case $ac_init_help in
833      short | recursive ) echo "Configuration of PostgreSQL 8.0.0beta3:";;
834    esac
835   cat <<\_ACEOF
836
837 Optional Features:
838   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
839   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
840   --enable-integer-datetimes  enable 64-bit integer date/time support
841   --enable-nls[=LANGUAGES]  enable Native Language Support
842   --disable-shared        do not build shared libraries
843   --disable-rpath         do not embed shared library search path in executables
844   --disable-spinlocks     do not use spinlocks
845   --enable-debug          build with debugging symbols (-g)
846   --enable-depend         turn on automatic dependency tracking
847   --enable-cassert        enable assertion checks (for debugging)
848   --enable-thread-safety  make client libraries thread-safe
849   --enable-thread-safety-force  force thread-safety in spite of thread test failure
850   --disable-largefile     omit support for large files
851
852 Optional Packages:
853   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
854   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
855
856   --with-docdir=DIR       install the documentation in DIR [PREFIX/doc]
857   --without-docdir        do not install the documentation
858   --with-includes=DIRS    look for additional header files in DIRS
859   --with-libraries=DIRS   look for additional libraries in DIRS
860   --with-libs=DIRS        alternative spelling of --with-libraries
861   --with-pgport=PORTNUM   change default port number 5432
862   --with-tcl              build Tcl and Tk interfaces
863   --with-tclconfig=DIR    tclConfig.sh is in DIR
864   --with-perl             build Perl modules (PL/Perl)
865   --with-python           build Python modules (PL/Python)
866   --with-krb4             build with Kerberos 4 support
867   --with-krb5             build with Kerberos 5 support
868   --with-krb-srvnam=NAME  name of the service principal in Kerberos [postgres]
869   --with-pam              build with PAM support
870   --with-rendezvous       build with Rendezvous support
871   --with-openssl          build with OpenSSL support
872   --without-readline      do not use Readline
873   --without-zlib          do not use Zlib
874   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
875
876 Some influential environment variables:
877   CC          C compiler command
878   CFLAGS      C compiler flags
879   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
880               nonstandard directory <lib dir>
881   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
882               headers in a nonstandard directory <include dir>
883   CPP         C preprocessor
884   DOCBOOKSTYLE
885               location of DocBook stylesheets
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 Report bugs to <pgsql-bugs@postgresql.org>.
891 _ACEOF
892 fi
893
894 if test "$ac_init_help" = "recursive"; then
895   # If there are subdirs, report their specific --help.
896   ac_popdir=`pwd`
897   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
898     test -d $ac_dir || continue
899     ac_builddir=.
900
901 if test "$ac_dir" != .; then
902   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
903   # A "../" for each directory in $ac_dir_suffix.
904   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
905 else
906   ac_dir_suffix= ac_top_builddir=
907 fi
908
909 case $srcdir in
910   .)  # No --srcdir option.  We are building in place.
911     ac_srcdir=.
912     if test -z "$ac_top_builddir"; then
913        ac_top_srcdir=.
914     else
915        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
916     fi ;;
917   [\\/]* | ?:[\\/]* )  # Absolute path.
918     ac_srcdir=$srcdir$ac_dir_suffix;
919     ac_top_srcdir=$srcdir ;;
920   *) # Relative path.
921     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
922     ac_top_srcdir=$ac_top_builddir$srcdir ;;
923 esac
924 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
925 # absolute.
926 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
927 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
928 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
929 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
930
931     cd $ac_dir
932     # Check for guested configure; otherwise get Cygnus style configure.
933     if test -f $ac_srcdir/configure.gnu; then
934       echo
935       $SHELL $ac_srcdir/configure.gnu  --help=recursive
936     elif test -f $ac_srcdir/configure; then
937       echo
938       $SHELL $ac_srcdir/configure  --help=recursive
939     elif test -f $ac_srcdir/configure.ac ||
940            test -f $ac_srcdir/configure.in; then
941       echo
942       $ac_configure --help
943     else
944       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
945     fi
946     cd $ac_popdir
947   done
948 fi
949
950 test -n "$ac_init_help" && exit 0
951 if $ac_init_version; then
952   cat <<\_ACEOF
953 PostgreSQL configure 8.0.0beta3
954 generated by GNU Autoconf 2.53
955
956 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
957 Free Software Foundation, Inc.
958 This configure script is free software; the Free Software Foundation
959 gives unlimited permission to copy, distribute and modify it.
960
961 Copyright 2004 PostgreSQL Global Development Group
962 _ACEOF
963   exit 0
964 fi
965 exec 5>config.log
966 cat >&5 <<_ACEOF
967 This file contains any messages produced by compilers while
968 running configure, to aid debugging if configure makes a mistake.
969
970 It was created by PostgreSQL $as_me 8.0.0beta3, which was
971 generated by GNU Autoconf 2.53.  Invocation command line was
972
973   $ $0 $@
974
975 _ACEOF
976 {
977 cat <<_ASUNAME
978 ## --------- ##
979 ## Platform. ##
980 ## --------- ##
981
982 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
983 uname -m = `(uname -m) 2>/dev/null || echo unknown`
984 uname -r = `(uname -r) 2>/dev/null || echo unknown`
985 uname -s = `(uname -s) 2>/dev/null || echo unknown`
986 uname -v = `(uname -v) 2>/dev/null || echo unknown`
987
988 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
989 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
990
991 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
992 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
993 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
994 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
995 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
996 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
997 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
998
999 _ASUNAME
1000
1001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1002 for as_dir in $PATH
1003 do
1004   IFS=$as_save_IFS
1005   test -z "$as_dir" && as_dir=.
1006   echo "PATH: $as_dir"
1007 done
1008
1009 } >&5
1010
1011 cat >&5 <<_ACEOF
1012
1013
1014 ## ----------- ##
1015 ## Core tests. ##
1016 ## ----------- ##
1017
1018 _ACEOF
1019
1020
1021 # Keep a trace of the command line.
1022 # Strip out --no-create and --no-recursion so they do not pile up.
1023 # Also quote any args containing shell meta-characters.
1024 ac_configure_args=
1025 ac_sep=
1026 for ac_arg
1027 do
1028   case $ac_arg in
1029   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1030   | --no-cr | --no-c | -n ) continue ;;
1031   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1032   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1033     continue ;;
1034   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1035     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1036   esac
1037   case " $ac_configure_args " in
1038     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1039     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1040        ac_sep=" " ;;
1041   esac
1042   # Get rid of the leading space.
1043 done
1044
1045 # When interrupted or exit'd, cleanup temporary files, and complete
1046 # config.log.  We remove comments because anyway the quotes in there
1047 # would cause problems or look ugly.
1048 # WARNING: Be sure not to use single quotes in there, as some shells,
1049 # such as our DU 5.0 friend, will then `close' the trap.
1050 trap 'exit_status=$?
1051   # Save into config.log some information that might help in debugging.
1052   {
1053     echo
1054     cat <<\_ASBOX
1055 ## ---------------- ##
1056 ## Cache variables. ##
1057 ## ---------------- ##
1058 _ASBOX
1059     echo
1060     # The following way of writing the cache mishandles newlines in values,
1061 {
1062   (set) 2>&1 |
1063     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1064     *ac_space=\ *)
1065       sed -n \
1066         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1067           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1068       ;;
1069     *)
1070       sed -n \
1071         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1072       ;;
1073     esac;
1074 }
1075     echo
1076     if test -s confdefs.h; then
1077       cat <<\_ASBOX
1078 ## ----------- ##
1079 ## confdefs.h. ##
1080 ## ----------- ##
1081 _ASBOX
1082       echo
1083       sed "/^$/d" confdefs.h
1084       echo
1085     fi
1086     test "$ac_signal" != 0 &&
1087       echo "$as_me: caught signal $ac_signal"
1088     echo "$as_me: exit $exit_status"
1089   } >&5
1090   rm -f core core.* *.core &&
1091   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1092     exit $exit_status
1093      ' 0
1094 for ac_signal in 1 2 13 15; do
1095   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1096 done
1097 ac_signal=0
1098
1099 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1100 rm -rf conftest* confdefs.h
1101 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1102 echo >confdefs.h
1103
1104 # Predefined preprocessor variables.
1105
1106 cat >>confdefs.h <<_ACEOF
1107 #define PACKAGE_NAME "$PACKAGE_NAME"
1108 _ACEOF
1109
1110
1111 cat >>confdefs.h <<_ACEOF
1112 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1113 _ACEOF
1114
1115
1116 cat >>confdefs.h <<_ACEOF
1117 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1118 _ACEOF
1119
1120
1121 cat >>confdefs.h <<_ACEOF
1122 #define PACKAGE_STRING "$PACKAGE_STRING"
1123 _ACEOF
1124
1125
1126 cat >>confdefs.h <<_ACEOF
1127 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1128 _ACEOF
1129
1130
1131 # Let the site file select an alternate cache file if it wants to.
1132 # Prefer explicitly selected file to automatically selected ones.
1133 if test -z "$CONFIG_SITE"; then
1134   if test "x$prefix" != xNONE; then
1135     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1136   else
1137     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1138   fi
1139 fi
1140 for ac_site_file in $CONFIG_SITE; do
1141   if test -r "$ac_site_file"; then
1142     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1143 echo "$as_me: loading site script $ac_site_file" >&6;}
1144     sed 's/^/| /' "$ac_site_file" >&5
1145     . "$ac_site_file"
1146   fi
1147 done
1148
1149 if test -r "$cache_file"; then
1150   # Some versions of bash will fail to source /dev/null (special
1151   # files actually), so we avoid doing that.
1152   if test -f "$cache_file"; then
1153     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1154 echo "$as_me: loading cache $cache_file" >&6;}
1155     case $cache_file in
1156       [\\/]* | ?:[\\/]* ) . $cache_file;;
1157       *)                      . ./$cache_file;;
1158     esac
1159   fi
1160 else
1161   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1162 echo "$as_me: creating cache $cache_file" >&6;}
1163   >$cache_file
1164 fi
1165
1166 # Check that the precious variables saved in the cache have kept the same
1167 # value.
1168 ac_cache_corrupted=false
1169 for ac_var in `(set) 2>&1 |
1170                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1171   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1172   eval ac_new_set=\$ac_env_${ac_var}_set
1173   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1174   eval ac_new_val="\$ac_env_${ac_var}_value"
1175   case $ac_old_set,$ac_new_set in
1176     set,)
1177       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1178 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1179       ac_cache_corrupted=: ;;
1180     ,set)
1181       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1182 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1183       ac_cache_corrupted=: ;;
1184     ,);;
1185     *)
1186       if test "x$ac_old_val" != "x$ac_new_val"; then
1187         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1188 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1189         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1190 echo "$as_me:   former value:  $ac_old_val" >&2;}
1191         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1192 echo "$as_me:   current value: $ac_new_val" >&2;}
1193         ac_cache_corrupted=:
1194       fi;;
1195   esac
1196   # Pass precious variables to config.status.
1197   if test "$ac_new_set" = set; then
1198     case $ac_new_val in
1199     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1200       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1201     *) ac_arg=$ac_var=$ac_new_val ;;
1202     esac
1203     case " $ac_configure_args " in
1204       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1205       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1206     esac
1207   fi
1208 done
1209 if $ac_cache_corrupted; then
1210   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1211 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1212   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1213 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1214    { (exit 1); exit 1; }; }
1215 fi
1216
1217 ac_ext=c
1218 ac_cpp='$CPP $CPPFLAGS'
1219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252 ac_aux_dir=
1253 for ac_dir in config $srcdir/config; do
1254   if test -f $ac_dir/install-sh; then
1255     ac_aux_dir=$ac_dir
1256     ac_install_sh="$ac_aux_dir/install-sh -c"
1257     break
1258   elif test -f $ac_dir/install.sh; then
1259     ac_aux_dir=$ac_dir
1260     ac_install_sh="$ac_aux_dir/install.sh -c"
1261     break
1262   elif test -f $ac_dir/shtool; then
1263     ac_aux_dir=$ac_dir
1264     ac_install_sh="$ac_aux_dir/shtool install -c"
1265     break
1266   fi
1267 done
1268 if test -z "$ac_aux_dir"; then
1269   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1270 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1271    { (exit 1); exit 1; }; }
1272 fi
1273 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1274 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1275 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1276
1277
1278 configure_args=$ac_configure_args
1279
1280
1281
1282 cat >>confdefs.h <<_ACEOF
1283 #define PG_VERSION "$PACKAGE_VERSION"
1284 _ACEOF
1285
1286
1287 # Make sure we can run config.sub.
1288 $ac_config_sub sun4 >/dev/null 2>&1 ||
1289   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1290 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1291    { (exit 1); exit 1; }; }
1292
1293 echo "$as_me:$LINENO: checking build system type" >&5
1294 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1295 if test "${ac_cv_build+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_build_alias=$build_alias
1299 test -z "$ac_cv_build_alias" &&
1300   ac_cv_build_alias=`$ac_config_guess`
1301 test -z "$ac_cv_build_alias" &&
1302   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1303 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1304    { (exit 1); exit 1; }; }
1305 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1306   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1307 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310 fi
1311 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1312 echo "${ECHO_T}$ac_cv_build" >&6
1313 build=$ac_cv_build
1314 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1315 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1316 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1317
1318
1319 echo "$as_me:$LINENO: checking host system type" >&5
1320 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1321 if test "${ac_cv_host+set}" = set; then
1322   echo $ECHO_N "(cached) $ECHO_C" >&6
1323 else
1324   ac_cv_host_alias=$host_alias
1325 test -z "$ac_cv_host_alias" &&
1326   ac_cv_host_alias=$ac_cv_build_alias
1327 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1328   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1329 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1330    { (exit 1); exit 1; }; }
1331
1332 fi
1333 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1334 echo "${ECHO_T}$ac_cv_host" >&6
1335 host=$ac_cv_host
1336 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1337 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1338 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1339
1340
1341
1342 template=
1343 echo "$as_me:$LINENO: checking which template to use" >&5
1344 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1345
1346
1347
1348
1349 # Check whether --with-template or --without-template was given.
1350 if test "${with_template+set}" = set; then
1351   withval="$with_template"
1352
1353   case $withval in
1354     yes)
1355       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1356 echo "$as_me: error: argument required for --with-template option" >&2;}
1357    { (exit 1); exit 1; }; }
1358       ;;
1359     no)
1360       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1361 echo "$as_me: error: argument required for --with-template option" >&2;}
1362    { (exit 1); exit 1; }; }
1363       ;;
1364     *)
1365
1366   case $withval in
1367     list)   echo; ls "$srcdir/src/template"; exit;;
1368     *)      if test -f "$srcdir/src/template/$with_template" ; then
1369               template=$withval
1370             else
1371               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1372 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1373    { (exit 1); exit 1; }; }
1374             fi;;
1375   esac
1376
1377       ;;
1378   esac
1379
1380 else
1381
1382 # --with-template not given
1383
1384 case $host_os in
1385      aix*) template=aix ;;
1386     beos*) template=beos ;;
1387     bsdi*) template=bsdi ;;
1388   cygwin*) template=cygwin ;;
1389   darwin*) template=darwin ;;
1390     dgux*) template=dgux ;;
1391  freebsd*) template=freebsd ;;
1392     hpux*) template=hpux ;;
1393     irix*) template=irix ;;
1394  linux*|gnu*|k*bsd*-gnu)
1395            template=linux ;;
1396    mingw*) template=win32 ;;
1397   netbsd*) template=netbsd ;;
1398 nextstep*) template=nextstep ;;
1399  openbsd*) template=openbsd ;;
1400      osf*) template=osf ;;
1401      qnx*) template=qnx4 ;;
1402      sco*) template=sco ;;
1403  solaris*) template=solaris ;;
1404    sunos*) template=sunos4 ;;
1405  sysv4.2*)
1406         case $host_vendor in
1407           univel) template=univel ;;
1408         esac ;;
1409    sysv4*) template=svr4 ;;
1410    sysv5*) template=unixware ;;
1411   ultrix*) template=ultrix4 ;;
1412 esac
1413
1414   if test x"$template" = x"" ; then
1415     { { echo "$as_me:$LINENO: error:
1416 *******************************************************************
1417 PostgreSQL has apparently not been ported to your platform yet.
1418 To try a manual configuration, look into the src/template directory
1419 for a similar platform and use the '--with-template=' option.
1420
1421 Please also contact <pgsql-ports@postgresql.org> to see about
1422 rectifying this.  Include the above 'checking host system type...'
1423 line.
1424 *******************************************************************
1425 " >&5
1426 echo "$as_me: error:
1427 *******************************************************************
1428 PostgreSQL has apparently not been ported to your platform yet.
1429 To try a manual configuration, look into the src/template directory
1430 for a similar platform and use the '--with-template=' option.
1431
1432 Please also contact <pgsql-ports@postgresql.org> to see about
1433 rectifying this.  Include the above 'checking host system type...'
1434 line.
1435 *******************************************************************
1436 " >&2;}
1437    { (exit 1); exit 1; }; }
1438   fi
1439
1440
1441 fi;
1442
1443
1444 echo "$as_me:$LINENO: result: $template" >&5
1445 echo "${ECHO_T}$template" >&6
1446
1447 PORTNAME=$template
1448
1449
1450 # Initialize default assumption that we do not need separate assembly code
1451 # for TAS (test-and-set).  This can be overridden by the template file
1452 # when it's executed.
1453 need_tas=no
1454 tas_file=dummy.s
1455
1456
1457
1458 ##
1459 ## Command line options
1460 ##
1461
1462 #
1463 # Installation directory for documentation
1464 #
1465
1466
1467
1468 # Check whether --with-docdir or --without-docdir was given.
1469 if test "${with_docdir+set}" = set; then
1470   withval="$with_docdir"
1471
1472   case $withval in
1473     yes)
1474       { { echo "$as_me:$LINENO: error: option --with-docdir requires an argument" >&5
1475 echo "$as_me: error: option --with-docdir requires an argument" >&2;}
1476    { (exit 1); exit 1; }; }
1477       ;;
1478     no)
1479       docdir=
1480       ;;
1481     *)
1482       docdir=$withval
1483       ;;
1484   esac
1485
1486 else
1487   docdir='${prefix}/doc'
1488 fi;
1489
1490
1491
1492
1493 #
1494 # Add non-standard directories to the include path
1495 #
1496
1497
1498
1499 # Check whether --with-includes or --without-includes was given.
1500 if test "${with_includes+set}" = set; then
1501   withval="$with_includes"
1502
1503   case $withval in
1504     yes)
1505       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1506 echo "$as_me: error: argument required for --with-includes option" >&2;}
1507    { (exit 1); exit 1; }; }
1508       ;;
1509     no)
1510       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1511 echo "$as_me: error: argument required for --with-includes option" >&2;}
1512    { (exit 1); exit 1; }; }
1513       ;;
1514     *)
1515
1516       ;;
1517   esac
1518
1519 fi;
1520
1521
1522
1523 #
1524 # Add non-standard directories to the library search path
1525 #
1526
1527
1528
1529 # Check whether --with-libraries or --without-libraries was given.
1530 if test "${with_libraries+set}" = set; then
1531   withval="$with_libraries"
1532
1533   case $withval in
1534     yes)
1535       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1536 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1537    { (exit 1); exit 1; }; }
1538       ;;
1539     no)
1540       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1541 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1542    { (exit 1); exit 1; }; }
1543       ;;
1544     *)
1545       LIBRARY_DIRS=$withval
1546       ;;
1547   esac
1548
1549 fi;
1550
1551
1552
1553
1554
1555 # Check whether --with-libs or --without-libs was given.
1556 if test "${with_libs+set}" = set; then
1557   withval="$with_libs"
1558
1559   case $withval in
1560     yes)
1561       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1562 echo "$as_me: error: argument required for --with-libs option" >&2;}
1563    { (exit 1); exit 1; }; }
1564       ;;
1565     no)
1566       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1567 echo "$as_me: error: argument required for --with-libs option" >&2;}
1568    { (exit 1); exit 1; }; }
1569       ;;
1570     *)
1571       LIBRARY_DIRS=$withval
1572       ;;
1573   esac
1574
1575 fi;
1576
1577
1578
1579 #
1580 # 64-bit integer date/time storage (--enable-integer-datetimes)
1581 #
1582 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1583 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1584
1585
1586 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1587 if test "${enable_integer_datetimes+set}" = set; then
1588   enableval="$enable_integer_datetimes"
1589
1590   case $enableval in
1591     yes)
1592
1593 cat >>confdefs.h <<\_ACEOF
1594 #define USE_INTEGER_DATETIMES 1
1595 _ACEOF
1596
1597       ;;
1598     no)
1599       :
1600       ;;
1601     *)
1602       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1603 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1604    { (exit 1); exit 1; }; }
1605       ;;
1606   esac
1607
1608 else
1609   enable_integer_datetimes=no
1610
1611 fi;
1612
1613 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1614 echo "${ECHO_T}$enable_integer_datetimes" >&6
1615
1616
1617 #
1618 # NLS
1619 #
1620 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1621 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1622
1623
1624 # Check whether --enable-nls or --disable-nls was given.
1625 if test "${enable_nls+set}" = set; then
1626   enableval="$enable_nls"
1627
1628   case $enableval in
1629     yes)
1630       :
1631       ;;
1632     no)
1633       :
1634       ;;
1635     *)
1636       enable_nls=yes
1637 WANTED_LANGUAGES=$enableval
1638       ;;
1639   esac
1640
1641 else
1642   enable_nls=no
1643 fi;
1644
1645
1646 if test "$enable_nls" = yes; then
1647
1648 cat >>confdefs.h <<\_ACEOF
1649 #define ENABLE_NLS 1
1650 _ACEOF
1651
1652 fi
1653
1654 echo "$as_me:$LINENO: result: $enable_nls" >&5
1655 echo "${ECHO_T}$enable_nls" >&6
1656
1657
1658
1659 #
1660 # Default port number (--with-pgport), default 5432
1661 #
1662 echo "$as_me:$LINENO: checking for default port number" >&5
1663 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1664
1665
1666
1667 # Check whether --with-pgport or --without-pgport was given.
1668 if test "${with_pgport+set}" = set; then
1669   withval="$with_pgport"
1670
1671   case $withval in
1672     yes)
1673       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1674 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1675    { (exit 1); exit 1; }; }
1676       ;;
1677     no)
1678       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1679 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1680    { (exit 1); exit 1; }; }
1681       ;;
1682     *)
1683       default_port=$withval
1684       ;;
1685   esac
1686
1687 else
1688   default_port=5432
1689 fi;
1690
1691 echo "$as_me:$LINENO: result: $default_port" >&5
1692 echo "${ECHO_T}$default_port" >&6
1693 # Need both of these because some places want an integer and some a string
1694
1695 cat >>confdefs.h <<_ACEOF
1696 #define DEF_PGPORT ${default_port}
1697 _ACEOF
1698
1699
1700 cat >>confdefs.h <<_ACEOF
1701 #define DEF_PGPORT_STR "${default_port}"
1702 _ACEOF
1703
1704
1705
1706 #
1707 # Option to disable shared libraries
1708 #
1709
1710
1711 # Check whether --enable-shared or --disable-shared was given.
1712 if test "${enable_shared+set}" = set; then
1713   enableval="$enable_shared"
1714
1715   case $enableval in
1716     yes)
1717       :
1718       ;;
1719     no)
1720       :
1721       ;;
1722     *)
1723       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1724 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1725    { (exit 1); exit 1; }; }
1726       ;;
1727   esac
1728
1729 else
1730   enable_shared=yes
1731
1732 fi;
1733
1734
1735
1736 #
1737 # '-rpath'-like feature can be disabled
1738 #
1739
1740
1741 # Check whether --enable-rpath or --disable-rpath was given.
1742 if test "${enable_rpath+set}" = set; then
1743   enableval="$enable_rpath"
1744
1745   case $enableval in
1746     yes)
1747       :
1748       ;;
1749     no)
1750       :
1751       ;;
1752     *)
1753       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1754 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1755    { (exit 1); exit 1; }; }
1756       ;;
1757   esac
1758
1759 else
1760   enable_rpath=yes
1761
1762 fi;
1763
1764
1765
1766 #
1767 # Spinlocks
1768 #
1769
1770
1771 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1772 if test "${enable_spinlocks+set}" = set; then
1773   enableval="$enable_spinlocks"
1774
1775   case $enableval in
1776     yes)
1777       :
1778       ;;
1779     no)
1780       :
1781       ;;
1782     *)
1783       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1784 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1785    { (exit 1); exit 1; }; }
1786       ;;
1787   esac
1788
1789 else
1790   enable_spinlocks=yes
1791
1792 fi;
1793
1794
1795 #
1796 # --enable-debug adds -g to compiler flags
1797 #
1798
1799
1800 # Check whether --enable-debug or --disable-debug was given.
1801 if test "${enable_debug+set}" = set; then
1802   enableval="$enable_debug"
1803
1804   case $enableval in
1805     yes)
1806       :
1807       ;;
1808     no)
1809       :
1810       ;;
1811     *)
1812       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1813 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1814    { (exit 1); exit 1; }; }
1815       ;;
1816   esac
1817
1818 else
1819   enable_debug=no
1820
1821 fi;
1822
1823
1824
1825 #
1826 # C compiler
1827 #
1828
1829 # For historical reasons you can also use --with-CC to specify the C compiler
1830 # to use, although the standard way to do this is to set the CC environment
1831 # variable.
1832
1833
1834
1835 # Check whether --with-CC or --without-CC was given.
1836 if test "${with_CC+set}" = set; then
1837   withval="$with_CC"
1838
1839   case $withval in
1840     yes)
1841       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1842 echo "$as_me: error: argument required for --with-CC option" >&2;}
1843    { (exit 1); exit 1; }; }
1844       ;;
1845     no)
1846       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1847 echo "$as_me: error: argument required for --with-CC option" >&2;}
1848    { (exit 1); exit 1; }; }
1849       ;;
1850     *)
1851       CC=$with_CC
1852       ;;
1853   esac
1854
1855 fi;
1856
1857
1858 case $template in
1859   aix) pgac_cc_list="gcc xlc";;
1860  irix) pgac_cc_list="cc";; # no gcc
1861     *) pgac_cc_list="gcc cc";;
1862 esac
1863
1864 ac_ext=c
1865 ac_cpp='$CPP $CPPFLAGS'
1866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1869 if test -n "$ac_tool_prefix"; then
1870   for ac_prog in $pgac_cc_list
1871   do
1872     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1873 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1874 echo "$as_me:$LINENO: checking for $ac_word" >&5
1875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1876 if test "${ac_cv_prog_CC+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   if test -n "$CC"; then
1880   ac_cv_prog_CC="$CC" # Let the user override the test.
1881 else
1882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1883 for as_dir in $PATH
1884 do
1885   IFS=$as_save_IFS
1886   test -z "$as_dir" && as_dir=.
1887   for ac_exec_ext in '' $ac_executable_extensions; do
1888   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1889     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1890     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1891     break 2
1892   fi
1893 done
1894 done
1895
1896 fi
1897 fi
1898 CC=$ac_cv_prog_CC
1899 if test -n "$CC"; then
1900   echo "$as_me:$LINENO: result: $CC" >&5
1901 echo "${ECHO_T}$CC" >&6
1902 else
1903   echo "$as_me:$LINENO: result: no" >&5
1904 echo "${ECHO_T}no" >&6
1905 fi
1906
1907     test -n "$CC" && break
1908   done
1909 fi
1910 if test -z "$CC"; then
1911   ac_ct_CC=$CC
1912   for ac_prog in $pgac_cc_list
1913 do
1914   # Extract the first word of "$ac_prog", so it can be a program name with args.
1915 set dummy $ac_prog; ac_word=$2
1916 echo "$as_me:$LINENO: checking for $ac_word" >&5
1917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1918 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1919   echo $ECHO_N "(cached) $ECHO_C" >&6
1920 else
1921   if test -n "$ac_ct_CC"; then
1922   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1923 else
1924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1925 for as_dir in $PATH
1926 do
1927   IFS=$as_save_IFS
1928   test -z "$as_dir" && as_dir=.
1929   for ac_exec_ext in '' $ac_executable_extensions; do
1930   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1931     ac_cv_prog_ac_ct_CC="$ac_prog"
1932     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1933     break 2
1934   fi
1935 done
1936 done
1937
1938 fi
1939 fi
1940 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1941 if test -n "$ac_ct_CC"; then
1942   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1943 echo "${ECHO_T}$ac_ct_CC" >&6
1944 else
1945   echo "$as_me:$LINENO: result: no" >&5
1946 echo "${ECHO_T}no" >&6
1947 fi
1948
1949   test -n "$ac_ct_CC" && break
1950 done
1951
1952   CC=$ac_ct_CC
1953 fi
1954
1955
1956 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1957 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1958    { (exit 1); exit 1; }; }
1959
1960 # Provide some information about the compiler.
1961 echo "$as_me:$LINENO:" \
1962      "checking for C compiler version" >&5
1963 ac_compiler=`set X $ac_compile; echo $2`
1964 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1965   (eval $ac_compiler --version </dev/null >&5) 2>&5
1966   ac_status=$?
1967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1968   (exit $ac_status); }
1969 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1970   (eval $ac_compiler -v </dev/null >&5) 2>&5
1971   ac_status=$?
1972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1973   (exit $ac_status); }
1974 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1975   (eval $ac_compiler -V </dev/null >&5) 2>&5
1976   ac_status=$?
1977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1978   (exit $ac_status); }
1979
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #line $LINENO "configure"
1982 #include "confdefs.h"
1983
1984 #ifdef F77_DUMMY_MAIN
1985 #  ifdef __cplusplus
1986      extern "C"
1987 #  endif
1988    int F77_DUMMY_MAIN() { return 1; }
1989 #endif
1990 int
1991 main ()
1992 {
1993
1994   ;
1995   return 0;
1996 }
1997 _ACEOF
1998 ac_clean_files_save=$ac_clean_files
1999 ac_clean_files="$ac_clean_files a.out a.exe"
2000 # Try to create an executable without -o first, disregard a.out.
2001 # It will help us diagnose broken compilers, and finding out an intuition
2002 # of exeext.
2003 echo "$as_me:$LINENO: checking for C compiler default output" >&5
2004 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2005 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2006 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2007   (eval $ac_link_default) 2>&5
2008   ac_status=$?
2009   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2010   (exit $ac_status); }; then
2011   # Find the output, starting from the most likely.  This scheme is
2012 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2013 # resort.
2014
2015 # Be careful to initialize this variable, since it used to be cached.
2016 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2017 ac_cv_exeext=
2018 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2019                 ls a.out conftest 2>/dev/null;
2020                 ls a.* conftest.* 2>/dev/null`; do
2021   case $ac_file in
2022     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2023     a.out ) # We found the default executable, but exeext='' is most
2024             # certainly right.
2025             break;;
2026     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2027           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2028           export ac_cv_exeext
2029           break;;
2030     * ) break;;
2031   esac
2032 done
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2037 echo "$as_me: error: C compiler cannot create executables" >&2;}
2038    { (exit 77); exit 77; }; }
2039 fi
2040
2041 ac_exeext=$ac_cv_exeext
2042 echo "$as_me:$LINENO: result: $ac_file" >&5
2043 echo "${ECHO_T}$ac_file" >&6
2044
2045 # Check the compiler produces executables we can run.  If not, either
2046 # the compiler is broken, or we cross compile.
2047 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2048 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2049 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2050 # If not cross compiling, check that we can run a simple program.
2051 if test "$cross_compiling" != yes; then
2052   if { ac_try='./$ac_file'
2053   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058     cross_compiling=no
2059   else
2060     if test "$cross_compiling" = maybe; then
2061         cross_compiling=yes
2062     else
2063         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2064 If you meant to cross compile, use \`--host'." >&5
2065 echo "$as_me: error: cannot run C compiled programs.
2066 If you meant to cross compile, use \`--host'." >&2;}
2067    { (exit 1); exit 1; }; }
2068     fi
2069   fi
2070 fi
2071 echo "$as_me:$LINENO: result: yes" >&5
2072 echo "${ECHO_T}yes" >&6
2073
2074 rm -f a.out a.exe conftest$ac_cv_exeext
2075 ac_clean_files=$ac_clean_files_save
2076 # Check the compiler produces executables we can run.  If not, either
2077 # the compiler is broken, or we cross compile.
2078 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2079 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2080 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2081 echo "${ECHO_T}$cross_compiling" >&6
2082
2083 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2084 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2085 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2086   (eval $ac_link) 2>&5
2087   ac_status=$?
2088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2089   (exit $ac_status); }; then
2090   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2091 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2092 # work properly (i.e., refer to `conftest.exe'), while it won't with
2093 # `rm'.
2094 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2095   case $ac_file in
2096     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2097     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2098           export ac_cv_exeext
2099           break;;
2100     * ) break;;
2101   esac
2102 done
2103 else
2104   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2105 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2106    { (exit 1); exit 1; }; }
2107 fi
2108
2109 rm -f conftest$ac_cv_exeext
2110 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2111 echo "${ECHO_T}$ac_cv_exeext" >&6
2112
2113 rm -f conftest.$ac_ext
2114 EXEEXT=$ac_cv_exeext
2115 ac_exeext=$EXEEXT
2116 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2117 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2118 if test "${ac_cv_objext+set}" = set; then
2119   echo $ECHO_N "(cached) $ECHO_C" >&6
2120 else
2121   cat >conftest.$ac_ext <<_ACEOF
2122 #line $LINENO "configure"
2123 #include "confdefs.h"
2124
2125 #ifdef F77_DUMMY_MAIN
2126 #  ifdef __cplusplus
2127      extern "C"
2128 #  endif
2129    int F77_DUMMY_MAIN() { return 1; }
2130 #endif
2131 int
2132 main ()
2133 {
2134
2135   ;
2136   return 0;
2137 }
2138 _ACEOF
2139 rm -f conftest.o conftest.obj
2140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2141   (eval $ac_compile) 2>&5
2142   ac_status=$?
2143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2144   (exit $ac_status); }; then
2145   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2146   case $ac_file in
2147     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2148     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2149        break;;
2150   esac
2151 done
2152 else
2153   echo "$as_me: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2156 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2157    { (exit 1); exit 1; }; }
2158 fi
2159
2160 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2161 fi
2162 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2163 echo "${ECHO_T}$ac_cv_objext" >&6
2164 OBJEXT=$ac_cv_objext
2165 ac_objext=$OBJEXT
2166 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2167 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2168 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2169   echo $ECHO_N "(cached) $ECHO_C" >&6
2170 else
2171   cat >conftest.$ac_ext <<_ACEOF
2172 #line $LINENO "configure"
2173 #include "confdefs.h"
2174
2175 #ifdef F77_DUMMY_MAIN
2176 #  ifdef __cplusplus
2177      extern "C"
2178 #  endif
2179    int F77_DUMMY_MAIN() { return 1; }
2180 #endif
2181 int
2182 main ()
2183 {
2184 #ifndef __GNUC__
2185        choke me
2186 #endif
2187
2188   ;
2189   return 0;
2190 }
2191 _ACEOF
2192 rm -f conftest.$ac_objext
2193 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2194   (eval $ac_compile) 2>&5
2195   ac_status=$?
2196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2197   (exit $ac_status); } &&
2198          { ac_try='test -s conftest.$ac_objext'
2199   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2200   (eval $ac_try) 2>&5
2201   ac_status=$?
2202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2203   (exit $ac_status); }; }; then
2204   ac_compiler_gnu=yes
2205 else
2206   echo "$as_me: failed program was:" >&5
2207 cat conftest.$ac_ext >&5
2208 ac_compiler_gnu=no
2209 fi
2210 rm -f conftest.$ac_objext conftest.$ac_ext
2211 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2212
2213 fi
2214 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2215 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2216 GCC=`test $ac_compiler_gnu = yes && echo yes`
2217 ac_test_CFLAGS=${CFLAGS+set}
2218 ac_save_CFLAGS=$CFLAGS
2219 CFLAGS="-g"
2220 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2221 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2222 if test "${ac_cv_prog_cc_g+set}" = set; then
2223   echo $ECHO_N "(cached) $ECHO_C" >&6
2224 else
2225   cat >conftest.$ac_ext <<_ACEOF
2226 #line $LINENO "configure"
2227 #include "confdefs.h"
2228
2229 #ifdef F77_DUMMY_MAIN
2230 #  ifdef __cplusplus
2231      extern "C"
2232 #  endif
2233    int F77_DUMMY_MAIN() { return 1; }
2234 #endif
2235 int
2236 main ()
2237 {
2238
2239   ;
2240   return 0;
2241 }
2242 _ACEOF
2243 rm -f conftest.$ac_objext
2244 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2245   (eval $ac_compile) 2>&5
2246   ac_status=$?
2247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2248   (exit $ac_status); } &&
2249          { ac_try='test -s conftest.$ac_objext'
2250   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2251   (eval $ac_try) 2>&5
2252   ac_status=$?
2253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2254   (exit $ac_status); }; }; then
2255   ac_cv_prog_cc_g=yes
2256 else
2257   echo "$as_me: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2259 ac_cv_prog_cc_g=no
2260 fi
2261 rm -f conftest.$ac_objext conftest.$ac_ext
2262 fi
2263 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2264 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2265 if test "$ac_test_CFLAGS" = set; then
2266   CFLAGS=$ac_save_CFLAGS
2267 elif test $ac_cv_prog_cc_g = yes; then
2268   if test "$GCC" = yes; then
2269     CFLAGS="-g -O2"
2270   else
2271     CFLAGS="-g"
2272   fi
2273 else
2274   if test "$GCC" = yes; then
2275     CFLAGS="-O2"
2276   else
2277     CFLAGS=
2278   fi
2279 fi
2280 # Some people use a C++ compiler to compile C.  Since we use `exit',
2281 # in C++ we need to declare it.  In case someone uses the same compiler
2282 # for both compiling C and C++ we need to have the C++ compiler decide
2283 # the declaration of exit, since it's the most demanding environment.
2284 cat >conftest.$ac_ext <<_ACEOF
2285 #ifndef __cplusplus
2286   choke me
2287 #endif
2288 _ACEOF
2289 rm -f conftest.$ac_objext
2290 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2291   (eval $ac_compile) 2>&5
2292   ac_status=$?
2293   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2294   (exit $ac_status); } &&
2295          { ac_try='test -s conftest.$ac_objext'
2296   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2297   (eval $ac_try) 2>&5
2298   ac_status=$?
2299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2300   (exit $ac_status); }; }; then
2301   for ac_declaration in \
2302    ''\
2303    '#include <stdlib.h>' \
2304    'extern "C" void std::exit (int) throw (); using std::exit;' \
2305    'extern "C" void std::exit (int); using std::exit;' \
2306    'extern "C" void exit (int) throw ();' \
2307    'extern "C" void exit (int);' \
2308    'void exit (int);'
2309 do
2310   cat >conftest.$ac_ext <<_ACEOF
2311 #line $LINENO "configure"
2312 #include "confdefs.h"
2313 #include <stdlib.h>
2314 $ac_declaration
2315 #ifdef F77_DUMMY_MAIN
2316 #  ifdef __cplusplus
2317      extern "C"
2318 #  endif
2319    int F77_DUMMY_MAIN() { return 1; }
2320 #endif
2321 int
2322 main ()
2323 {
2324 exit (42);
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 rm -f conftest.$ac_objext
2330 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2331   (eval $ac_compile) 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   :
2342 else
2343   echo "$as_me: failed program was:" >&5
2344 cat conftest.$ac_ext >&5
2345 continue
2346 fi
2347 rm -f conftest.$ac_objext conftest.$ac_ext
2348   cat >conftest.$ac_ext <<_ACEOF
2349 #line $LINENO "configure"
2350 #include "confdefs.h"
2351 $ac_declaration
2352 #ifdef F77_DUMMY_MAIN
2353 #  ifdef __cplusplus
2354      extern "C"
2355 #  endif
2356    int F77_DUMMY_MAIN() { return 1; }
2357 #endif
2358 int
2359 main ()
2360 {
2361 exit (42);
2362   ;
2363   return 0;
2364 }
2365 _ACEOF
2366 rm -f conftest.$ac_objext
2367 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2368   (eval $ac_compile) 2>&5
2369   ac_status=$?
2370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2371   (exit $ac_status); } &&
2372          { ac_try='test -s conftest.$ac_objext'
2373   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2377   (exit $ac_status); }; }; then
2378   break
2379 else
2380   echo "$as_me: failed program was:" >&5
2381 cat conftest.$ac_ext >&5
2382 fi
2383 rm -f conftest.$ac_objext conftest.$ac_ext
2384 done
2385 rm -f conftest*
2386 if test -n "$ac_declaration"; then
2387   echo '#ifdef __cplusplus' >>confdefs.h
2388   echo $ac_declaration      >>confdefs.h
2389   echo '#endif'             >>confdefs.h
2390 fi
2391
2392 else
2393   echo "$as_me: failed program was:" >&5
2394 cat conftest.$ac_ext >&5
2395 fi
2396 rm -f conftest.$ac_objext conftest.$ac_ext
2397 ac_ext=c
2398 ac_cpp='$CPP $CPPFLAGS'
2399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2402
2403
2404 unset CFLAGS
2405
2406 #
2407 # Read the template
2408 #
2409 . "$srcdir/src/template/$template" || exit
2410
2411 # CFLAGS are selected so:
2412 # If the user specifies something in the environment, that is used.
2413 # else:  If the template file set something, that is used.
2414 # else:  If the compiler is GCC, then we use -O2.
2415 # else:  If the compiler is something else, then we use -0.
2416
2417 if test "$ac_env_CFLAGS_set" = set; then
2418   CFLAGS=$ac_env_CFLAGS_value
2419 elif test "${CFLAGS+set}" = set; then
2420   : # (keep what template set)
2421 elif test "$GCC" = yes; then
2422   CFLAGS="-O2"
2423 else
2424   # if the user selected debug mode, don't use -O
2425   if test "$enable_debug" != yes; then
2426     CFLAGS="-O"
2427   fi
2428 fi
2429
2430 # Need to specify -fno-strict-aliasing too in case it's gcc 3.3 or later.
2431 echo "$as_me:$LINENO: checking how to turn off strict aliasing in $CC" >&5
2432 echo $ECHO_N "checking how to turn off strict aliasing in $CC... $ECHO_C" >&6
2433 if test "${pgac_cv_prog_cc_no_strict_aliasing+set}" = set; then
2434   echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436   pgac_save_CFLAGS=$CFLAGS
2437 if test "$GCC" = yes; then
2438   pgac_try="-fno-strict-aliasing"
2439 else
2440   # Maybe fill in later...
2441   pgac_try=
2442 fi
2443
2444 for pgac_flag in $pgac_try; do
2445   CFLAGS="$pgac_save_CFLAGS $pgac_flag"
2446   cat >conftest.$ac_ext <<_ACEOF
2447 #line $LINENO "configure"
2448 #include "confdefs.h"
2449
2450 #ifdef F77_DUMMY_MAIN
2451 #  ifdef __cplusplus
2452      extern "C"
2453 #  endif
2454    int F77_DUMMY_MAIN() { return 1; }
2455 #endif
2456 int
2457 main ()
2458 {
2459
2460   ;
2461   return 0;
2462 }
2463 _ACEOF
2464 rm -f conftest.$ac_objext
2465 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2466   (eval $ac_compile) 2>&5
2467   ac_status=$?
2468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469   (exit $ac_status); } &&
2470          { ac_try='test -s conftest.$ac_objext'
2471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2472   (eval $ac_try) 2>&5
2473   ac_status=$?
2474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2475   (exit $ac_status); }; }; then
2476   pgac_cv_prog_cc_no_strict_aliasing=$pgac_try
2477 break
2478 else
2479   echo "$as_me: failed program was:" >&5
2480 cat conftest.$ac_ext >&5
2481 fi
2482 rm -f conftest.$ac_objext conftest.$ac_ext
2483 done
2484
2485 CFLAGS=$pgac_save_CFLAGS
2486
2487 fi
2488 echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_no_strict_aliasing" >&5
2489 echo "${ECHO_T}$pgac_cv_prog_cc_no_strict_aliasing" >&6
2490
2491 if test x"$pgac_cv_prog_cc_no_strict_aliasing" != x""; then
2492   CFLAGS="$CFLAGS $pgac_cv_prog_cc_no_strict_aliasing"
2493 fi
2494
2495 # supply -g if --enable-debug
2496 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2497   CFLAGS="$CFLAGS -g"
2498 fi
2499
2500 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2501 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2502
2503 # We already have this in Makefile.win32, but configure needs it too
2504 if test "$PORTNAME" = "win32"; then
2505   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
2506 fi
2507
2508 # Check if the compiler still works with the template settings
2509 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2510 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2511
2512 cat >conftest.$ac_ext <<_ACEOF
2513 #line $LINENO "configure"
2514 #include "confdefs.h"
2515
2516 #ifdef F77_DUMMY_MAIN
2517 #  ifdef __cplusplus
2518      extern "C"
2519 #  endif
2520    int F77_DUMMY_MAIN() { return 1; }
2521 #endif
2522 int
2523 main ()
2524 {
2525 return 0;
2526   ;
2527   return 0;
2528 }
2529 _ACEOF
2530 rm -f conftest.$ac_objext conftest$ac_exeext
2531 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2532   (eval $ac_link) 2>&5
2533   ac_status=$?
2534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535   (exit $ac_status); } &&
2536          { ac_try='test -s conftest$ac_exeext'
2537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2538   (eval $ac_try) 2>&5
2539   ac_status=$?
2540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541   (exit $ac_status); }; }; then
2542   echo "$as_me:$LINENO: result: yes" >&5
2543 echo "${ECHO_T}yes" >&6
2544 else
2545   echo "$as_me: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2547 echo "$as_me:$LINENO: result: no" >&5
2548 echo "${ECHO_T}no" >&6
2549    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2550 echo "$as_me: error: cannot proceed" >&2;}
2551    { (exit 1); exit 1; }; }
2552 fi
2553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2554
2555 # Defend against gcc -ffast-math
2556 if test "$GCC" = yes; then
2557 cat >conftest.$ac_ext <<_ACEOF
2558 #line $LINENO "configure"
2559 #include "confdefs.h"
2560
2561 #ifdef F77_DUMMY_MAIN
2562 #  ifdef __cplusplus
2563      extern "C"
2564 #  endif
2565    int F77_DUMMY_MAIN() { return 1; }
2566 #endif
2567 int
2568 main ()
2569 {
2570 #ifdef __FAST_MATH__
2571 choke me
2572 #endif
2573   ;
2574   return 0;
2575 }
2576 _ACEOF
2577 rm -f conftest.$ac_objext
2578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2579   (eval $ac_compile) 2>&5
2580   ac_status=$?
2581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2582   (exit $ac_status); } &&
2583          { ac_try='test -s conftest.$ac_objext'
2584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2585   (eval $ac_try) 2>&5
2586   ac_status=$?
2587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2588   (exit $ac_status); }; }; then
2589   :
2590 else
2591   echo "$as_me: failed program was:" >&5
2592 cat conftest.$ac_ext >&5
2593 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
2594 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
2595    { (exit 1); exit 1; }; }
2596 fi
2597 rm -f conftest.$ac_objext conftest.$ac_ext
2598 fi
2599
2600 ac_ext=c
2601 ac_cpp='$CPP $CPPFLAGS'
2602 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2603 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2604 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2605 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2606 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2607 # On Suns, sometimes $CPP names a directory.
2608 if test -n "$CPP" && test -d "$CPP"; then
2609   CPP=
2610 fi
2611 if test -z "$CPP"; then
2612   if test "${ac_cv_prog_CPP+set}" = set; then
2613   echo $ECHO_N "(cached) $ECHO_C" >&6
2614 else
2615       # Double quotes because CPP needs to be expanded
2616     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2617     do
2618       ac_preproc_ok=false
2619 for ac_c_preproc_warn_flag in '' yes
2620 do
2621   # Use a header file that comes with gcc, so configuring glibc
2622   # with a fresh cross-compiler works.
2623   # On the NeXT, cc -E runs the code through the compiler's parser,
2624   # not just through cpp. "Syntax error" is here to catch this case.
2625   cat >conftest.$ac_ext <<_ACEOF
2626 #line $LINENO "configure"
2627 #include "confdefs.h"
2628 #include <assert.h>
2629                      Syntax error
2630 _ACEOF
2631 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2632   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2633   ac_status=$?
2634   egrep -v '^ *\+' conftest.er1 >conftest.err
2635   rm -f conftest.er1
2636   cat conftest.err >&5
2637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638   (exit $ac_status); } >/dev/null; then
2639   if test -s conftest.err; then
2640     ac_cpp_err=$ac_c_preproc_warn_flag
2641   else
2642     ac_cpp_err=
2643   fi
2644 else
2645   ac_cpp_err=yes
2646 fi
2647 if test -z "$ac_cpp_err"; then
2648   :
2649 else
2650   echo "$as_me: failed program was:" >&5
2651   cat conftest.$ac_ext >&5
2652   # Broken: fails on valid input.
2653 continue
2654 fi
2655 rm -f conftest.err conftest.$ac_ext
2656
2657   # OK, works on sane cases.  Now check whether non-existent headers
2658   # can be detected and how.
2659   cat >conftest.$ac_ext <<_ACEOF
2660 #line $LINENO "configure"
2661 #include "confdefs.h"
2662 #include <ac_nonexistent.h>
2663 _ACEOF
2664 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2665   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2666   ac_status=$?
2667   egrep -v '^ *\+' conftest.er1 >conftest.err
2668   rm -f conftest.er1
2669   cat conftest.err >&5
2670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2671   (exit $ac_status); } >/dev/null; then
2672   if test -s conftest.err; then
2673     ac_cpp_err=$ac_c_preproc_warn_flag
2674   else
2675     ac_cpp_err=
2676   fi
2677 else
2678   ac_cpp_err=yes
2679 fi
2680 if test -z "$ac_cpp_err"; then
2681   # Broken: success on invalid input.
2682 continue
2683 else
2684   echo "$as_me: failed program was:" >&5
2685   cat conftest.$ac_ext >&5
2686   # Passes both tests.
2687 ac_preproc_ok=:
2688 break
2689 fi
2690 rm -f conftest.err conftest.$ac_ext
2691
2692 done
2693 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2694 rm -f conftest.err conftest.$ac_ext
2695 if $ac_preproc_ok; then
2696   break
2697 fi
2698
2699     done
2700     ac_cv_prog_CPP=$CPP
2701
2702 fi
2703   CPP=$ac_cv_prog_CPP
2704 else
2705   ac_cv_prog_CPP=$CPP
2706 fi
2707 echo "$as_me:$LINENO: result: $CPP" >&5
2708 echo "${ECHO_T}$CPP" >&6
2709 ac_preproc_ok=false
2710 for ac_c_preproc_warn_flag in '' yes
2711 do
2712   # Use a header file that comes with gcc, so configuring glibc
2713   # with a fresh cross-compiler works.
2714   # On the NeXT, cc -E runs the code through the compiler's parser,
2715   # not just through cpp. "Syntax error" is here to catch this case.
2716   cat >conftest.$ac_ext <<_ACEOF
2717 #line $LINENO "configure"
2718 #include "confdefs.h"
2719 #include <assert.h>
2720                      Syntax error
2721 _ACEOF
2722 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2724   ac_status=$?
2725   egrep -v '^ *\+' conftest.er1 >conftest.err
2726   rm -f conftest.er1
2727   cat conftest.err >&5
2728   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2729   (exit $ac_status); } >/dev/null; then
2730   if test -s conftest.err; then
2731     ac_cpp_err=$ac_c_preproc_warn_flag
2732   else
2733     ac_cpp_err=
2734   fi
2735 else
2736   ac_cpp_err=yes
2737 fi
2738 if test -z "$ac_cpp_err"; then
2739   :
2740 else
2741   echo "$as_me: failed program was:" >&5
2742   cat conftest.$ac_ext >&5
2743   # Broken: fails on valid input.
2744 continue
2745 fi
2746 rm -f conftest.err conftest.$ac_ext
2747
2748   # OK, works on sane cases.  Now check whether non-existent headers
2749   # can be detected and how.
2750   cat >conftest.$ac_ext <<_ACEOF
2751 #line $LINENO "configure"
2752 #include "confdefs.h"
2753 #include <ac_nonexistent.h>
2754 _ACEOF
2755 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2756   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2757   ac_status=$?
2758   egrep -v '^ *\+' conftest.er1 >conftest.err
2759   rm -f conftest.er1
2760   cat conftest.err >&5
2761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2762   (exit $ac_status); } >/dev/null; then
2763   if test -s conftest.err; then
2764     ac_cpp_err=$ac_c_preproc_warn_flag
2765   else
2766     ac_cpp_err=
2767   fi
2768 else
2769   ac_cpp_err=yes
2770 fi
2771 if test -z "$ac_cpp_err"; then
2772   # Broken: success on invalid input.
2773 continue
2774 else
2775   echo "$as_me: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   # Passes both tests.
2778 ac_preproc_ok=:
2779 break
2780 fi
2781 rm -f conftest.err conftest.$ac_ext
2782
2783 done
2784 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2785 rm -f conftest.err conftest.$ac_ext
2786 if $ac_preproc_ok; then
2787   :
2788 else
2789   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2790 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2791    { (exit 1); exit 1; }; }
2792 fi
2793
2794 ac_ext=c
2795 ac_cpp='$CPP $CPPFLAGS'
2796 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2797 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2798 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2799
2800
2801
2802 # Create compiler version string
2803 if test x"$GCC" = x"yes" ; then
2804   cc_string="GCC `${CC} --version | sed q`"
2805 else
2806   cc_string=$CC
2807 fi
2808
2809 cat >>confdefs.h <<_ACEOF
2810 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
2811 _ACEOF
2812
2813
2814
2815 #
2816 # Set up TAS assembly code if needed; the template file has now had its
2817 # chance to request this.
2818 #
2819 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
2820
2821
2822 if test "$need_tas" = yes ; then
2823   TAS=tas.o
2824 else
2825   TAS=""
2826 fi
2827
2828
2829
2830 #
2831 # Automatic dependency tracking
2832 #
2833
2834
2835 # Check whether --enable-depend or --disable-depend was given.
2836 if test "${enable_depend+set}" = set; then
2837   enableval="$enable_depend"
2838
2839   case $enableval in
2840     yes)
2841       autodepend=yes
2842       ;;
2843     no)
2844       :
2845       ;;
2846     *)
2847       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
2848 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
2849    { (exit 1); exit 1; }; }
2850       ;;
2851   esac
2852
2853 else
2854   enable_depend=no
2855
2856 fi;
2857
2858
2859
2860
2861 #
2862 # Enable assert checks
2863 #
2864
2865
2866 # Check whether --enable-cassert or --disable-cassert was given.
2867 if test "${enable_cassert+set}" = set; then
2868   enableval="$enable_cassert"
2869
2870   case $enableval in
2871     yes)
2872
2873 cat >>confdefs.h <<\_ACEOF
2874 #define USE_ASSERT_CHECKING 1
2875 _ACEOF
2876
2877       ;;
2878     no)
2879       :
2880       ;;
2881     *)
2882       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
2883 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
2884    { (exit 1); exit 1; }; }
2885       ;;
2886   esac
2887
2888 else
2889   enable_cassert=no
2890
2891 fi;
2892
2893
2894
2895 #
2896 # Include directories
2897 #
2898 ac_save_IFS=$IFS
2899 IFS="${IFS}${PATH_SEPARATOR}"
2900 # SRCH_INC comes from the template file
2901 for dir in $with_includes $SRCH_INC; do
2902   if test -d "$dir"; then
2903     INCLUDES="$INCLUDES -I$dir"
2904   else
2905     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
2906 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
2907   fi
2908 done
2909 IFS=$ac_save_IFS
2910
2911
2912
2913 #
2914 # Library directories
2915 #
2916 ac_save_IFS=$IFS
2917 IFS="${IFS}${PATH_SEPARATOR}"
2918 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
2919 for dir in $LIBRARY_DIRS $SRCH_LIB; do
2920   if test -d "$dir"; then
2921     LIBDIRS="$LIBDIRS -L$dir"
2922   else
2923     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
2924 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
2925   fi
2926 done
2927 IFS=$ac_save_IFS
2928
2929 #
2930 # Enable thread-safe client libraries
2931 #
2932 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
2933 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
2934
2935
2936 # Check whether --enable-thread-safety or --disable-thread-safety was given.
2937 if test "${enable_thread_safety+set}" = set; then
2938   enableval="$enable_thread_safety"
2939
2940   case $enableval in
2941     yes)
2942       :
2943       ;;
2944     no)
2945       :
2946       ;;
2947     *)
2948       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
2949 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
2950    { (exit 1); exit 1; }; }
2951       ;;
2952   esac
2953
2954 else
2955   enable_thread_safety=no
2956
2957 fi;
2958
2959
2960
2961 # Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
2962 if test "${enable_thread_safety_force+set}" = set; then
2963   enableval="$enable_thread_safety_force"
2964
2965   case $enableval in
2966     yes)
2967       :
2968       ;;
2969     no)
2970       :
2971       ;;
2972     *)
2973       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety-force option" >&5
2974 echo "$as_me: error: no argument expected for --enable-thread-safety-force option" >&2;}
2975    { (exit 1); exit 1; }; }
2976       ;;
2977   esac
2978
2979 else
2980   enable_thread_safety_force=no
2981
2982 fi;
2983
2984 if test "$enable_thread_safety" = yes -o \
2985         "$enable_thread_safety_force" = yes; then
2986   enable_thread_safety="yes"    # for 'force'
2987
2988 cat >>confdefs.h <<\_ACEOF
2989 #define ENABLE_THREAD_SAFETY 1
2990 _ACEOF
2991
2992 fi
2993 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
2994 echo "${ECHO_T}$enable_thread_safety" >&6
2995
2996
2997 #
2998 # Tcl/Tk
2999 #
3000 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
3001 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
3002
3003
3004
3005 # Check whether --with-tcl or --without-tcl was given.
3006 if test "${with_tcl+set}" = set; then
3007   withval="$with_tcl"
3008
3009   case $withval in
3010     yes)
3011       :
3012       ;;
3013     no)
3014       :
3015       ;;
3016     *)
3017       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
3018 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
3019    { (exit 1); exit 1; }; }
3020       ;;
3021   esac
3022
3023 else
3024   with_tcl=no
3025
3026 fi;
3027
3028 echo "$as_me:$LINENO: result: $with_tcl" >&5
3029 echo "${ECHO_T}$with_tcl" >&6
3030
3031
3032 # We see if the path to the Tcl/Tk configuration scripts is specified.
3033 # This will override the use of tclsh to find the paths to search.
3034
3035
3036
3037
3038 # Check whether --with-tclconfig or --without-tclconfig was given.
3039 if test "${with_tclconfig+set}" = set; then
3040   withval="$with_tclconfig"
3041
3042   case $withval in
3043     yes)
3044       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3045 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3046    { (exit 1); exit 1; }; }
3047       ;;
3048     no)
3049       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
3050 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
3051    { (exit 1); exit 1; }; }
3052       ;;
3053     *)
3054
3055       ;;
3056   esac
3057
3058 fi;
3059
3060
3061 #
3062 # Optionally build Perl modules (PL/Perl)
3063 #
3064 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
3065 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
3066
3067
3068
3069 # Check whether --with-perl or --without-perl was given.
3070 if test "${with_perl+set}" = set; then
3071   withval="$with_perl"
3072
3073   case $withval in
3074     yes)
3075       :
3076       ;;
3077     no)
3078       :
3079       ;;
3080     *)
3081       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3082 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3083    { (exit 1); exit 1; }; }
3084       ;;
3085   esac
3086
3087 else
3088   with_perl=no
3089
3090 fi;
3091
3092 echo "$as_me:$LINENO: result: $with_perl" >&5
3093 echo "${ECHO_T}$with_perl" >&6
3094
3095
3096 #
3097 # Optionally build Python modules (PL/Python)
3098 #
3099 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3100 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3101
3102
3103
3104 # Check whether --with-python or --without-python was given.
3105 if test "${with_python+set}" = set; then
3106   withval="$with_python"
3107
3108   case $withval in
3109     yes)
3110       :
3111       ;;
3112     no)
3113       :
3114       ;;
3115     *)
3116       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3117 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3118    { (exit 1); exit 1; }; }
3119       ;;
3120   esac
3121
3122 else
3123   with_python=no
3124
3125 fi;
3126
3127 echo "$as_me:$LINENO: result: $with_python" >&5
3128 echo "${ECHO_T}$with_python" >&6
3129
3130
3131 #
3132 # Kerberos 4
3133 #
3134 echo "$as_me:$LINENO: checking whether to build with Kerberos 4 support" >&5
3135 echo $ECHO_N "checking whether to build with Kerberos 4 support... $ECHO_C" >&6
3136
3137
3138
3139 # Check whether --with-krb4 or --without-krb4 was given.
3140 if test "${with_krb4+set}" = set; then
3141   withval="$with_krb4"
3142
3143   case $withval in
3144     yes)
3145
3146
3147 cat >>confdefs.h <<\_ACEOF
3148 #define KRB4 1
3149 _ACEOF
3150
3151   krb_srvtab="/etc/srvtab"
3152
3153       ;;
3154     no)
3155       :
3156       ;;
3157     *)
3158       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb4 option" >&5
3159 echo "$as_me: error: no argument expected for --with-krb4 option" >&2;}
3160    { (exit 1); exit 1; }; }
3161       ;;
3162   esac
3163
3164 else
3165   with_krb4=no
3166
3167 fi;
3168
3169 echo "$as_me:$LINENO: result: $with_krb4" >&5
3170 echo "${ECHO_T}$with_krb4" >&6
3171
3172
3173
3174 #
3175 # Kerberos 5
3176 #
3177 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3178 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3179
3180
3181
3182 # Check whether --with-krb5 or --without-krb5 was given.
3183 if test "${with_krb5+set}" = set; then
3184   withval="$with_krb5"
3185
3186   case $withval in
3187     yes)
3188
3189
3190 cat >>confdefs.h <<\_ACEOF
3191 #define KRB5 1
3192 _ACEOF
3193
3194   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3195
3196       ;;
3197     no)
3198       :
3199       ;;
3200     *)
3201       { { echo "$as_me:$LINENO: error: no argument expected for --with-krb5 option" >&5
3202 echo "$as_me: error: no argument expected for --with-krb5 option" >&2;}
3203    { (exit 1); exit 1; }; }
3204       ;;
3205   esac
3206
3207 else
3208   with_krb5=no
3209
3210 fi;
3211
3212 echo "$as_me:$LINENO: result: $with_krb5" >&5
3213 echo "${ECHO_T}$with_krb5" >&6
3214
3215
3216
3217 # Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
3218 if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
3219   { { echo "$as_me:$LINENO: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&5
3220 echo "$as_me: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&2;}
3221    { (exit 1); exit 1; }; }
3222 fi
3223
3224
3225
3226
3227 #
3228 # Kerberos configuration parameters
3229 #
3230
3231
3232
3233 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3234 if test "${with_krb_srvnam+set}" = set; then
3235   withval="$with_krb_srvnam"
3236
3237   case $withval in
3238     yes)
3239       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3240 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3241    { (exit 1); exit 1; }; }
3242       ;;
3243     no)
3244       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3245 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3246    { (exit 1); exit 1; }; }
3247       ;;
3248     *)
3249
3250       ;;
3251   esac
3252
3253 else
3254   with_krb_srvnam="postgres"
3255 fi;
3256
3257
3258 cat >>confdefs.h <<_ACEOF
3259 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3260 _ACEOF
3261
3262
3263
3264 #
3265 # PAM
3266 #
3267 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3268 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3269
3270
3271
3272 # Check whether --with-pam or --without-pam was given.
3273 if test "${with_pam+set}" = set; then
3274   withval="$with_pam"
3275
3276   case $withval in
3277     yes)
3278
3279 cat >>confdefs.h <<\_ACEOF
3280 #define USE_PAM 1
3281 _ACEOF
3282
3283       ;;
3284     no)
3285       :
3286       ;;
3287     *)
3288       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3289 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3290    { (exit 1); exit 1; }; }
3291       ;;
3292   esac
3293
3294 else
3295   with_pam=no
3296
3297 fi;
3298
3299 echo "$as_me:$LINENO: result: $with_pam" >&5
3300 echo "${ECHO_T}$with_pam" >&6
3301
3302
3303
3304 #
3305 # Rendezvous
3306 #
3307 echo "$as_me:$LINENO: checking whether to build with Rendezvous support" >&5
3308 echo $ECHO_N "checking whether to build with Rendezvous support... $ECHO_C" >&6
3309
3310
3311
3312 # Check whether --with-rendezvous or --without-rendezvous was given.
3313 if test "${with_rendezvous+set}" = set; then
3314   withval="$with_rendezvous"
3315
3316   case $withval in
3317     yes)
3318
3319 cat >>confdefs.h <<\_ACEOF
3320 #define USE_RENDEZVOUS 1
3321 _ACEOF
3322
3323       ;;
3324     no)
3325       :
3326       ;;
3327     *)
3328       { { echo "$as_me:$LINENO: error: no argument expected for --with-rendezvous option" >&5
3329 echo "$as_me: error: no argument expected for --with-rendezvous option" >&2;}
3330    { (exit 1); exit 1; }; }
3331       ;;
3332   esac
3333
3334 else
3335   with_rendezvous=no
3336
3337 fi;
3338
3339 echo "$as_me:$LINENO: result: $with_rendezvous" >&5
3340 echo "${ECHO_T}$with_rendezvous" >&6
3341
3342
3343
3344 #
3345 # OpenSSL
3346 #
3347 echo "$as_me:$LINENO: checking whether to build with OpenSSL support" >&5
3348 echo $ECHO_N "checking whether to build with OpenSSL support... $ECHO_C" >&6
3349
3350
3351
3352 # Check whether --with-openssl or --without-openssl was given.
3353 if test "${with_openssl+set}" = set; then
3354   withval="$with_openssl"
3355
3356   case $withval in
3357     yes)
3358
3359 cat >>confdefs.h <<\_ACEOF
3360 #define USE_SSL 1
3361 _ACEOF
3362
3363       ;;
3364     no)
3365       :
3366       ;;
3367     *)
3368       { { echo "$as_me:$LINENO: error: no argument expected for --with-openssl option" >&5
3369 echo "$as_me: error: no argument expected for --with-openssl option" >&2;}
3370    { (exit 1); exit 1; }; }
3371       ;;
3372   esac
3373
3374 else
3375   with_openssl=no
3376
3377 fi;
3378
3379 echo "$as_me:$LINENO: result: $with_openssl" >&5
3380 echo "${ECHO_T}$with_openssl" >&6
3381
3382
3383
3384 #
3385 # Readline
3386 #
3387
3388
3389
3390 # Check whether --with-readline or --without-readline was given.
3391 if test "${with_readline+set}" = set; then
3392   withval="$with_readline"
3393
3394   case $withval in
3395     yes)
3396       :
3397       ;;
3398     no)
3399       :
3400       ;;
3401     *)
3402       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3403 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3404    { (exit 1); exit 1; }; }
3405       ;;
3406   esac
3407
3408 else
3409   with_readline=yes
3410
3411 fi;
3412
3413 # readline on MinGW has problems with backslashes in psql and other bugs.
3414 # This is particularly a problem with non-US code pages.
3415 # Therefore disable its use until we understand the cause. 2004-07-20
3416 if test "$PORTNAME" = "win32"; then
3417   if test "$with_readline" = yes; then
3418     { echo "$as_me:$LINENO: WARNING: *** Readline does not work on MinGW --- disabling" >&5
3419 echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
3420     with_readline=no
3421   fi
3422 fi
3423
3424
3425 #
3426 # Zlib
3427 #
3428
3429
3430
3431 # Check whether --with-zlib or --without-zlib was given.
3432 if test "${with_zlib+set}" = set; then
3433   withval="$with_zlib"
3434
3435   case $withval in
3436     yes)
3437       :
3438       ;;
3439     no)
3440       :
3441       ;;
3442     *)
3443       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3444 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3445    { (exit 1); exit 1; }; }
3446       ;;
3447   esac
3448
3449 else
3450   with_zlib=yes
3451
3452 fi;
3453
3454
3455 #
3456 # Elf
3457 #
3458
3459 # Assume system is ELF if it predefines __ELF__ as 1,
3460 # otherwise believe host_os based default.
3461 case $host_os in
3462     freebsd1*|freebsd2*) elf=no;;
3463     freebsd3*|freebsd4*) elf=yes;;
3464 esac
3465
3466
3467 cat >conftest.$ac_ext <<_ACEOF
3468 #line $LINENO "configure"
3469 #include "confdefs.h"
3470 #if __ELF__
3471   yes
3472 #endif
3473
3474 _ACEOF
3475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3476   egrep "yes" >/dev/null 2>&1; then
3477   ELF_SYS=true
3478 else
3479   if test "X$elf" = "Xyes" ; then
3480   ELF_SYS=true
3481 else
3482   ELF_SYS=
3483 fi
3484 fi
3485 rm -f conftest*
3486
3487
3488
3489 #
3490 # Assignments
3491 #
3492
3493 CPPFLAGS="$CPPFLAGS $INCLUDES"
3494 LDFLAGS="$LDFLAGS $LIBDIRS"
3495
3496 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3497 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3498 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3499 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3500
3501
3502 for ac_prog in gawk mawk nawk awk
3503 do
3504   # Extract the first word of "$ac_prog", so it can be a program name with args.
3505 set dummy $ac_prog; ac_word=$2
3506 echo "$as_me:$LINENO: checking for $ac_word" >&5
3507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3508 if test "${ac_cv_prog_AWK+set}" = set; then
3509   echo $ECHO_N "(cached) $ECHO_C" >&6
3510 else
3511   if test -n "$AWK"; then
3512   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3513 else
3514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515 for as_dir in $PATH
3516 do
3517   IFS=$as_save_IFS
3518   test -z "$as_dir" && as_dir=.
3519   for ac_exec_ext in '' $ac_executable_extensions; do
3520   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3521     ac_cv_prog_AWK="$ac_prog"
3522     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3523     break 2
3524   fi
3525 done
3526 done
3527
3528 fi
3529 fi
3530 AWK=$ac_cv_prog_AWK
3531 if test -n "$AWK"; then
3532   echo "$as_me:$LINENO: result: $AWK" >&5
3533 echo "${ECHO_T}$AWK" >&6
3534 else
3535   echo "$as_me:$LINENO: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537 fi
3538
3539   test -n "$AWK" && break
3540 done
3541
3542 echo "$as_me:$LINENO: checking for flex" >&5
3543 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3544 if test "${pgac_cv_path_flex+set}" = set; then
3545   echo $ECHO_N "(cached) $ECHO_C" >&6
3546 else
3547   # Let the user override the test
3548 if test -n "$FLEX"; then
3549   pgac_cv_path_flex=$FLEX
3550 else
3551   pgac_save_IFS=$IFS
3552   IFS=$PATH_SEPARATOR
3553   for pgac_dir in $PATH; do
3554     IFS=$pgac_save_IFS
3555     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3556       pgac_dir=`pwd`
3557     fi
3558     for pgac_prog in flex lex; do
3559       pgac_candidate="$pgac_dir/$pgac_prog"
3560       if test -f "$pgac_candidate" \
3561         && $pgac_candidate --version </dev/null >/dev/null 2>&1
3562       then
3563         echo '%%'  > conftest.l
3564         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
3565           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
3566             pgac_broken_flex=$pgac_candidate
3567             continue
3568           fi
3569
3570           pgac_cv_path_flex=$pgac_candidate
3571           break 2
3572         fi
3573       fi
3574     done
3575   done
3576   rm -f conftest.l lex.yy.c
3577   : ${pgac_cv_path_flex=no}
3578 fi
3579
3580 fi
3581 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
3582 echo "${ECHO_T}$pgac_cv_path_flex" >&6
3583 if test x"$pgac_cv_path_flex" = x"no"; then
3584   if test -n "$pgac_broken_flex"; then
3585     { echo "$as_me:$LINENO: WARNING:
3586 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
3587 *** should get version 2.5.4 or later." >&5
3588 echo "$as_me: WARNING:
3589 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
3590 *** should get version 2.5.4 or later." >&2;}
3591   fi
3592
3593   { echo "$as_me:$LINENO: WARNING:
3594 *** Without Flex you will not be able to build PostgreSQL from CVS or
3595 *** change any of the scanner definition files.  You can obtain Flex from
3596 *** a GNU mirror site.  (If you are using the official distribution of
3597 *** PostgreSQL then you do not need to worry about this because the Flex
3598 *** output is pre-generated.)" >&5
3599 echo "$as_me: WARNING:
3600 *** Without Flex you will not be able to build PostgreSQL from CVS or
3601 *** change any of the scanner definition files.  You can obtain Flex from
3602 *** a GNU mirror site.  (If you are using the official distribution of
3603 *** PostgreSQL then you do not need to worry about this because the Flex
3604 *** output is pre-generated.)" >&2;}
3605 fi
3606
3607 if test x"$pgac_cv_path_flex" = x"no"; then
3608   FLEX=
3609 else
3610   FLEX=$pgac_cv_path_flex
3611 fi
3612
3613
3614
3615
3616 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3617 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3618 LN_S=$as_ln_s
3619 if test "$LN_S" = "ln -s"; then
3620   echo "$as_me:$LINENO: result: yes" >&5
3621 echo "${ECHO_T}yes" >&6
3622 else
3623   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3624 echo "${ECHO_T}no, using $LN_S" >&6
3625 fi
3626
3627
3628 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3629 if test "${with_gnu_ld+set}" = set; then
3630   withval="$with_gnu_ld"
3631   test "$withval" = no || with_gnu_ld=yes
3632 else
3633   with_gnu_ld=no
3634 fi;
3635 ac_prog=ld
3636 if test "$GCC" = yes; then
3637   # Check if gcc -print-prog-name=ld gives a path.
3638   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3639 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3640   case $host in
3641   *-*-mingw*)
3642     # gcc leaves a trailing carriage return which upsets mingw
3643     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3644   *)
3645     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3646   esac
3647   case "$ac_prog" in
3648     # Accept absolute paths.
3649     [\\/]* | [A-Za-z]:[\\/]*)
3650       re_direlt='/[^/][^/]*/\.\./'
3651       # Canonicalize the path of ld
3652       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3653       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3654         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3655       done
3656       test -z "$LD" && LD="$ac_prog"
3657       ;;
3658   "")
3659     # If it fails, then pretend we aren't using GCC.
3660     ac_prog=ld
3661     ;;
3662   *)
3663     # If it is relative, then search for the first ld in PATH.
3664     with_gnu_ld=unknown
3665     ;;
3666   esac
3667 elif test "$with_gnu_ld" = yes; then
3668   echo "$as_me:$LINENO: checking for GNU ld" >&5
3669 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3670 else
3671   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3672 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3673 fi
3674 if test "${ac_cv_path_LD+set}" = set; then
3675   echo $ECHO_N "(cached) $ECHO_C" >&6
3676 else
3677   if test -z "$LD"; then
3678   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3679   for ac_dir in $PATH; do
3680     test -z "$ac_dir" && ac_dir=.
3681     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3682       ac_cv_path_LD="$ac_dir/$ac_prog"
3683       # Check to see if the program is GNU ld.  I'd rather use --version,
3684       # but apparently some GNU ld's only accept -v.
3685       # Break only if it was the GNU/non-GNU ld that we prefer.
3686       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3687         test "$with_gnu_ld" != no && break
3688       else
3689         test "$with_gnu_ld" != yes && break
3690       fi
3691     fi
3692   done
3693   IFS="$ac_save_ifs"
3694 else
3695   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3696 fi
3697 fi
3698
3699 LD="$ac_cv_path_LD"
3700 if test -n "$LD"; then
3701   echo "$as_me:$LINENO: result: $LD" >&5
3702 echo "${ECHO_T}$LD" >&6
3703 else
3704   echo "$as_me:$LINENO: result: no" >&5
3705 echo "${ECHO_T}no" >&6
3706 fi
3707 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3708 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3709    { (exit 1); exit 1; }; }
3710 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3711 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3712 if test "${ac_cv_prog_gnu_ld+set}" = set; then
3713   echo $ECHO_N "(cached) $ECHO_C" >&6
3714 else
3715   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3716 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3717   ac_cv_prog_gnu_ld=yes
3718 else
3719   ac_cv_prog_gnu_ld=no
3720 fi
3721 fi
3722 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
3723 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
3724 with_gnu_ld=$ac_cv_prog_gnu_ld
3725
3726
3727
3728
3729 case $host_os in sysv5*)
3730   echo "$as_me:$LINENO: checking whether ld -R works" >&5
3731 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
3732 if test "${pgac_cv_prog_ld_R+set}" = set; then
3733   echo $ECHO_N "(cached) $ECHO_C" >&6
3734 else
3735
3736     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
3737     cat >conftest.$ac_ext <<_ACEOF
3738 #line $LINENO "configure"
3739 #include "confdefs.h"
3740
3741 #ifdef F77_DUMMY_MAIN
3742 #  ifdef __cplusplus
3743      extern "C"
3744 #  endif
3745    int F77_DUMMY_MAIN() { return 1; }
3746 #endif
3747 int
3748 main ()
3749 {
3750
3751   ;
3752   return 0;
3753 }
3754 _ACEOF
3755 rm -f conftest.$ac_objext conftest$ac_exeext
3756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3757   (eval $ac_link) 2>&5
3758   ac_status=$?
3759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760   (exit $ac_status); } &&
3761          { ac_try='test -s conftest$ac_exeext'
3762   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3763   (eval $ac_try) 2>&5
3764   ac_status=$?
3765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3766   (exit $ac_status); }; }; then
3767   pgac_cv_prog_ld_R=yes
3768 else
3769   echo "$as_me: failed program was:" >&5
3770 cat conftest.$ac_ext >&5
3771 pgac_cv_prog_ld_R=no
3772 fi
3773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3774     LDFLAGS=$pgac_save_LDFLAGS
3775
3776 fi
3777 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
3778 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
3779   ld_R_works=$pgac_cv_prog_ld_R
3780
3781 esac
3782 if test -n "$ac_tool_prefix"; then
3783   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3784 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3785 echo "$as_me:$LINENO: checking for $ac_word" >&5
3786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3787 if test "${ac_cv_prog_RANLIB+set}" = set; then
3788   echo $ECHO_N "(cached) $ECHO_C" >&6
3789 else
3790   if test -n "$RANLIB"; then
3791   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3792 else
3793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794 for as_dir in $PATH
3795 do
3796   IFS=$as_save_IFS
3797   test -z "$as_dir" && as_dir=.
3798   for ac_exec_ext in '' $ac_executable_extensions; do
3799   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3800     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3801     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3802     break 2
3803   fi
3804 done
3805 done
3806
3807 fi
3808 fi
3809 RANLIB=$ac_cv_prog_RANLIB
3810 if test -n "$RANLIB"; then
3811   echo "$as_me:$LINENO: result: $RANLIB" >&5
3812 echo "${ECHO_T}$RANLIB" >&6
3813 else
3814   echo "$as_me:$LINENO: result: no" >&5
3815 echo "${ECHO_T}no" >&6
3816 fi
3817
3818 fi
3819 if test -z "$ac_cv_prog_RANLIB"; then
3820   ac_ct_RANLIB=$RANLIB
3821   # Extract the first word of "ranlib", so it can be a program name with args.
3822 set dummy ranlib; ac_word=$2
3823 echo "$as_me:$LINENO: checking for $ac_word" >&5
3824 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3825 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3826   echo $ECHO_N "(cached) $ECHO_C" >&6
3827 else
3828   if test -n "$ac_ct_RANLIB"; then
3829   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3830 else
3831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3832 for as_dir in $PATH
3833 do
3834   IFS=$as_save_IFS
3835   test -z "$as_dir" && as_dir=.
3836   for ac_exec_ext in '' $ac_executable_extensions; do
3837   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3838     ac_cv_prog_ac_ct_RANLIB="ranlib"
3839     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3840     break 2
3841   fi
3842 done
3843 done
3844
3845   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3846 fi
3847 fi
3848 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3849 if test -n "$ac_ct_RANLIB"; then
3850   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3851 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3852 else
3853   echo "$as_me:$LINENO: result: no" >&5
3854 echo "${ECHO_T}no" >&6
3855 fi
3856
3857   RANLIB=$ac_ct_RANLIB
3858 else
3859   RANLIB="$ac_cv_prog_RANLIB"
3860 fi
3861
3862 for ac_prog in lorder
3863 do
3864   # Extract the first word of "$ac_prog", so it can be a program name with args.
3865 set dummy $ac_prog; ac_word=$2
3866 echo "$as_me:$LINENO: checking for $ac_word" >&5
3867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3868 if test "${ac_cv_prog_LORDER+set}" = set; then
3869   echo $ECHO_N "(cached) $ECHO_C" >&6
3870 else
3871   if test -n "$LORDER"; then
3872   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
3873 else
3874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH
3876 do
3877   IFS=$as_save_IFS
3878   test -z "$as_dir" && as_dir=.
3879   for ac_exec_ext in '' $ac_executable_extensions; do
3880   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3881     ac_cv_prog_LORDER="$ac_prog"
3882     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3883     break 2
3884   fi
3885 done
3886 done
3887
3888 fi
3889 fi
3890 LORDER=$ac_cv_prog_LORDER
3891 if test -n "$LORDER"; then
3892   echo "$as_me:$LINENO: result: $LORDER" >&5
3893 echo "${ECHO_T}$LORDER" >&6
3894 else
3895   echo "$as_me:$LINENO: result: no" >&5
3896 echo "${ECHO_T}no" >&6
3897 fi
3898
3899   test -n "$LORDER" && break
3900 done
3901
3902 # Extract the first word of "tar", so it can be a program name with args.
3903 set dummy tar; ac_word=$2
3904 echo "$as_me:$LINENO: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_path_TAR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   case $TAR in
3910   [\\/]* | ?:[\\/]*)
3911   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
3912   ;;
3913   *)
3914   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3915 for as_dir in $PATH
3916 do
3917   IFS=$as_save_IFS
3918   test -z "$as_dir" && as_dir=.
3919   for ac_exec_ext in '' $ac_executable_extensions; do
3920   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3921     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
3922     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3923     break 2
3924   fi
3925 done
3926 done
3927
3928   ;;
3929 esac
3930 fi
3931 TAR=$ac_cv_path_TAR
3932
3933 if test -n "$TAR"; then
3934   echo "$as_me:$LINENO: result: $TAR" >&5
3935 echo "${ECHO_T}$TAR" >&6
3936 else
3937   echo "$as_me:$LINENO: result: no" >&5
3938 echo "${ECHO_T}no" >&6
3939 fi
3940
3941
3942   if test -n "$ac_tool_prefix"; then
3943   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3944 set dummy ${ac_tool_prefix}strip; ac_word=$2
3945 echo "$as_me:$LINENO: checking for $ac_word" >&5
3946 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3947 if test "${ac_cv_prog_STRIP+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   if test -n "$STRIP"; then
3951   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3952 else
3953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3954 for as_dir in $PATH
3955 do
3956   IFS=$as_save_IFS
3957   test -z "$as_dir" && as_dir=.
3958   for ac_exec_ext in '' $ac_executable_extensions; do
3959   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3960     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3961     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3962     break 2
3963   fi
3964 done
3965 done
3966
3967 fi
3968 fi
3969 STRIP=$ac_cv_prog_STRIP
3970 if test -n "$STRIP"; then
3971   echo "$as_me:$LINENO: result: $STRIP" >&5
3972 echo "${ECHO_T}$STRIP" >&6
3973 else
3974   echo "$as_me:$LINENO: result: no" >&5
3975 echo "${ECHO_T}no" >&6
3976 fi
3977
3978 fi
3979 if test -z "$ac_cv_prog_STRIP"; then
3980   ac_ct_STRIP=$STRIP
3981   # Extract the first word of "strip", so it can be a program name with args.
3982 set dummy strip; ac_word=$2
3983 echo "$as_me:$LINENO: checking for $ac_word" >&5
3984 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3985 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
3986   echo $ECHO_N "(cached) $ECHO_C" >&6
3987 else
3988   if test -n "$ac_ct_STRIP"; then
3989   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3990 else
3991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3992 for as_dir in $PATH
3993 do
3994   IFS=$as_save_IFS
3995   test -z "$as_dir" && as_dir=.
3996   for ac_exec_ext in '' $ac_executable_extensions; do
3997   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3998     ac_cv_prog_ac_ct_STRIP="strip"
3999     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4000     break 2
4001   fi
4002 done
4003 done
4004
4005   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4006 fi
4007 fi
4008 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4009 if test -n "$ac_ct_STRIP"; then
4010   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4011 echo "${ECHO_T}$ac_ct_STRIP" >&6
4012 else
4013   echo "$as_me:$LINENO: result: no" >&5
4014 echo "${ECHO_T}no" >&6
4015 fi
4016
4017   STRIP=$ac_ct_STRIP
4018 else
4019   STRIP="$ac_cv_prog_STRIP"
4020 fi
4021
4022
4023   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4024 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4025   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4026     STRIP_STATIC_LIB="$STRIP -x"
4027     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4028     echo "$as_me:$LINENO: result: yes" >&5
4029 echo "${ECHO_T}yes" >&6
4030   else
4031     STRIP_STATIC_LIB=:
4032     STRIP_SHARED_LIB=:
4033     echo "$as_me:$LINENO: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035   fi
4036
4037
4038
4039
4040 for ac_prog in 'bison -y'
4041 do
4042   # Extract the first word of "$ac_prog", so it can be a program name with args.
4043 set dummy $ac_prog; ac_word=$2
4044 echo "$as_me:$LINENO: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_prog_YACC+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   if test -n "$YACC"; then
4050   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4051 else
4052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4053 for as_dir in $PATH
4054 do
4055   IFS=$as_save_IFS
4056   test -z "$as_dir" && as_dir=.
4057   for ac_exec_ext in '' $ac_executable_extensions; do
4058   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4059     ac_cv_prog_YACC="$ac_prog"
4060     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4061     break 2
4062   fi
4063 done
4064 done
4065
4066 fi
4067 fi
4068 YACC=$ac_cv_prog_YACC
4069 if test -n "$YACC"; then
4070   echo "$as_me:$LINENO: result: $YACC" >&5
4071 echo "${ECHO_T}$YACC" >&6
4072 else
4073   echo "$as_me:$LINENO: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077   test -n "$YACC" && break
4078 done
4079
4080
4081 if test "$YACC"; then
4082   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4083     { echo "$as_me:$LINENO: WARNING:
4084 *** If you are going to modify the grammar files or build from CVS, the installed
4085 *** version of Bison is too old.  Bison version 1.875 or later is required." >&5
4086 echo "$as_me: WARNING:
4087 *** If you are going to modify the grammar files or build from CVS, the installed
4088 *** version of Bison is too old.  Bison version 1.875 or later is required." >&2;}
4089   fi
4090 fi
4091
4092 if test -z "$YACC"; then
4093   { echo "$as_me:$LINENO: WARNING:
4094 *** Without Bison you will not be able to build PostgreSQL from CVS or
4095 *** change any of the parser definition files.  You can obtain Bison from
4096 *** a GNU mirror site.  (If you are using the official distribution of
4097 *** PostgreSQL then you do not need to worry about this because the Bison
4098 *** output is pre-generated.)  To use a different yacc program (possible,
4099 *** but not recommended), set the environment variable YACC before running
4100 *** 'configure'." >&5
4101 echo "$as_me: WARNING:
4102 *** Without Bison you will not be able to build PostgreSQL from CVS or
4103 *** change any of the parser definition files.  You can obtain Bison from
4104 *** a GNU mirror site.  (If you are using the official distribution of
4105 *** PostgreSQL then you do not need to worry about this because the Bison
4106 *** output is pre-generated.)  To use a different yacc program (possible,
4107 *** but not recommended), set the environment variable YACC before running
4108 *** 'configure'." >&2;}
4109 fi
4110
4111
4112 # Extract the first word of "perl", so it can be a program name with args.
4113 set dummy perl; ac_word=$2
4114 echo "$as_me:$LINENO: checking for $ac_word" >&5
4115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4116 if test "${ac_cv_path_PERL+set}" = set; then
4117   echo $ECHO_N "(cached) $ECHO_C" >&6
4118 else
4119   case $PERL in
4120   [\\/]* | ?:[\\/]*)
4121   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4122   ;;
4123   *)
4124   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125 for as_dir in $PATH
4126 do
4127   IFS=$as_save_IFS
4128   test -z "$as_dir" && as_dir=.
4129   for ac_exec_ext in '' $ac_executable_extensions; do
4130   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4131     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4132     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4133     break 2
4134   fi
4135 done
4136 done
4137
4138   ;;
4139 esac
4140 fi
4141 PERL=$ac_cv_path_PERL
4142
4143 if test -n "$PERL"; then
4144   echo "$as_me:$LINENO: result: $PERL" >&5
4145 echo "${ECHO_T}$PERL" >&6
4146 else
4147   echo "$as_me:$LINENO: result: no" >&5
4148 echo "${ECHO_T}no" >&6
4149 fi
4150
4151 if test "$with_perl" = yes; then
4152
4153 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4154 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4155 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4156 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4157 echo "${ECHO_T}$perl_archlibexp" >&6
4158 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4159 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4160 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4161 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4162 echo "${ECHO_T}$perl_privlibexp" >&6
4163 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4164 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4165 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4166 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4167 echo "${ECHO_T}$perl_useshrplib" >&6
4168
4169 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4170 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4171 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4172 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4173 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4174 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4175 echo "${ECHO_T}$perl_embed_ldflags" >&6
4176 fi
4177
4178 if test "$with_python" = yes; then
4179   # Extract the first word of "python", so it can be a program name with args.
4180 set dummy python; ac_word=$2
4181 echo "$as_me:$LINENO: checking for $ac_word" >&5
4182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4183 if test "${ac_cv_path_PYTHON+set}" = set; then
4184   echo $ECHO_N "(cached) $ECHO_C" >&6
4185 else
4186   case $PYTHON in
4187   [\\/]* | ?:[\\/]*)
4188   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4189   ;;
4190   *)
4191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4192 for as_dir in $PATH
4193 do
4194   IFS=$as_save_IFS
4195   test -z "$as_dir" && as_dir=.
4196   for ac_exec_ext in '' $ac_executable_extensions; do
4197   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4198     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4199     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4200     break 2
4201   fi
4202 done
4203 done
4204
4205   ;;
4206 esac
4207 fi
4208 PYTHON=$ac_cv_path_PYTHON
4209
4210 if test -n "$PYTHON"; then
4211   echo "$as_me:$LINENO: result: $PYTHON" >&5
4212 echo "${ECHO_T}$PYTHON" >&6
4213 else
4214   echo "$as_me:$LINENO: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4216 fi
4217
4218 if test x"$PYTHON" = x""; then
4219   { { echo "$as_me:$LINENO: error: Python not found" >&5
4220 echo "$as_me: error: Python not found" >&2;}
4221    { (exit 1); exit 1; }; }
4222 fi
4223
4224
4225 echo "$as_me:$LINENO: checking for Python distutils module" >&5
4226 echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4227 if "${PYTHON}" 2>&- -c 'import distutils'
4228 then
4229     echo "$as_me:$LINENO: result: yes" >&5
4230 echo "${ECHO_T}yes" >&6
4231 else
4232     echo "$as_me:$LINENO: result: no" >&5
4233 echo "${ECHO_T}no" >&6
4234     { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4235 echo "$as_me: error: distutils module not found" >&2;}
4236    { (exit 1); exit 1; }; }
4237 fi
4238 echo "$as_me:$LINENO: checking Python installation directories" >&5
4239 echo $ECHO_N "checking Python installation directories... $ECHO_C" >&6
4240 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4241 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
4242 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
4243 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')"`
4244 python_includespec="-I${python_prefix}/include/python${python_version}"
4245 if test "$python_prefix" != "$python_execprefix"; then
4246   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
4247 fi
4248
4249 # This should be enough of a message.
4250 if test "$python_prefix" != "$python_execprefix"; then
4251   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&5
4252 echo "${ECHO_T}$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&6
4253 else
4254   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version}" >&5
4255 echo "${ECHO_T}$python_prefix/lib/python${python_version}" >&6
4256 fi
4257
4258
4259 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4260 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4261
4262 if test ! -f "$python_configdir/Makefile"; then
4263   echo "$as_me:$LINENO: result: no" >&5
4264 echo "${ECHO_T}no" >&6
4265   { { echo "$as_me:$LINENO: error: Python Makefile not found" >&5
4266 echo "$as_me: error: Python Makefile not found" >&2;}
4267    { (exit 1); exit 1; }; }
4268 fi
4269
4270 _python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4271 _python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
4272 _python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
4273 _python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4274 _python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4275
4276 pgac_tab="      " # tab character
4277 python_libspec=`echo X"-L$python_configdir $_python_libs $_python_libc $_python_libm -lpython$python_version $_python_liblocalmod $_python_libbasemod" | sed -e 's/^X//' -e "s/[ $pgac_tab][ $pgac_tab]*/ /g"`
4278
4279 echo "$as_me:$LINENO: result: ${python_libspec}" >&5
4280 echo "${ECHO_T}${python_libspec}" >&6
4281
4282
4283 fi
4284
4285
4286 ##
4287 ## Libraries
4288 ##
4289
4290 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4291 then
4292
4293 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4294 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4295 if test "${ac_cv_lib_bsd_main+set}" = set; then
4296   echo $ECHO_N "(cached) $ECHO_C" >&6
4297 else
4298   ac_check_lib_save_LIBS=$LIBS
4299 LIBS="-lbsd  $LIBS"
4300 cat >conftest.$ac_ext <<_ACEOF
4301 #line $LINENO "configure"
4302 #include "confdefs.h"
4303
4304
4305 #ifdef F77_DUMMY_MAIN
4306 #  ifdef __cplusplus
4307      extern "C"
4308 #  endif
4309    int F77_DUMMY_MAIN() { return 1; }
4310 #endif
4311 int
4312 main ()
4313 {
4314 main ();
4315   ;
4316   return 0;
4317 }
4318 _ACEOF
4319 rm -f conftest.$ac_objext conftest$ac_exeext
4320 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4321   (eval $ac_link) 2>&5
4322   ac_status=$?
4323   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4324   (exit $ac_status); } &&
4325          { ac_try='test -s conftest$ac_exeext'
4326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4327   (eval $ac_try) 2>&5
4328   ac_status=$?
4329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330   (exit $ac_status); }; }; then
4331   ac_cv_lib_bsd_main=yes
4332 else
4333   echo "$as_me: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
4335 ac_cv_lib_bsd_main=no
4336 fi
4337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4338 LIBS=$ac_check_lib_save_LIBS
4339 fi
4340 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4341 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4342 if test $ac_cv_lib_bsd_main = yes; then
4343   cat >>confdefs.h <<_ACEOF
4344 #define HAVE_LIBBSD 1
4345 _ACEOF
4346
4347   LIBS="-lbsd $LIBS"
4348
4349 fi
4350
4351 fi
4352
4353 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4354 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4355 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   ac_check_lib_save_LIBS=$LIBS
4359 LIBS="-lutil  $LIBS"
4360 cat >conftest.$ac_ext <<_ACEOF
4361 #line $LINENO "configure"
4362 #include "confdefs.h"
4363
4364 /* Override any gcc2 internal prototype to avoid an error.  */
4365 #ifdef __cplusplus
4366 extern "C"
4367 #endif
4368 /* We use char because int might match the return type of a gcc2
4369    builtin and then its argument prototype would still apply.  */
4370 char setproctitle ();
4371 #ifdef F77_DUMMY_MAIN
4372 #  ifdef __cplusplus
4373      extern "C"
4374 #  endif
4375    int F77_DUMMY_MAIN() { return 1; }
4376 #endif
4377 int
4378 main ()
4379 {
4380 setproctitle ();
4381   ;
4382   return 0;
4383 }
4384 _ACEOF
4385 rm -f conftest.$ac_objext conftest$ac_exeext
4386 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4387   (eval $ac_link) 2>&5
4388   ac_status=$?
4389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4390   (exit $ac_status); } &&
4391          { ac_try='test -s conftest$ac_exeext'
4392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4393   (eval $ac_try) 2>&5
4394   ac_status=$?
4395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4396   (exit $ac_status); }; }; then
4397   ac_cv_lib_util_setproctitle=yes
4398 else
4399   echo "$as_me: failed program was:" >&5
4400 cat conftest.$ac_ext >&5
4401 ac_cv_lib_util_setproctitle=no
4402 fi
4403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4404 LIBS=$ac_check_lib_save_LIBS
4405 fi
4406 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4407 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4408 if test $ac_cv_lib_util_setproctitle = yes; then
4409   cat >>confdefs.h <<_ACEOF
4410 #define HAVE_LIBUTIL 1
4411 _ACEOF
4412
4413   LIBS="-lutil $LIBS"
4414
4415 fi
4416
4417
4418 echo "$as_me:$LINENO: checking for main in -lm" >&5
4419 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4420 if test "${ac_cv_lib_m_main+set}" = set; then
4421   echo $ECHO_N "(cached) $ECHO_C" >&6
4422 else
4423   ac_check_lib_save_LIBS=$LIBS
4424 LIBS="-lm  $LIBS"
4425 cat >conftest.$ac_ext <<_ACEOF
4426 #line $LINENO "configure"
4427 #include "confdefs.h"
4428
4429
4430 #ifdef F77_DUMMY_MAIN
4431 #  ifdef __cplusplus
4432      extern "C"
4433 #  endif
4434    int F77_DUMMY_MAIN() { return 1; }
4435 #endif
4436 int
4437 main ()
4438 {
4439 main ();
4440   ;
4441   return 0;
4442 }
4443 _ACEOF
4444 rm -f conftest.$ac_objext conftest$ac_exeext
4445 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4446   (eval $ac_link) 2>&5
4447   ac_status=$?
4448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4449   (exit $ac_status); } &&
4450          { ac_try='test -s conftest$ac_exeext'
4451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4452   (eval $ac_try) 2>&5
4453   ac_status=$?
4454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4455   (exit $ac_status); }; }; then
4456   ac_cv_lib_m_main=yes
4457 else
4458   echo "$as_me: failed program was:" >&5
4459 cat conftest.$ac_ext >&5
4460 ac_cv_lib_m_main=no
4461 fi
4462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4463 LIBS=$ac_check_lib_save_LIBS
4464 fi
4465 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4466 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4467 if test $ac_cv_lib_m_main = yes; then
4468   cat >>confdefs.h <<_ACEOF
4469 #define HAVE_LIBM 1
4470 _ACEOF
4471
4472   LIBS="-lm $LIBS"
4473
4474 fi
4475
4476
4477 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4478 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4479 if test "${ac_cv_lib_dl_main+set}" = set; then
4480   echo $ECHO_N "(cached) $ECHO_C" >&6
4481 else
4482   ac_check_lib_save_LIBS=$LIBS
4483 LIBS="-ldl  $LIBS"
4484 cat >conftest.$ac_ext <<_ACEOF
4485 #line $LINENO "configure"
4486 #include "confdefs.h"
4487
4488
4489 #ifdef F77_DUMMY_MAIN
4490 #  ifdef __cplusplus
4491      extern "C"
4492 #  endif
4493    int F77_DUMMY_MAIN() { return 1; }
4494 #endif
4495 int
4496 main ()
4497 {
4498 main ();
4499   ;
4500   return 0;
4501 }
4502 _ACEOF
4503 rm -f conftest.$ac_objext conftest$ac_exeext
4504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4505   (eval $ac_link) 2>&5
4506   ac_status=$?
4507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508   (exit $ac_status); } &&
4509          { ac_try='test -s conftest$ac_exeext'
4510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4511   (eval $ac_try) 2>&5
4512   ac_status=$?
4513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514   (exit $ac_status); }; }; then
4515   ac_cv_lib_dl_main=yes
4516 else
4517   echo "$as_me: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4519 ac_cv_lib_dl_main=no
4520 fi
4521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4522 LIBS=$ac_check_lib_save_LIBS
4523 fi
4524 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
4525 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
4526 if test $ac_cv_lib_dl_main = yes; then
4527   cat >>confdefs.h <<_ACEOF
4528 #define HAVE_LIBDL 1
4529 _ACEOF
4530
4531   LIBS="-ldl $LIBS"
4532
4533 fi
4534
4535
4536 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
4537 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
4538 if test "${ac_cv_lib_nsl_main+set}" = set; then
4539   echo $ECHO_N "(cached) $ECHO_C" >&6
4540 else
4541   ac_check_lib_save_LIBS=$LIBS
4542 LIBS="-lnsl  $LIBS"
4543 cat >conftest.$ac_ext <<_ACEOF
4544 #line $LINENO "configure"
4545 #include "confdefs.h"
4546
4547
4548 #ifdef F77_DUMMY_MAIN
4549 #  ifdef __cplusplus
4550      extern "C"
4551 #  endif
4552    int F77_DUMMY_MAIN() { return 1; }
4553 #endif
4554 int
4555 main ()
4556 {
4557 main ();
4558   ;
4559   return 0;
4560 }
4561 _ACEOF
4562 rm -f conftest.$ac_objext conftest$ac_exeext
4563 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4564   (eval $ac_link) 2>&5
4565   ac_status=$?
4566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4567   (exit $ac_status); } &&
4568          { ac_try='test -s conftest$ac_exeext'
4569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4570   (eval $ac_try) 2>&5
4571   ac_status=$?
4572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4573   (exit $ac_status); }; }; then
4574   ac_cv_lib_nsl_main=yes
4575 else
4576   echo "$as_me: failed program was:" >&5
4577 cat conftest.$ac_ext >&5
4578 ac_cv_lib_nsl_main=no
4579 fi
4580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4581 LIBS=$ac_check_lib_save_LIBS
4582 fi
4583 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
4584 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
4585 if test $ac_cv_lib_nsl_main = yes; then
4586   cat >>confdefs.h <<_ACEOF
4587 #define HAVE_LIBNSL 1
4588 _ACEOF
4589
4590   LIBS="-lnsl $LIBS"
4591
4592 fi
4593
4594
4595 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
4596 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
4597 if test "${ac_cv_lib_socket_main+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   ac_check_lib_save_LIBS=$LIBS
4601 LIBS="-lsocket  $LIBS"
4602 cat >conftest.$ac_ext <<_ACEOF
4603 #line $LINENO "configure"
4604 #include "confdefs.h"
4605
4606
4607 #ifdef F77_DUMMY_MAIN
4608 #  ifdef __cplusplus
4609      extern "C"
4610 #  endif
4611    int F77_DUMMY_MAIN() { return 1; }
4612 #endif
4613 int
4614 main ()
4615 {
4616 main ();
4617   ;
4618   return 0;
4619 }
4620 _ACEOF
4621 rm -f conftest.$ac_objext conftest$ac_exeext
4622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4623   (eval $ac_link) 2>&5
4624   ac_status=$?
4625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4626   (exit $ac_status); } &&
4627          { ac_try='test -s conftest$ac_exeext'
4628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4629   (eval $ac_try) 2>&5
4630   ac_status=$?
4631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4632   (exit $ac_status); }; }; then
4633   ac_cv_lib_socket_main=yes
4634 else
4635   echo "$as_me: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
4637 ac_cv_lib_socket_main=no
4638 fi
4639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4640 LIBS=$ac_check_lib_save_LIBS
4641 fi
4642 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
4643 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
4644 if test $ac_cv_lib_socket_main = yes; then
4645   cat >>confdefs.h <<_ACEOF
4646 #define HAVE_LIBSOCKET 1
4647 _ACEOF
4648
4649   LIBS="-lsocket $LIBS"
4650
4651 fi
4652
4653
4654 echo "$as_me:$LINENO: checking for main in -lipc" >&5
4655 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
4656 if test "${ac_cv_lib_ipc_main+set}" = set; then
4657   echo $ECHO_N "(cached) $ECHO_C" >&6
4658 else
4659   ac_check_lib_save_LIBS=$LIBS
4660 LIBS="-lipc  $LIBS"
4661 cat >conftest.$ac_ext <<_ACEOF
4662 #line $LINENO "configure"
4663 #include "confdefs.h"
4664
4665
4666 #ifdef F77_DUMMY_MAIN
4667 #  ifdef __cplusplus
4668      extern "C"
4669 #  endif
4670    int F77_DUMMY_MAIN() { return 1; }
4671 #endif
4672 int
4673 main ()
4674 {
4675 main ();
4676   ;
4677   return 0;
4678 }
4679 _ACEOF
4680 rm -f conftest.$ac_objext conftest$ac_exeext
4681 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4682   (eval $ac_link) 2>&5
4683   ac_status=$?
4684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685   (exit $ac_status); } &&
4686          { ac_try='test -s conftest$ac_exeext'
4687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4688   (eval $ac_try) 2>&5
4689   ac_status=$?
4690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691   (exit $ac_status); }; }; then
4692   ac_cv_lib_ipc_main=yes
4693 else
4694   echo "$as_me: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 ac_cv_lib_ipc_main=no
4697 fi
4698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4699 LIBS=$ac_check_lib_save_LIBS
4700 fi
4701 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
4702 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
4703 if test $ac_cv_lib_ipc_main = yes; then
4704   cat >>confdefs.h <<_ACEOF
4705 #define HAVE_LIBIPC 1
4706 _ACEOF
4707
4708   LIBS="-lipc $LIBS"
4709
4710 fi
4711
4712
4713 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
4714 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
4715 if test "${ac_cv_lib_IPC_main+set}" = set; then
4716   echo $ECHO_N "(cached) $ECHO_C" >&6
4717 else
4718   ac_check_lib_save_LIBS=$LIBS
4719 LIBS="-lIPC  $LIBS"
4720 cat >conftest.$ac_ext <<_ACEOF
4721 #line $LINENO "configure"
4722 #include "confdefs.h"
4723
4724
4725 #ifdef F77_DUMMY_MAIN
4726 #  ifdef __cplusplus
4727      extern "C"
4728 #  endif
4729    int F77_DUMMY_MAIN() { return 1; }
4730 #endif
4731 int
4732 main ()
4733 {
4734 main ();
4735   ;
4736   return 0;
4737 }
4738 _ACEOF
4739 rm -f conftest.$ac_objext conftest$ac_exeext
4740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4741   (eval $ac_link) 2>&5
4742   ac_status=$?
4743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744   (exit $ac_status); } &&
4745          { ac_try='test -s conftest$ac_exeext'
4746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4747   (eval $ac_try) 2>&5
4748   ac_status=$?
4749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4750   (exit $ac_status); }; }; then
4751   ac_cv_lib_IPC_main=yes
4752 else
4753   echo "$as_me: failed program was:" >&5
4754 cat conftest.$ac_ext >&5
4755 ac_cv_lib_IPC_main=no
4756 fi
4757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4758 LIBS=$ac_check_lib_save_LIBS
4759 fi
4760 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
4761 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
4762 if test $ac_cv_lib_IPC_main = yes; then
4763   cat >>confdefs.h <<_ACEOF
4764 #define HAVE_LIBIPC 1
4765 _ACEOF
4766
4767   LIBS="-lIPC $LIBS"
4768
4769 fi
4770
4771
4772 echo "$as_me:$LINENO: checking for main in -llc" >&5
4773 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
4774 if test "${ac_cv_lib_lc_main+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   ac_check_lib_save_LIBS=$LIBS
4778 LIBS="-llc  $LIBS"
4779 cat >conftest.$ac_ext <<_ACEOF
4780 #line $LINENO "configure"
4781 #include "confdefs.h"
4782
4783
4784 #ifdef F77_DUMMY_MAIN
4785 #  ifdef __cplusplus
4786      extern "C"
4787 #  endif
4788    int F77_DUMMY_MAIN() { return 1; }
4789 #endif
4790 int
4791 main ()
4792 {
4793 main ();
4794   ;
4795   return 0;
4796 }
4797 _ACEOF
4798 rm -f conftest.$ac_objext conftest$ac_exeext
4799 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4800   (eval $ac_link) 2>&5
4801   ac_status=$?
4802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803   (exit $ac_status); } &&
4804          { ac_try='test -s conftest$ac_exeext'
4805   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4806   (eval $ac_try) 2>&5
4807   ac_status=$?
4808   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809   (exit $ac_status); }; }; then
4810   ac_cv_lib_lc_main=yes
4811 else
4812   echo "$as_me: failed program was:" >&5
4813 cat conftest.$ac_ext >&5
4814 ac_cv_lib_lc_main=no
4815 fi
4816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4817 LIBS=$ac_check_lib_save_LIBS
4818 fi
4819 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
4820 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
4821 if test $ac_cv_lib_lc_main = yes; then
4822   cat >>confdefs.h <<_ACEOF
4823 #define HAVE_LIBLC 1
4824 _ACEOF
4825
4826   LIBS="-llc $LIBS"
4827
4828 fi
4829
4830
4831 echo "$as_me:$LINENO: checking for main in -ldld" >&5
4832 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
4833 if test "${ac_cv_lib_dld_main+set}" = set; then
4834   echo $ECHO_N "(cached) $ECHO_C" >&6
4835 else
4836   ac_check_lib_save_LIBS=$LIBS
4837 LIBS="-ldld  $LIBS"
4838 cat >conftest.$ac_ext <<_ACEOF
4839 #line $LINENO "configure"
4840 #include "confdefs.h"
4841
4842
4843 #ifdef F77_DUMMY_MAIN
4844 #  ifdef __cplusplus
4845      extern "C"
4846 #  endif
4847    int F77_DUMMY_MAIN() { return 1; }
4848 #endif
4849 int
4850 main ()
4851 {
4852 main ();
4853   ;
4854   return 0;
4855 }
4856 _ACEOF
4857 rm -f conftest.$ac_objext conftest$ac_exeext
4858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4859   (eval $ac_link) 2>&5
4860   ac_status=$?
4861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4862   (exit $ac_status); } &&
4863          { ac_try='test -s conftest$ac_exeext'
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); }; }; then
4869   ac_cv_lib_dld_main=yes
4870 else
4871   echo "$as_me: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 ac_cv_lib_dld_main=no
4874 fi
4875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4876 LIBS=$ac_check_lib_save_LIBS
4877 fi
4878 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
4879 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
4880 if test $ac_cv_lib_dld_main = yes; then
4881   cat >>confdefs.h <<_ACEOF
4882 #define HAVE_LIBDLD 1
4883 _ACEOF
4884
4885   LIBS="-ldld $LIBS"
4886
4887 fi
4888
4889
4890 echo "$as_me:$LINENO: checking for main in -lld" >&5
4891 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
4892 if test "${ac_cv_lib_ld_main+set}" = set; then
4893   echo $ECHO_N "(cached) $ECHO_C" >&6
4894 else
4895   ac_check_lib_save_LIBS=$LIBS
4896 LIBS="-lld  $LIBS"
4897 cat >conftest.$ac_ext <<_ACEOF
4898 #line $LINENO "configure"
4899 #include "confdefs.h"
4900
4901
4902 #ifdef F77_DUMMY_MAIN
4903 #  ifdef __cplusplus
4904      extern "C"
4905 #  endif
4906    int F77_DUMMY_MAIN() { return 1; }
4907 #endif
4908 int
4909 main ()
4910 {
4911 main ();
4912   ;
4913   return 0;
4914 }
4915 _ACEOF
4916 rm -f conftest.$ac_objext conftest$ac_exeext
4917 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4918   (eval $ac_link) 2>&5
4919   ac_status=$?
4920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4921   (exit $ac_status); } &&
4922          { ac_try='test -s conftest$ac_exeext'
4923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4924   (eval $ac_try) 2>&5
4925   ac_status=$?
4926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927   (exit $ac_status); }; }; then
4928   ac_cv_lib_ld_main=yes
4929 else
4930   echo "$as_me: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 ac_cv_lib_ld_main=no
4933 fi
4934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4935 LIBS=$ac_check_lib_save_LIBS
4936 fi
4937 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
4938 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
4939 if test $ac_cv_lib_ld_main = yes; then
4940   cat >>confdefs.h <<_ACEOF
4941 #define HAVE_LIBLD 1
4942 _ACEOF
4943
4944   LIBS="-lld $LIBS"
4945
4946 fi
4947
4948
4949 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
4950 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
4951 if test "${ac_cv_lib_compat_main+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   ac_check_lib_save_LIBS=$LIBS
4955 LIBS="-lcompat  $LIBS"
4956 cat >conftest.$ac_ext <<_ACEOF
4957 #line $LINENO "configure"
4958 #include "confdefs.h"
4959
4960
4961 #ifdef F77_DUMMY_MAIN
4962 #  ifdef __cplusplus
4963      extern "C"
4964 #  endif
4965    int F77_DUMMY_MAIN() { return 1; }
4966 #endif
4967 int
4968 main ()
4969 {
4970 main ();
4971   ;
4972   return 0;
4973 }
4974 _ACEOF
4975 rm -f conftest.$ac_objext conftest$ac_exeext
4976 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4977   (eval $ac_link) 2>&5
4978   ac_status=$?
4979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4980   (exit $ac_status); } &&
4981          { ac_try='test -s conftest$ac_exeext'
4982   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4983   (eval $ac_try) 2>&5
4984   ac_status=$?
4985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986   (exit $ac_status); }; }; then
4987   ac_cv_lib_compat_main=yes
4988 else
4989   echo "$as_me: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 ac_cv_lib_compat_main=no
4992 fi
4993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4994 LIBS=$ac_check_lib_save_LIBS
4995 fi
4996 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
4997 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
4998 if test $ac_cv_lib_compat_main = yes; then
4999   cat >>confdefs.h <<_ACEOF
5000 #define HAVE_LIBCOMPAT 1
5001 _ACEOF
5002
5003   LIBS="-lcompat $LIBS"
5004
5005 fi
5006
5007
5008 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5009 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5010 if test "${ac_cv_lib_BSD_main+set}" = set; then
5011   echo $ECHO_N "(cached) $ECHO_C" >&6
5012 else
5013   ac_check_lib_save_LIBS=$LIBS
5014 LIBS="-lBSD  $LIBS"
5015 cat >conftest.$ac_ext <<_ACEOF
5016 #line $LINENO "configure"
5017 #include "confdefs.h"
5018
5019
5020 #ifdef F77_DUMMY_MAIN
5021 #  ifdef __cplusplus
5022      extern "C"
5023 #  endif
5024    int F77_DUMMY_MAIN() { return 1; }
5025 #endif
5026 int
5027 main ()
5028 {
5029 main ();
5030   ;
5031   return 0;
5032 }
5033 _ACEOF
5034 rm -f conftest.$ac_objext conftest$ac_exeext
5035 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5036   (eval $ac_link) 2>&5
5037   ac_status=$?
5038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5039   (exit $ac_status); } &&
5040          { ac_try='test -s conftest$ac_exeext'
5041   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5042   (eval $ac_try) 2>&5
5043   ac_status=$?
5044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5045   (exit $ac_status); }; }; then
5046   ac_cv_lib_BSD_main=yes
5047 else
5048   echo "$as_me: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 ac_cv_lib_BSD_main=no
5051 fi
5052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053 LIBS=$ac_check_lib_save_LIBS
5054 fi
5055 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5056 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5057 if test $ac_cv_lib_BSD_main = yes; then
5058   cat >>confdefs.h <<_ACEOF
5059 #define HAVE_LIBBSD 1
5060 _ACEOF
5061
5062   LIBS="-lBSD $LIBS"
5063
5064 fi
5065
5066
5067 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5068 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5069 if test "${ac_cv_lib_gen_main+set}" = set; then
5070   echo $ECHO_N "(cached) $ECHO_C" >&6
5071 else
5072   ac_check_lib_save_LIBS=$LIBS
5073 LIBS="-lgen  $LIBS"
5074 cat >conftest.$ac_ext <<_ACEOF
5075 #line $LINENO "configure"
5076 #include "confdefs.h"
5077
5078
5079 #ifdef F77_DUMMY_MAIN
5080 #  ifdef __cplusplus
5081      extern "C"
5082 #  endif
5083    int F77_DUMMY_MAIN() { return 1; }
5084 #endif
5085 int
5086 main ()
5087 {
5088 main ();
5089   ;
5090   return 0;
5091 }
5092 _ACEOF
5093 rm -f conftest.$ac_objext conftest$ac_exeext
5094 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5095   (eval $ac_link) 2>&5
5096   ac_status=$?
5097   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098   (exit $ac_status); } &&
5099          { ac_try='test -s conftest$ac_exeext'
5100   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5101   (eval $ac_try) 2>&5
5102   ac_status=$?
5103   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104   (exit $ac_status); }; }; then
5105   ac_cv_lib_gen_main=yes
5106 else
5107   echo "$as_me: failed program was:" >&5
5108 cat conftest.$ac_ext >&5
5109 ac_cv_lib_gen_main=no
5110 fi
5111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5112 LIBS=$ac_check_lib_save_LIBS
5113 fi
5114 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5115 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5116 if test $ac_cv_lib_gen_main = yes; then
5117   cat >>confdefs.h <<_ACEOF
5118 #define HAVE_LIBGEN 1
5119 _ACEOF
5120
5121   LIBS="-lgen $LIBS"
5122
5123 fi
5124
5125
5126 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5127 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5128 if test "${ac_cv_lib_PW_main+set}" = set; then
5129   echo $ECHO_N "(cached) $ECHO_C" >&6
5130 else
5131   ac_check_lib_save_LIBS=$LIBS
5132 LIBS="-lPW  $LIBS"
5133 cat >conftest.$ac_ext <<_ACEOF
5134 #line $LINENO "configure"
5135 #include "confdefs.h"
5136
5137
5138 #ifdef F77_DUMMY_MAIN
5139 #  ifdef __cplusplus
5140      extern "C"
5141 #  endif
5142    int F77_DUMMY_MAIN() { return 1; }
5143 #endif
5144 int
5145 main ()
5146 {
5147 main ();
5148   ;
5149   return 0;
5150 }
5151 _ACEOF
5152 rm -f conftest.$ac_objext conftest$ac_exeext
5153 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5154   (eval $ac_link) 2>&5
5155   ac_status=$?
5156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5157   (exit $ac_status); } &&
5158          { ac_try='test -s conftest$ac_exeext'
5159   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5160   (eval $ac_try) 2>&5
5161   ac_status=$?
5162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5163   (exit $ac_status); }; }; then
5164   ac_cv_lib_PW_main=yes
5165 else
5166   echo "$as_me: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
5168 ac_cv_lib_PW_main=no
5169 fi
5170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5171 LIBS=$ac_check_lib_save_LIBS
5172 fi
5173 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5174 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5175 if test $ac_cv_lib_PW_main = yes; then
5176   cat >>confdefs.h <<_ACEOF
5177 #define HAVE_LIBPW 1
5178 _ACEOF
5179
5180   LIBS="-lPW $LIBS"
5181
5182 fi
5183
5184
5185 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5186 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5187 if test "${ac_cv_lib_resolv_main+set}" = set; then
5188   echo $ECHO_N "(cached) $ECHO_C" >&6
5189 else
5190   ac_check_lib_save_LIBS=$LIBS
5191 LIBS="-lresolv  $LIBS"
5192 cat >conftest.$ac_ext <<_ACEOF
5193 #line $LINENO "configure"
5194 #include "confdefs.h"
5195
5196
5197 #ifdef F77_DUMMY_MAIN
5198 #  ifdef __cplusplus
5199      extern "C"
5200 #  endif
5201    int F77_DUMMY_MAIN() { return 1; }
5202 #endif
5203 int
5204 main ()
5205 {
5206 main ();
5207   ;
5208   return 0;
5209 }
5210 _ACEOF
5211 rm -f conftest.$ac_objext conftest$ac_exeext
5212 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5213   (eval $ac_link) 2>&5
5214   ac_status=$?
5215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -s conftest$ac_exeext'
5218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5219   (eval $ac_try) 2>&5
5220   ac_status=$?
5221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5222   (exit $ac_status); }; }; then
5223   ac_cv_lib_resolv_main=yes
5224 else
5225   echo "$as_me: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5227 ac_cv_lib_resolv_main=no
5228 fi
5229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5230 LIBS=$ac_check_lib_save_LIBS
5231 fi
5232 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5233 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5234 if test $ac_cv_lib_resolv_main = yes; then
5235   cat >>confdefs.h <<_ACEOF
5236 #define HAVE_LIBRESOLV 1
5237 _ACEOF
5238
5239   LIBS="-lresolv $LIBS"
5240
5241 fi
5242
5243 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5244 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5245 if test "${ac_cv_search_getopt_long+set}" = set; then
5246   echo $ECHO_N "(cached) $ECHO_C" >&6
5247 else
5248   ac_func_search_save_LIBS=$LIBS
5249 ac_cv_search_getopt_long=no
5250 cat >conftest.$ac_ext <<_ACEOF
5251 #line $LINENO "configure"
5252 #include "confdefs.h"
5253
5254 /* Override any gcc2 internal prototype to avoid an error.  */
5255 #ifdef __cplusplus
5256 extern "C"
5257 #endif
5258 /* We use char because int might match the return type of a gcc2
5259    builtin and then its argument prototype would still apply.  */
5260 char getopt_long ();
5261 #ifdef F77_DUMMY_MAIN
5262 #  ifdef __cplusplus
5263      extern "C"
5264 #  endif
5265    int F77_DUMMY_MAIN() { return 1; }
5266 #endif
5267 int
5268 main ()
5269 {
5270 getopt_long ();
5271   ;
5272   return 0;
5273 }
5274 _ACEOF
5275 rm -f conftest.$ac_objext conftest$ac_exeext
5276 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5277   (eval $ac_link) 2>&5
5278   ac_status=$?
5279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5280   (exit $ac_status); } &&
5281          { ac_try='test -s conftest$ac_exeext'
5282   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5283   (eval $ac_try) 2>&5
5284   ac_status=$?
5285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5286   (exit $ac_status); }; }; then
5287   ac_cv_search_getopt_long="none required"
5288 else
5289   echo "$as_me: failed program was:" >&5
5290 cat conftest.$ac_ext >&5
5291 fi
5292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5293 if test "$ac_cv_search_getopt_long" = no; then
5294   for ac_lib in getopt gnugetopt; do
5295     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5296     cat >conftest.$ac_ext <<_ACEOF
5297 #line $LINENO "configure"
5298 #include "confdefs.h"
5299
5300 /* Override any gcc2 internal prototype to avoid an error.  */
5301 #ifdef __cplusplus
5302 extern "C"
5303 #endif
5304 /* We use char because int might match the return type of a gcc2
5305    builtin and then its argument prototype would still apply.  */
5306 char getopt_long ();
5307 #ifdef F77_DUMMY_MAIN
5308 #  ifdef __cplusplus
5309      extern "C"
5310 #  endif
5311    int F77_DUMMY_MAIN() { return 1; }
5312 #endif
5313 int
5314 main ()
5315 {
5316 getopt_long ();
5317   ;
5318   return 0;
5319 }
5320 _ACEOF
5321 rm -f conftest.$ac_objext conftest$ac_exeext
5322 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5323   (eval $ac_link) 2>&5
5324   ac_status=$?
5325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326   (exit $ac_status); } &&
5327          { ac_try='test -s conftest$ac_exeext'
5328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329   (eval $ac_try) 2>&5
5330   ac_status=$?
5331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332   (exit $ac_status); }; }; then
5333   ac_cv_search_getopt_long="-l$ac_lib"
5334 break
5335 else
5336   echo "$as_me: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5338 fi
5339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5340   done
5341 fi
5342 LIBS=$ac_func_search_save_LIBS
5343 fi
5344 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5345 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5346 if test "$ac_cv_search_getopt_long" != no; then
5347   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5348
5349 fi
5350
5351 # QNX:
5352
5353 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5354 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5355 if test "${ac_cv_lib_unix_main+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358   ac_check_lib_save_LIBS=$LIBS
5359 LIBS="-lunix  $LIBS"
5360 cat >conftest.$ac_ext <<_ACEOF
5361 #line $LINENO "configure"
5362 #include "confdefs.h"
5363
5364
5365 #ifdef F77_DUMMY_MAIN
5366 #  ifdef __cplusplus
5367      extern "C"
5368 #  endif
5369    int F77_DUMMY_MAIN() { return 1; }
5370 #endif
5371 int
5372 main ()
5373 {
5374 main ();
5375   ;
5376   return 0;
5377 }
5378 _ACEOF
5379 rm -f conftest.$ac_objext conftest$ac_exeext
5380 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5381   (eval $ac_link) 2>&5
5382   ac_status=$?
5383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384   (exit $ac_status); } &&
5385          { ac_try='test -s conftest$ac_exeext'
5386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5387   (eval $ac_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390   (exit $ac_status); }; }; then
5391   ac_cv_lib_unix_main=yes
5392 else
5393   echo "$as_me: failed program was:" >&5
5394 cat conftest.$ac_ext >&5
5395 ac_cv_lib_unix_main=no
5396 fi
5397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5398 LIBS=$ac_check_lib_save_LIBS
5399 fi
5400 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
5401 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
5402 if test $ac_cv_lib_unix_main = yes; then
5403   cat >>confdefs.h <<_ACEOF
5404 #define HAVE_LIBUNIX 1
5405 _ACEOF
5406
5407   LIBS="-lunix $LIBS"
5408
5409 fi
5410
5411 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5412 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5413 if test "${ac_cv_search_crypt+set}" = set; then
5414   echo $ECHO_N "(cached) $ECHO_C" >&6
5415 else
5416   ac_func_search_save_LIBS=$LIBS
5417 ac_cv_search_crypt=no
5418 cat >conftest.$ac_ext <<_ACEOF
5419 #line $LINENO "configure"
5420 #include "confdefs.h"
5421
5422 /* Override any gcc2 internal prototype to avoid an error.  */
5423 #ifdef __cplusplus
5424 extern "C"
5425 #endif
5426 /* We use char because int might match the return type of a gcc2
5427    builtin and then its argument prototype would still apply.  */
5428 char crypt ();
5429 #ifdef F77_DUMMY_MAIN
5430 #  ifdef __cplusplus
5431      extern "C"
5432 #  endif
5433    int F77_DUMMY_MAIN() { return 1; }
5434 #endif
5435 int
5436 main ()
5437 {
5438 crypt ();
5439   ;
5440   return 0;
5441 }
5442 _ACEOF
5443 rm -f conftest.$ac_objext conftest$ac_exeext
5444 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5445   (eval $ac_link) 2>&5
5446   ac_status=$?
5447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448   (exit $ac_status); } &&
5449          { ac_try='test -s conftest$ac_exeext'
5450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5451   (eval $ac_try) 2>&5
5452   ac_status=$?
5453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454   (exit $ac_status); }; }; then
5455   ac_cv_search_crypt="none required"
5456 else
5457   echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 fi
5460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5461 if test "$ac_cv_search_crypt" = no; then
5462   for ac_lib in crypt; do
5463     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5464     cat >conftest.$ac_ext <<_ACEOF
5465 #line $LINENO "configure"
5466 #include "confdefs.h"
5467
5468 /* Override any gcc2 internal prototype to avoid an error.  */
5469 #ifdef __cplusplus
5470 extern "C"
5471 #endif
5472 /* We use char because int might match the return type of a gcc2
5473    builtin and then its argument prototype would still apply.  */
5474 char crypt ();
5475 #ifdef F77_DUMMY_MAIN
5476 #  ifdef __cplusplus
5477      extern "C"
5478 #  endif
5479    int F77_DUMMY_MAIN() { return 1; }
5480 #endif
5481 int
5482 main ()
5483 {
5484 crypt ();
5485   ;
5486   return 0;
5487 }
5488 _ACEOF
5489 rm -f conftest.$ac_objext conftest$ac_exeext
5490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5491   (eval $ac_link) 2>&5
5492   ac_status=$?
5493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -s conftest$ac_exeext'
5496   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5497   (eval $ac_try) 2>&5
5498   ac_status=$?
5499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5500   (exit $ac_status); }; }; then
5501   ac_cv_search_crypt="-l$ac_lib"
5502 break
5503 else
5504   echo "$as_me: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 fi
5507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5508   done
5509 fi
5510 LIBS=$ac_func_search_save_LIBS
5511 fi
5512 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
5513 echo "${ECHO_T}$ac_cv_search_crypt" >&6
5514 if test "$ac_cv_search_crypt" != no; then
5515   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
5516
5517 fi
5518
5519 # BeOS:
5520 if test "$PORTNAME" = "beos"
5521 then
5522
5523 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
5524 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
5525 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
5526   echo $ECHO_N "(cached) $ECHO_C" >&6
5527 else
5528   ac_check_lib_save_LIBS=$LIBS
5529 LIBS="-lbind  $LIBS"
5530 cat >conftest.$ac_ext <<_ACEOF
5531 #line $LINENO "configure"
5532 #include "confdefs.h"
5533
5534 /* Override any gcc2 internal prototype to avoid an error.  */
5535 #ifdef __cplusplus
5536 extern "C"
5537 #endif
5538 /* We use char because int might match the return type of a gcc2
5539    builtin and then its argument prototype would still apply.  */
5540 char __inet_ntoa ();
5541 #ifdef F77_DUMMY_MAIN
5542 #  ifdef __cplusplus
5543      extern "C"
5544 #  endif
5545    int F77_DUMMY_MAIN() { return 1; }
5546 #endif
5547 int
5548 main ()
5549 {
5550 __inet_ntoa ();
5551   ;
5552   return 0;
5553 }
5554 _ACEOF
5555 rm -f conftest.$ac_objext conftest$ac_exeext
5556 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5557   (eval $ac_link) 2>&5
5558   ac_status=$?
5559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5560   (exit $ac_status); } &&
5561          { ac_try='test -s conftest$ac_exeext'
5562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5563   (eval $ac_try) 2>&5
5564   ac_status=$?
5565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566   (exit $ac_status); }; }; then
5567   ac_cv_lib_bind___inet_ntoa=yes
5568 else
5569   echo "$as_me: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
5571 ac_cv_lib_bind___inet_ntoa=no
5572 fi
5573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5574 LIBS=$ac_check_lib_save_LIBS
5575 fi
5576 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
5577 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
5578 if test $ac_cv_lib_bind___inet_ntoa = yes; then
5579   cat >>confdefs.h <<_ACEOF
5580 #define HAVE_LIBBIND 1
5581 _ACEOF
5582
5583   LIBS="-lbind $LIBS"
5584
5585 fi
5586
5587 fi
5588 # Solaris:
5589 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
5590 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
5591 if test "${ac_cv_search_fdatasync+set}" = set; then
5592   echo $ECHO_N "(cached) $ECHO_C" >&6
5593 else
5594   ac_func_search_save_LIBS=$LIBS
5595 ac_cv_search_fdatasync=no
5596 cat >conftest.$ac_ext <<_ACEOF
5597 #line $LINENO "configure"
5598 #include "confdefs.h"
5599
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 #ifdef __cplusplus
5602 extern "C"
5603 #endif
5604 /* We use char because int might match the return type of a gcc2
5605    builtin and then its argument prototype would still apply.  */
5606 char fdatasync ();
5607 #ifdef F77_DUMMY_MAIN
5608 #  ifdef __cplusplus
5609      extern "C"
5610 #  endif
5611    int F77_DUMMY_MAIN() { return 1; }
5612 #endif
5613 int
5614 main ()
5615 {
5616 fdatasync ();
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 rm -f conftest.$ac_objext conftest$ac_exeext
5622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5623   (eval $ac_link) 2>&5
5624   ac_status=$?
5625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5626   (exit $ac_status); } &&
5627          { ac_try='test -s conftest$ac_exeext'
5628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5629   (eval $ac_try) 2>&5
5630   ac_status=$?
5631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5632   (exit $ac_status); }; }; then
5633   ac_cv_search_fdatasync="none required"
5634 else
5635   echo "$as_me: failed program was:" >&5
5636 cat conftest.$ac_ext >&5
5637 fi
5638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5639 if test "$ac_cv_search_fdatasync" = no; then
5640   for ac_lib in rt posix4; do
5641     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5642     cat >conftest.$ac_ext <<_ACEOF
5643 #line $LINENO "configure"
5644 #include "confdefs.h"
5645
5646 /* Override any gcc2 internal prototype to avoid an error.  */
5647 #ifdef __cplusplus
5648 extern "C"
5649 #endif
5650 /* We use char because int might match the return type of a gcc2
5651    builtin and then its argument prototype would still apply.  */
5652 char fdatasync ();
5653 #ifdef F77_DUMMY_MAIN
5654 #  ifdef __cplusplus
5655      extern "C"
5656 #  endif
5657    int F77_DUMMY_MAIN() { return 1; }
5658 #endif
5659 int
5660 main ()
5661 {
5662 fdatasync ();
5663   ;
5664   return 0;
5665 }
5666 _ACEOF
5667 rm -f conftest.$ac_objext conftest$ac_exeext
5668 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5669   (eval $ac_link) 2>&5
5670   ac_status=$?
5671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672   (exit $ac_status); } &&
5673          { ac_try='test -s conftest$ac_exeext'
5674   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5675   (eval $ac_try) 2>&5
5676   ac_status=$?
5677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5678   (exit $ac_status); }; }; then
5679   ac_cv_search_fdatasync="-l$ac_lib"
5680 break
5681 else
5682   echo "$as_me: failed program was:" >&5
5683 cat conftest.$ac_ext >&5
5684 fi
5685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5686   done
5687 fi
5688 LIBS=$ac_func_search_save_LIBS
5689 fi
5690 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
5691 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
5692 if test "$ac_cv_search_fdatasync" != no; then
5693   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
5694
5695 fi
5696
5697 # Cygwin:
5698
5699 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
5700 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
5701 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
5702   echo $ECHO_N "(cached) $ECHO_C" >&6
5703 else
5704   ac_check_lib_save_LIBS=$LIBS
5705 LIBS="-lcygipc  $LIBS"
5706 cat >conftest.$ac_ext <<_ACEOF
5707 #line $LINENO "configure"
5708 #include "confdefs.h"
5709
5710 /* Override any gcc2 internal prototype to avoid an error.  */
5711 #ifdef __cplusplus
5712 extern "C"
5713 #endif
5714 /* We use char because int might match the return type of a gcc2
5715    builtin and then its argument prototype would still apply.  */
5716 char shmget ();
5717 #ifdef F77_DUMMY_MAIN
5718 #  ifdef __cplusplus
5719      extern "C"
5720 #  endif
5721    int F77_DUMMY_MAIN() { return 1; }
5722 #endif
5723 int
5724 main ()
5725 {
5726 shmget ();
5727   ;
5728   return 0;
5729 }
5730 _ACEOF
5731 rm -f conftest.$ac_objext conftest$ac_exeext
5732 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5733   (eval $ac_link) 2>&5
5734   ac_status=$?
5735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5736   (exit $ac_status); } &&
5737          { ac_try='test -s conftest$ac_exeext'
5738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5739   (eval $ac_try) 2>&5
5740   ac_status=$?
5741   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5742   (exit $ac_status); }; }; then
5743   ac_cv_lib_cygipc_shmget=yes
5744 else
5745   echo "$as_me: failed program was:" >&5
5746 cat conftest.$ac_ext >&5
5747 ac_cv_lib_cygipc_shmget=no
5748 fi
5749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5750 LIBS=$ac_check_lib_save_LIBS
5751 fi
5752 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
5753 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
5754 if test $ac_cv_lib_cygipc_shmget = yes; then
5755   cat >>confdefs.h <<_ACEOF
5756 #define HAVE_LIBCYGIPC 1
5757 _ACEOF
5758
5759   LIBS="-lcygipc $LIBS"
5760
5761 fi
5762
5763 # WIN32:
5764 if test "$PORTNAME" = "win32"
5765 then
5766
5767 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
5768 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
5769 if test "${ac_cv_lib_wsock32_main+set}" = set; then
5770   echo $ECHO_N "(cached) $ECHO_C" >&6
5771 else
5772   ac_check_lib_save_LIBS=$LIBS
5773 LIBS="-lwsock32  $LIBS"
5774 cat >conftest.$ac_ext <<_ACEOF
5775 #line $LINENO "configure"
5776 #include "confdefs.h"
5777
5778
5779 #ifdef F77_DUMMY_MAIN
5780 #  ifdef __cplusplus
5781      extern "C"
5782 #  endif
5783    int F77_DUMMY_MAIN() { return 1; }
5784 #endif
5785 int
5786 main ()
5787 {
5788 main ();
5789   ;
5790   return 0;
5791 }
5792 _ACEOF
5793 rm -f conftest.$ac_objext conftest$ac_exeext
5794 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5795   (eval $ac_link) 2>&5
5796   ac_status=$?
5797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798   (exit $ac_status); } &&
5799          { ac_try='test -s conftest$ac_exeext'
5800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801   (eval $ac_try) 2>&5
5802   ac_status=$?
5803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804   (exit $ac_status); }; }; then
5805   ac_cv_lib_wsock32_main=yes
5806 else
5807   echo "$as_me: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5809 ac_cv_lib_wsock32_main=no
5810 fi
5811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5812 LIBS=$ac_check_lib_save_LIBS
5813 fi
5814 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
5815 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
5816 if test $ac_cv_lib_wsock32_main = yes; then
5817   cat >>confdefs.h <<_ACEOF
5818 #define HAVE_LIBWSOCK32 1
5819 _ACEOF
5820
5821   LIBS="-lwsock32 $LIBS"
5822
5823 fi
5824
5825 fi
5826
5827 if test "$with_readline" = yes; then
5828
5829 echo "$as_me:$LINENO: checking for readline" >&5
5830 echo $ECHO_N "checking for readline... $ECHO_C" >&6
5831
5832 if test "${pgac_cv_check_readline+set}" = set; then
5833   echo $ECHO_N "(cached) $ECHO_C" >&6
5834 else
5835   pgac_cv_check_readline=no
5836 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
5837   for pgac_rllib in -lreadline -ledit ; do
5838     pgac_save_LIBS=$LIBS
5839     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
5840     cat >conftest.$ac_ext <<_ACEOF
5841 #line $LINENO "configure"
5842 #include "confdefs.h"
5843
5844 /* Override any gcc2 internal prototype to avoid an error.  */
5845 #ifdef __cplusplus
5846 extern "C"
5847 #endif
5848 /* We use char because int might match the return type of a gcc2
5849    builtin and then its argument prototype would still apply.  */
5850 char readline ();
5851 #ifdef F77_DUMMY_MAIN
5852 #  ifdef __cplusplus
5853      extern "C"
5854 #  endif
5855    int F77_DUMMY_MAIN() { return 1; }
5856 #endif
5857 int
5858 main ()
5859 {
5860 readline ();
5861   ;
5862   return 0;
5863 }
5864 _ACEOF
5865 rm -f conftest.$ac_objext conftest$ac_exeext
5866 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5867   (eval $ac_link) 2>&5
5868   ac_status=$?
5869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5870   (exit $ac_status); } &&
5871          { ac_try='test -s conftest$ac_exeext'
5872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5873   (eval $ac_try) 2>&5
5874   ac_status=$?
5875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5876   (exit $ac_status); }; }; then
5877
5878       # NetBSD, OpenBSD, and Irix have a broken linker that does not
5879       # recognize dependent libraries
5880       case $host_os in netbsd* | openbsd* | irix*)
5881         case $pgac_lib in
5882           *curses*) ;;
5883           *) pgac_lib=" -lcurses" ;;
5884         esac
5885       esac
5886
5887       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
5888       break 2
5889
5890 else
5891   echo "$as_me: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 fi
5894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5895     LIBS=$pgac_save_LIBS
5896   done
5897 done
5898 LIBS=$pgac_save_LIBS
5899
5900 fi
5901
5902 if test "$pgac_cv_check_readline" != no ; then
5903
5904 cat >>confdefs.h <<\_ACEOF
5905 #define HAVE_LIBREADLINE 1
5906 _ACEOF
5907
5908   LIBS="$pgac_cv_check_readline $LIBS"
5909   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
5910 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
5911 else
5912   echo "$as_me:$LINENO: result: no" >&5
5913 echo "${ECHO_T}no" >&6
5914 fi
5915   if test x"$pgac_cv_check_readline" = x"no"; then
5916     { { echo "$as_me:$LINENO: error: readline library not found
5917 If you have readline already installed, see config.log for details on the
5918 failure.  It is possible the compiler isn't looking in the proper directory.
5919 Use --without-readline to disable readline support." >&5
5920 echo "$as_me: error: readline library not found
5921 If you have readline already installed, see config.log for details on the
5922 failure.  It is possible the compiler isn't looking in the proper directory.
5923 Use --without-readline to disable readline support." >&2;}
5924    { (exit 1); exit 1; }; }
5925   fi
5926 fi
5927
5928 if test "$with_zlib" = yes; then
5929
5930 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
5931 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
5932 if test "${ac_cv_lib_z_inflate+set}" = set; then
5933   echo $ECHO_N "(cached) $ECHO_C" >&6
5934 else
5935   ac_check_lib_save_LIBS=$LIBS
5936 LIBS="-lz  $LIBS"
5937 cat >conftest.$ac_ext <<_ACEOF
5938 #line $LINENO "configure"
5939 #include "confdefs.h"
5940
5941 /* Override any gcc2 internal prototype to avoid an error.  */
5942 #ifdef __cplusplus
5943 extern "C"
5944 #endif
5945 /* We use char because int might match the return type of a gcc2
5946    builtin and then its argument prototype would still apply.  */
5947 char inflate ();
5948 #ifdef F77_DUMMY_MAIN
5949 #  ifdef __cplusplus
5950      extern "C"
5951 #  endif
5952    int F77_DUMMY_MAIN() { return 1; }
5953 #endif
5954 int
5955 main ()
5956 {
5957 inflate ();
5958   ;
5959   return 0;
5960 }
5961 _ACEOF
5962 rm -f conftest.$ac_objext conftest$ac_exeext
5963 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5964   (eval $ac_link) 2>&5
5965   ac_status=$?
5966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5967   (exit $ac_status); } &&
5968          { ac_try='test -s conftest$ac_exeext'
5969   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5970   (eval $ac_try) 2>&5
5971   ac_status=$?
5972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973   (exit $ac_status); }; }; then
5974   ac_cv_lib_z_inflate=yes
5975 else
5976   echo "$as_me: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5978 ac_cv_lib_z_inflate=no
5979 fi
5980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5981 LIBS=$ac_check_lib_save_LIBS
5982 fi
5983 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
5984 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
5985 if test $ac_cv_lib_z_inflate = yes; then
5986   cat >>confdefs.h <<_ACEOF
5987 #define HAVE_LIBZ 1
5988 _ACEOF
5989
5990   LIBS="-lz $LIBS"
5991
5992 else
5993   { { echo "$as_me:$LINENO: error: zlib library not found
5994 If you have zlib already installed, see config.log for details on the
5995 failure.  It is possible the compiler isn't looking in the proper directory.
5996 Use --without-zlib to disable zlib support." >&5
5997 echo "$as_me: error: zlib library not found
5998 If you have zlib already installed, see config.log for details on the
5999 failure.  It is possible the compiler isn't looking in the proper directory.
6000 Use --without-zlib to disable zlib support." >&2;}
6001    { (exit 1); exit 1; }; }
6002 fi
6003
6004 fi
6005
6006 if test "$enable_spinlocks" = yes; then
6007
6008 cat >>confdefs.h <<\_ACEOF
6009 #define HAVE_SPINLOCKS 1
6010 _ACEOF
6011
6012 else
6013   { echo "$as_me:$LINENO: WARNING:
6014 *** Not using spinlocks will cause poor performance." >&5
6015 echo "$as_me: WARNING:
6016 *** Not using spinlocks will cause poor performance." >&2;}
6017 fi
6018
6019 if test "$with_krb4" = yes ; then
6020
6021 echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
6022 echo $ECHO_N "checking for des_encrypt in -ldes... $ECHO_C" >&6
6023 if test "${ac_cv_lib_des_des_encrypt+set}" = set; then
6024   echo $ECHO_N "(cached) $ECHO_C" >&6
6025 else
6026   ac_check_lib_save_LIBS=$LIBS
6027 LIBS="-ldes  $LIBS"
6028 cat >conftest.$ac_ext <<_ACEOF
6029 #line $LINENO "configure"
6030 #include "confdefs.h"
6031
6032 /* Override any gcc2 internal prototype to avoid an error.  */
6033 #ifdef __cplusplus
6034 extern "C"
6035 #endif
6036 /* We use char because int might match the return type of a gcc2
6037    builtin and then its argument prototype would still apply.  */
6038 char des_encrypt ();
6039 #ifdef F77_DUMMY_MAIN
6040 #  ifdef __cplusplus
6041      extern "C"
6042 #  endif
6043    int F77_DUMMY_MAIN() { return 1; }
6044 #endif
6045 int
6046 main ()
6047 {
6048 des_encrypt ();
6049   ;
6050   return 0;
6051 }
6052 _ACEOF
6053 rm -f conftest.$ac_objext conftest$ac_exeext
6054 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6055   (eval $ac_link) 2>&5
6056   ac_status=$?
6057   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6058   (exit $ac_status); } &&
6059          { ac_try='test -s conftest$ac_exeext'
6060   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6061   (eval $ac_try) 2>&5
6062   ac_status=$?
6063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6064   (exit $ac_status); }; }; then
6065   ac_cv_lib_des_des_encrypt=yes
6066 else
6067   echo "$as_me: failed program was:" >&5
6068 cat conftest.$ac_ext >&5
6069 ac_cv_lib_des_des_encrypt=no
6070 fi
6071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6072 LIBS=$ac_check_lib_save_LIBS
6073 fi
6074 echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_encrypt" >&5
6075 echo "${ECHO_T}$ac_cv_lib_des_des_encrypt" >&6
6076 if test $ac_cv_lib_des_des_encrypt = yes; then
6077   cat >>confdefs.h <<_ACEOF
6078 #define HAVE_LIBDES 1
6079 _ACEOF
6080
6081   LIBS="-ldes $LIBS"
6082
6083 else
6084   { { echo "$as_me:$LINENO: error: library 'des' is required for Kerberos 4" >&5
6085 echo "$as_me: error: library 'des' is required for Kerberos 4" >&2;}
6086    { (exit 1); exit 1; }; }
6087 fi
6088
6089
6090 echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
6091 echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6
6092 if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
6093   echo $ECHO_N "(cached) $ECHO_C" >&6
6094 else
6095   ac_check_lib_save_LIBS=$LIBS
6096 LIBS="-lkrb  $LIBS"
6097 cat >conftest.$ac_ext <<_ACEOF
6098 #line $LINENO "configure"
6099 #include "confdefs.h"
6100
6101 /* Override any gcc2 internal prototype to avoid an error.  */
6102 #ifdef __cplusplus
6103 extern "C"
6104 #endif
6105 /* We use char because int might match the return type of a gcc2
6106    builtin and then its argument prototype would still apply.  */
6107 char krb_sendauth ();
6108 #ifdef F77_DUMMY_MAIN
6109 #  ifdef __cplusplus
6110      extern "C"
6111 #  endif
6112    int F77_DUMMY_MAIN() { return 1; }
6113 #endif
6114 int
6115 main ()
6116 {
6117 krb_sendauth ();
6118   ;
6119   return 0;
6120 }
6121 _ACEOF
6122 rm -f conftest.$ac_objext conftest$ac_exeext
6123 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6124   (eval $ac_link) 2>&5
6125   ac_status=$?
6126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6127   (exit $ac_status); } &&
6128          { ac_try='test -s conftest$ac_exeext'
6129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6130   (eval $ac_try) 2>&5
6131   ac_status=$?
6132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6133   (exit $ac_status); }; }; then
6134   ac_cv_lib_krb_krb_sendauth=yes
6135 else
6136   echo "$as_me: failed program was:" >&5
6137 cat conftest.$ac_ext >&5
6138 ac_cv_lib_krb_krb_sendauth=no
6139 fi
6140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6141 LIBS=$ac_check_lib_save_LIBS
6142 fi
6143 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
6144 echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6
6145 if test $ac_cv_lib_krb_krb_sendauth = yes; then
6146   cat >>confdefs.h <<_ACEOF
6147 #define HAVE_LIBKRB 1
6148 _ACEOF
6149
6150   LIBS="-lkrb $LIBS"
6151
6152 else
6153   { { echo "$as_me:$LINENO: error: library 'krb' is required for Kerberos 4" >&5
6154 echo "$as_me: error: library 'krb' is required for Kerberos 4" >&2;}
6155    { (exit 1); exit 1; }; }
6156 fi
6157
6158
6159 for ac_func in gethostname
6160 do
6161 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6162 echo "$as_me:$LINENO: checking for $ac_func" >&5
6163 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6164 if eval "test \"\${$as_ac_var+set}\" = set"; then
6165   echo $ECHO_N "(cached) $ECHO_C" >&6
6166 else
6167   cat >conftest.$ac_ext <<_ACEOF
6168 #line $LINENO "configure"
6169 #include "confdefs.h"
6170 /* System header to define __stub macros and hopefully few prototypes,
6171     which can conflict with char $ac_func (); below.  */
6172 #include <assert.h>
6173 /* Override any gcc2 internal prototype to avoid an error.  */
6174 #ifdef __cplusplus
6175 extern "C"
6176 #endif
6177 /* We use char because int might match the return type of a gcc2
6178    builtin and then its argument prototype would still apply.  */
6179 char $ac_func ();
6180 char (*f) ();
6181
6182 #ifdef F77_DUMMY_MAIN
6183 #  ifdef __cplusplus
6184      extern "C"
6185 #  endif
6186    int F77_DUMMY_MAIN() { return 1; }
6187 #endif
6188 int
6189 main ()
6190 {
6191 /* The GNU C library defines this for functions which it implements
6192     to always fail with ENOSYS.  Some functions are actually named
6193     something starting with __ and the normal name is an alias.  */
6194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6195 choke me
6196 #else
6197 f = $ac_func;
6198 #endif
6199
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f conftest.$ac_objext conftest$ac_exeext
6205 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6206   (eval $ac_link) 2>&5
6207   ac_status=$?
6208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209   (exit $ac_status); } &&
6210          { ac_try='test -s conftest$ac_exeext'
6211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6212   (eval $ac_try) 2>&5
6213   ac_status=$?
6214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215   (exit $ac_status); }; }; then
6216   eval "$as_ac_var=yes"
6217 else
6218   echo "$as_me: failed program was:" >&5
6219 cat conftest.$ac_ext >&5
6220 eval "$as_ac_var=no"
6221 fi
6222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6223 fi
6224 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6225 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6226 if test `eval echo '${'$as_ac_var'}'` = yes; then
6227   cat >>confdefs.h <<_ACEOF
6228 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6229 _ACEOF
6230
6231 else
6232   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6233 fi
6234 done
6235
6236
6237 fi
6238
6239 if test "$with_krb5" = yes ; then
6240   echo "$as_me:$LINENO: checking for library containing com_err" >&5
6241 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6242 if test "${ac_cv_search_com_err+set}" = set; then
6243   echo $ECHO_N "(cached) $ECHO_C" >&6
6244 else
6245   ac_func_search_save_LIBS=$LIBS
6246 ac_cv_search_com_err=no
6247 cat >conftest.$ac_ext <<_ACEOF
6248 #line $LINENO "configure"
6249 #include "confdefs.h"
6250
6251 /* Override any gcc2 internal prototype to avoid an error.  */
6252 #ifdef __cplusplus
6253 extern "C"
6254 #endif
6255 /* We use char because int might match the return type of a gcc2
6256    builtin and then its argument prototype would still apply.  */
6257 char com_err ();
6258 #ifdef F77_DUMMY_MAIN
6259 #  ifdef __cplusplus
6260      extern "C"
6261 #  endif
6262    int F77_DUMMY_MAIN() { return 1; }
6263 #endif
6264 int
6265 main ()
6266 {
6267 com_err ();
6268   ;
6269   return 0;
6270 }
6271 _ACEOF
6272 rm -f conftest.$ac_objext conftest$ac_exeext
6273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6274   (eval $ac_link) 2>&5
6275   ac_status=$?
6276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6277   (exit $ac_status); } &&
6278          { ac_try='test -s conftest$ac_exeext'
6279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6280   (eval $ac_try) 2>&5
6281   ac_status=$?
6282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6283   (exit $ac_status); }; }; then
6284   ac_cv_search_com_err="none required"
6285 else
6286   echo "$as_me: failed program was:" >&5
6287 cat conftest.$ac_ext >&5
6288 fi
6289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6290 if test "$ac_cv_search_com_err" = no; then
6291   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6292     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6293     cat >conftest.$ac_ext <<_ACEOF
6294 #line $LINENO "configure"
6295 #include "confdefs.h"
6296
6297 /* Override any gcc2 internal prototype to avoid an error.  */
6298 #ifdef __cplusplus
6299 extern "C"
6300 #endif
6301 /* We use char because int might match the return type of a gcc2
6302    builtin and then its argument prototype would still apply.  */
6303 char com_err ();
6304 #ifdef F77_DUMMY_MAIN
6305 #  ifdef __cplusplus
6306      extern "C"
6307 #  endif
6308    int F77_DUMMY_MAIN() { return 1; }
6309 #endif
6310 int
6311 main ()
6312 {
6313 com_err ();
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 rm -f conftest.$ac_objext conftest$ac_exeext
6319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6320   (eval $ac_link) 2>&5
6321   ac_status=$?
6322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6323   (exit $ac_status); } &&
6324          { ac_try='test -s conftest$ac_exeext'
6325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6326   (eval $ac_try) 2>&5
6327   ac_status=$?
6328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6329   (exit $ac_status); }; }; then
6330   ac_cv_search_com_err="-l$ac_lib"
6331 break
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat conftest.$ac_ext >&5
6335 fi
6336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6337   done
6338 fi
6339 LIBS=$ac_func_search_save_LIBS
6340 fi
6341 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6342 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6343 if test "$ac_cv_search_com_err" != no; then
6344   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6345
6346 else
6347   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6348 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6349    { (exit 1); exit 1; }; }
6350 fi
6351
6352   echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6353 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6354 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6355   echo $ECHO_N "(cached) $ECHO_C" >&6
6356 else
6357   ac_func_search_save_LIBS=$LIBS
6358 ac_cv_search_krb5_encrypt=no
6359 cat >conftest.$ac_ext <<_ACEOF
6360 #line $LINENO "configure"
6361 #include "confdefs.h"
6362
6363 /* Override any gcc2 internal prototype to avoid an error.  */
6364 #ifdef __cplusplus
6365 extern "C"
6366 #endif
6367 /* We use char because int might match the return type of a gcc2
6368    builtin and then its argument prototype would still apply.  */
6369 char krb5_encrypt ();
6370 #ifdef F77_DUMMY_MAIN
6371 #  ifdef __cplusplus
6372      extern "C"
6373 #  endif
6374    int F77_DUMMY_MAIN() { return 1; }
6375 #endif
6376 int
6377 main ()
6378 {
6379 krb5_encrypt ();
6380   ;
6381   return 0;
6382 }
6383 _ACEOF
6384 rm -f conftest.$ac_objext conftest$ac_exeext
6385 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6386   (eval $ac_link) 2>&5
6387   ac_status=$?
6388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6389   (exit $ac_status); } &&
6390          { ac_try='test -s conftest$ac_exeext'
6391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6392   (eval $ac_try) 2>&5
6393   ac_status=$?
6394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6395   (exit $ac_status); }; }; then
6396   ac_cv_search_krb5_encrypt="none required"
6397 else
6398   echo "$as_me: failed program was:" >&5
6399 cat conftest.$ac_ext >&5
6400 fi
6401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6402 if test "$ac_cv_search_krb5_encrypt" = no; then
6403   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6404     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6405     cat >conftest.$ac_ext <<_ACEOF
6406 #line $LINENO "configure"
6407 #include "confdefs.h"
6408
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 #ifdef __cplusplus
6411 extern "C"
6412 #endif
6413 /* We use char because int might match the return type of a gcc2
6414    builtin and then its argument prototype would still apply.  */
6415 char krb5_encrypt ();
6416 #ifdef F77_DUMMY_MAIN
6417 #  ifdef __cplusplus
6418      extern "C"
6419 #  endif
6420    int F77_DUMMY_MAIN() { return 1; }
6421 #endif
6422 int
6423 main ()
6424 {
6425 krb5_encrypt ();
6426   ;
6427   return 0;
6428 }
6429 _ACEOF
6430 rm -f conftest.$ac_objext conftest$ac_exeext
6431 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6432   (eval $ac_link) 2>&5
6433   ac_status=$?
6434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -s conftest$ac_exeext'
6437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   ac_cv_search_krb5_encrypt="-l$ac_lib"
6443 break
6444 else
6445   echo "$as_me: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
6447 fi
6448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6449   done
6450 fi
6451 LIBS=$ac_func_search_save_LIBS
6452 fi
6453 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6454 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6455 if test "$ac_cv_search_krb5_encrypt" != no; then
6456   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6457
6458 else
6459   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6460 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6461    { (exit 1); exit 1; }; }
6462 fi
6463
6464   echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6465 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6466 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6467   echo $ECHO_N "(cached) $ECHO_C" >&6
6468 else
6469   ac_func_search_save_LIBS=$LIBS
6470 ac_cv_search_krb5_sendauth=no
6471 cat >conftest.$ac_ext <<_ACEOF
6472 #line $LINENO "configure"
6473 #include "confdefs.h"
6474
6475 /* Override any gcc2 internal prototype to avoid an error.  */
6476 #ifdef __cplusplus
6477 extern "C"
6478 #endif
6479 /* We use char because int might match the return type of a gcc2
6480    builtin and then its argument prototype would still apply.  */
6481 char krb5_sendauth ();
6482 #ifdef F77_DUMMY_MAIN
6483 #  ifdef __cplusplus
6484      extern "C"
6485 #  endif
6486    int F77_DUMMY_MAIN() { return 1; }
6487 #endif
6488 int
6489 main ()
6490 {
6491 krb5_sendauth ();
6492   ;
6493   return 0;
6494 }
6495 _ACEOF
6496 rm -f conftest.$ac_objext conftest$ac_exeext
6497 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6498   (eval $ac_link) 2>&5
6499   ac_status=$?
6500   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6501   (exit $ac_status); } &&
6502          { ac_try='test -s conftest$ac_exeext'
6503   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6504   (eval $ac_try) 2>&5
6505   ac_status=$?
6506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507   (exit $ac_status); }; }; then
6508   ac_cv_search_krb5_sendauth="none required"
6509 else
6510   echo "$as_me: failed program was:" >&5
6511 cat conftest.$ac_ext >&5
6512 fi
6513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6514 if test "$ac_cv_search_krb5_sendauth" = no; then
6515   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6516     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6517     cat >conftest.$ac_ext <<_ACEOF
6518 #line $LINENO "configure"
6519 #include "confdefs.h"
6520
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 #ifdef __cplusplus
6523 extern "C"
6524 #endif
6525 /* We use char because int might match the return type of a gcc2
6526    builtin and then its argument prototype would still apply.  */
6527 char krb5_sendauth ();
6528 #ifdef F77_DUMMY_MAIN
6529 #  ifdef __cplusplus
6530      extern "C"
6531 #  endif
6532    int F77_DUMMY_MAIN() { return 1; }
6533 #endif
6534 int
6535 main ()
6536 {
6537 krb5_sendauth ();
6538   ;
6539   return 0;
6540 }
6541 _ACEOF
6542 rm -f conftest.$ac_objext conftest$ac_exeext
6543 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6544   (eval $ac_link) 2>&5
6545   ac_status=$?
6546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547   (exit $ac_status); } &&
6548          { ac_try='test -s conftest$ac_exeext'
6549   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6550   (eval $ac_try) 2>&5
6551   ac_status=$?
6552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6553   (exit $ac_status); }; }; then
6554   ac_cv_search_krb5_sendauth="-l$ac_lib"
6555 break
6556 else
6557   echo "$as_me: failed program was:" >&5
6558 cat conftest.$ac_ext >&5
6559 fi
6560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6561   done
6562 fi
6563 LIBS=$ac_func_search_save_LIBS
6564 fi
6565 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6566 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6567 if test "$ac_cv_search_krb5_sendauth" != no; then
6568   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6569
6570 else
6571   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6572 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6573    { (exit 1); exit 1; }; }
6574 fi
6575
6576 fi
6577
6578 if test "$with_openssl" = yes ; then
6579
6580 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6581 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6582 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6583   echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585   ac_check_lib_save_LIBS=$LIBS
6586 LIBS="-lcrypto  $LIBS"
6587 cat >conftest.$ac_ext <<_ACEOF
6588 #line $LINENO "configure"
6589 #include "confdefs.h"
6590
6591 /* Override any gcc2 internal prototype to avoid an error.  */
6592 #ifdef __cplusplus
6593 extern "C"
6594 #endif
6595 /* We use char because int might match the return type of a gcc2
6596    builtin and then its argument prototype would still apply.  */
6597 char CRYPTO_new_ex_data ();
6598 #ifdef F77_DUMMY_MAIN
6599 #  ifdef __cplusplus
6600      extern "C"
6601 #  endif
6602    int F77_DUMMY_MAIN() { return 1; }
6603 #endif
6604 int
6605 main ()
6606 {
6607 CRYPTO_new_ex_data ();
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext conftest$ac_exeext
6613 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6614   (eval $ac_link) 2>&5
6615   ac_status=$?
6616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6617   (exit $ac_status); } &&
6618          { ac_try='test -s conftest$ac_exeext'
6619   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623   (exit $ac_status); }; }; then
6624   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6625 else
6626   echo "$as_me: failed program was:" >&5
6627 cat conftest.$ac_ext >&5
6628 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6629 fi
6630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6631 LIBS=$ac_check_lib_save_LIBS
6632 fi
6633 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6634 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6635 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6636   cat >>confdefs.h <<_ACEOF
6637 #define HAVE_LIBCRYPTO 1
6638 _ACEOF
6639
6640   LIBS="-lcrypto $LIBS"
6641
6642 else
6643   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6644 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6645    { (exit 1); exit 1; }; }
6646 fi
6647
6648
6649 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6650 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6651 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6652   echo $ECHO_N "(cached) $ECHO_C" >&6
6653 else
6654   ac_check_lib_save_LIBS=$LIBS
6655 LIBS="-lssl  $LIBS"
6656 cat >conftest.$ac_ext <<_ACEOF
6657 #line $LINENO "configure"
6658 #include "confdefs.h"
6659
6660 /* Override any gcc2 internal prototype to avoid an error.  */
6661 #ifdef __cplusplus
6662 extern "C"
6663 #endif
6664 /* We use char because int might match the return type of a gcc2
6665    builtin and then its argument prototype would still apply.  */
6666 char SSL_library_init ();
6667 #ifdef F77_DUMMY_MAIN
6668 #  ifdef __cplusplus
6669      extern "C"
6670 #  endif
6671    int F77_DUMMY_MAIN() { return 1; }
6672 #endif
6673 int
6674 main ()
6675 {
6676 SSL_library_init ();
6677   ;
6678   return 0;
6679 }
6680 _ACEOF
6681 rm -f conftest.$ac_objext conftest$ac_exeext
6682 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6683   (eval $ac_link) 2>&5
6684   ac_status=$?
6685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686   (exit $ac_status); } &&
6687          { ac_try='test -s conftest$ac_exeext'
6688   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6689   (eval $ac_try) 2>&5
6690   ac_status=$?
6691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692   (exit $ac_status); }; }; then
6693   ac_cv_lib_ssl_SSL_library_init=yes
6694 else
6695   echo "$as_me: failed program was:" >&5
6696 cat conftest.$ac_ext >&5
6697 ac_cv_lib_ssl_SSL_library_init=no
6698 fi
6699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6700 LIBS=$ac_check_lib_save_LIBS
6701 fi
6702 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
6703 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
6704 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
6705   cat >>confdefs.h <<_ACEOF
6706 #define HAVE_LIBSSL 1
6707 _ACEOF
6708
6709   LIBS="-lssl $LIBS"
6710
6711 else
6712   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
6713 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
6714    { (exit 1); exit 1; }; }
6715 fi
6716
6717 fi
6718
6719 if test "$with_pam" = yes ; then
6720
6721 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
6722 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
6723 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
6724   echo $ECHO_N "(cached) $ECHO_C" >&6
6725 else
6726   ac_check_lib_save_LIBS=$LIBS
6727 LIBS="-lpam  $LIBS"
6728 cat >conftest.$ac_ext <<_ACEOF
6729 #line $LINENO "configure"
6730 #include "confdefs.h"
6731
6732 /* Override any gcc2 internal prototype to avoid an error.  */
6733 #ifdef __cplusplus
6734 extern "C"
6735 #endif
6736 /* We use char because int might match the return type of a gcc2
6737    builtin and then its argument prototype would still apply.  */
6738 char pam_start ();
6739 #ifdef F77_DUMMY_MAIN
6740 #  ifdef __cplusplus
6741      extern "C"
6742 #  endif
6743    int F77_DUMMY_MAIN() { return 1; }
6744 #endif
6745 int
6746 main ()
6747 {
6748 pam_start ();
6749   ;
6750   return 0;
6751 }
6752 _ACEOF
6753 rm -f conftest.$ac_objext conftest$ac_exeext
6754 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6755   (eval $ac_link) 2>&5
6756   ac_status=$?
6757   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6758   (exit $ac_status); } &&
6759          { ac_try='test -s conftest$ac_exeext'
6760   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6761   (eval $ac_try) 2>&5
6762   ac_status=$?
6763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6764   (exit $ac_status); }; }; then
6765   ac_cv_lib_pam_pam_start=yes
6766 else
6767   echo "$as_me: failed program was:" >&5
6768 cat conftest.$ac_ext >&5
6769 ac_cv_lib_pam_pam_start=no
6770 fi
6771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6772 LIBS=$ac_check_lib_save_LIBS
6773 fi
6774 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
6775 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
6776 if test $ac_cv_lib_pam_pam_start = yes; then
6777   cat >>confdefs.h <<_ACEOF
6778 #define HAVE_LIBPAM 1
6779 _ACEOF
6780
6781   LIBS="-lpam $LIBS"
6782
6783 else
6784   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
6785 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
6786    { (exit 1); exit 1; }; }
6787 fi
6788
6789 fi
6790
6791
6792 ##
6793 ## Header files
6794 ##
6795
6796 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6797 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6798 if test "${ac_cv_header_stdc+set}" = set; then
6799   echo $ECHO_N "(cached) $ECHO_C" >&6
6800 else
6801   cat >conftest.$ac_ext <<_ACEOF
6802 #line $LINENO "configure"
6803 #include "confdefs.h"
6804 #include <stdlib.h>
6805 #include <stdarg.h>
6806 #include <string.h>
6807 #include <float.h>
6808
6809 _ACEOF
6810 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6811   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6812   ac_status=$?
6813   egrep -v '^ *\+' conftest.er1 >conftest.err
6814   rm -f conftest.er1
6815   cat conftest.err >&5
6816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817   (exit $ac_status); } >/dev/null; then
6818   if test -s conftest.err; then
6819     ac_cpp_err=$ac_c_preproc_warn_flag
6820   else
6821     ac_cpp_err=
6822   fi
6823 else
6824   ac_cpp_err=yes
6825 fi
6826 if test -z "$ac_cpp_err"; then
6827   ac_cv_header_stdc=yes
6828 else
6829   echo "$as_me: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831   ac_cv_header_stdc=no
6832 fi
6833 rm -f conftest.err conftest.$ac_ext
6834
6835 if test $ac_cv_header_stdc = yes; then
6836   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6837   cat >conftest.$ac_ext <<_ACEOF
6838 #line $LINENO "configure"
6839 #include "confdefs.h"
6840 #include <string.h>
6841
6842 _ACEOF
6843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6844   egrep "memchr" >/dev/null 2>&1; then
6845   :
6846 else
6847   ac_cv_header_stdc=no
6848 fi
6849 rm -f conftest*
6850
6851 fi
6852
6853 if test $ac_cv_header_stdc = yes; then
6854   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6855   cat >conftest.$ac_ext <<_ACEOF
6856 #line $LINENO "configure"
6857 #include "confdefs.h"
6858 #include <stdlib.h>
6859
6860 _ACEOF
6861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6862   egrep "free" >/dev/null 2>&1; then
6863   :
6864 else
6865   ac_cv_header_stdc=no
6866 fi
6867 rm -f conftest*
6868
6869 fi
6870
6871 if test $ac_cv_header_stdc = yes; then
6872   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6873   if test "$cross_compiling" = yes; then
6874   :
6875 else
6876   cat >conftest.$ac_ext <<_ACEOF
6877 #line $LINENO "configure"
6878 #include "confdefs.h"
6879 #include <ctype.h>
6880 #if ((' ' & 0x0FF) == 0x020)
6881 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6882 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6883 #else
6884 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6885                      || ('j' <= (c) && (c) <= 'r') \
6886                      || ('s' <= (c) && (c) <= 'z'))
6887 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6888 #endif
6889
6890 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6891 int
6892 main ()
6893 {
6894   int i;
6895   for (i = 0; i < 256; i++)
6896     if (XOR (islower (i), ISLOWER (i))
6897         || toupper (i) != TOUPPER (i))
6898       exit(2);
6899   exit (0);
6900 }
6901 _ACEOF
6902 rm -f conftest$ac_exeext
6903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6904   (eval $ac_link) 2>&5
6905   ac_status=$?
6906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6907   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6908   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6909   (eval $ac_try) 2>&5
6910   ac_status=$?
6911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6912   (exit $ac_status); }; }; then
6913   :
6914 else
6915   echo "$as_me: program exited with status $ac_status" >&5
6916 echo "$as_me: failed program was:" >&5
6917 cat conftest.$ac_ext >&5
6918 ( exit $ac_status )
6919 ac_cv_header_stdc=no
6920 fi
6921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6922 fi
6923 fi
6924 fi
6925 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6926 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6927 if test $ac_cv_header_stdc = yes; then
6928
6929 cat >>confdefs.h <<\_ACEOF
6930 #define STDC_HEADERS 1
6931 _ACEOF
6932
6933 fi
6934
6935 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6946                   inttypes.h stdint.h unistd.h
6947 do
6948 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6949 echo "$as_me:$LINENO: checking for $ac_header" >&5
6950 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6951 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6952   echo $ECHO_N "(cached) $ECHO_C" >&6
6953 else
6954   cat >conftest.$ac_ext <<_ACEOF
6955 #line $LINENO "configure"
6956 #include "confdefs.h"
6957 $ac_includes_default
6958
6959 #include <$ac_header>
6960 _ACEOF
6961 rm -f conftest.$ac_objext
6962 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6963   (eval $ac_compile) 2>&5
6964   ac_status=$?
6965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -s conftest.$ac_objext'
6968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6972   (exit $ac_status); }; }; then
6973   eval "$as_ac_Header=yes"
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 eval "$as_ac_Header=no"
6978 fi
6979 rm -f conftest.$ac_objext conftest.$ac_ext
6980 fi
6981 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6982 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6983 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6984   cat >>confdefs.h <<_ACEOF
6985 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6986 _ACEOF
6987
6988 fi
6989
6990 done
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018 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
7019 do
7020 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7021 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7022   echo "$as_me:$LINENO: checking for $ac_header" >&5
7023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7025   echo $ECHO_N "(cached) $ECHO_C" >&6
7026 fi
7027 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7028 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7029 else
7030   # Is the header compilable?
7031 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7032 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7033 cat >conftest.$ac_ext <<_ACEOF
7034 #line $LINENO "configure"
7035 #include "confdefs.h"
7036 $ac_includes_default
7037 #include <$ac_header>
7038 _ACEOF
7039 rm -f conftest.$ac_objext
7040 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7041   (eval $ac_compile) 2>&5
7042   ac_status=$?
7043   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044   (exit $ac_status); } &&
7045          { ac_try='test -s conftest.$ac_objext'
7046   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7047   (eval $ac_try) 2>&5
7048   ac_status=$?
7049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050   (exit $ac_status); }; }; then
7051   ac_header_compiler=yes
7052 else
7053   echo "$as_me: failed program was:" >&5
7054 cat conftest.$ac_ext >&5
7055 ac_header_compiler=no
7056 fi
7057 rm -f conftest.$ac_objext conftest.$ac_ext
7058 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7059 echo "${ECHO_T}$ac_header_compiler" >&6
7060
7061 # Is the header present?
7062 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7063 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7064 cat >conftest.$ac_ext <<_ACEOF
7065 #line $LINENO "configure"
7066 #include "confdefs.h"
7067 #include <$ac_header>
7068 _ACEOF
7069 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7071   ac_status=$?
7072   egrep -v '^ *\+' conftest.er1 >conftest.err
7073   rm -f conftest.er1
7074   cat conftest.err >&5
7075   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7076   (exit $ac_status); } >/dev/null; then
7077   if test -s conftest.err; then
7078     ac_cpp_err=$ac_c_preproc_warn_flag
7079   else
7080     ac_cpp_err=
7081   fi
7082 else
7083   ac_cpp_err=yes
7084 fi
7085 if test -z "$ac_cpp_err"; then
7086   ac_header_preproc=yes
7087 else
7088   echo "$as_me: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   ac_header_preproc=no
7091 fi
7092 rm -f conftest.err conftest.$ac_ext
7093 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7094 echo "${ECHO_T}$ac_header_preproc" >&6
7095
7096 # So?  What about this header?
7097 case $ac_header_compiler:$ac_header_preproc in
7098   yes:no )
7099     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7100 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7101     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7102 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7103   no:yes )
7104     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7105 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7106     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7107 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7108     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7109 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7110 esac
7111 echo "$as_me:$LINENO: checking for $ac_header" >&5
7112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7114   echo $ECHO_N "(cached) $ECHO_C" >&6
7115 else
7116   eval "$as_ac_Header=$ac_header_preproc"
7117 fi
7118 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7119 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7120
7121 fi
7122 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7123   cat >>confdefs.h <<_ACEOF
7124 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7125 _ACEOF
7126
7127 fi
7128
7129 done
7130
7131
7132 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7133 # netinet/in.h is included first.
7134
7135 for ac_header in netinet/in.h
7136 do
7137 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7138 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7139   echo "$as_me:$LINENO: checking for $ac_header" >&5
7140 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7141 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7142   echo $ECHO_N "(cached) $ECHO_C" >&6
7143 fi
7144 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7145 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7146 else
7147   # Is the header compilable?
7148 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7149 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7150 cat >conftest.$ac_ext <<_ACEOF
7151 #line $LINENO "configure"
7152 #include "confdefs.h"
7153 $ac_includes_default
7154 #include <$ac_header>
7155 _ACEOF
7156 rm -f conftest.$ac_objext
7157 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7158   (eval $ac_compile) 2>&5
7159   ac_status=$?
7160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7161   (exit $ac_status); } &&
7162          { ac_try='test -s conftest.$ac_objext'
7163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7164   (eval $ac_try) 2>&5
7165   ac_status=$?
7166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7167   (exit $ac_status); }; }; then
7168   ac_header_compiler=yes
7169 else
7170   echo "$as_me: failed program was:" >&5
7171 cat conftest.$ac_ext >&5
7172 ac_header_compiler=no
7173 fi
7174 rm -f conftest.$ac_objext conftest.$ac_ext
7175 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7176 echo "${ECHO_T}$ac_header_compiler" >&6
7177
7178 # Is the header present?
7179 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7180 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7181 cat >conftest.$ac_ext <<_ACEOF
7182 #line $LINENO "configure"
7183 #include "confdefs.h"
7184 #include <$ac_header>
7185 _ACEOF
7186 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7188   ac_status=$?
7189   egrep -v '^ *\+' conftest.er1 >conftest.err
7190   rm -f conftest.er1
7191   cat conftest.err >&5
7192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193   (exit $ac_status); } >/dev/null; then
7194   if test -s conftest.err; then
7195     ac_cpp_err=$ac_c_preproc_warn_flag
7196   else
7197     ac_cpp_err=
7198   fi
7199 else
7200   ac_cpp_err=yes
7201 fi
7202 if test -z "$ac_cpp_err"; then
7203   ac_header_preproc=yes
7204 else
7205   echo "$as_me: failed program was:" >&5
7206   cat conftest.$ac_ext >&5
7207   ac_header_preproc=no
7208 fi
7209 rm -f conftest.err conftest.$ac_ext
7210 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7211 echo "${ECHO_T}$ac_header_preproc" >&6
7212
7213 # So?  What about this header?
7214 case $ac_header_compiler:$ac_header_preproc in
7215   yes:no )
7216     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7217 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7218     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7219 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7220   no:yes )
7221     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7222 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7223     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7224 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7225     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7226 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7227 esac
7228 echo "$as_me:$LINENO: checking for $ac_header" >&5
7229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7230 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7231   echo $ECHO_N "(cached) $ECHO_C" >&6
7232 else
7233   eval "$as_ac_Header=$ac_header_preproc"
7234 fi
7235 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7236 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7237
7238 fi
7239 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7240   cat >>confdefs.h <<_ACEOF
7241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7242 _ACEOF
7243
7244 fi
7245
7246 done
7247
7248
7249 for ac_header in netinet/tcp.h
7250 do
7251 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7252 echo "$as_me:$LINENO: checking for $ac_header" >&5
7253 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7255   echo $ECHO_N "(cached) $ECHO_C" >&6
7256 else
7257   cat >conftest.$ac_ext <<_ACEOF
7258 #line $LINENO "configure"
7259 #include "confdefs.h"
7260 $ac_includes_default
7261 #ifdef HAVE_NETINET_IN_H
7262 #include <netinet/in.h>
7263 #endif
7264
7265
7266 #include <$ac_header>
7267 _ACEOF
7268 rm -f conftest.$ac_objext
7269 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7270   (eval $ac_compile) 2>&5
7271   ac_status=$?
7272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273   (exit $ac_status); } &&
7274          { ac_try='test -s conftest.$ac_objext'
7275   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7276   (eval $ac_try) 2>&5
7277   ac_status=$?
7278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7279   (exit $ac_status); }; }; then
7280   eval "$as_ac_Header=yes"
7281 else
7282   echo "$as_me: failed program was:" >&5
7283 cat conftest.$ac_ext >&5
7284 eval "$as_ac_Header=no"
7285 fi
7286 rm -f conftest.$ac_objext conftest.$ac_ext
7287 fi
7288 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7290 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7291   cat >>confdefs.h <<_ACEOF
7292 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7293 _ACEOF
7294
7295 fi
7296
7297 done
7298
7299
7300 if test "$with_readline" = yes; then
7301
7302 for ac_header in readline/readline.h
7303 do
7304 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7305 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7306   echo "$as_me:$LINENO: checking for $ac_header" >&5
7307 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7308 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7309   echo $ECHO_N "(cached) $ECHO_C" >&6
7310 fi
7311 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7313 else
7314   # Is the header compilable?
7315 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7316 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7317 cat >conftest.$ac_ext <<_ACEOF
7318 #line $LINENO "configure"
7319 #include "confdefs.h"
7320 $ac_includes_default
7321 #include <$ac_header>
7322 _ACEOF
7323 rm -f conftest.$ac_objext
7324 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7325   (eval $ac_compile) 2>&5
7326   ac_status=$?
7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7328   (exit $ac_status); } &&
7329          { ac_try='test -s conftest.$ac_objext'
7330   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7331   (eval $ac_try) 2>&5
7332   ac_status=$?
7333   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7334   (exit $ac_status); }; }; then
7335   ac_header_compiler=yes
7336 else
7337   echo "$as_me: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 ac_header_compiler=no
7340 fi
7341 rm -f conftest.$ac_objext conftest.$ac_ext
7342 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7343 echo "${ECHO_T}$ac_header_compiler" >&6
7344
7345 # Is the header present?
7346 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7347 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7348 cat >conftest.$ac_ext <<_ACEOF
7349 #line $LINENO "configure"
7350 #include "confdefs.h"
7351 #include <$ac_header>
7352 _ACEOF
7353 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7354   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7355   ac_status=$?
7356   egrep -v '^ *\+' conftest.er1 >conftest.err
7357   rm -f conftest.er1
7358   cat conftest.err >&5
7359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7360   (exit $ac_status); } >/dev/null; then
7361   if test -s conftest.err; then
7362     ac_cpp_err=$ac_c_preproc_warn_flag
7363   else
7364     ac_cpp_err=
7365   fi
7366 else
7367   ac_cpp_err=yes
7368 fi
7369 if test -z "$ac_cpp_err"; then
7370   ac_header_preproc=yes
7371 else
7372   echo "$as_me: failed program was:" >&5
7373   cat conftest.$ac_ext >&5
7374   ac_header_preproc=no
7375 fi
7376 rm -f conftest.err conftest.$ac_ext
7377 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7378 echo "${ECHO_T}$ac_header_preproc" >&6
7379
7380 # So?  What about this header?
7381 case $ac_header_compiler:$ac_header_preproc in
7382   yes:no )
7383     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7384 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7385     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7386 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7387   no:yes )
7388     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7389 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7390     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7391 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7392     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7393 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7394 esac
7395 echo "$as_me:$LINENO: checking for $ac_header" >&5
7396 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7398   echo $ECHO_N "(cached) $ECHO_C" >&6
7399 else
7400   eval "$as_ac_Header=$ac_header_preproc"
7401 fi
7402 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7403 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7404
7405 fi
7406 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7407   cat >>confdefs.h <<_ACEOF
7408 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7409 _ACEOF
7410
7411 else
7412
7413 for ac_header in editline/readline.h
7414 do
7415 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7416 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7417   echo "$as_me:$LINENO: checking for $ac_header" >&5
7418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7419 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7420   echo $ECHO_N "(cached) $ECHO_C" >&6
7421 fi
7422 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7423 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7424 else
7425   # Is the header compilable?
7426 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7427 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7428 cat >conftest.$ac_ext <<_ACEOF
7429 #line $LINENO "configure"
7430 #include "confdefs.h"
7431 $ac_includes_default
7432 #include <$ac_header>
7433 _ACEOF
7434 rm -f conftest.$ac_objext
7435 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7436   (eval $ac_compile) 2>&5
7437   ac_status=$?
7438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439   (exit $ac_status); } &&
7440          { ac_try='test -s conftest.$ac_objext'
7441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7442   (eval $ac_try) 2>&5
7443   ac_status=$?
7444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7445   (exit $ac_status); }; }; then
7446   ac_header_compiler=yes
7447 else
7448   echo "$as_me: failed program was:" >&5
7449 cat conftest.$ac_ext >&5
7450 ac_header_compiler=no
7451 fi
7452 rm -f conftest.$ac_objext conftest.$ac_ext
7453 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7454 echo "${ECHO_T}$ac_header_compiler" >&6
7455
7456 # Is the header present?
7457 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7458 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7459 cat >conftest.$ac_ext <<_ACEOF
7460 #line $LINENO "configure"
7461 #include "confdefs.h"
7462 #include <$ac_header>
7463 _ACEOF
7464 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7466   ac_status=$?
7467   egrep -v '^ *\+' conftest.er1 >conftest.err
7468   rm -f conftest.er1
7469   cat conftest.err >&5
7470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7471   (exit $ac_status); } >/dev/null; then
7472   if test -s conftest.err; then
7473     ac_cpp_err=$ac_c_preproc_warn_flag
7474   else
7475     ac_cpp_err=
7476   fi
7477 else
7478   ac_cpp_err=yes
7479 fi
7480 if test -z "$ac_cpp_err"; then
7481   ac_header_preproc=yes
7482 else
7483   echo "$as_me: failed program was:" >&5
7484   cat conftest.$ac_ext >&5
7485   ac_header_preproc=no
7486 fi
7487 rm -f conftest.err conftest.$ac_ext
7488 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7489 echo "${ECHO_T}$ac_header_preproc" >&6
7490
7491 # So?  What about this header?
7492 case $ac_header_compiler:$ac_header_preproc in
7493   yes:no )
7494     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7495 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7496     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7497 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7498   no:yes )
7499     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7500 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7501     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7502 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7503     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7504 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7505 esac
7506 echo "$as_me:$LINENO: checking for $ac_header" >&5
7507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   eval "$as_ac_Header=$ac_header_preproc"
7512 fi
7513 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7514 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7515
7516 fi
7517 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7518   cat >>confdefs.h <<_ACEOF
7519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7520 _ACEOF
7521
7522 else
7523
7524 for ac_header in readline.h
7525 do
7526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7527 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7528   echo "$as_me:$LINENO: checking for $ac_header" >&5
7529 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7530 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7531   echo $ECHO_N "(cached) $ECHO_C" >&6
7532 fi
7533 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7534 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7535 else
7536   # Is the header compilable?
7537 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7538 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7539 cat >conftest.$ac_ext <<_ACEOF
7540 #line $LINENO "configure"
7541 #include "confdefs.h"
7542 $ac_includes_default
7543 #include <$ac_header>
7544 _ACEOF
7545 rm -f conftest.$ac_objext
7546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7547   (eval $ac_compile) 2>&5
7548   ac_status=$?
7549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest.$ac_objext'
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_header_compiler=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 ac_header_compiler=no
7562 fi
7563 rm -f conftest.$ac_objext conftest.$ac_ext
7564 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7565 echo "${ECHO_T}$ac_header_compiler" >&6
7566
7567 # Is the header present?
7568 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7569 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7570 cat >conftest.$ac_ext <<_ACEOF
7571 #line $LINENO "configure"
7572 #include "confdefs.h"
7573 #include <$ac_header>
7574 _ACEOF
7575 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7576   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7577   ac_status=$?
7578   egrep -v '^ *\+' conftest.er1 >conftest.err
7579   rm -f conftest.er1
7580   cat conftest.err >&5
7581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7582   (exit $ac_status); } >/dev/null; then
7583   if test -s conftest.err; then
7584     ac_cpp_err=$ac_c_preproc_warn_flag
7585   else
7586     ac_cpp_err=
7587   fi
7588 else
7589   ac_cpp_err=yes
7590 fi
7591 if test -z "$ac_cpp_err"; then
7592   ac_header_preproc=yes
7593 else
7594   echo "$as_me: failed program was:" >&5
7595   cat conftest.$ac_ext >&5
7596   ac_header_preproc=no
7597 fi
7598 rm -f conftest.err conftest.$ac_ext
7599 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7600 echo "${ECHO_T}$ac_header_preproc" >&6
7601
7602 # So?  What about this header?
7603 case $ac_header_compiler:$ac_header_preproc in
7604   yes:no )
7605     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7606 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7607     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7608 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7609   no:yes )
7610     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7611 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7612     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7613 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7614     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7615 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7616 esac
7617 echo "$as_me:$LINENO: checking for $ac_header" >&5
7618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7620   echo $ECHO_N "(cached) $ECHO_C" >&6
7621 else
7622   eval "$as_ac_Header=$ac_header_preproc"
7623 fi
7624 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7625 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7626
7627 fi
7628 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7629   cat >>confdefs.h <<_ACEOF
7630 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7631 _ACEOF
7632
7633 else
7634   { { echo "$as_me:$LINENO: error: readline header not found
7635 If you have readline already installed, see config.log for details on the
7636 failure.  It is possible the compiler isn't looking in the proper directory.
7637 Use --without-readline to disable readline support." >&5
7638 echo "$as_me: error: readline header not found
7639 If you have readline already installed, see config.log for details on the
7640 failure.  It is possible the compiler isn't looking in the proper directory.
7641 Use --without-readline to disable readline support." >&2;}
7642    { (exit 1); exit 1; }; }
7643 fi
7644
7645 done
7646
7647 fi
7648
7649 done
7650
7651 fi
7652
7653 done
7654
7655
7656 for ac_header in readline/history.h
7657 do
7658 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7660   echo "$as_me:$LINENO: checking for $ac_header" >&5
7661 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7663   echo $ECHO_N "(cached) $ECHO_C" >&6
7664 fi
7665 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7666 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7667 else
7668   # Is the header compilable?
7669 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7670 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7671 cat >conftest.$ac_ext <<_ACEOF
7672 #line $LINENO "configure"
7673 #include "confdefs.h"
7674 $ac_includes_default
7675 #include <$ac_header>
7676 _ACEOF
7677 rm -f conftest.$ac_objext
7678 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7679   (eval $ac_compile) 2>&5
7680   ac_status=$?
7681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7682   (exit $ac_status); } &&
7683          { ac_try='test -s conftest.$ac_objext'
7684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7685   (eval $ac_try) 2>&5
7686   ac_status=$?
7687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7688   (exit $ac_status); }; }; then
7689   ac_header_compiler=yes
7690 else
7691   echo "$as_me: failed program was:" >&5
7692 cat conftest.$ac_ext >&5
7693 ac_header_compiler=no
7694 fi
7695 rm -f conftest.$ac_objext conftest.$ac_ext
7696 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7697 echo "${ECHO_T}$ac_header_compiler" >&6
7698
7699 # Is the header present?
7700 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7701 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7702 cat >conftest.$ac_ext <<_ACEOF
7703 #line $LINENO "configure"
7704 #include "confdefs.h"
7705 #include <$ac_header>
7706 _ACEOF
7707 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7708   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7709   ac_status=$?
7710   egrep -v '^ *\+' conftest.er1 >conftest.err
7711   rm -f conftest.er1
7712   cat conftest.err >&5
7713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7714   (exit $ac_status); } >/dev/null; then
7715   if test -s conftest.err; then
7716     ac_cpp_err=$ac_c_preproc_warn_flag
7717   else
7718     ac_cpp_err=
7719   fi
7720 else
7721   ac_cpp_err=yes
7722 fi
7723 if test -z "$ac_cpp_err"; then
7724   ac_header_preproc=yes
7725 else
7726   echo "$as_me: failed program was:" >&5
7727   cat conftest.$ac_ext >&5
7728   ac_header_preproc=no
7729 fi
7730 rm -f conftest.err conftest.$ac_ext
7731 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7732 echo "${ECHO_T}$ac_header_preproc" >&6
7733
7734 # So?  What about this header?
7735 case $ac_header_compiler:$ac_header_preproc in
7736   yes:no )
7737     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7738 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7739     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7740 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7741   no:yes )
7742     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7743 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7744     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7745 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7746     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7747 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7748 esac
7749 echo "$as_me:$LINENO: checking for $ac_header" >&5
7750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 else
7754   eval "$as_ac_Header=$ac_header_preproc"
7755 fi
7756 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7757 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7758
7759 fi
7760 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7761   cat >>confdefs.h <<_ACEOF
7762 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7763 _ACEOF
7764
7765 else
7766
7767 for ac_header in editline/history.h
7768 do
7769 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7770 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7771   echo "$as_me:$LINENO: checking for $ac_header" >&5
7772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7774   echo $ECHO_N "(cached) $ECHO_C" >&6
7775 fi
7776 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7777 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7778 else
7779   # Is the header compilable?
7780 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7781 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7782 cat >conftest.$ac_ext <<_ACEOF
7783 #line $LINENO "configure"
7784 #include "confdefs.h"
7785 $ac_includes_default
7786 #include <$ac_header>
7787 _ACEOF
7788 rm -f conftest.$ac_objext
7789 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7790   (eval $ac_compile) 2>&5
7791   ac_status=$?
7792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7793   (exit $ac_status); } &&
7794          { ac_try='test -s conftest.$ac_objext'
7795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7796   (eval $ac_try) 2>&5
7797   ac_status=$?
7798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7799   (exit $ac_status); }; }; then
7800   ac_header_compiler=yes
7801 else
7802   echo "$as_me: failed program was:" >&5
7803 cat conftest.$ac_ext >&5
7804 ac_header_compiler=no
7805 fi
7806 rm -f conftest.$ac_objext conftest.$ac_ext
7807 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7808 echo "${ECHO_T}$ac_header_compiler" >&6
7809
7810 # Is the header present?
7811 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7812 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7813 cat >conftest.$ac_ext <<_ACEOF
7814 #line $LINENO "configure"
7815 #include "confdefs.h"
7816 #include <$ac_header>
7817 _ACEOF
7818 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7819   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7820   ac_status=$?
7821   egrep -v '^ *\+' conftest.er1 >conftest.err
7822   rm -f conftest.er1
7823   cat conftest.err >&5
7824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7825   (exit $ac_status); } >/dev/null; then
7826   if test -s conftest.err; then
7827     ac_cpp_err=$ac_c_preproc_warn_flag
7828   else
7829     ac_cpp_err=
7830   fi
7831 else
7832   ac_cpp_err=yes
7833 fi
7834 if test -z "$ac_cpp_err"; then
7835   ac_header_preproc=yes
7836 else
7837   echo "$as_me: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   ac_header_preproc=no
7840 fi
7841 rm -f conftest.err conftest.$ac_ext
7842 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7843 echo "${ECHO_T}$ac_header_preproc" >&6
7844
7845 # So?  What about this header?
7846 case $ac_header_compiler:$ac_header_preproc in
7847   yes:no )
7848     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7849 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7850     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7851 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7852   no:yes )
7853     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7854 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7855     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7856 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7858 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7859 esac
7860 echo "$as_me:$LINENO: checking for $ac_header" >&5
7861 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7862 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7863   echo $ECHO_N "(cached) $ECHO_C" >&6
7864 else
7865   eval "$as_ac_Header=$ac_header_preproc"
7866 fi
7867 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7868 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7869
7870 fi
7871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7872   cat >>confdefs.h <<_ACEOF
7873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7874 _ACEOF
7875
7876 else
7877
7878 for ac_header in history.h
7879 do
7880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7882   echo "$as_me:$LINENO: checking for $ac_header" >&5
7883 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7884 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7885   echo $ECHO_N "(cached) $ECHO_C" >&6
7886 fi
7887 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7888 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7889 else
7890   # Is the header compilable?
7891 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7892 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7893 cat >conftest.$ac_ext <<_ACEOF
7894 #line $LINENO "configure"
7895 #include "confdefs.h"
7896 $ac_includes_default
7897 #include <$ac_header>
7898 _ACEOF
7899 rm -f conftest.$ac_objext
7900 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7901   (eval $ac_compile) 2>&5
7902   ac_status=$?
7903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904   (exit $ac_status); } &&
7905          { ac_try='test -s conftest.$ac_objext'
7906   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7907   (eval $ac_try) 2>&5
7908   ac_status=$?
7909   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7910   (exit $ac_status); }; }; then
7911   ac_header_compiler=yes
7912 else
7913   echo "$as_me: failed program was:" >&5
7914 cat conftest.$ac_ext >&5
7915 ac_header_compiler=no
7916 fi
7917 rm -f conftest.$ac_objext conftest.$ac_ext
7918 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7919 echo "${ECHO_T}$ac_header_compiler" >&6
7920
7921 # Is the header present?
7922 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7923 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7924 cat >conftest.$ac_ext <<_ACEOF
7925 #line $LINENO "configure"
7926 #include "confdefs.h"
7927 #include <$ac_header>
7928 _ACEOF
7929 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7930   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7931   ac_status=$?
7932   egrep -v '^ *\+' conftest.er1 >conftest.err
7933   rm -f conftest.er1
7934   cat conftest.err >&5
7935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7936   (exit $ac_status); } >/dev/null; then
7937   if test -s conftest.err; then
7938     ac_cpp_err=$ac_c_preproc_warn_flag
7939   else
7940     ac_cpp_err=
7941   fi
7942 else
7943   ac_cpp_err=yes
7944 fi
7945 if test -z "$ac_cpp_err"; then
7946   ac_header_preproc=yes
7947 else
7948   echo "$as_me: failed program was:" >&5
7949   cat conftest.$ac_ext >&5
7950   ac_header_preproc=no
7951 fi
7952 rm -f conftest.err conftest.$ac_ext
7953 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7954 echo "${ECHO_T}$ac_header_preproc" >&6
7955
7956 # So?  What about this header?
7957 case $ac_header_compiler:$ac_header_preproc in
7958   yes:no )
7959     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7960 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7961     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7962 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7963   no:yes )
7964     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7965 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7966     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7967 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7968     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7969 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7970 esac
7971 echo "$as_me:$LINENO: checking for $ac_header" >&5
7972 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7973 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7974   echo $ECHO_N "(cached) $ECHO_C" >&6
7975 else
7976   eval "$as_ac_Header=$ac_header_preproc"
7977 fi
7978 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7979 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7980
7981 fi
7982 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7983   cat >>confdefs.h <<_ACEOF
7984 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7985 _ACEOF
7986
7987 else
7988   { { echo "$as_me:$LINENO: error: history header not found
7989 If you have readline already installed, see config.log for details on the
7990 failure.  It is possible the compiler isn't looking in the proper directory.
7991 Use --without-readline to disable readline support." >&5
7992 echo "$as_me: error: history header not found
7993 If you have readline already installed, see config.log for details on the
7994 failure.  It is possible the compiler isn't looking in the proper directory.
7995 Use --without-readline to disable readline support." >&2;}
7996    { (exit 1); exit 1; }; }
7997 fi
7998
7999 done
8000
8001 fi
8002
8003 done
8004
8005 fi
8006
8007 done
8008
8009 fi
8010
8011 if test "$with_zlib" = yes; then
8012   if test "${ac_cv_header_zlib_h+set}" = set; then
8013   echo "$as_me:$LINENO: checking for zlib.h" >&5
8014 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
8015 if test "${ac_cv_header_zlib_h+set}" = set; then
8016   echo $ECHO_N "(cached) $ECHO_C" >&6
8017 fi
8018 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
8019 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
8020 else
8021   # Is the header compilable?
8022 echo "$as_me:$LINENO: checking zlib.h usability" >&5
8023 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
8024 cat >conftest.$ac_ext <<_ACEOF
8025 #line $LINENO "configure"
8026 #include "confdefs.h"
8027 $ac_includes_default
8028 #include <zlib.h>
8029 _ACEOF
8030 rm -f conftest.$ac_objext
8031 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8032   (eval $ac_compile) 2>&5
8033   ac_status=$?
8034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8035   (exit $ac_status); } &&
8036          { ac_try='test -s conftest.$ac_objext'
8037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8038   (eval $ac_try) 2>&5
8039   ac_status=$?
8040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041   (exit $ac_status); }; }; then
8042   ac_header_compiler=yes
8043 else
8044   echo "$as_me: failed program was:" >&5
8045 cat conftest.$ac_ext >&5
8046 ac_header_compiler=no
8047 fi
8048 rm -f conftest.$ac_objext conftest.$ac_ext
8049 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8050 echo "${ECHO_T}$ac_header_compiler" >&6
8051
8052 # Is the header present?
8053 echo "$as_me:$LINENO: checking zlib.h presence" >&5
8054 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
8055 cat >conftest.$ac_ext <<_ACEOF
8056 #line $LINENO "configure"
8057 #include "confdefs.h"
8058 #include <zlib.h>
8059 _ACEOF
8060 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8061   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8062   ac_status=$?
8063   egrep -v '^ *\+' conftest.er1 >conftest.err
8064   rm -f conftest.er1
8065   cat conftest.err >&5
8066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8067   (exit $ac_status); } >/dev/null; then
8068   if test -s conftest.err; then
8069     ac_cpp_err=$ac_c_preproc_warn_flag
8070   else
8071     ac_cpp_err=
8072   fi
8073 else
8074   ac_cpp_err=yes
8075 fi
8076 if test -z "$ac_cpp_err"; then
8077   ac_header_preproc=yes
8078 else
8079   echo "$as_me: failed program was:" >&5
8080   cat conftest.$ac_ext >&5
8081   ac_header_preproc=no
8082 fi
8083 rm -f conftest.err conftest.$ac_ext
8084 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8085 echo "${ECHO_T}$ac_header_preproc" >&6
8086
8087 # So?  What about this header?
8088 case $ac_header_compiler:$ac_header_preproc in
8089   yes:no )
8090     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
8091 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8092     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
8093 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
8094   no:yes )
8095     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
8096 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
8097     { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
8098 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
8099     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
8100 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
8101 esac
8102 echo "$as_me:$LINENO: checking for zlib.h" >&5
8103 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
8104 if test "${ac_cv_header_zlib_h+set}" = set; then
8105   echo $ECHO_N "(cached) $ECHO_C" >&6
8106 else
8107   ac_cv_header_zlib_h=$ac_header_preproc
8108 fi
8109 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
8110 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
8111
8112 fi
8113 if test $ac_cv_header_zlib_h = yes; then
8114   :
8115 else
8116   { { echo "$as_me:$LINENO: error: zlib header not found
8117 If you have zlib already installed, see config.log for details on the
8118 failure.  It is possible the compiler isn't looking in the proper directory.
8119 Use --without-zlib to disable zlib support." >&5
8120 echo "$as_me: error: zlib header not found
8121 If you have zlib already installed, see config.log for details on the
8122 failure.  It is possible the compiler isn't looking in the proper directory.
8123 Use --without-zlib to disable zlib support." >&2;}
8124    { (exit 1); exit 1; }; }
8125 fi
8126
8127
8128 fi
8129
8130 if test "$with_krb4" = yes ; then
8131   if test "${ac_cv_header_krb_h+set}" = set; then
8132   echo "$as_me:$LINENO: checking for krb.h" >&5
8133 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8134 if test "${ac_cv_header_krb_h+set}" = set; then
8135   echo $ECHO_N "(cached) $ECHO_C" >&6
8136 fi
8137 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8138 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8139 else
8140   # Is the header compilable?
8141 echo "$as_me:$LINENO: checking krb.h usability" >&5
8142 echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
8143 cat >conftest.$ac_ext <<_ACEOF
8144 #line $LINENO "configure"
8145 #include "confdefs.h"
8146 $ac_includes_default
8147 #include <krb.h>
8148 _ACEOF
8149 rm -f conftest.$ac_objext
8150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8151   (eval $ac_compile) 2>&5
8152   ac_status=$?
8153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8154   (exit $ac_status); } &&
8155          { ac_try='test -s conftest.$ac_objext'
8156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8157   (eval $ac_try) 2>&5
8158   ac_status=$?
8159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8160   (exit $ac_status); }; }; then
8161   ac_header_compiler=yes
8162 else
8163   echo "$as_me: failed program was:" >&5
8164 cat conftest.$ac_ext >&5
8165 ac_header_compiler=no
8166 fi
8167 rm -f conftest.$ac_objext conftest.$ac_ext
8168 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8169 echo "${ECHO_T}$ac_header_compiler" >&6
8170
8171 # Is the header present?
8172 echo "$as_me:$LINENO: checking krb.h presence" >&5
8173 echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
8174 cat >conftest.$ac_ext <<_ACEOF
8175 #line $LINENO "configure"
8176 #include "confdefs.h"
8177 #include <krb.h>
8178 _ACEOF
8179 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8181   ac_status=$?
8182   egrep -v '^ *\+' conftest.er1 >conftest.err
8183   rm -f conftest.er1
8184   cat conftest.err >&5
8185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8186   (exit $ac_status); } >/dev/null; then
8187   if test -s conftest.err; then
8188     ac_cpp_err=$ac_c_preproc_warn_flag
8189   else
8190     ac_cpp_err=
8191   fi
8192 else
8193   ac_cpp_err=yes
8194 fi
8195 if test -z "$ac_cpp_err"; then
8196   ac_header_preproc=yes
8197 else
8198   echo "$as_me: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   ac_header_preproc=no
8201 fi
8202 rm -f conftest.err conftest.$ac_ext
8203 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8204 echo "${ECHO_T}$ac_header_preproc" >&6
8205
8206 # So?  What about this header?
8207 case $ac_header_compiler:$ac_header_preproc in
8208   yes:no )
8209     { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
8210 echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8211     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8212 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8213   no:yes )
8214     { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
8215 echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
8216     { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
8217 echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
8218     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8219 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8220 esac
8221 echo "$as_me:$LINENO: checking for krb.h" >&5
8222 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8223 if test "${ac_cv_header_krb_h+set}" = set; then
8224   echo $ECHO_N "(cached) $ECHO_C" >&6
8225 else
8226   ac_cv_header_krb_h=$ac_header_preproc
8227 fi
8228 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8229 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8230
8231 fi
8232 if test $ac_cv_header_krb_h = yes; then
8233   :
8234 else
8235   { { echo "$as_me:$LINENO: error: header file <krb.h> is required for Kerberos 4" >&5
8236 echo "$as_me: error: header file <krb.h> is required for Kerberos 4" >&2;}
8237    { (exit 1); exit 1; }; }
8238 fi
8239
8240
8241 fi
8242
8243 if test "$with_krb5" = yes ; then
8244   if test "${ac_cv_header_krb5_h+set}" = set; then
8245   echo "$as_me:$LINENO: checking for krb5.h" >&5
8246 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8247 if test "${ac_cv_header_krb5_h+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 fi
8250 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8251 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8252 else
8253   # Is the header compilable?
8254 echo "$as_me:$LINENO: checking krb5.h usability" >&5
8255 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
8256 cat >conftest.$ac_ext <<_ACEOF
8257 #line $LINENO "configure"
8258 #include "confdefs.h"
8259 $ac_includes_default
8260 #include <krb5.h>
8261 _ACEOF
8262 rm -f conftest.$ac_objext
8263 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8264   (eval $ac_compile) 2>&5
8265   ac_status=$?
8266   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267   (exit $ac_status); } &&
8268          { ac_try='test -s conftest.$ac_objext'
8269   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8270   (eval $ac_try) 2>&5
8271   ac_status=$?
8272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8273   (exit $ac_status); }; }; then
8274   ac_header_compiler=yes
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278 ac_header_compiler=no
8279 fi
8280 rm -f conftest.$ac_objext conftest.$ac_ext
8281 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8282 echo "${ECHO_T}$ac_header_compiler" >&6
8283
8284 # Is the header present?
8285 echo "$as_me:$LINENO: checking krb5.h presence" >&5
8286 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
8287 cat >conftest.$ac_ext <<_ACEOF
8288 #line $LINENO "configure"
8289 #include "confdefs.h"
8290 #include <krb5.h>
8291 _ACEOF
8292 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8293   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8294   ac_status=$?
8295   egrep -v '^ *\+' conftest.er1 >conftest.err
8296   rm -f conftest.er1
8297   cat conftest.err >&5
8298   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8299   (exit $ac_status); } >/dev/null; then
8300   if test -s conftest.err; then
8301     ac_cpp_err=$ac_c_preproc_warn_flag
8302   else
8303     ac_cpp_err=
8304   fi
8305 else
8306   ac_cpp_err=yes
8307 fi
8308 if test -z "$ac_cpp_err"; then
8309   ac_header_preproc=yes
8310 else
8311   echo "$as_me: failed program was:" >&5
8312   cat conftest.$ac_ext >&5
8313   ac_header_preproc=no
8314 fi
8315 rm -f conftest.err conftest.$ac_ext
8316 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8317 echo "${ECHO_T}$ac_header_preproc" >&6
8318
8319 # So?  What about this header?
8320 case $ac_header_compiler:$ac_header_preproc in
8321   yes:no )
8322     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
8323 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8324     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8325 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8326   no:yes )
8327     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
8328 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
8329     { echo "$as_me:$LINENO: WARNING: krb5.h: check for missing prerequisite headers?" >&5
8330 echo "$as_me: WARNING: krb5.h: check for missing prerequisite headers?" >&2;}
8331     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8332 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8333 esac
8334 echo "$as_me:$LINENO: checking for krb5.h" >&5
8335 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8336 if test "${ac_cv_header_krb5_h+set}" = set; then
8337   echo $ECHO_N "(cached) $ECHO_C" >&6
8338 else
8339   ac_cv_header_krb5_h=$ac_header_preproc
8340 fi
8341 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8342 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8343
8344 fi
8345 if test $ac_cv_header_krb5_h = yes; then
8346   :
8347 else
8348   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
8349 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
8350    { (exit 1); exit 1; }; }
8351 fi
8352
8353
8354   if test "${ac_cv_header_com_err_h+set}" = set; then
8355   echo "$as_me:$LINENO: checking for com_err.h" >&5
8356 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8357 if test "${ac_cv_header_com_err_h+set}" = set; then
8358   echo $ECHO_N "(cached) $ECHO_C" >&6
8359 fi
8360 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8361 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8362 else
8363   # Is the header compilable?
8364 echo "$as_me:$LINENO: checking com_err.h usability" >&5
8365 echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
8366 cat >conftest.$ac_ext <<_ACEOF
8367 #line $LINENO "configure"
8368 #include "confdefs.h"
8369 $ac_includes_default
8370 #include <com_err.h>
8371 _ACEOF
8372 rm -f conftest.$ac_objext
8373 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8374   (eval $ac_compile) 2>&5
8375   ac_status=$?
8376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377   (exit $ac_status); } &&
8378          { ac_try='test -s conftest.$ac_objext'
8379   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8380   (eval $ac_try) 2>&5
8381   ac_status=$?
8382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383   (exit $ac_status); }; }; then
8384   ac_header_compiler=yes
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 cat conftest.$ac_ext >&5
8388 ac_header_compiler=no
8389 fi
8390 rm -f conftest.$ac_objext conftest.$ac_ext
8391 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8392 echo "${ECHO_T}$ac_header_compiler" >&6
8393
8394 # Is the header present?
8395 echo "$as_me:$LINENO: checking com_err.h presence" >&5
8396 echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
8397 cat >conftest.$ac_ext <<_ACEOF
8398 #line $LINENO "configure"
8399 #include "confdefs.h"
8400 #include <com_err.h>
8401 _ACEOF
8402 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8404   ac_status=$?
8405   egrep -v '^ *\+' conftest.er1 >conftest.err
8406   rm -f conftest.er1
8407   cat conftest.err >&5
8408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409   (exit $ac_status); } >/dev/null; then
8410   if test -s conftest.err; then
8411     ac_cpp_err=$ac_c_preproc_warn_flag
8412   else
8413     ac_cpp_err=
8414   fi
8415 else
8416   ac_cpp_err=yes
8417 fi
8418 if test -z "$ac_cpp_err"; then
8419   ac_header_preproc=yes
8420 else
8421   echo "$as_me: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   ac_header_preproc=no
8424 fi
8425 rm -f conftest.err conftest.$ac_ext
8426 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8427 echo "${ECHO_T}$ac_header_preproc" >&6
8428
8429 # So?  What about this header?
8430 case $ac_header_compiler:$ac_header_preproc in
8431   yes:no )
8432     { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8433 echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8434     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8435 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8436   no:yes )
8437     { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
8438 echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
8439     { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
8440 echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
8441     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8442 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8443 esac
8444 echo "$as_me:$LINENO: checking for com_err.h" >&5
8445 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8446 if test "${ac_cv_header_com_err_h+set}" = set; then
8447   echo $ECHO_N "(cached) $ECHO_C" >&6
8448 else
8449   ac_cv_header_com_err_h=$ac_header_preproc
8450 fi
8451 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8452 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8453
8454 fi
8455 if test $ac_cv_header_com_err_h = yes; then
8456   :
8457 else
8458   { { echo "$as_me:$LINENO: error: header file <com_err.h> is required for Kerberos 5" >&5
8459 echo "$as_me: error: header file <com_err.h> is required for Kerberos 5" >&2;}
8460    { (exit 1); exit 1; }; }
8461 fi
8462
8463
8464 fi
8465
8466 if test "$with_openssl" = yes ; then
8467   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8468   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8469 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8470 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 fi
8473 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8474 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8475 else
8476   # Is the header compilable?
8477 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
8478 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
8479 cat >conftest.$ac_ext <<_ACEOF
8480 #line $LINENO "configure"
8481 #include "confdefs.h"
8482 $ac_includes_default
8483 #include <openssl/ssl.h>
8484 _ACEOF
8485 rm -f conftest.$ac_objext
8486 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8487   (eval $ac_compile) 2>&5
8488   ac_status=$?
8489   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8490   (exit $ac_status); } &&
8491          { ac_try='test -s conftest.$ac_objext'
8492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493   (eval $ac_try) 2>&5
8494   ac_status=$?
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); }; }; then
8497   ac_header_compiler=yes
8498 else
8499   echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 ac_header_compiler=no
8502 fi
8503 rm -f conftest.$ac_objext conftest.$ac_ext
8504 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8505 echo "${ECHO_T}$ac_header_compiler" >&6
8506
8507 # Is the header present?
8508 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
8509 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
8510 cat >conftest.$ac_ext <<_ACEOF
8511 #line $LINENO "configure"
8512 #include "confdefs.h"
8513 #include <openssl/ssl.h>
8514 _ACEOF
8515 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8516   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8517   ac_status=$?
8518   egrep -v '^ *\+' conftest.er1 >conftest.err
8519   rm -f conftest.er1
8520   cat conftest.err >&5
8521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8522   (exit $ac_status); } >/dev/null; then
8523   if test -s conftest.err; then
8524     ac_cpp_err=$ac_c_preproc_warn_flag
8525   else
8526     ac_cpp_err=
8527   fi
8528 else
8529   ac_cpp_err=yes
8530 fi
8531 if test -z "$ac_cpp_err"; then
8532   ac_header_preproc=yes
8533 else
8534   echo "$as_me: failed program was:" >&5
8535   cat conftest.$ac_ext >&5
8536   ac_header_preproc=no
8537 fi
8538 rm -f conftest.err conftest.$ac_ext
8539 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8540 echo "${ECHO_T}$ac_header_preproc" >&6
8541
8542 # So?  What about this header?
8543 case $ac_header_compiler:$ac_header_preproc in
8544   yes:no )
8545     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8546 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8547     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8548 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8549   no:yes )
8550     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
8551 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
8552     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5
8553 echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;}
8554     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8555 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8556 esac
8557 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8558 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8559 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   ac_cv_header_openssl_ssl_h=$ac_header_preproc
8563 fi
8564 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8565 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8566
8567 fi
8568 if test $ac_cv_header_openssl_ssl_h = yes; then
8569   :
8570 else
8571   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
8572 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
8573    { (exit 1); exit 1; }; }
8574 fi
8575
8576
8577   if test "${ac_cv_header_openssl_err_h+set}" = set; then
8578   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8579 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8580 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8581   echo $ECHO_N "(cached) $ECHO_C" >&6
8582 fi
8583 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8584 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8585 else
8586   # Is the header compilable?
8587 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
8588 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
8589 cat >conftest.$ac_ext <<_ACEOF
8590 #line $LINENO "configure"
8591 #include "confdefs.h"
8592 $ac_includes_default
8593 #include <openssl/err.h>
8594 _ACEOF
8595 rm -f conftest.$ac_objext
8596 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8597   (eval $ac_compile) 2>&5
8598   ac_status=$?
8599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8600   (exit $ac_status); } &&
8601          { ac_try='test -s conftest.$ac_objext'
8602   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8603   (eval $ac_try) 2>&5
8604   ac_status=$?
8605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606   (exit $ac_status); }; }; then
8607   ac_header_compiler=yes
8608 else
8609   echo "$as_me: failed program was:" >&5
8610 cat conftest.$ac_ext >&5
8611 ac_header_compiler=no
8612 fi
8613 rm -f conftest.$ac_objext conftest.$ac_ext
8614 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8615 echo "${ECHO_T}$ac_header_compiler" >&6
8616
8617 # Is the header present?
8618 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
8619 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
8620 cat >conftest.$ac_ext <<_ACEOF
8621 #line $LINENO "configure"
8622 #include "confdefs.h"
8623 #include <openssl/err.h>
8624 _ACEOF
8625 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8626   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8627   ac_status=$?
8628   egrep -v '^ *\+' conftest.er1 >conftest.err
8629   rm -f conftest.er1
8630   cat conftest.err >&5
8631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8632   (exit $ac_status); } >/dev/null; then
8633   if test -s conftest.err; then
8634     ac_cpp_err=$ac_c_preproc_warn_flag
8635   else
8636     ac_cpp_err=
8637   fi
8638 else
8639   ac_cpp_err=yes
8640 fi
8641 if test -z "$ac_cpp_err"; then
8642   ac_header_preproc=yes
8643 else
8644   echo "$as_me: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   ac_header_preproc=no
8647 fi
8648 rm -f conftest.err conftest.$ac_ext
8649 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8650 echo "${ECHO_T}$ac_header_preproc" >&6
8651
8652 # So?  What about this header?
8653 case $ac_header_compiler:$ac_header_preproc in
8654   yes:no )
8655     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8656 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8657     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8658 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8659   no:yes )
8660     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
8661 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
8662     { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5
8663 echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;}
8664     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8665 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8666 esac
8667 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8668 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8669 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8670   echo $ECHO_N "(cached) $ECHO_C" >&6
8671 else
8672   ac_cv_header_openssl_err_h=$ac_header_preproc
8673 fi
8674 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8675 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8676
8677 fi
8678 if test $ac_cv_header_openssl_err_h = yes; then
8679   :
8680 else
8681   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
8682 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
8683    { (exit 1); exit 1; }; }
8684 fi
8685
8686
8687 fi
8688
8689 if test "$with_pam" = yes ; then
8690
8691 for ac_header in security/pam_appl.h
8692 do
8693 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8694 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8695   echo "$as_me:$LINENO: checking for $ac_header" >&5
8696 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8697 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8698   echo $ECHO_N "(cached) $ECHO_C" >&6
8699 fi
8700 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8702 else
8703   # Is the header compilable?
8704 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8705 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8706 cat >conftest.$ac_ext <<_ACEOF
8707 #line $LINENO "configure"
8708 #include "confdefs.h"
8709 $ac_includes_default
8710 #include <$ac_header>
8711 _ACEOF
8712 rm -f conftest.$ac_objext
8713 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8714   (eval $ac_compile) 2>&5
8715   ac_status=$?
8716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717   (exit $ac_status); } &&
8718          { ac_try='test -s conftest.$ac_objext'
8719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720   (eval $ac_try) 2>&5
8721   ac_status=$?
8722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723   (exit $ac_status); }; }; then
8724   ac_header_compiler=yes
8725 else
8726   echo "$as_me: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8728 ac_header_compiler=no
8729 fi
8730 rm -f conftest.$ac_objext conftest.$ac_ext
8731 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8732 echo "${ECHO_T}$ac_header_compiler" >&6
8733
8734 # Is the header present?
8735 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8736 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8737 cat >conftest.$ac_ext <<_ACEOF
8738 #line $LINENO "configure"
8739 #include "confdefs.h"
8740 #include <$ac_header>
8741 _ACEOF
8742 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8743   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8744   ac_status=$?
8745   egrep -v '^ *\+' conftest.er1 >conftest.err
8746   rm -f conftest.er1
8747   cat conftest.err >&5
8748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8749   (exit $ac_status); } >/dev/null; then
8750   if test -s conftest.err; then
8751     ac_cpp_err=$ac_c_preproc_warn_flag
8752   else
8753     ac_cpp_err=
8754   fi
8755 else
8756   ac_cpp_err=yes
8757 fi
8758 if test -z "$ac_cpp_err"; then
8759   ac_header_preproc=yes
8760 else
8761   echo "$as_me: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   ac_header_preproc=no
8764 fi
8765 rm -f conftest.err conftest.$ac_ext
8766 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8767 echo "${ECHO_T}$ac_header_preproc" >&6
8768
8769 # So?  What about this header?
8770 case $ac_header_compiler:$ac_header_preproc in
8771   yes:no )
8772     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8773 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8774     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8775 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8776   no:yes )
8777     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8778 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8779     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8780 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8781     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8782 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8783 esac
8784 echo "$as_me:$LINENO: checking for $ac_header" >&5
8785 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8786 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8787   echo $ECHO_N "(cached) $ECHO_C" >&6
8788 else
8789   eval "$as_ac_Header=$ac_header_preproc"
8790 fi
8791 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8792 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8793
8794 fi
8795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8796   cat >>confdefs.h <<_ACEOF
8797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8798 _ACEOF
8799
8800 else
8801
8802 for ac_header in pam/pam_appl.h
8803 do
8804 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8805 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8806   echo "$as_me:$LINENO: checking for $ac_header" >&5
8807 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8808 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8809   echo $ECHO_N "(cached) $ECHO_C" >&6
8810 fi
8811 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8812 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8813 else
8814   # Is the header compilable?
8815 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8816 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8817 cat >conftest.$ac_ext <<_ACEOF
8818 #line $LINENO "configure"
8819 #include "confdefs.h"
8820 $ac_includes_default
8821 #include <$ac_header>
8822 _ACEOF
8823 rm -f conftest.$ac_objext
8824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8825   (eval $ac_compile) 2>&5
8826   ac_status=$?
8827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8828   (exit $ac_status); } &&
8829          { ac_try='test -s conftest.$ac_objext'
8830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8831   (eval $ac_try) 2>&5
8832   ac_status=$?
8833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8834   (exit $ac_status); }; }; then
8835   ac_header_compiler=yes
8836 else
8837   echo "$as_me: failed program was:" >&5
8838 cat conftest.$ac_ext >&5
8839 ac_header_compiler=no
8840 fi
8841 rm -f conftest.$ac_objext conftest.$ac_ext
8842 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8843 echo "${ECHO_T}$ac_header_compiler" >&6
8844
8845 # Is the header present?
8846 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8847 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8848 cat >conftest.$ac_ext <<_ACEOF
8849 #line $LINENO "configure"
8850 #include "confdefs.h"
8851 #include <$ac_header>
8852 _ACEOF
8853 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8855   ac_status=$?
8856   egrep -v '^ *\+' conftest.er1 >conftest.err
8857   rm -f conftest.er1
8858   cat conftest.err >&5
8859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860   (exit $ac_status); } >/dev/null; then
8861   if test -s conftest.err; then
8862     ac_cpp_err=$ac_c_preproc_warn_flag
8863   else
8864     ac_cpp_err=
8865   fi
8866 else
8867   ac_cpp_err=yes
8868 fi
8869 if test -z "$ac_cpp_err"; then
8870   ac_header_preproc=yes
8871 else
8872   echo "$as_me: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   ac_header_preproc=no
8875 fi
8876 rm -f conftest.err conftest.$ac_ext
8877 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8878 echo "${ECHO_T}$ac_header_preproc" >&6
8879
8880 # So?  What about this header?
8881 case $ac_header_compiler:$ac_header_preproc in
8882   yes:no )
8883     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8884 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8885     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8886 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8887   no:yes )
8888     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8889 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8890     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8891 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8892     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8893 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8894 esac
8895 echo "$as_me:$LINENO: checking for $ac_header" >&5
8896 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8897 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8898   echo $ECHO_N "(cached) $ECHO_C" >&6
8899 else
8900   eval "$as_ac_Header=$ac_header_preproc"
8901 fi
8902 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8903 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8904
8905 fi
8906 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8907   cat >>confdefs.h <<_ACEOF
8908 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8909 _ACEOF
8910
8911 else
8912   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
8913 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
8914    { (exit 1); exit 1; }; }
8915 fi
8916
8917 done
8918
8919 fi
8920
8921 done
8922
8923 fi
8924
8925 if test "$with_rendezvous" = yes ; then
8926   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
8927   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
8928 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
8929 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
8930   echo $ECHO_N "(cached) $ECHO_C" >&6
8931 fi
8932 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
8933 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
8934 else
8935   # Is the header compilable?
8936 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
8937 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
8938 cat >conftest.$ac_ext <<_ACEOF
8939 #line $LINENO "configure"
8940 #include "confdefs.h"
8941 $ac_includes_default
8942 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
8943 _ACEOF
8944 rm -f conftest.$ac_objext
8945 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8946   (eval $ac_compile) 2>&5
8947   ac_status=$?
8948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8949   (exit $ac_status); } &&
8950          { ac_try='test -s conftest.$ac_objext'
8951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8952   (eval $ac_try) 2>&5
8953   ac_status=$?
8954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8955   (exit $ac_status); }; }; then
8956   ac_header_compiler=yes
8957 else
8958   echo "$as_me: failed program was:" >&5
8959 cat conftest.$ac_ext >&5
8960 ac_header_compiler=no
8961 fi
8962 rm -f conftest.$ac_objext conftest.$ac_ext
8963 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8964 echo "${ECHO_T}$ac_header_compiler" >&6
8965
8966 # Is the header present?
8967 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
8968 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
8969 cat >conftest.$ac_ext <<_ACEOF
8970 #line $LINENO "configure"
8971 #include "confdefs.h"
8972 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
8973 _ACEOF
8974 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8975   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8976   ac_status=$?
8977   egrep -v '^ *\+' conftest.er1 >conftest.err
8978   rm -f conftest.er1
8979   cat conftest.err >&5
8980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981   (exit $ac_status); } >/dev/null; then
8982   if test -s conftest.err; then
8983     ac_cpp_err=$ac_c_preproc_warn_flag
8984   else
8985     ac_cpp_err=
8986   fi
8987 else
8988   ac_cpp_err=yes
8989 fi
8990 if test -z "$ac_cpp_err"; then
8991   ac_header_preproc=yes
8992 else
8993   echo "$as_me: failed program was:" >&5
8994   cat conftest.$ac_ext >&5
8995   ac_header_preproc=no
8996 fi
8997 rm -f conftest.err conftest.$ac_ext
8998 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8999 echo "${ECHO_T}$ac_header_preproc" >&6
9000
9001 # So?  What about this header?
9002 case $ac_header_compiler:$ac_header_preproc in
9003   yes:no )
9004     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
9005 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9006     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
9007 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
9008   no:yes )
9009     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
9010 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
9011     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&5
9012 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&2;}
9013     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
9014 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
9015 esac
9016 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
9017 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
9018 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
9019   echo $ECHO_N "(cached) $ECHO_C" >&6
9020 else
9021   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
9022 fi
9023 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
9024 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
9025
9026 fi
9027 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
9028   :
9029 else
9030   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&5
9031 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&2;}
9032    { (exit 1); exit 1; }; }
9033 fi
9034
9035
9036 fi
9037
9038
9039 ##
9040 ## Types, structures, compiler characteristics
9041 ##
9042
9043
9044 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
9045 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
9046 if test "${ac_cv_c_const+set}" = set; then
9047   echo $ECHO_N "(cached) $ECHO_C" >&6
9048 else
9049   cat >conftest.$ac_ext <<_ACEOF
9050 #line $LINENO "configure"
9051 #include "confdefs.h"
9052
9053 #ifdef F77_DUMMY_MAIN
9054 #  ifdef __cplusplus
9055      extern "C"
9056 #  endif
9057    int F77_DUMMY_MAIN() { return 1; }
9058 #endif
9059 int
9060 main ()
9061 {
9062 /* FIXME: Include the comments suggested by Paul. */
9063 #ifndef __cplusplus
9064   /* Ultrix mips cc rejects this.  */
9065   typedef int charset[2];
9066   const charset x;
9067   /* SunOS 4.1.1 cc rejects this.  */
9068   char const *const *ccp;
9069   char **p;
9070   /* NEC SVR4.0.2 mips cc rejects this.  */
9071   struct point {int x, y;};
9072   static struct point const zero = {0,0};
9073   /* AIX XL C 1.02.0.0 rejects this.
9074      It does not let you subtract one const X* pointer from another in
9075      an arm of an if-expression whose if-part is not a constant
9076      expression */
9077   const char *g = "string";
9078   ccp = &g + (g ? g-g : 0);
9079   /* HPUX 7.0 cc rejects these. */
9080   ++ccp;
9081   p = (char**) ccp;
9082   ccp = (char const *const *) p;
9083   { /* SCO 3.2v4 cc rejects this.  */
9084     char *t;
9085     char const *s = 0 ? (char *) 0 : (char const *) 0;
9086
9087     *t++ = 0;
9088   }
9089   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9090     int x[] = {25, 17};
9091     const int *foo = &x[0];
9092     ++foo;
9093   }
9094   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9095     typedef const int *iptr;
9096     iptr p = 0;
9097     ++p;
9098   }
9099   { /* AIX XL C 1.02.0.0 rejects this saying
9100        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9101     struct s { int j; const int *ap[3]; };
9102     struct s *b; b->j = 5;
9103   }
9104   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9105     const int foo = 10;
9106   }
9107 #endif
9108
9109   ;
9110   return 0;
9111 }
9112 _ACEOF
9113 rm -f conftest.$ac_objext
9114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9115   (eval $ac_compile) 2>&5
9116   ac_status=$?
9117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9118   (exit $ac_status); } &&
9119          { ac_try='test -s conftest.$ac_objext'
9120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9121   (eval $ac_try) 2>&5
9122   ac_status=$?
9123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9124   (exit $ac_status); }; }; then
9125   ac_cv_c_const=yes
9126 else
9127   echo "$as_me: failed program was:" >&5
9128 cat conftest.$ac_ext >&5
9129 ac_cv_c_const=no
9130 fi
9131 rm -f conftest.$ac_objext conftest.$ac_ext
9132 fi
9133 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9134 echo "${ECHO_T}$ac_cv_c_const" >&6
9135 if test $ac_cv_c_const = no; then
9136
9137 cat >>confdefs.h <<\_ACEOF
9138 #define const
9139 _ACEOF
9140
9141 fi
9142
9143 echo "$as_me:$LINENO: checking for inline" >&5
9144 echo $ECHO_N "checking for inline... $ECHO_C" >&6
9145 if test "${ac_cv_c_inline+set}" = set; then
9146   echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148   ac_cv_c_inline=no
9149 for ac_kw in inline __inline__ __inline; do
9150   cat >conftest.$ac_ext <<_ACEOF
9151 #line $LINENO "configure"
9152 #include "confdefs.h"
9153 #ifndef __cplusplus
9154 typedef int foo_t;
9155 static $ac_kw foo_t static_foo () {return 0; }
9156 $ac_kw int foo () {return 0; }
9157 #endif
9158
9159 _ACEOF
9160 rm -f conftest.$ac_objext
9161 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9162   (eval $ac_compile) 2>&5
9163   ac_status=$?
9164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9165   (exit $ac_status); } &&
9166          { ac_try='test -s conftest.$ac_objext'
9167   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9168   (eval $ac_try) 2>&5
9169   ac_status=$?
9170   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9171   (exit $ac_status); }; }; then
9172   ac_cv_c_inline=$ac_kw; break
9173 else
9174   echo "$as_me: failed program was:" >&5
9175 cat conftest.$ac_ext >&5
9176 fi
9177 rm -f conftest.$ac_objext conftest.$ac_ext
9178 done
9179
9180 fi
9181 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
9182 echo "${ECHO_T}$ac_cv_c_inline" >&6
9183 case $ac_cv_c_inline in
9184   inline | yes) ;;
9185   no)
9186 cat >>confdefs.h <<\_ACEOF
9187 #define inline
9188 _ACEOF
9189  ;;
9190   *)  cat >>confdefs.h <<_ACEOF
9191 #define inline $ac_cv_c_inline
9192 _ACEOF
9193  ;;
9194 esac
9195
9196 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
9197 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
9198 if test "${ac_cv_c_stringize+set}" = set; then
9199   echo $ECHO_N "(cached) $ECHO_C" >&6
9200 else
9201   cat >conftest.$ac_ext <<_ACEOF
9202 #line $LINENO "configure"
9203 #include "confdefs.h"
9204 #define x(y) #y
9205
9206 char *s = x(teststring);
9207 _ACEOF
9208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9209   egrep "#teststring" >/dev/null 2>&1; then
9210   ac_cv_c_stringize=no
9211 else
9212   ac_cv_c_stringize=yes
9213 fi
9214 rm -f conftest*
9215
9216 fi
9217 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
9218 echo "${ECHO_T}$ac_cv_c_stringize" >&6
9219 if test $ac_cv_c_stringize = yes; then
9220
9221 cat >>confdefs.h <<\_ACEOF
9222 #define HAVE_STRINGIZE 1
9223 _ACEOF
9224
9225 fi
9226
9227 echo "$as_me:$LINENO: checking for signed types" >&5
9228 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
9229 if test "${pgac_cv_c_signed+set}" = set; then
9230   echo $ECHO_N "(cached) $ECHO_C" >&6
9231 else
9232   cat >conftest.$ac_ext <<_ACEOF
9233 #line $LINENO "configure"
9234 #include "confdefs.h"
9235
9236 #ifdef F77_DUMMY_MAIN
9237 #  ifdef __cplusplus
9238      extern "C"
9239 #  endif
9240    int F77_DUMMY_MAIN() { return 1; }
9241 #endif
9242 int
9243 main ()
9244 {
9245 signed char c; signed short s; signed int i;
9246   ;
9247   return 0;
9248 }
9249 _ACEOF
9250 rm -f conftest.$ac_objext
9251 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9252   (eval $ac_compile) 2>&5
9253   ac_status=$?
9254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9255   (exit $ac_status); } &&
9256          { ac_try='test -s conftest.$ac_objext'
9257   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9258   (eval $ac_try) 2>&5
9259   ac_status=$?
9260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9261   (exit $ac_status); }; }; then
9262   pgac_cv_c_signed=yes
9263 else
9264   echo "$as_me: failed program was:" >&5
9265 cat conftest.$ac_ext >&5
9266 pgac_cv_c_signed=no
9267 fi
9268 rm -f conftest.$ac_objext conftest.$ac_ext
9269 fi
9270 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
9271 echo "${ECHO_T}$pgac_cv_c_signed" >&6
9272 if test x"$pgac_cv_c_signed" = xno ; then
9273
9274 cat >>confdefs.h <<\_ACEOF
9275 #define signed
9276 _ACEOF
9277
9278 fi
9279 echo "$as_me:$LINENO: checking for working volatile" >&5
9280 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
9281 if test "${ac_cv_c_volatile+set}" = set; then
9282   echo $ECHO_N "(cached) $ECHO_C" >&6
9283 else
9284   cat >conftest.$ac_ext <<_ACEOF
9285 #line $LINENO "configure"
9286 #include "confdefs.h"
9287
9288 #ifdef F77_DUMMY_MAIN
9289 #  ifdef __cplusplus
9290      extern "C"
9291 #  endif
9292    int F77_DUMMY_MAIN() { return 1; }
9293 #endif
9294 int
9295 main ()
9296 {
9297
9298 volatile int x;
9299 int * volatile y;
9300   ;
9301   return 0;
9302 }
9303 _ACEOF
9304 rm -f conftest.$ac_objext
9305 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9306   (eval $ac_compile) 2>&5
9307   ac_status=$?
9308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9309   (exit $ac_status); } &&
9310          { ac_try='test -s conftest.$ac_objext'
9311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9312   (eval $ac_try) 2>&5
9313   ac_status=$?
9314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315   (exit $ac_status); }; }; then
9316   ac_cv_c_volatile=yes
9317 else
9318   echo "$as_me: failed program was:" >&5
9319 cat conftest.$ac_ext >&5
9320 ac_cv_c_volatile=no
9321 fi
9322 rm -f conftest.$ac_objext conftest.$ac_ext
9323 fi
9324 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
9325 echo "${ECHO_T}$ac_cv_c_volatile" >&6
9326 if test $ac_cv_c_volatile = no; then
9327
9328 cat >>confdefs.h <<\_ACEOF
9329 #define volatile
9330 _ACEOF
9331
9332 fi
9333
9334 echo "$as_me:$LINENO: checking for __func__" >&5
9335 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
9336 if test "${pgac_cv_funcname_func_support+set}" = set; then
9337   echo $ECHO_N "(cached) $ECHO_C" >&6
9338 else
9339   cat >conftest.$ac_ext <<_ACEOF
9340 #line $LINENO "configure"
9341 #include "confdefs.h"
9342 #include <stdio.h>
9343 #ifdef F77_DUMMY_MAIN
9344 #  ifdef __cplusplus
9345      extern "C"
9346 #  endif
9347    int F77_DUMMY_MAIN() { return 1; }
9348 #endif
9349 int
9350 main ()
9351 {
9352 printf("%s\n", __func__);
9353   ;
9354   return 0;
9355 }
9356 _ACEOF
9357 rm -f conftest.$ac_objext
9358 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9359   (eval $ac_compile) 2>&5
9360   ac_status=$?
9361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9362   (exit $ac_status); } &&
9363          { ac_try='test -s conftest.$ac_objext'
9364   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9365   (eval $ac_try) 2>&5
9366   ac_status=$?
9367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368   (exit $ac_status); }; }; then
9369   pgac_cv_funcname_func_support=yes
9370 else
9371   echo "$as_me: failed program was:" >&5
9372 cat conftest.$ac_ext >&5
9373 pgac_cv_funcname_func_support=no
9374 fi
9375 rm -f conftest.$ac_objext conftest.$ac_ext
9376 fi
9377 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
9378 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
9379 if test x"$pgac_cv_funcname_func_support" = xyes ; then
9380
9381 cat >>confdefs.h <<\_ACEOF
9382 #define HAVE_FUNCNAME__FUNC 1
9383 _ACEOF
9384
9385 else
9386 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
9387 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
9388 if test "${pgac_cv_funcname_function_support+set}" = set; then
9389   echo $ECHO_N "(cached) $ECHO_C" >&6
9390 else
9391   cat >conftest.$ac_ext <<_ACEOF
9392 #line $LINENO "configure"
9393 #include "confdefs.h"
9394 #include <stdio.h>
9395 #ifdef F77_DUMMY_MAIN
9396 #  ifdef __cplusplus
9397      extern "C"
9398 #  endif
9399    int F77_DUMMY_MAIN() { return 1; }
9400 #endif
9401 int
9402 main ()
9403 {
9404 printf("%s\n", __FUNCTION__);
9405   ;
9406   return 0;
9407 }
9408 _ACEOF
9409 rm -f conftest.$ac_objext
9410 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9411   (eval $ac_compile) 2>&5
9412   ac_status=$?
9413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414   (exit $ac_status); } &&
9415          { ac_try='test -s conftest.$ac_objext'
9416   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9417   (eval $ac_try) 2>&5
9418   ac_status=$?
9419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9420   (exit $ac_status); }; }; then
9421   pgac_cv_funcname_function_support=yes
9422 else
9423   echo "$as_me: failed program was:" >&5
9424 cat conftest.$ac_ext >&5
9425 pgac_cv_funcname_function_support=no
9426 fi
9427 rm -f conftest.$ac_objext conftest.$ac_ext
9428 fi
9429 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
9430 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
9431 if test x"$pgac_cv_funcname_function_support" = xyes ; then
9432
9433 cat >>confdefs.h <<\_ACEOF
9434 #define HAVE_FUNCNAME__FUNCTION 1
9435 _ACEOF
9436
9437 fi
9438 fi
9439 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
9440 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
9441 if test "${ac_cv_struct_tm+set}" = set; then
9442   echo $ECHO_N "(cached) $ECHO_C" >&6
9443 else
9444   cat >conftest.$ac_ext <<_ACEOF
9445 #line $LINENO "configure"
9446 #include "confdefs.h"
9447 #include <sys/types.h>
9448 #include <time.h>
9449
9450 #ifdef F77_DUMMY_MAIN
9451 #  ifdef __cplusplus
9452      extern "C"
9453 #  endif
9454    int F77_DUMMY_MAIN() { return 1; }
9455 #endif
9456 int
9457 main ()
9458 {
9459 struct tm *tp; tp->tm_sec;
9460   ;
9461   return 0;
9462 }
9463 _ACEOF
9464 rm -f conftest.$ac_objext
9465 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9466   (eval $ac_compile) 2>&5
9467   ac_status=$?
9468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9469   (exit $ac_status); } &&
9470          { ac_try='test -s conftest.$ac_objext'
9471   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9472   (eval $ac_try) 2>&5
9473   ac_status=$?
9474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9475   (exit $ac_status); }; }; then
9476   ac_cv_struct_tm=time.h
9477 else
9478   echo "$as_me: failed program was:" >&5
9479 cat conftest.$ac_ext >&5
9480 ac_cv_struct_tm=sys/time.h
9481 fi
9482 rm -f conftest.$ac_objext conftest.$ac_ext
9483 fi
9484 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
9485 echo "${ECHO_T}$ac_cv_struct_tm" >&6
9486 if test $ac_cv_struct_tm = sys/time.h; then
9487
9488 cat >>confdefs.h <<\_ACEOF
9489 #define TM_IN_SYS_TIME 1
9490 _ACEOF
9491
9492 fi
9493
9494 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
9495 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
9496 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
9497   echo $ECHO_N "(cached) $ECHO_C" >&6
9498 else
9499   cat >conftest.$ac_ext <<_ACEOF
9500 #line $LINENO "configure"
9501 #include "confdefs.h"
9502 #include <sys/types.h>
9503 #include <$ac_cv_struct_tm>
9504
9505
9506 #ifdef F77_DUMMY_MAIN
9507 #  ifdef __cplusplus
9508      extern "C"
9509 #  endif
9510    int F77_DUMMY_MAIN() { return 1; }
9511 #endif
9512 int
9513 main ()
9514 {
9515 static struct tm ac_aggr;
9516 if (ac_aggr.tm_zone)
9517 return 0;
9518   ;
9519   return 0;
9520 }
9521 _ACEOF
9522 rm -f conftest.$ac_objext
9523 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9524   (eval $ac_compile) 2>&5
9525   ac_status=$?
9526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9527   (exit $ac_status); } &&
9528          { ac_try='test -s conftest.$ac_objext'
9529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9530   (eval $ac_try) 2>&5
9531   ac_status=$?
9532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9533   (exit $ac_status); }; }; then
9534   ac_cv_member_struct_tm_tm_zone=yes
9535 else
9536   echo "$as_me: failed program was:" >&5
9537 cat conftest.$ac_ext >&5
9538 ac_cv_member_struct_tm_tm_zone=no
9539 fi
9540 rm -f conftest.$ac_objext conftest.$ac_ext
9541 fi
9542 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
9543 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
9544 if test $ac_cv_member_struct_tm_tm_zone = yes; then
9545
9546 cat >>confdefs.h <<_ACEOF
9547 #define HAVE_STRUCT_TM_TM_ZONE 1
9548 _ACEOF
9549
9550
9551 fi
9552
9553 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
9554
9555 cat >>confdefs.h <<\_ACEOF
9556 #define HAVE_TM_ZONE 1
9557 _ACEOF
9558
9559 fi
9560 echo "$as_me:$LINENO: checking for tzname" >&5
9561 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
9562 if test "${ac_cv_var_tzname+set}" = set; then
9563   echo $ECHO_N "(cached) $ECHO_C" >&6
9564 else
9565   cat >conftest.$ac_ext <<_ACEOF
9566 #line $LINENO "configure"
9567 #include "confdefs.h"
9568 #include <time.h>
9569 #ifndef tzname /* For SGI.  */
9570 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
9571 #endif
9572
9573 #ifdef F77_DUMMY_MAIN
9574 #  ifdef __cplusplus
9575      extern "C"
9576 #  endif
9577    int F77_DUMMY_MAIN() { return 1; }
9578 #endif
9579 int
9580 main ()
9581 {
9582 atoi(*tzname);
9583   ;
9584   return 0;
9585 }
9586 _ACEOF
9587 rm -f conftest.$ac_objext conftest$ac_exeext
9588 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9589   (eval $ac_link) 2>&5
9590   ac_status=$?
9591   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592   (exit $ac_status); } &&
9593          { ac_try='test -s conftest$ac_exeext'
9594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9595   (eval $ac_try) 2>&5
9596   ac_status=$?
9597   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598   (exit $ac_status); }; }; then
9599   ac_cv_var_tzname=yes
9600 else
9601   echo "$as_me: failed program was:" >&5
9602 cat conftest.$ac_ext >&5
9603 ac_cv_var_tzname=no
9604 fi
9605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9606 fi
9607 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
9608 echo "${ECHO_T}$ac_cv_var_tzname" >&6
9609 if test $ac_cv_var_tzname = yes; then
9610
9611 cat >>confdefs.h <<\_ACEOF
9612 #define HAVE_TZNAME 1
9613 _ACEOF
9614
9615 fi
9616
9617 echo "$as_me:$LINENO: checking for union semun" >&5
9618 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
9619 if test "${ac_cv_type_union_semun+set}" = set; then
9620   echo $ECHO_N "(cached) $ECHO_C" >&6
9621 else
9622   cat >conftest.$ac_ext <<_ACEOF
9623 #line $LINENO "configure"
9624 #include "confdefs.h"
9625 #include <sys/types.h>
9626 #include <sys/ipc.h>
9627 #include <sys/sem.h>
9628
9629 #ifdef F77_DUMMY_MAIN
9630 #  ifdef __cplusplus
9631      extern "C"
9632 #  endif
9633    int F77_DUMMY_MAIN() { return 1; }
9634 #endif
9635 int
9636 main ()
9637 {
9638 if ((union semun *) 0)
9639   return 0;
9640 if (sizeof (union semun))
9641   return 0;
9642   ;
9643   return 0;
9644 }
9645 _ACEOF
9646 rm -f conftest.$ac_objext
9647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9648   (eval $ac_compile) 2>&5
9649   ac_status=$?
9650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9651   (exit $ac_status); } &&
9652          { ac_try='test -s conftest.$ac_objext'
9653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9654   (eval $ac_try) 2>&5
9655   ac_status=$?
9656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9657   (exit $ac_status); }; }; then
9658   ac_cv_type_union_semun=yes
9659 else
9660   echo "$as_me: failed program was:" >&5
9661 cat conftest.$ac_ext >&5
9662 ac_cv_type_union_semun=no
9663 fi
9664 rm -f conftest.$ac_objext conftest.$ac_ext
9665 fi
9666 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
9667 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
9668 if test $ac_cv_type_union_semun = yes; then
9669
9670 cat >>confdefs.h <<_ACEOF
9671 #define HAVE_UNION_SEMUN 1
9672 _ACEOF
9673
9674
9675 fi
9676
9677 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
9678 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
9679 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
9680   echo $ECHO_N "(cached) $ECHO_C" >&6
9681 else
9682   cat >conftest.$ac_ext <<_ACEOF
9683 #line $LINENO "configure"
9684 #include "confdefs.h"
9685 #include <sys/types.h>
9686 #ifdef HAVE_SYS_UN_H
9687 #include <sys/un.h>
9688 #endif
9689
9690
9691 #ifdef F77_DUMMY_MAIN
9692 #  ifdef __cplusplus
9693      extern "C"
9694 #  endif
9695    int F77_DUMMY_MAIN() { return 1; }
9696 #endif
9697 int
9698 main ()
9699 {
9700 if ((struct sockaddr_un *) 0)
9701   return 0;
9702 if (sizeof (struct sockaddr_un))
9703   return 0;
9704   ;
9705   return 0;
9706 }
9707 _ACEOF
9708 rm -f conftest.$ac_objext
9709 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9710   (eval $ac_compile) 2>&5
9711   ac_status=$?
9712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9713   (exit $ac_status); } &&
9714          { ac_try='test -s conftest.$ac_objext'
9715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9716   (eval $ac_try) 2>&5
9717   ac_status=$?
9718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9719   (exit $ac_status); }; }; then
9720   ac_cv_type_struct_sockaddr_un=yes
9721 else
9722   echo "$as_me: failed program was:" >&5
9723 cat conftest.$ac_ext >&5
9724 ac_cv_type_struct_sockaddr_un=no
9725 fi
9726 rm -f conftest.$ac_objext conftest.$ac_ext
9727 fi
9728 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
9729 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
9730 if test $ac_cv_type_struct_sockaddr_un = yes; then
9731
9732 cat >>confdefs.h <<_ACEOF
9733 #define HAVE_STRUCT_SOCKADDR_UN 1
9734 _ACEOF
9735
9736
9737 cat >>confdefs.h <<\_ACEOF
9738 #define HAVE_UNIX_SOCKETS 1
9739 _ACEOF
9740
9741 fi
9742
9743 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
9744 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
9745 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
9746   echo $ECHO_N "(cached) $ECHO_C" >&6
9747 else
9748   cat >conftest.$ac_ext <<_ACEOF
9749 #line $LINENO "configure"
9750 #include "confdefs.h"
9751 #include <sys/types.h>
9752 #ifdef HAVE_SYS_SOCKET_H
9753 #include <sys/socket.h>
9754 #endif
9755
9756
9757 #ifdef F77_DUMMY_MAIN
9758 #  ifdef __cplusplus
9759      extern "C"
9760 #  endif
9761    int F77_DUMMY_MAIN() { return 1; }
9762 #endif
9763 int
9764 main ()
9765 {
9766 if ((struct sockaddr_storage *) 0)
9767   return 0;
9768 if (sizeof (struct sockaddr_storage))
9769   return 0;
9770   ;
9771   return 0;
9772 }
9773 _ACEOF
9774 rm -f conftest.$ac_objext
9775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9776   (eval $ac_compile) 2>&5
9777   ac_status=$?
9778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9779   (exit $ac_status); } &&
9780          { ac_try='test -s conftest.$ac_objext'
9781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9782   (eval $ac_try) 2>&5
9783   ac_status=$?
9784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9785   (exit $ac_status); }; }; then
9786   ac_cv_type_struct_sockaddr_storage=yes
9787 else
9788   echo "$as_me: failed program was:" >&5
9789 cat conftest.$ac_ext >&5
9790 ac_cv_type_struct_sockaddr_storage=no
9791 fi
9792 rm -f conftest.$ac_objext conftest.$ac_ext
9793 fi
9794 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
9795 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
9796 if test $ac_cv_type_struct_sockaddr_storage = yes; then
9797
9798 cat >>confdefs.h <<_ACEOF
9799 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
9800 _ACEOF
9801
9802
9803 fi
9804
9805 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
9806 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
9807 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
9808   echo $ECHO_N "(cached) $ECHO_C" >&6
9809 else
9810   cat >conftest.$ac_ext <<_ACEOF
9811 #line $LINENO "configure"
9812 #include "confdefs.h"
9813 #include <sys/types.h>
9814 #ifdef HAVE_SYS_SOCKET_H
9815 #include <sys/socket.h>
9816 #endif
9817
9818
9819 #ifdef F77_DUMMY_MAIN
9820 #  ifdef __cplusplus
9821      extern "C"
9822 #  endif
9823    int F77_DUMMY_MAIN() { return 1; }
9824 #endif
9825 int
9826 main ()
9827 {
9828 static struct sockaddr_storage ac_aggr;
9829 if (ac_aggr.ss_family)
9830 return 0;
9831   ;
9832   return 0;
9833 }
9834 _ACEOF
9835 rm -f conftest.$ac_objext
9836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9837   (eval $ac_compile) 2>&5
9838   ac_status=$?
9839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840   (exit $ac_status); } &&
9841          { ac_try='test -s conftest.$ac_objext'
9842   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843   (eval $ac_try) 2>&5
9844   ac_status=$?
9845   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846   (exit $ac_status); }; }; then
9847   ac_cv_member_struct_sockaddr_storage_ss_family=yes
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 cat conftest.$ac_ext >&5
9851 ac_cv_member_struct_sockaddr_storage_ss_family=no
9852 fi
9853 rm -f conftest.$ac_objext conftest.$ac_ext
9854 fi
9855 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
9856 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
9857 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
9858
9859 cat >>confdefs.h <<_ACEOF
9860 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
9861 _ACEOF
9862
9863
9864 fi
9865 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
9866 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
9867 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
9868   echo $ECHO_N "(cached) $ECHO_C" >&6
9869 else
9870   cat >conftest.$ac_ext <<_ACEOF
9871 #line $LINENO "configure"
9872 #include "confdefs.h"
9873 #include <sys/types.h>
9874 #ifdef HAVE_SYS_SOCKET_H
9875 #include <sys/socket.h>
9876 #endif
9877
9878
9879 #ifdef F77_DUMMY_MAIN
9880 #  ifdef __cplusplus
9881      extern "C"
9882 #  endif
9883    int F77_DUMMY_MAIN() { return 1; }
9884 #endif
9885 int
9886 main ()
9887 {
9888 static struct sockaddr_storage ac_aggr;
9889 if (ac_aggr.__ss_family)
9890 return 0;
9891   ;
9892   return 0;
9893 }
9894 _ACEOF
9895 rm -f conftest.$ac_objext
9896 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9897   (eval $ac_compile) 2>&5
9898   ac_status=$?
9899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9900   (exit $ac_status); } &&
9901          { ac_try='test -s conftest.$ac_objext'
9902   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9903   (eval $ac_try) 2>&5
9904   ac_status=$?
9905   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9906   (exit $ac_status); }; }; then
9907   ac_cv_member_struct_sockaddr_storage___ss_family=yes
9908 else
9909   echo "$as_me: failed program was:" >&5
9910 cat conftest.$ac_ext >&5
9911 ac_cv_member_struct_sockaddr_storage___ss_family=no
9912 fi
9913 rm -f conftest.$ac_objext conftest.$ac_ext
9914 fi
9915 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
9916 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
9917 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
9918
9919 cat >>confdefs.h <<_ACEOF
9920 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
9921 _ACEOF
9922
9923
9924 fi
9925 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
9926 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
9927 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
9928   echo $ECHO_N "(cached) $ECHO_C" >&6
9929 else
9930   cat >conftest.$ac_ext <<_ACEOF
9931 #line $LINENO "configure"
9932 #include "confdefs.h"
9933 #include <sys/types.h>
9934 #ifdef HAVE_SYS_SOCKET_H
9935 #include <sys/socket.h>
9936 #endif
9937
9938
9939 #ifdef F77_DUMMY_MAIN
9940 #  ifdef __cplusplus
9941      extern "C"
9942 #  endif
9943    int F77_DUMMY_MAIN() { return 1; }
9944 #endif
9945 int
9946 main ()
9947 {
9948 static struct sockaddr_storage ac_aggr;
9949 if (ac_aggr.ss_len)
9950 return 0;
9951   ;
9952   return 0;
9953 }
9954 _ACEOF
9955 rm -f conftest.$ac_objext
9956 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9957   (eval $ac_compile) 2>&5
9958   ac_status=$?
9959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9960   (exit $ac_status); } &&
9961          { ac_try='test -s conftest.$ac_objext'
9962   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9963   (eval $ac_try) 2>&5
9964   ac_status=$?
9965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9966   (exit $ac_status); }; }; then
9967   ac_cv_member_struct_sockaddr_storage_ss_len=yes
9968 else
9969   echo "$as_me: failed program was:" >&5
9970 cat conftest.$ac_ext >&5
9971 ac_cv_member_struct_sockaddr_storage_ss_len=no
9972 fi
9973 rm -f conftest.$ac_objext conftest.$ac_ext
9974 fi
9975 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
9976 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
9977 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
9978
9979 cat >>confdefs.h <<_ACEOF
9980 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
9981 _ACEOF
9982
9983
9984 fi
9985 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
9986 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
9987 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
9988   echo $ECHO_N "(cached) $ECHO_C" >&6
9989 else
9990   cat >conftest.$ac_ext <<_ACEOF
9991 #line $LINENO "configure"
9992 #include "confdefs.h"
9993 #include <sys/types.h>
9994 #ifdef HAVE_SYS_SOCKET_H
9995 #include <sys/socket.h>
9996 #endif
9997
9998
9999 #ifdef F77_DUMMY_MAIN
10000 #  ifdef __cplusplus
10001      extern "C"
10002 #  endif
10003    int F77_DUMMY_MAIN() { return 1; }
10004 #endif
10005 int
10006 main ()
10007 {
10008 static struct sockaddr_storage ac_aggr;
10009 if (ac_aggr.__ss_len)
10010 return 0;
10011   ;
10012   return 0;
10013 }
10014 _ACEOF
10015 rm -f conftest.$ac_objext
10016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10017   (eval $ac_compile) 2>&5
10018   ac_status=$?
10019   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10020   (exit $ac_status); } &&
10021          { ac_try='test -s conftest.$ac_objext'
10022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10023   (eval $ac_try) 2>&5
10024   ac_status=$?
10025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10026   (exit $ac_status); }; }; then
10027   ac_cv_member_struct_sockaddr_storage___ss_len=yes
10028 else
10029   echo "$as_me: failed program was:" >&5
10030 cat conftest.$ac_ext >&5
10031 ac_cv_member_struct_sockaddr_storage___ss_len=no
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034 fi
10035 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
10036 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
10037 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
10038
10039 cat >>confdefs.h <<_ACEOF
10040 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10041 _ACEOF
10042
10043
10044 fi
10045 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
10046 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
10047 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
10048   echo $ECHO_N "(cached) $ECHO_C" >&6
10049 else
10050   cat >conftest.$ac_ext <<_ACEOF
10051 #line $LINENO "configure"
10052 #include "confdefs.h"
10053 #include <sys/types.h>
10054 #ifdef HAVE_SYS_SOCKET_H
10055 #include <sys/socket.h>
10056 #endif
10057
10058
10059 #ifdef F77_DUMMY_MAIN
10060 #  ifdef __cplusplus
10061      extern "C"
10062 #  endif
10063    int F77_DUMMY_MAIN() { return 1; }
10064 #endif
10065 int
10066 main ()
10067 {
10068 static struct sockaddr ac_aggr;
10069 if (ac_aggr.sa_len)
10070 return 0;
10071   ;
10072   return 0;
10073 }
10074 _ACEOF
10075 rm -f conftest.$ac_objext
10076 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10077   (eval $ac_compile) 2>&5
10078   ac_status=$?
10079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10080   (exit $ac_status); } &&
10081          { ac_try='test -s conftest.$ac_objext'
10082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10083   (eval $ac_try) 2>&5
10084   ac_status=$?
10085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10086   (exit $ac_status); }; }; then
10087   ac_cv_member_struct_sockaddr_sa_len=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10091 ac_cv_member_struct_sockaddr_sa_len=no
10092 fi
10093 rm -f conftest.$ac_objext conftest.$ac_ext
10094 fi
10095 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
10096 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
10097 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
10098
10099 cat >>confdefs.h <<_ACEOF
10100 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10101 _ACEOF
10102
10103
10104 fi
10105
10106 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
10107 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
10108 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
10109   echo $ECHO_N "(cached) $ECHO_C" >&6
10110 else
10111   cat >conftest.$ac_ext <<_ACEOF
10112 #line $LINENO "configure"
10113 #include "confdefs.h"
10114 #include <sys/types.h>
10115 #include <sys/socket.h>
10116 #include <netdb.h>
10117
10118
10119 #ifdef F77_DUMMY_MAIN
10120 #  ifdef __cplusplus
10121      extern "C"
10122 #  endif
10123    int F77_DUMMY_MAIN() { return 1; }
10124 #endif
10125 int
10126 main ()
10127 {
10128 if ((struct addrinfo *) 0)
10129   return 0;
10130 if (sizeof (struct addrinfo))
10131   return 0;
10132   ;
10133   return 0;
10134 }
10135 _ACEOF
10136 rm -f conftest.$ac_objext
10137 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10138   (eval $ac_compile) 2>&5
10139   ac_status=$?
10140   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10141   (exit $ac_status); } &&
10142          { ac_try='test -s conftest.$ac_objext'
10143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10144   (eval $ac_try) 2>&5
10145   ac_status=$?
10146   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10147   (exit $ac_status); }; }; then
10148   ac_cv_type_struct_addrinfo=yes
10149 else
10150   echo "$as_me: failed program was:" >&5
10151 cat conftest.$ac_ext >&5
10152 ac_cv_type_struct_addrinfo=no
10153 fi
10154 rm -f conftest.$ac_objext conftest.$ac_ext
10155 fi
10156 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
10157 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
10158 if test $ac_cv_type_struct_addrinfo = yes; then
10159
10160 cat >>confdefs.h <<_ACEOF
10161 #define HAVE_STRUCT_ADDRINFO 1
10162 _ACEOF
10163
10164
10165 fi
10166
10167
10168 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
10169 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
10170 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
10171   echo $ECHO_N "(cached) $ECHO_C" >&6
10172 else
10173   cat >conftest.$ac_ext <<_ACEOF
10174 #line $LINENO "configure"
10175 #include "confdefs.h"
10176 #include <sys/param.h>
10177 #include <sys/types.h>
10178 #include <sys/socket.h>
10179 #include <sys/ucred.h>
10180
10181 #ifdef F77_DUMMY_MAIN
10182 #  ifdef __cplusplus
10183      extern "C"
10184 #  endif
10185    int F77_DUMMY_MAIN() { return 1; }
10186 #endif
10187 int
10188 main ()
10189 {
10190 if ((struct cmsgcred *) 0)
10191   return 0;
10192 if (sizeof (struct cmsgcred))
10193   return 0;
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 rm -f conftest.$ac_objext
10199 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10200   (eval $ac_compile) 2>&5
10201   ac_status=$?
10202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10203   (exit $ac_status); } &&
10204          { ac_try='test -s conftest.$ac_objext'
10205   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10209   (exit $ac_status); }; }; then
10210   ac_cv_type_struct_cmsgcred=yes
10211 else
10212   echo "$as_me: failed program was:" >&5
10213 cat conftest.$ac_ext >&5
10214 ac_cv_type_struct_cmsgcred=no
10215 fi
10216 rm -f conftest.$ac_objext conftest.$ac_ext
10217 fi
10218 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
10219 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
10220 if test $ac_cv_type_struct_cmsgcred = yes; then
10221
10222 cat >>confdefs.h <<_ACEOF
10223 #define HAVE_STRUCT_CMSGCRED 1
10224 _ACEOF
10225
10226
10227 fi
10228 echo "$as_me:$LINENO: checking for struct fcred" >&5
10229 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
10230 if test "${ac_cv_type_struct_fcred+set}" = set; then
10231   echo $ECHO_N "(cached) $ECHO_C" >&6
10232 else
10233   cat >conftest.$ac_ext <<_ACEOF
10234 #line $LINENO "configure"
10235 #include "confdefs.h"
10236 #include <sys/param.h>
10237 #include <sys/types.h>
10238 #include <sys/socket.h>
10239 #include <sys/ucred.h>
10240
10241 #ifdef F77_DUMMY_MAIN
10242 #  ifdef __cplusplus
10243      extern "C"
10244 #  endif
10245    int F77_DUMMY_MAIN() { return 1; }
10246 #endif
10247 int
10248 main ()
10249 {
10250 if ((struct fcred *) 0)
10251   return 0;
10252 if (sizeof (struct fcred))
10253   return 0;
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f conftest.$ac_objext
10259 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10263   (exit $ac_status); } &&
10264          { ac_try='test -s conftest.$ac_objext'
10265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10269   (exit $ac_status); }; }; then
10270   ac_cv_type_struct_fcred=yes
10271 else
10272   echo "$as_me: failed program was:" >&5
10273 cat conftest.$ac_ext >&5
10274 ac_cv_type_struct_fcred=no
10275 fi
10276 rm -f conftest.$ac_objext conftest.$ac_ext
10277 fi
10278 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
10279 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
10280 if test $ac_cv_type_struct_fcred = yes; then
10281
10282 cat >>confdefs.h <<_ACEOF
10283 #define HAVE_STRUCT_FCRED 1
10284 _ACEOF
10285
10286
10287 fi
10288 echo "$as_me:$LINENO: checking for struct sockcred" >&5
10289 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
10290 if test "${ac_cv_type_struct_sockcred+set}" = set; then
10291   echo $ECHO_N "(cached) $ECHO_C" >&6
10292 else
10293   cat >conftest.$ac_ext <<_ACEOF
10294 #line $LINENO "configure"
10295 #include "confdefs.h"
10296 #include <sys/param.h>
10297 #include <sys/types.h>
10298 #include <sys/socket.h>
10299 #include <sys/ucred.h>
10300
10301 #ifdef F77_DUMMY_MAIN
10302 #  ifdef __cplusplus
10303      extern "C"
10304 #  endif
10305    int F77_DUMMY_MAIN() { return 1; }
10306 #endif
10307 int
10308 main ()
10309 {
10310 if ((struct sockcred *) 0)
10311   return 0;
10312 if (sizeof (struct sockcred))
10313   return 0;
10314   ;
10315   return 0;
10316 }
10317 _ACEOF
10318 rm -f conftest.$ac_objext
10319 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10320   (eval $ac_compile) 2>&5
10321   ac_status=$?
10322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323   (exit $ac_status); } &&
10324          { ac_try='test -s conftest.$ac_objext'
10325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10326   (eval $ac_try) 2>&5
10327   ac_status=$?
10328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10329   (exit $ac_status); }; }; then
10330   ac_cv_type_struct_sockcred=yes
10331 else
10332   echo "$as_me: failed program was:" >&5
10333 cat conftest.$ac_ext >&5
10334 ac_cv_type_struct_sockcred=no
10335 fi
10336 rm -f conftest.$ac_objext conftest.$ac_ext
10337 fi
10338 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
10339 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
10340 if test $ac_cv_type_struct_sockcred = yes; then
10341
10342 cat >>confdefs.h <<_ACEOF
10343 #define HAVE_STRUCT_SOCKCRED 1
10344 _ACEOF
10345
10346
10347 fi
10348
10349
10350 echo "$as_me:$LINENO: checking for struct option" >&5
10351 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
10352 if test "${ac_cv_type_struct_option+set}" = set; then
10353   echo $ECHO_N "(cached) $ECHO_C" >&6
10354 else
10355   cat >conftest.$ac_ext <<_ACEOF
10356 #line $LINENO "configure"
10357 #include "confdefs.h"
10358 #ifdef HAVE_GETOPT_H
10359 #include <getopt.h>
10360 #endif
10361
10362 #ifdef F77_DUMMY_MAIN
10363 #  ifdef __cplusplus
10364      extern "C"
10365 #  endif
10366    int F77_DUMMY_MAIN() { return 1; }
10367 #endif
10368 int
10369 main ()
10370 {
10371 if ((struct option *) 0)
10372   return 0;
10373 if (sizeof (struct option))
10374   return 0;
10375   ;
10376   return 0;
10377 }
10378 _ACEOF
10379 rm -f conftest.$ac_objext
10380 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10381   (eval $ac_compile) 2>&5
10382   ac_status=$?
10383   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384   (exit $ac_status); } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   ac_cv_type_struct_option=yes
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 cat conftest.$ac_ext >&5
10395 ac_cv_type_struct_option=no
10396 fi
10397 rm -f conftest.$ac_objext conftest.$ac_ext
10398 fi
10399 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
10400 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
10401 if test $ac_cv_type_struct_option = yes; then
10402
10403 cat >>confdefs.h <<_ACEOF
10404 #define HAVE_STRUCT_OPTION 1
10405 _ACEOF
10406
10407
10408 fi
10409
10410
10411 if test "$with_zlib" = yes; then
10412   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10413   # did not).  While we could work around the lack of z_streamp, it
10414   # seems unwise to encourage people to use such old zlib versions...
10415   echo "$as_me:$LINENO: checking for z_streamp" >&5
10416 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
10417 if test "${ac_cv_type_z_streamp+set}" = set; then
10418   echo $ECHO_N "(cached) $ECHO_C" >&6
10419 else
10420   cat >conftest.$ac_ext <<_ACEOF
10421 #line $LINENO "configure"
10422 #include "confdefs.h"
10423 #include <zlib.h>
10424
10425 #ifdef F77_DUMMY_MAIN
10426 #  ifdef __cplusplus
10427      extern "C"
10428 #  endif
10429    int F77_DUMMY_MAIN() { return 1; }
10430 #endif
10431 int
10432 main ()
10433 {
10434 if ((z_streamp *) 0)
10435   return 0;
10436 if (sizeof (z_streamp))
10437   return 0;
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f conftest.$ac_objext
10443 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10447   (exit $ac_status); } &&
10448          { ac_try='test -s conftest.$ac_objext'
10449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453   (exit $ac_status); }; }; then
10454   ac_cv_type_z_streamp=yes
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 ac_cv_type_z_streamp=no
10459 fi
10460 rm -f conftest.$ac_objext conftest.$ac_ext
10461 fi
10462 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
10463 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
10464 if test $ac_cv_type_z_streamp = yes; then
10465   :
10466 else
10467   { { echo "$as_me:$LINENO: error: zlib version is too old
10468 Use --without-zlib to disable zlib support." >&5
10469 echo "$as_me: error: zlib version is too old
10470 Use --without-zlib to disable zlib support." >&2;}
10471    { (exit 1); exit 1; }; }
10472 fi
10473
10474 fi
10475
10476 if test "$with_krb5" = yes; then
10477 # Check for differences between MIT and Heimdal (KTH) releases
10478   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
10479 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
10480 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
10481   echo $ECHO_N "(cached) $ECHO_C" >&6
10482 else
10483   cat >conftest.$ac_ext <<_ACEOF
10484 #line $LINENO "configure"
10485 #include "confdefs.h"
10486 #include <krb5.h>
10487
10488 #ifdef F77_DUMMY_MAIN
10489 #  ifdef __cplusplus
10490      extern "C"
10491 #  endif
10492    int F77_DUMMY_MAIN() { return 1; }
10493 #endif
10494 int
10495 main ()
10496 {
10497 static krb5_ticket ac_aggr;
10498 if (ac_aggr.enc_part2)
10499 return 0;
10500   ;
10501   return 0;
10502 }
10503 _ACEOF
10504 rm -f conftest.$ac_objext
10505 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10506   (eval $ac_compile) 2>&5
10507   ac_status=$?
10508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10509   (exit $ac_status); } &&
10510          { ac_try='test -s conftest.$ac_objext'
10511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10512   (eval $ac_try) 2>&5
10513   ac_status=$?
10514   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10515   (exit $ac_status); }; }; then
10516   ac_cv_member_krb5_ticket_enc_part2=yes
10517 else
10518   echo "$as_me: failed program was:" >&5
10519 cat conftest.$ac_ext >&5
10520 ac_cv_member_krb5_ticket_enc_part2=no
10521 fi
10522 rm -f conftest.$ac_objext conftest.$ac_ext
10523 fi
10524 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
10525 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
10526 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
10527
10528 cat >>confdefs.h <<_ACEOF
10529 #define HAVE_KRB5_TICKET_ENC_PART2 1
10530 _ACEOF
10531
10532
10533 else
10534   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
10535 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
10536 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
10537   echo $ECHO_N "(cached) $ECHO_C" >&6
10538 else
10539   cat >conftest.$ac_ext <<_ACEOF
10540 #line $LINENO "configure"
10541 #include "confdefs.h"
10542 #include <krb5.h>
10543
10544 #ifdef F77_DUMMY_MAIN
10545 #  ifdef __cplusplus
10546      extern "C"
10547 #  endif
10548    int F77_DUMMY_MAIN() { return 1; }
10549 #endif
10550 int
10551 main ()
10552 {
10553 static krb5_ticket ac_aggr;
10554 if (ac_aggr.client)
10555 return 0;
10556   ;
10557   return 0;
10558 }
10559 _ACEOF
10560 rm -f conftest.$ac_objext
10561 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10562   (eval $ac_compile) 2>&5
10563   ac_status=$?
10564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565   (exit $ac_status); } &&
10566          { ac_try='test -s conftest.$ac_objext'
10567   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10568   (eval $ac_try) 2>&5
10569   ac_status=$?
10570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10571   (exit $ac_status); }; }; then
10572   ac_cv_member_krb5_ticket_client=yes
10573 else
10574   echo "$as_me: failed program was:" >&5
10575 cat conftest.$ac_ext >&5
10576 ac_cv_member_krb5_ticket_client=no
10577 fi
10578 rm -f conftest.$ac_objext conftest.$ac_ext
10579 fi
10580 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
10581 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
10582 if test $ac_cv_member_krb5_ticket_client = yes; then
10583
10584 cat >>confdefs.h <<_ACEOF
10585 #define HAVE_KRB5_TICKET_CLIENT 1
10586 _ACEOF
10587
10588
10589 else
10590   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
10591 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
10592    { (exit 1); exit 1; }; }
10593 fi
10594
10595 fi
10596
10597   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
10598 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
10599 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
10600   echo $ECHO_N "(cached) $ECHO_C" >&6
10601 else
10602   cat >conftest.$ac_ext <<_ACEOF
10603 #line $LINENO "configure"
10604 #include "confdefs.h"
10605 #include <krb5.h>
10606
10607 #ifdef F77_DUMMY_MAIN
10608 #  ifdef __cplusplus
10609      extern "C"
10610 #  endif
10611    int F77_DUMMY_MAIN() { return 1; }
10612 #endif
10613 int
10614 main ()
10615 {
10616 static krb5_error ac_aggr;
10617 if (ac_aggr.text.data)
10618 return 0;
10619   ;
10620   return 0;
10621 }
10622 _ACEOF
10623 rm -f conftest.$ac_objext
10624 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10625   (eval $ac_compile) 2>&5
10626   ac_status=$?
10627   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628   (exit $ac_status); } &&
10629          { ac_try='test -s conftest.$ac_objext'
10630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10631   (eval $ac_try) 2>&5
10632   ac_status=$?
10633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10634   (exit $ac_status); }; }; then
10635   ac_cv_member_krb5_error_text_data=yes
10636 else
10637   echo "$as_me: failed program was:" >&5
10638 cat conftest.$ac_ext >&5
10639 ac_cv_member_krb5_error_text_data=no
10640 fi
10641 rm -f conftest.$ac_objext conftest.$ac_ext
10642 fi
10643 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
10644 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
10645 if test $ac_cv_member_krb5_error_text_data = yes; then
10646
10647 cat >>confdefs.h <<_ACEOF
10648 #define HAVE_KRB5_ERROR_TEXT_DATA 1
10649 _ACEOF
10650
10651
10652 else
10653   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
10654 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
10655 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
10656   echo $ECHO_N "(cached) $ECHO_C" >&6
10657 else
10658   cat >conftest.$ac_ext <<_ACEOF
10659 #line $LINENO "configure"
10660 #include "confdefs.h"
10661 #include <krb5.h>
10662
10663 #ifdef F77_DUMMY_MAIN
10664 #  ifdef __cplusplus
10665      extern "C"
10666 #  endif
10667    int F77_DUMMY_MAIN() { return 1; }
10668 #endif
10669 int
10670 main ()
10671 {
10672 static krb5_error ac_aggr;
10673 if (ac_aggr.e_data)
10674 return 0;
10675   ;
10676   return 0;
10677 }
10678 _ACEOF
10679 rm -f conftest.$ac_objext
10680 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10681   (eval $ac_compile) 2>&5
10682   ac_status=$?
10683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10684   (exit $ac_status); } &&
10685          { ac_try='test -s conftest.$ac_objext'
10686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10687   (eval $ac_try) 2>&5
10688   ac_status=$?
10689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10690   (exit $ac_status); }; }; then
10691   ac_cv_member_krb5_error_e_data=yes
10692 else
10693   echo "$as_me: failed program was:" >&5
10694 cat conftest.$ac_ext >&5
10695 ac_cv_member_krb5_error_e_data=no
10696 fi
10697 rm -f conftest.$ac_objext conftest.$ac_ext
10698 fi
10699 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
10700 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
10701 if test $ac_cv_member_krb5_error_e_data = yes; then
10702
10703 cat >>confdefs.h <<_ACEOF
10704 #define HAVE_KRB5_ERROR_E_DATA 1
10705 _ACEOF
10706
10707
10708 else
10709   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
10710 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
10711    { (exit 1); exit 1; }; }
10712 fi
10713
10714 fi
10715
10716 fi
10717
10718 ##
10719 ## Functions, global variables
10720 ##
10721
10722 echo "$as_me:$LINENO: checking for int timezone" >&5
10723 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
10724 if test "${pgac_cv_var_int_timezone+set}" = set; then
10725   echo $ECHO_N "(cached) $ECHO_C" >&6
10726 else
10727   cat >conftest.$ac_ext <<_ACEOF
10728 #line $LINENO "configure"
10729 #include "confdefs.h"
10730 #include <time.h>
10731 int res;
10732 #ifdef F77_DUMMY_MAIN
10733 #  ifdef __cplusplus
10734      extern "C"
10735 #  endif
10736    int F77_DUMMY_MAIN() { return 1; }
10737 #endif
10738 int
10739 main ()
10740 {
10741 #ifndef __CYGWIN__
10742 res = timezone / 60;
10743 #else
10744 res = _timezone / 60;
10745 #endif
10746   ;
10747   return 0;
10748 }
10749 _ACEOF
10750 rm -f conftest.$ac_objext conftest$ac_exeext
10751 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10752   (eval $ac_link) 2>&5
10753   ac_status=$?
10754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755   (exit $ac_status); } &&
10756          { ac_try='test -s conftest$ac_exeext'
10757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10758   (eval $ac_try) 2>&5
10759   ac_status=$?
10760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10761   (exit $ac_status); }; }; then
10762   pgac_cv_var_int_timezone=yes
10763 else
10764   echo "$as_me: failed program was:" >&5
10765 cat conftest.$ac_ext >&5
10766 pgac_cv_var_int_timezone=no
10767 fi
10768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10769 fi
10770 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
10771 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
10772 if test x"$pgac_cv_var_int_timezone" = xyes ; then
10773
10774 cat >>confdefs.h <<\_ACEOF
10775 #define HAVE_INT_TIMEZONE
10776 _ACEOF
10777
10778 fi
10779 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
10780 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
10781  if test "${ac_cv_func_accept_return+set}" = set; then
10782   echo $ECHO_N "(cached) $ECHO_C" >&6
10783 else
10784    if test "${ac_cv_func_accept_arg1+set}" = set; then
10785   echo $ECHO_N "(cached) $ECHO_C" >&6
10786 else
10787     if test "${ac_cv_func_accept_arg2+set}" = set; then
10788   echo $ECHO_N "(cached) $ECHO_C" >&6
10789 else
10790      if test "${ac_cv_func_accept_arg3+set}" = set; then
10791   echo $ECHO_N "(cached) $ECHO_C" >&6
10792 else
10793       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
10794       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
10795        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
10796         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
10797          cat >conftest.$ac_ext <<_ACEOF
10798 #line $LINENO "configure"
10799 #include "confdefs.h"
10800 #ifdef HAVE_SYS_TYPES_H
10801 #include <sys/types.h>
10802 #endif
10803 #ifdef HAVE_SYS_SOCKET_H
10804 #include <sys/socket.h>
10805 #endif
10806 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
10807 #ifdef F77_DUMMY_MAIN
10808 #  ifdef __cplusplus
10809      extern "C"
10810 #  endif
10811    int F77_DUMMY_MAIN() { return 1; }
10812 #endif
10813 int
10814 main ()
10815 {
10816
10817   ;
10818   return 0;
10819 }
10820 _ACEOF
10821 rm -f conftest.$ac_objext
10822 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10823   (eval $ac_compile) 2>&5
10824   ac_status=$?
10825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10826   (exit $ac_status); } &&
10827          { ac_try='test -s conftest.$ac_objext'
10828   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10829   (eval $ac_try) 2>&5
10830   ac_status=$?
10831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10832   (exit $ac_status); }; }; then
10833   ac_not_found=no; break 4
10834 else
10835   echo "$as_me: failed program was:" >&5
10836 cat conftest.$ac_ext >&5
10837 ac_not_found=yes
10838 fi
10839 rm -f conftest.$ac_objext conftest.$ac_ext
10840        done
10841       done
10842      done
10843     done
10844     if test "$ac_not_found" = yes; then
10845       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
10846 echo "$as_me: error: could not determine argument types" >&2;}
10847    { (exit 1); exit 1; }; }
10848     fi
10849     if test "$ac_cv_func_accept_arg3" = "void"; then
10850       ac_cv_func_accept_arg3=int
10851     fi
10852
10853 fi
10854
10855 fi
10856
10857 fi
10858
10859 fi
10860  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
10861 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
10862
10863 cat >>confdefs.h <<_ACEOF
10864 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
10865 _ACEOF
10866
10867
10868 cat >>confdefs.h <<_ACEOF
10869 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
10870 _ACEOF
10871
10872
10873 cat >>confdefs.h <<_ACEOF
10874 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
10875 _ACEOF
10876
10877
10878 cat >>confdefs.h <<_ACEOF
10879 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
10880 _ACEOF
10881
10882
10883 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
10884 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
10885 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
10886   echo $ECHO_N "(cached) $ECHO_C" >&6
10887 else
10888   cat >conftest.$ac_ext <<_ACEOF
10889 #line $LINENO "configure"
10890 #include "confdefs.h"
10891 #include <sys/time.h>
10892 #ifdef F77_DUMMY_MAIN
10893 #  ifdef __cplusplus
10894      extern "C"
10895 #  endif
10896    int F77_DUMMY_MAIN() { return 1; }
10897 #endif
10898 int
10899 main ()
10900 {
10901 struct timeval *tp;
10902 struct timezone *tzp;
10903 gettimeofday(tp,tzp);
10904   ;
10905   return 0;
10906 }
10907 _ACEOF
10908 rm -f conftest.$ac_objext
10909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10910   (eval $ac_compile) 2>&5
10911   ac_status=$?
10912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913   (exit $ac_status); } &&
10914          { ac_try='test -s conftest.$ac_objext'
10915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10916   (eval $ac_try) 2>&5
10917   ac_status=$?
10918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10919   (exit $ac_status); }; }; then
10920   pgac_cv_func_gettimeofday_1arg=no
10921 else
10922   echo "$as_me: failed program was:" >&5
10923 cat conftest.$ac_ext >&5
10924 pgac_cv_func_gettimeofday_1arg=yes
10925 fi
10926 rm -f conftest.$ac_objext conftest.$ac_ext
10927 fi
10928 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
10929 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
10930 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
10931
10932 cat >>confdefs.h <<\_ACEOF
10933 #define GETTIMEOFDAY_1ARG
10934 _ACEOF
10935
10936 fi
10937
10938
10939
10940 # SunOS doesn't handle negative byte comparisons properly with +/- return
10941 echo "$as_me:$LINENO: checking for working memcmp" >&5
10942 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
10943 if test "${ac_cv_func_memcmp_working+set}" = set; then
10944   echo $ECHO_N "(cached) $ECHO_C" >&6
10945 else
10946   if test "$cross_compiling" = yes; then
10947   ac_cv_func_memcmp_working=no
10948 else
10949   cat >conftest.$ac_ext <<_ACEOF
10950 #line $LINENO "configure"
10951 #include "confdefs.h"
10952
10953 #ifdef F77_DUMMY_MAIN
10954 #  ifdef __cplusplus
10955      extern "C"
10956 #  endif
10957    int F77_DUMMY_MAIN() { return 1; }
10958 #endif
10959 int
10960 main ()
10961 {
10962
10963   /* Some versions of memcmp are not 8-bit clean.  */
10964   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
10965   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
10966     exit (1);
10967
10968   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
10969      or more and with at least one buffer not starting on a 4-byte boundary.
10970      William Lewis provided this test program.   */
10971   {
10972     char foo[21];
10973     char bar[21];
10974     int i;
10975     for (i = 0; i < 4; i++)
10976       {
10977         char *a = foo + i;
10978         char *b = bar + i;
10979         strcpy (a, "--------01111111");
10980         strcpy (b, "--------10000000");
10981         if (memcmp (a, b, 16) >= 0)
10982           exit (1);
10983       }
10984     exit (0);
10985   }
10986
10987   ;
10988   return 0;
10989 }
10990 _ACEOF
10991 rm -f conftest$ac_exeext
10992 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10993   (eval $ac_link) 2>&5
10994   ac_status=$?
10995   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10996   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
11002   ac_cv_func_memcmp_working=yes
11003 else
11004   echo "$as_me: program exited with status $ac_status" >&5
11005 echo "$as_me: failed program was:" >&5
11006 cat conftest.$ac_ext >&5
11007 ( exit $ac_status )
11008 ac_cv_func_memcmp_working=no
11009 fi
11010 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11011 fi
11012 fi
11013 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
11014 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
11015 test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
11037 do
11038 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11039 echo "$as_me:$LINENO: checking for $ac_func" >&5
11040 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11041 if eval "test \"\${$as_ac_var+set}\" = set"; then
11042   echo $ECHO_N "(cached) $ECHO_C" >&6
11043 else
11044   cat >conftest.$ac_ext <<_ACEOF
11045 #line $LINENO "configure"
11046 #include "confdefs.h"
11047 /* System header to define __stub macros and hopefully few prototypes,
11048     which can conflict with char $ac_func (); below.  */
11049 #include <assert.h>
11050 /* Override any gcc2 internal prototype to avoid an error.  */
11051 #ifdef __cplusplus
11052 extern "C"
11053 #endif
11054 /* We use char because int might match the return type of a gcc2
11055    builtin and then its argument prototype would still apply.  */
11056 char $ac_func ();
11057 char (*f) ();
11058
11059 #ifdef F77_DUMMY_MAIN
11060 #  ifdef __cplusplus
11061      extern "C"
11062 #  endif
11063    int F77_DUMMY_MAIN() { return 1; }
11064 #endif
11065 int
11066 main ()
11067 {
11068 /* The GNU C library defines this for functions which it implements
11069     to always fail with ENOSYS.  Some functions are actually named
11070     something starting with __ and the normal name is an alias.  */
11071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11072 choke me
11073 #else
11074 f = $ac_func;
11075 #endif
11076
11077   ;
11078   return 0;
11079 }
11080 _ACEOF
11081 rm -f conftest.$ac_objext conftest$ac_exeext
11082 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11083   (eval $ac_link) 2>&5
11084   ac_status=$?
11085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11086   (exit $ac_status); } &&
11087          { ac_try='test -s conftest$ac_exeext'
11088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11089   (eval $ac_try) 2>&5
11090   ac_status=$?
11091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11092   (exit $ac_status); }; }; then
11093   eval "$as_ac_var=yes"
11094 else
11095   echo "$as_me: failed program was:" >&5
11096 cat conftest.$ac_ext >&5
11097 eval "$as_ac_var=no"
11098 fi
11099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11100 fi
11101 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11103 if test `eval echo '${'$as_ac_var'}'` = yes; then
11104   cat >>confdefs.h <<_ACEOF
11105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11106 _ACEOF
11107
11108 fi
11109 done
11110
11111
11112 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
11113 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
11114 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
11115   echo $ECHO_N "(cached) $ECHO_C" >&6
11116 else
11117   cat >conftest.$ac_ext <<_ACEOF
11118 #line $LINENO "configure"
11119 #include "confdefs.h"
11120 #include <unistd.h>
11121
11122 #ifdef F77_DUMMY_MAIN
11123 #  ifdef __cplusplus
11124      extern "C"
11125 #  endif
11126    int F77_DUMMY_MAIN() { return 1; }
11127 #endif
11128 int
11129 main ()
11130 {
11131 #ifndef fdatasync
11132   char *p = (char *) fdatasync;
11133 #endif
11134
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 rm -f conftest.$ac_objext
11140 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11141   (eval $ac_compile) 2>&5
11142   ac_status=$?
11143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -s conftest.$ac_objext'
11146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11147   (eval $ac_try) 2>&5
11148   ac_status=$?
11149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150   (exit $ac_status); }; }; then
11151   ac_cv_have_decl_fdatasync=yes
11152 else
11153   echo "$as_me: failed program was:" >&5
11154 cat conftest.$ac_ext >&5
11155 ac_cv_have_decl_fdatasync=no
11156 fi
11157 rm -f conftest.$ac_objext conftest.$ac_ext
11158 fi
11159 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
11160 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
11161 if test $ac_cv_have_decl_fdatasync = yes; then
11162
11163 cat >>confdefs.h <<_ACEOF
11164 #define HAVE_DECL_FDATASYNC 1
11165 _ACEOF
11166
11167
11168 else
11169   cat >>confdefs.h <<_ACEOF
11170 #define HAVE_DECL_FDATASYNC 0
11171 _ACEOF
11172
11173
11174 fi
11175
11176
11177
11178 HAVE_IPV6=no
11179 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
11180 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
11181 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
11182   echo $ECHO_N "(cached) $ECHO_C" >&6
11183 else
11184   cat >conftest.$ac_ext <<_ACEOF
11185 #line $LINENO "configure"
11186 #include "confdefs.h"
11187 $ac_includes_default
11188 #include <netinet/in.h>
11189
11190 #ifdef F77_DUMMY_MAIN
11191 #  ifdef __cplusplus
11192      extern "C"
11193 #  endif
11194    int F77_DUMMY_MAIN() { return 1; }
11195 #endif
11196 int
11197 main ()
11198 {
11199 if ((struct sockaddr_in6 *) 0)
11200   return 0;
11201 if (sizeof (struct sockaddr_in6))
11202   return 0;
11203   ;
11204   return 0;
11205 }
11206 _ACEOF
11207 rm -f conftest.$ac_objext
11208 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11209   (eval $ac_compile) 2>&5
11210   ac_status=$?
11211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212   (exit $ac_status); } &&
11213          { ac_try='test -s conftest.$ac_objext'
11214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11215   (eval $ac_try) 2>&5
11216   ac_status=$?
11217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11218   (exit $ac_status); }; }; then
11219   ac_cv_type_struct_sockaddr_in6=yes
11220 else
11221   echo "$as_me: failed program was:" >&5
11222 cat conftest.$ac_ext >&5
11223 ac_cv_type_struct_sockaddr_in6=no
11224 fi
11225 rm -f conftest.$ac_objext conftest.$ac_ext
11226 fi
11227 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
11228 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
11229 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
11230   echo "$as_me:$LINENO: checking for inet_ntop" >&5
11231 echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6
11232 if test "${ac_cv_func_inet_ntop+set}" = set; then
11233   echo $ECHO_N "(cached) $ECHO_C" >&6
11234 else
11235   cat >conftest.$ac_ext <<_ACEOF
11236 #line $LINENO "configure"
11237 #include "confdefs.h"
11238 /* System header to define __stub macros and hopefully few prototypes,
11239     which can conflict with char inet_ntop (); below.  */
11240 #include <assert.h>
11241 /* Override any gcc2 internal prototype to avoid an error.  */
11242 #ifdef __cplusplus
11243 extern "C"
11244 #endif
11245 /* We use char because int might match the return type of a gcc2
11246    builtin and then its argument prototype would still apply.  */
11247 char inet_ntop ();
11248 char (*f) ();
11249
11250 #ifdef F77_DUMMY_MAIN
11251 #  ifdef __cplusplus
11252      extern "C"
11253 #  endif
11254    int F77_DUMMY_MAIN() { return 1; }
11255 #endif
11256 int
11257 main ()
11258 {
11259 /* The GNU C library defines this for functions which it implements
11260     to always fail with ENOSYS.  Some functions are actually named
11261     something starting with __ and the normal name is an alias.  */
11262 #if defined (__stub_inet_ntop) || defined (__stub___inet_ntop)
11263 choke me
11264 #else
11265 f = inet_ntop;
11266 #endif
11267
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f conftest.$ac_objext conftest$ac_exeext
11273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11274   (eval $ac_link) 2>&5
11275   ac_status=$?
11276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11277   (exit $ac_status); } &&
11278          { ac_try='test -s conftest$ac_exeext'
11279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11280   (eval $ac_try) 2>&5
11281   ac_status=$?
11282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11283   (exit $ac_status); }; }; then
11284   ac_cv_func_inet_ntop=yes
11285 else
11286   echo "$as_me: failed program was:" >&5
11287 cat conftest.$ac_ext >&5
11288 ac_cv_func_inet_ntop=no
11289 fi
11290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11291 fi
11292 echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
11293 echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
11294 if test $ac_cv_func_inet_ntop = yes; then
11295
11296 cat >>confdefs.h <<\_ACEOF
11297 #define HAVE_IPV6 1
11298 _ACEOF
11299
11300                                                           HAVE_IPV6=yes
11301 fi
11302
11303 fi
11304
11305
11306
11307 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
11308 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
11309 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
11310   echo $ECHO_N "(cached) $ECHO_C" >&6
11311 else
11312   cat >conftest.$ac_ext <<_ACEOF
11313 #line $LINENO "configure"
11314 #include "confdefs.h"
11315 #include <machine/vmparam.h>
11316 #include <sys/exec.h>
11317
11318 #ifdef F77_DUMMY_MAIN
11319 #  ifdef __cplusplus
11320      extern "C"
11321 #  endif
11322    int F77_DUMMY_MAIN() { return 1; }
11323 #endif
11324 int
11325 main ()
11326 {
11327 PS_STRINGS->ps_nargvstr = 1;
11328 PS_STRINGS->ps_argvstr = "foo";
11329   ;
11330   return 0;
11331 }
11332 _ACEOF
11333 rm -f conftest.$ac_objext conftest$ac_exeext
11334 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11335   (eval $ac_link) 2>&5
11336   ac_status=$?
11337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11338   (exit $ac_status); } &&
11339          { ac_try='test -s conftest$ac_exeext'
11340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11341   (eval $ac_try) 2>&5
11342   ac_status=$?
11343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11344   (exit $ac_status); }; }; then
11345   pgac_cv_var_PS_STRINGS=yes
11346 else
11347   echo "$as_me: failed program was:" >&5
11348 cat conftest.$ac_ext >&5
11349 pgac_cv_var_PS_STRINGS=no
11350 fi
11351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11352 fi
11353 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
11354 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
11355 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11356
11357 cat >>confdefs.h <<\_ACEOF
11358 #define HAVE_PS_STRINGS
11359 _ACEOF
11360
11361 fi
11362
11363
11364 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11365 # is missing.  Yes, there are machines that have only one.  We may
11366 # also decide to use snprintf.c if snprintf() is present but does not
11367 # have working "long long int" support -- see below.
11368
11369 pgac_need_repl_snprintf=no
11370
11371 for ac_func in snprintf
11372 do
11373 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11374 echo "$as_me:$LINENO: checking for $ac_func" >&5
11375 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11376 if eval "test \"\${$as_ac_var+set}\" = set"; then
11377   echo $ECHO_N "(cached) $ECHO_C" >&6
11378 else
11379   cat >conftest.$ac_ext <<_ACEOF
11380 #line $LINENO "configure"
11381 #include "confdefs.h"
11382 /* System header to define __stub macros and hopefully few prototypes,
11383     which can conflict with char $ac_func (); below.  */
11384 #include <assert.h>
11385 /* Override any gcc2 internal prototype to avoid an error.  */
11386 #ifdef __cplusplus
11387 extern "C"
11388 #endif
11389 /* We use char because int might match the return type of a gcc2
11390    builtin and then its argument prototype would still apply.  */
11391 char $ac_func ();
11392 char (*f) ();
11393
11394 #ifdef F77_DUMMY_MAIN
11395 #  ifdef __cplusplus
11396      extern "C"
11397 #  endif
11398    int F77_DUMMY_MAIN() { return 1; }
11399 #endif
11400 int
11401 main ()
11402 {
11403 /* The GNU C library defines this for functions which it implements
11404     to always fail with ENOSYS.  Some functions are actually named
11405     something starting with __ and the normal name is an alias.  */
11406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11407 choke me
11408 #else
11409 f = $ac_func;
11410 #endif
11411
11412   ;
11413   return 0;
11414 }
11415 _ACEOF
11416 rm -f conftest.$ac_objext conftest$ac_exeext
11417 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11418   (eval $ac_link) 2>&5
11419   ac_status=$?
11420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421   (exit $ac_status); } &&
11422          { ac_try='test -s conftest$ac_exeext'
11423   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11424   (eval $ac_try) 2>&5
11425   ac_status=$?
11426   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11427   (exit $ac_status); }; }; then
11428   eval "$as_ac_var=yes"
11429 else
11430   echo "$as_me: failed program was:" >&5
11431 cat conftest.$ac_ext >&5
11432 eval "$as_ac_var=no"
11433 fi
11434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11435 fi
11436 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11437 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11438 if test `eval echo '${'$as_ac_var'}'` = yes; then
11439   cat >>confdefs.h <<_ACEOF
11440 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11441 _ACEOF
11442
11443 else
11444   pgac_need_repl_snprintf=yes
11445 fi
11446 done
11447
11448
11449 for ac_func in vsnprintf
11450 do
11451 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11452 echo "$as_me:$LINENO: checking for $ac_func" >&5
11453 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11454 if eval "test \"\${$as_ac_var+set}\" = set"; then
11455   echo $ECHO_N "(cached) $ECHO_C" >&6
11456 else
11457   cat >conftest.$ac_ext <<_ACEOF
11458 #line $LINENO "configure"
11459 #include "confdefs.h"
11460 /* System header to define __stub macros and hopefully few prototypes,
11461     which can conflict with char $ac_func (); below.  */
11462 #include <assert.h>
11463 /* Override any gcc2 internal prototype to avoid an error.  */
11464 #ifdef __cplusplus
11465 extern "C"
11466 #endif
11467 /* We use char because int might match the return type of a gcc2
11468    builtin and then its argument prototype would still apply.  */
11469 char $ac_func ();
11470 char (*f) ();
11471
11472 #ifdef F77_DUMMY_MAIN
11473 #  ifdef __cplusplus
11474      extern "C"
11475 #  endif
11476    int F77_DUMMY_MAIN() { return 1; }
11477 #endif
11478 int
11479 main ()
11480 {
11481 /* The GNU C library defines this for functions which it implements
11482     to always fail with ENOSYS.  Some functions are actually named
11483     something starting with __ and the normal name is an alias.  */
11484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11485 choke me
11486 #else
11487 f = $ac_func;
11488 #endif
11489
11490   ;
11491   return 0;
11492 }
11493 _ACEOF
11494 rm -f conftest.$ac_objext conftest$ac_exeext
11495 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11496   (eval $ac_link) 2>&5
11497   ac_status=$?
11498   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11499   (exit $ac_status); } &&
11500          { ac_try='test -s conftest$ac_exeext'
11501   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11502   (eval $ac_try) 2>&5
11503   ac_status=$?
11504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11505   (exit $ac_status); }; }; then
11506   eval "$as_ac_var=yes"
11507 else
11508   echo "$as_me: failed program was:" >&5
11509 cat conftest.$ac_ext >&5
11510 eval "$as_ac_var=no"
11511 fi
11512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11513 fi
11514 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11515 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11516 if test `eval echo '${'$as_ac_var'}'` = yes; then
11517   cat >>confdefs.h <<_ACEOF
11518 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11519 _ACEOF
11520
11521 else
11522   pgac_need_repl_snprintf=yes
11523 fi
11524 done
11525
11526
11527
11528 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11529 # include/c.h will provide declarations.  Note this is a separate test
11530 # from whether the functions exist in the C library --- there are
11531 # systems that have the functions but don't bother to declare them :-(
11532
11533 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
11534 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
11535 if test "${ac_cv_have_decl_snprintf+set}" = set; then
11536   echo $ECHO_N "(cached) $ECHO_C" >&6
11537 else
11538   cat >conftest.$ac_ext <<_ACEOF
11539 #line $LINENO "configure"
11540 #include "confdefs.h"
11541 $ac_includes_default
11542 #ifdef F77_DUMMY_MAIN
11543 #  ifdef __cplusplus
11544      extern "C"
11545 #  endif
11546    int F77_DUMMY_MAIN() { return 1; }
11547 #endif
11548 int
11549 main ()
11550 {
11551 #ifndef snprintf
11552   char *p = (char *) snprintf;
11553 #endif
11554
11555   ;
11556   return 0;
11557 }
11558 _ACEOF
11559 rm -f conftest.$ac_objext
11560 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11561   (eval $ac_compile) 2>&5
11562   ac_status=$?
11563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11564   (exit $ac_status); } &&
11565          { ac_try='test -s conftest.$ac_objext'
11566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11570   (exit $ac_status); }; }; then
11571   ac_cv_have_decl_snprintf=yes
11572 else
11573   echo "$as_me: failed program was:" >&5
11574 cat conftest.$ac_ext >&5
11575 ac_cv_have_decl_snprintf=no
11576 fi
11577 rm -f conftest.$ac_objext conftest.$ac_ext
11578 fi
11579 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
11580 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
11581 if test $ac_cv_have_decl_snprintf = yes; then
11582
11583 cat >>confdefs.h <<_ACEOF
11584 #define HAVE_DECL_SNPRINTF 1
11585 _ACEOF
11586
11587
11588 else
11589   cat >>confdefs.h <<_ACEOF
11590 #define HAVE_DECL_SNPRINTF 0
11591 _ACEOF
11592
11593
11594 fi
11595 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
11596 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
11597 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
11598   echo $ECHO_N "(cached) $ECHO_C" >&6
11599 else
11600   cat >conftest.$ac_ext <<_ACEOF
11601 #line $LINENO "configure"
11602 #include "confdefs.h"
11603 $ac_includes_default
11604 #ifdef F77_DUMMY_MAIN
11605 #  ifdef __cplusplus
11606      extern "C"
11607 #  endif
11608    int F77_DUMMY_MAIN() { return 1; }
11609 #endif
11610 int
11611 main ()
11612 {
11613 #ifndef vsnprintf
11614   char *p = (char *) vsnprintf;
11615 #endif
11616
11617   ;
11618   return 0;
11619 }
11620 _ACEOF
11621 rm -f conftest.$ac_objext
11622 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11623   (eval $ac_compile) 2>&5
11624   ac_status=$?
11625   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11626   (exit $ac_status); } &&
11627          { ac_try='test -s conftest.$ac_objext'
11628   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11629   (eval $ac_try) 2>&5
11630   ac_status=$?
11631   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11632   (exit $ac_status); }; }; then
11633   ac_cv_have_decl_vsnprintf=yes
11634 else
11635   echo "$as_me: failed program was:" >&5
11636 cat conftest.$ac_ext >&5
11637 ac_cv_have_decl_vsnprintf=no
11638 fi
11639 rm -f conftest.$ac_objext conftest.$ac_ext
11640 fi
11641 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
11642 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
11643 if test $ac_cv_have_decl_vsnprintf = yes; then
11644
11645 cat >>confdefs.h <<_ACEOF
11646 #define HAVE_DECL_VSNPRINTF 1
11647 _ACEOF
11648
11649
11650 else
11651   cat >>confdefs.h <<_ACEOF
11652 #define HAVE_DECL_VSNPRINTF 0
11653 _ACEOF
11654
11655
11656 fi
11657
11658
11659
11660
11661 # do this one the hard way in case isinf() is a macro
11662 echo "$as_me:$LINENO: checking for isinf" >&5
11663 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
11664 if test "${ac_cv_func_isinf+set}" = set; then
11665   echo $ECHO_N "(cached) $ECHO_C" >&6
11666 else
11667   cat >conftest.$ac_ext <<_ACEOF
11668 #line $LINENO "configure"
11669 #include "confdefs.h"
11670 #include <math.h>
11671
11672 #ifdef F77_DUMMY_MAIN
11673 #  ifdef __cplusplus
11674      extern "C"
11675 #  endif
11676    int F77_DUMMY_MAIN() { return 1; }
11677 #endif
11678 int
11679 main ()
11680 {
11681 double x = 0.0; int res = isinf(x);
11682   ;
11683   return 0;
11684 }
11685 _ACEOF
11686 rm -f conftest.$ac_objext conftest$ac_exeext
11687 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11688   (eval $ac_link) 2>&5
11689   ac_status=$?
11690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11691   (exit $ac_status); } &&
11692          { ac_try='test -s conftest$ac_exeext'
11693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11694   (eval $ac_try) 2>&5
11695   ac_status=$?
11696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697   (exit $ac_status); }; }; then
11698   ac_cv_func_isinf=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701 cat conftest.$ac_ext >&5
11702 ac_cv_func_isinf=no
11703 fi
11704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11705 fi
11706 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
11707 echo "${ECHO_T}$ac_cv_func_isinf" >&6
11708
11709 if test $ac_cv_func_isinf = yes ; then
11710
11711 cat >>confdefs.h <<\_ACEOF
11712 #define HAVE_ISINF 1
11713 _ACEOF
11714
11715 else
11716   LIBOBJS="$LIBOBJS isinf.$ac_objext"
11717   # Look for a way to implement a substitute for isinf()
11718
11719
11720
11721
11722 for ac_func in fpclass fp_class fp_class_d class
11723 do
11724 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11725 echo "$as_me:$LINENO: checking for $ac_func" >&5
11726 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11727 if eval "test \"\${$as_ac_var+set}\" = set"; then
11728   echo $ECHO_N "(cached) $ECHO_C" >&6
11729 else
11730   cat >conftest.$ac_ext <<_ACEOF
11731 #line $LINENO "configure"
11732 #include "confdefs.h"
11733 /* System header to define __stub macros and hopefully few prototypes,
11734     which can conflict with char $ac_func (); below.  */
11735 #include <assert.h>
11736 /* Override any gcc2 internal prototype to avoid an error.  */
11737 #ifdef __cplusplus
11738 extern "C"
11739 #endif
11740 /* We use char because int might match the return type of a gcc2
11741    builtin and then its argument prototype would still apply.  */
11742 char $ac_func ();
11743 char (*f) ();
11744
11745 #ifdef F77_DUMMY_MAIN
11746 #  ifdef __cplusplus
11747      extern "C"
11748 #  endif
11749    int F77_DUMMY_MAIN() { return 1; }
11750 #endif
11751 int
11752 main ()
11753 {
11754 /* The GNU C library defines this for functions which it implements
11755     to always fail with ENOSYS.  Some functions are actually named
11756     something starting with __ and the normal name is an alias.  */
11757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11758 choke me
11759 #else
11760 f = $ac_func;
11761 #endif
11762
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f conftest.$ac_objext conftest$ac_exeext
11768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11769   (eval $ac_link) 2>&5
11770   ac_status=$?
11771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772   (exit $ac_status); } &&
11773          { ac_try='test -s conftest$ac_exeext'
11774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778   (exit $ac_status); }; }; then
11779   eval "$as_ac_var=yes"
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 cat conftest.$ac_ext >&5
11783 eval "$as_ac_var=no"
11784 fi
11785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11786 fi
11787 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11788 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11789 if test `eval echo '${'$as_ac_var'}'` = yes; then
11790   cat >>confdefs.h <<_ACEOF
11791 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11792 _ACEOF
11793  break
11794 fi
11795 done
11796
11797 fi
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strdup strerror strtol strtoul unsetenv
11813 do
11814 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11815 echo "$as_me:$LINENO: checking for $ac_func" >&5
11816 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11817 if eval "test \"\${$as_ac_var+set}\" = set"; then
11818   echo $ECHO_N "(cached) $ECHO_C" >&6
11819 else
11820   cat >conftest.$ac_ext <<_ACEOF
11821 #line $LINENO "configure"
11822 #include "confdefs.h"
11823 /* System header to define __stub macros and hopefully few prototypes,
11824     which can conflict with char $ac_func (); below.  */
11825 #include <assert.h>
11826 /* Override any gcc2 internal prototype to avoid an error.  */
11827 #ifdef __cplusplus
11828 extern "C"
11829 #endif
11830 /* We use char because int might match the return type of a gcc2
11831    builtin and then its argument prototype would still apply.  */
11832 char $ac_func ();
11833 char (*f) ();
11834
11835 #ifdef F77_DUMMY_MAIN
11836 #  ifdef __cplusplus
11837      extern "C"
11838 #  endif
11839    int F77_DUMMY_MAIN() { return 1; }
11840 #endif
11841 int
11842 main ()
11843 {
11844 /* The GNU C library defines this for functions which it implements
11845     to always fail with ENOSYS.  Some functions are actually named
11846     something starting with __ and the normal name is an alias.  */
11847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11848 choke me
11849 #else
11850 f = $ac_func;
11851 #endif
11852
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 rm -f conftest.$ac_objext conftest$ac_exeext
11858 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11859   (eval $ac_link) 2>&5
11860   ac_status=$?
11861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11862   (exit $ac_status); } &&
11863          { ac_try='test -s conftest$ac_exeext'
11864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11865   (eval $ac_try) 2>&5
11866   ac_status=$?
11867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868   (exit $ac_status); }; }; then
11869   eval "$as_ac_var=yes"
11870 else
11871   echo "$as_me: failed program was:" >&5
11872 cat conftest.$ac_ext >&5
11873 eval "$as_ac_var=no"
11874 fi
11875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11876 fi
11877 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11878 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11879 if test `eval echo '${'$as_ac_var'}'` = yes; then
11880   cat >>confdefs.h <<_ACEOF
11881 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11882 _ACEOF
11883
11884 else
11885   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
11886 fi
11887 done
11888
11889
11890
11891 # system's version of getaddrinfo(), if any, may be used only if we found
11892 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h
11893 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11894
11895 for ac_func in getaddrinfo
11896 do
11897 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11898 echo "$as_me:$LINENO: checking for $ac_func" >&5
11899 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11900 if eval "test \"\${$as_ac_var+set}\" = set"; then
11901   echo $ECHO_N "(cached) $ECHO_C" >&6
11902 else
11903   cat >conftest.$ac_ext <<_ACEOF
11904 #line $LINENO "configure"
11905 #include "confdefs.h"
11906 /* System header to define __stub macros and hopefully few prototypes,
11907     which can conflict with char $ac_func (); below.  */
11908 #include <assert.h>
11909 /* Override any gcc2 internal prototype to avoid an error.  */
11910 #ifdef __cplusplus
11911 extern "C"
11912 #endif
11913 /* We use char because int might match the return type of a gcc2
11914    builtin and then its argument prototype would still apply.  */
11915 char $ac_func ();
11916 char (*f) ();
11917
11918 #ifdef F77_DUMMY_MAIN
11919 #  ifdef __cplusplus
11920      extern "C"
11921 #  endif
11922    int F77_DUMMY_MAIN() { return 1; }
11923 #endif
11924 int
11925 main ()
11926 {
11927 /* The GNU C library defines this for functions which it implements
11928     to always fail with ENOSYS.  Some functions are actually named
11929     something starting with __ and the normal name is an alias.  */
11930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11931 choke me
11932 #else
11933 f = $ac_func;
11934 #endif
11935
11936   ;
11937   return 0;
11938 }
11939 _ACEOF
11940 rm -f conftest.$ac_objext conftest$ac_exeext
11941 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11942   (eval $ac_link) 2>&5
11943   ac_status=$?
11944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945   (exit $ac_status); } &&
11946          { ac_try='test -s conftest$ac_exeext'
11947   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11948   (eval $ac_try) 2>&5
11949   ac_status=$?
11950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11951   (exit $ac_status); }; }; then
11952   eval "$as_ac_var=yes"
11953 else
11954   echo "$as_me: failed program was:" >&5
11955 cat conftest.$ac_ext >&5
11956 eval "$as_ac_var=no"
11957 fi
11958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11959 fi
11960 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11961 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11962 if test `eval echo '${'$as_ac_var'}'` = yes; then
11963   cat >>confdefs.h <<_ACEOF
11964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11965 _ACEOF
11966
11967 else
11968   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
11969 fi
11970 done
11971
11972
11973 else
11974   LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
11975 fi
11976
11977 # similarly, use system's getopt_long() only if system provides struct option.
11978 if test x"$ac_cv_type_struct_option" = xyes ; then
11979
11980 for ac_func in getopt_long
11981 do
11982 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11983 echo "$as_me:$LINENO: checking for $ac_func" >&5
11984 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11985 if eval "test \"\${$as_ac_var+set}\" = set"; then
11986   echo $ECHO_N "(cached) $ECHO_C" >&6
11987 else
11988   cat >conftest.$ac_ext <<_ACEOF
11989 #line $LINENO "configure"
11990 #include "confdefs.h"
11991 /* System header to define __stub macros and hopefully few prototypes,
11992     which can conflict with char $ac_func (); below.  */
11993 #include <assert.h>
11994 /* Override any gcc2 internal prototype to avoid an error.  */
11995 #ifdef __cplusplus
11996 extern "C"
11997 #endif
11998 /* We use char because int might match the return type of a gcc2
11999    builtin and then its argument prototype would still apply.  */
12000 char $ac_func ();
12001 char (*f) ();
12002
12003 #ifdef F77_DUMMY_MAIN
12004 #  ifdef __cplusplus
12005      extern "C"
12006 #  endif
12007    int F77_DUMMY_MAIN() { return 1; }
12008 #endif
12009 int
12010 main ()
12011 {
12012 /* The GNU C library defines this for functions which it implements
12013     to always fail with ENOSYS.  Some functions are actually named
12014     something starting with __ and the normal name is an alias.  */
12015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12016 choke me
12017 #else
12018 f = $ac_func;
12019 #endif
12020
12021   ;
12022   return 0;
12023 }
12024 _ACEOF
12025 rm -f conftest.$ac_objext conftest$ac_exeext
12026 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12027   (eval $ac_link) 2>&5
12028   ac_status=$?
12029   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12030   (exit $ac_status); } &&
12031          { ac_try='test -s conftest$ac_exeext'
12032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12033   (eval $ac_try) 2>&5
12034   ac_status=$?
12035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12036   (exit $ac_status); }; }; then
12037   eval "$as_ac_var=yes"
12038 else
12039   echo "$as_me: failed program was:" >&5
12040 cat conftest.$ac_ext >&5
12041 eval "$as_ac_var=no"
12042 fi
12043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12044 fi
12045 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12046 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12047 if test `eval echo '${'$as_ac_var'}'` = yes; then
12048   cat >>confdefs.h <<_ACEOF
12049 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12050 _ACEOF
12051
12052 else
12053   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
12054 fi
12055 done
12056
12057
12058 else
12059   LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12060 fi
12061
12062 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
12063 # We override the previous test that said fseeko/ftello didn't exist
12064 # OS tests are also done in include/c.h and port/fseeko.c
12065 case $host_os in bsdi*|netbsd*)
12066 ac_cv_func_fseeko=yes
12067 esac
12068
12069 # Solaris has a very slow qsort in certain cases, so we replace it.
12070 if test "$PORTNAME" = "solaris"; then
12071 LIBOBJS="$LIBOBJS qsort.$ac_objext"
12072 fi
12073
12074 # Win32 support
12075 if test "$PORTNAME" = "win32"; then
12076 LIBOBJS="$LIBOBJS copydir.$ac_objext"
12077 LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
12078 LIBOBJS="$LIBOBJS kill.$ac_objext"
12079 LIBOBJS="$LIBOBJS open.$ac_objext"
12080 LIBOBJS="$LIBOBJS rand.$ac_objext"
12081
12082 cat >>confdefs.h <<\_ACEOF
12083 #define HAVE_SYMLINK 1
12084 _ACEOF
12085
12086 fi
12087
12088 if test "$with_readline" = yes; then
12089   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
12090 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
12091 cat >conftest.$ac_ext <<_ACEOF
12092 #line $LINENO "configure"
12093 #include "confdefs.h"
12094 #include <stdio.h>
12095 #ifdef HAVE_READLINE_READLINE_H
12096 # include <readline/readline.h>
12097 #elif defined(HAVE_READLINE_H)
12098 # include <readline.h>
12099 #endif
12100
12101 #ifdef F77_DUMMY_MAIN
12102 #  ifdef __cplusplus
12103      extern "C"
12104 #  endif
12105    int F77_DUMMY_MAIN() { return 1; }
12106 #endif
12107 int
12108 main ()
12109 {
12110 rl_completion_append_character = 'x';
12111   ;
12112   return 0;
12113 }
12114 _ACEOF
12115 rm -f conftest.$ac_objext conftest$ac_exeext
12116 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12117   (eval $ac_link) 2>&5
12118   ac_status=$?
12119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120   (exit $ac_status); } &&
12121          { ac_try='test -s conftest$ac_exeext'
12122   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12123   (eval $ac_try) 2>&5
12124   ac_status=$?
12125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126   (exit $ac_status); }; }; then
12127   echo "$as_me:$LINENO: result: yes" >&5
12128 echo "${ECHO_T}yes" >&6
12129
12130 cat >>confdefs.h <<\_ACEOF
12131 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
12132 _ACEOF
12133
12134 else
12135   echo "$as_me: failed program was:" >&5
12136 cat conftest.$ac_ext >&5
12137 echo "$as_me:$LINENO: result: no" >&5
12138 echo "${ECHO_T}no" >&6
12139 fi
12140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12141
12142
12143 for ac_func in rl_completion_matches rl_filename_completion_function
12144 do
12145 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12146 echo "$as_me:$LINENO: checking for $ac_func" >&5
12147 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12148 if eval "test \"\${$as_ac_var+set}\" = set"; then
12149   echo $ECHO_N "(cached) $ECHO_C" >&6
12150 else
12151   cat >conftest.$ac_ext <<_ACEOF
12152 #line $LINENO "configure"
12153 #include "confdefs.h"
12154 /* System header to define __stub macros and hopefully few prototypes,
12155     which can conflict with char $ac_func (); below.  */
12156 #include <assert.h>
12157 /* Override any gcc2 internal prototype to avoid an error.  */
12158 #ifdef __cplusplus
12159 extern "C"
12160 #endif
12161 /* We use char because int might match the return type of a gcc2
12162    builtin and then its argument prototype would still apply.  */
12163 char $ac_func ();
12164 char (*f) ();
12165
12166 #ifdef F77_DUMMY_MAIN
12167 #  ifdef __cplusplus
12168      extern "C"
12169 #  endif
12170    int F77_DUMMY_MAIN() { return 1; }
12171 #endif
12172 int
12173 main ()
12174 {
12175 /* The GNU C library defines this for functions which it implements
12176     to always fail with ENOSYS.  Some functions are actually named
12177     something starting with __ and the normal name is an alias.  */
12178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12179 choke me
12180 #else
12181 f = $ac_func;
12182 #endif
12183
12184   ;
12185   return 0;
12186 }
12187 _ACEOF
12188 rm -f conftest.$ac_objext conftest$ac_exeext
12189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12190   (eval $ac_link) 2>&5
12191   ac_status=$?
12192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12193   (exit $ac_status); } &&
12194          { ac_try='test -s conftest$ac_exeext'
12195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12199   (exit $ac_status); }; }; then
12200   eval "$as_ac_var=yes"
12201 else
12202   echo "$as_me: failed program was:" >&5
12203 cat conftest.$ac_ext >&5
12204 eval "$as_ac_var=no"
12205 fi
12206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12207 fi
12208 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12209 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12210 if test `eval echo '${'$as_ac_var'}'` = yes; then
12211   cat >>confdefs.h <<_ACEOF
12212 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12213 _ACEOF
12214
12215 fi
12216 done
12217
12218
12219 for ac_func in replace_history_entry
12220 do
12221 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12222 echo "$as_me:$LINENO: checking for $ac_func" >&5
12223 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12224 if eval "test \"\${$as_ac_var+set}\" = set"; then
12225   echo $ECHO_N "(cached) $ECHO_C" >&6
12226 else
12227   cat >conftest.$ac_ext <<_ACEOF
12228 #line $LINENO "configure"
12229 #include "confdefs.h"
12230 /* System header to define __stub macros and hopefully few prototypes,
12231     which can conflict with char $ac_func (); below.  */
12232 #include <assert.h>
12233 /* Override any gcc2 internal prototype to avoid an error.  */
12234 #ifdef __cplusplus
12235 extern "C"
12236 #endif
12237 /* We use char because int might match the return type of a gcc2
12238    builtin and then its argument prototype would still apply.  */
12239 char $ac_func ();
12240 char (*f) ();
12241
12242 #ifdef F77_DUMMY_MAIN
12243 #  ifdef __cplusplus
12244      extern "C"
12245 #  endif
12246    int F77_DUMMY_MAIN() { return 1; }
12247 #endif
12248 int
12249 main ()
12250 {
12251 /* The GNU C library defines this for functions which it implements
12252     to always fail with ENOSYS.  Some functions are actually named
12253     something starting with __ and the normal name is an alias.  */
12254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12255 choke me
12256 #else
12257 f = $ac_func;
12258 #endif
12259
12260   ;
12261   return 0;
12262 }
12263 _ACEOF
12264 rm -f conftest.$ac_objext conftest$ac_exeext
12265 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12266   (eval $ac_link) 2>&5
12267   ac_status=$?
12268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269   (exit $ac_status); } &&
12270          { ac_try='test -s conftest$ac_exeext'
12271   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12272   (eval $ac_try) 2>&5
12273   ac_status=$?
12274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275   (exit $ac_status); }; }; then
12276   eval "$as_ac_var=yes"
12277 else
12278   echo "$as_me: failed program was:" >&5
12279 cat conftest.$ac_ext >&5
12280 eval "$as_ac_var=no"
12281 fi
12282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12283 fi
12284 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12285 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12286 if test `eval echo '${'$as_ac_var'}'` = yes; then
12287   cat >>confdefs.h <<_ACEOF
12288 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12289 _ACEOF
12290
12291 fi
12292 done
12293
12294 fi
12295
12296
12297 echo "$as_me:$LINENO: checking for finite" >&5
12298 echo $ECHO_N "checking for finite... $ECHO_C" >&6
12299 cat >conftest.$ac_ext <<_ACEOF
12300 #line $LINENO "configure"
12301 #include "confdefs.h"
12302 #include <math.h>
12303 #ifdef F77_DUMMY_MAIN
12304 #  ifdef __cplusplus
12305      extern "C"
12306 #  endif
12307    int F77_DUMMY_MAIN() { return 1; }
12308 #endif
12309 int
12310 main ()
12311 {
12312 int dummy=finite(1.0);
12313   ;
12314   return 0;
12315 }
12316 _ACEOF
12317 rm -f conftest.$ac_objext conftest$ac_exeext
12318 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12319   (eval $ac_link) 2>&5
12320   ac_status=$?
12321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322   (exit $ac_status); } &&
12323          { ac_try='test -s conftest$ac_exeext'
12324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12325   (eval $ac_try) 2>&5
12326   ac_status=$?
12327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12328   (exit $ac_status); }; }; then
12329
12330 cat >>confdefs.h <<\_ACEOF
12331 #define HAVE_FINITE 1
12332 _ACEOF
12333
12334 echo "$as_me:$LINENO: result: yes" >&5
12335 echo "${ECHO_T}yes" >&6
12336 else
12337   echo "$as_me: failed program was:" >&5
12338 cat conftest.$ac_ext >&5
12339 echo "$as_me:$LINENO: result: no" >&5
12340 echo "${ECHO_T}no" >&6
12341 fi
12342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12343
12344 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
12345 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
12346 cat >conftest.$ac_ext <<_ACEOF
12347 #line $LINENO "configure"
12348 #include "confdefs.h"
12349 #include <setjmp.h>
12350 #ifdef F77_DUMMY_MAIN
12351 #  ifdef __cplusplus
12352      extern "C"
12353 #  endif
12354    int F77_DUMMY_MAIN() { return 1; }
12355 #endif
12356 int
12357 main ()
12358 {
12359 sigjmp_buf x; sigsetjmp(x, 1);
12360   ;
12361   return 0;
12362 }
12363 _ACEOF
12364 rm -f conftest.$ac_objext conftest$ac_exeext
12365 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12366   (eval $ac_link) 2>&5
12367   ac_status=$?
12368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369   (exit $ac_status); } &&
12370          { ac_try='test -s conftest$ac_exeext'
12371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372   (eval $ac_try) 2>&5
12373   ac_status=$?
12374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375   (exit $ac_status); }; }; then
12376
12377 cat >>confdefs.h <<\_ACEOF
12378 #define HAVE_SIGSETJMP 1
12379 _ACEOF
12380
12381 echo "$as_me:$LINENO: result: yes" >&5
12382 echo "${ECHO_T}yes" >&6
12383 else
12384   echo "$as_me: failed program was:" >&5
12385 cat conftest.$ac_ext >&5
12386 echo "$as_me:$LINENO: result: no" >&5
12387 echo "${ECHO_T}no" >&6
12388 fi
12389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12390
12391 echo "$as_me:$LINENO: checking for syslog" >&5
12392 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
12393 if test "${ac_cv_func_syslog+set}" = set; then
12394   echo $ECHO_N "(cached) $ECHO_C" >&6
12395 else
12396   cat >conftest.$ac_ext <<_ACEOF
12397 #line $LINENO "configure"
12398 #include "confdefs.h"
12399 /* System header to define __stub macros and hopefully few prototypes,
12400     which can conflict with char syslog (); below.  */
12401 #include <assert.h>
12402 /* Override any gcc2 internal prototype to avoid an error.  */
12403 #ifdef __cplusplus
12404 extern "C"
12405 #endif
12406 /* We use char because int might match the return type of a gcc2
12407    builtin and then its argument prototype would still apply.  */
12408 char syslog ();
12409 char (*f) ();
12410
12411 #ifdef F77_DUMMY_MAIN
12412 #  ifdef __cplusplus
12413      extern "C"
12414 #  endif
12415    int F77_DUMMY_MAIN() { return 1; }
12416 #endif
12417 int
12418 main ()
12419 {
12420 /* The GNU C library defines this for functions which it implements
12421     to always fail with ENOSYS.  Some functions are actually named
12422     something starting with __ and the normal name is an alias.  */
12423 #if defined (__stub_syslog) || defined (__stub___syslog)
12424 choke me
12425 #else
12426 f = syslog;
12427 #endif
12428
12429   ;
12430   return 0;
12431 }
12432 _ACEOF
12433 rm -f conftest.$ac_objext conftest$ac_exeext
12434 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12435   (eval $ac_link) 2>&5
12436   ac_status=$?
12437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12438   (exit $ac_status); } &&
12439          { ac_try='test -s conftest$ac_exeext'
12440   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12441   (eval $ac_try) 2>&5
12442   ac_status=$?
12443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12444   (exit $ac_status); }; }; then
12445   ac_cv_func_syslog=yes
12446 else
12447   echo "$as_me: failed program was:" >&5
12448 cat conftest.$ac_ext >&5
12449 ac_cv_func_syslog=no
12450 fi
12451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12452 fi
12453 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
12454 echo "${ECHO_T}$ac_cv_func_syslog" >&6
12455 if test $ac_cv_func_syslog = yes; then
12456   if test "${ac_cv_header_syslog_h+set}" = set; then
12457   echo "$as_me:$LINENO: checking for syslog.h" >&5
12458 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
12459 if test "${ac_cv_header_syslog_h+set}" = set; then
12460   echo $ECHO_N "(cached) $ECHO_C" >&6
12461 fi
12462 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
12463 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
12464 else
12465   # Is the header compilable?
12466 echo "$as_me:$LINENO: checking syslog.h usability" >&5
12467 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
12468 cat >conftest.$ac_ext <<_ACEOF
12469 #line $LINENO "configure"
12470 #include "confdefs.h"
12471 $ac_includes_default
12472 #include <syslog.h>
12473 _ACEOF
12474 rm -f conftest.$ac_objext
12475 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12476   (eval $ac_compile) 2>&5
12477   ac_status=$?
12478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12479   (exit $ac_status); } &&
12480          { ac_try='test -s conftest.$ac_objext'
12481   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12482   (eval $ac_try) 2>&5
12483   ac_status=$?
12484   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485   (exit $ac_status); }; }; then
12486   ac_header_compiler=yes
12487 else
12488   echo "$as_me: failed program was:" >&5
12489 cat conftest.$ac_ext >&5
12490 ac_header_compiler=no
12491 fi
12492 rm -f conftest.$ac_objext conftest.$ac_ext
12493 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12494 echo "${ECHO_T}$ac_header_compiler" >&6
12495
12496 # Is the header present?
12497 echo "$as_me:$LINENO: checking syslog.h presence" >&5
12498 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
12499 cat >conftest.$ac_ext <<_ACEOF
12500 #line $LINENO "configure"
12501 #include "confdefs.h"
12502 #include <syslog.h>
12503 _ACEOF
12504 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12505   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12506   ac_status=$?
12507   egrep -v '^ *\+' conftest.er1 >conftest.err
12508   rm -f conftest.er1
12509   cat conftest.err >&5
12510   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12511   (exit $ac_status); } >/dev/null; then
12512   if test -s conftest.err; then
12513     ac_cpp_err=$ac_c_preproc_warn_flag
12514   else
12515     ac_cpp_err=
12516   fi
12517 else
12518   ac_cpp_err=yes
12519 fi
12520 if test -z "$ac_cpp_err"; then
12521   ac_header_preproc=yes
12522 else
12523   echo "$as_me: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   ac_header_preproc=no
12526 fi
12527 rm -f conftest.err conftest.$ac_ext
12528 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12529 echo "${ECHO_T}$ac_header_preproc" >&6
12530
12531 # So?  What about this header?
12532 case $ac_header_compiler:$ac_header_preproc in
12533   yes:no )
12534     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
12535 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12536     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
12537 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
12538   no:yes )
12539     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
12540 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
12541     { echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
12542 echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
12543     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
12544 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
12545 esac
12546 echo "$as_me:$LINENO: checking for syslog.h" >&5
12547 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
12548 if test "${ac_cv_header_syslog_h+set}" = set; then
12549   echo $ECHO_N "(cached) $ECHO_C" >&6
12550 else
12551   ac_cv_header_syslog_h=$ac_header_preproc
12552 fi
12553 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
12554 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
12555
12556 fi
12557 if test $ac_cv_header_syslog_h = yes; then
12558
12559 cat >>confdefs.h <<\_ACEOF
12560 #define HAVE_SYSLOG 1
12561 _ACEOF
12562
12563 fi
12564
12565
12566 fi
12567
12568
12569 echo "$as_me:$LINENO: checking for optreset" >&5
12570 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
12571 if test "${pgac_cv_var_int_optreset+set}" = set; then
12572   echo $ECHO_N "(cached) $ECHO_C" >&6
12573 else
12574   cat >conftest.$ac_ext <<_ACEOF
12575 #line $LINENO "configure"
12576 #include "confdefs.h"
12577 #include <unistd.h>
12578 #ifdef F77_DUMMY_MAIN
12579 #  ifdef __cplusplus
12580      extern "C"
12581 #  endif
12582    int F77_DUMMY_MAIN() { return 1; }
12583 #endif
12584 int
12585 main ()
12586 {
12587 extern int optreset; optreset = 1;
12588   ;
12589   return 0;
12590 }
12591 _ACEOF
12592 rm -f conftest.$ac_objext conftest$ac_exeext
12593 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12594   (eval $ac_link) 2>&5
12595   ac_status=$?
12596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12597   (exit $ac_status); } &&
12598          { ac_try='test -s conftest$ac_exeext'
12599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12600   (eval $ac_try) 2>&5
12601   ac_status=$?
12602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12603   (exit $ac_status); }; }; then
12604   pgac_cv_var_int_optreset=yes
12605 else
12606   echo "$as_me: failed program was:" >&5
12607 cat conftest.$ac_ext >&5
12608 pgac_cv_var_int_optreset=no
12609 fi
12610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12611 fi
12612 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
12613 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
12614 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12615
12616 cat >>confdefs.h <<\_ACEOF
12617 #define HAVE_INT_OPTRESET 1
12618 _ACEOF
12619
12620 fi
12621
12622
12623
12624 for ac_func in strtoll strtoq
12625 do
12626 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12627 echo "$as_me:$LINENO: checking for $ac_func" >&5
12628 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12629 if eval "test \"\${$as_ac_var+set}\" = set"; then
12630   echo $ECHO_N "(cached) $ECHO_C" >&6
12631 else
12632   cat >conftest.$ac_ext <<_ACEOF
12633 #line $LINENO "configure"
12634 #include "confdefs.h"
12635 /* System header to define __stub macros and hopefully few prototypes,
12636     which can conflict with char $ac_func (); below.  */
12637 #include <assert.h>
12638 /* Override any gcc2 internal prototype to avoid an error.  */
12639 #ifdef __cplusplus
12640 extern "C"
12641 #endif
12642 /* We use char because int might match the return type of a gcc2
12643    builtin and then its argument prototype would still apply.  */
12644 char $ac_func ();
12645 char (*f) ();
12646
12647 #ifdef F77_DUMMY_MAIN
12648 #  ifdef __cplusplus
12649      extern "C"
12650 #  endif
12651    int F77_DUMMY_MAIN() { return 1; }
12652 #endif
12653 int
12654 main ()
12655 {
12656 /* The GNU C library defines this for functions which it implements
12657     to always fail with ENOSYS.  Some functions are actually named
12658     something starting with __ and the normal name is an alias.  */
12659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12660 choke me
12661 #else
12662 f = $ac_func;
12663 #endif
12664
12665   ;
12666   return 0;
12667 }
12668 _ACEOF
12669 rm -f conftest.$ac_objext conftest$ac_exeext
12670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12671   (eval $ac_link) 2>&5
12672   ac_status=$?
12673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674   (exit $ac_status); } &&
12675          { ac_try='test -s conftest$ac_exeext'
12676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677   (eval $ac_try) 2>&5
12678   ac_status=$?
12679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680   (exit $ac_status); }; }; then
12681   eval "$as_ac_var=yes"
12682 else
12683   echo "$as_me: failed program was:" >&5
12684 cat conftest.$ac_ext >&5
12685 eval "$as_ac_var=no"
12686 fi
12687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12688 fi
12689 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12690 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12691 if test `eval echo '${'$as_ac_var'}'` = yes; then
12692   cat >>confdefs.h <<_ACEOF
12693 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12694 _ACEOF
12695  break
12696 fi
12697 done
12698
12699
12700
12701 for ac_func in strtoull strtouq
12702 do
12703 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12704 echo "$as_me:$LINENO: checking for $ac_func" >&5
12705 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12706 if eval "test \"\${$as_ac_var+set}\" = set"; then
12707   echo $ECHO_N "(cached) $ECHO_C" >&6
12708 else
12709   cat >conftest.$ac_ext <<_ACEOF
12710 #line $LINENO "configure"
12711 #include "confdefs.h"
12712 /* System header to define __stub macros and hopefully few prototypes,
12713     which can conflict with char $ac_func (); below.  */
12714 #include <assert.h>
12715 /* Override any gcc2 internal prototype to avoid an error.  */
12716 #ifdef __cplusplus
12717 extern "C"
12718 #endif
12719 /* We use char because int might match the return type of a gcc2
12720    builtin and then its argument prototype would still apply.  */
12721 char $ac_func ();
12722 char (*f) ();
12723
12724 #ifdef F77_DUMMY_MAIN
12725 #  ifdef __cplusplus
12726      extern "C"
12727 #  endif
12728    int F77_DUMMY_MAIN() { return 1; }
12729 #endif
12730 int
12731 main ()
12732 {
12733 /* The GNU C library defines this for functions which it implements
12734     to always fail with ENOSYS.  Some functions are actually named
12735     something starting with __ and the normal name is an alias.  */
12736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12737 choke me
12738 #else
12739 f = $ac_func;
12740 #endif
12741
12742   ;
12743   return 0;
12744 }
12745 _ACEOF
12746 rm -f conftest.$ac_objext conftest$ac_exeext
12747 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12748   (eval $ac_link) 2>&5
12749   ac_status=$?
12750   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12751   (exit $ac_status); } &&
12752          { ac_try='test -s conftest$ac_exeext'
12753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12754   (eval $ac_try) 2>&5
12755   ac_status=$?
12756   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12757   (exit $ac_status); }; }; then
12758   eval "$as_ac_var=yes"
12759 else
12760   echo "$as_me: failed program was:" >&5
12761 cat conftest.$ac_ext >&5
12762 eval "$as_ac_var=no"
12763 fi
12764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12765 fi
12766 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12767 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12768 if test `eval echo '${'$as_ac_var'}'` = yes; then
12769   cat >>confdefs.h <<_ACEOF
12770 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12771 _ACEOF
12772  break
12773 fi
12774 done
12775
12776
12777 # Check for one of atexit() or on_exit()
12778
12779 for ac_func in atexit
12780 do
12781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12782 echo "$as_me:$LINENO: checking for $ac_func" >&5
12783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12784 if eval "test \"\${$as_ac_var+set}\" = set"; then
12785   echo $ECHO_N "(cached) $ECHO_C" >&6
12786 else
12787   cat >conftest.$ac_ext <<_ACEOF
12788 #line $LINENO "configure"
12789 #include "confdefs.h"
12790 /* System header to define __stub macros and hopefully few prototypes,
12791     which can conflict with char $ac_func (); below.  */
12792 #include <assert.h>
12793 /* Override any gcc2 internal prototype to avoid an error.  */
12794 #ifdef __cplusplus
12795 extern "C"
12796 #endif
12797 /* We use char because int might match the return type of a gcc2
12798    builtin and then its argument prototype would still apply.  */
12799 char $ac_func ();
12800 char (*f) ();
12801
12802 #ifdef F77_DUMMY_MAIN
12803 #  ifdef __cplusplus
12804      extern "C"
12805 #  endif
12806    int F77_DUMMY_MAIN() { return 1; }
12807 #endif
12808 int
12809 main ()
12810 {
12811 /* The GNU C library defines this for functions which it implements
12812     to always fail with ENOSYS.  Some functions are actually named
12813     something starting with __ and the normal name is an alias.  */
12814 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12815 choke me
12816 #else
12817 f = $ac_func;
12818 #endif
12819
12820   ;
12821   return 0;
12822 }
12823 _ACEOF
12824 rm -f conftest.$ac_objext conftest$ac_exeext
12825 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12826   (eval $ac_link) 2>&5
12827   ac_status=$?
12828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829   (exit $ac_status); } &&
12830          { ac_try='test -s conftest$ac_exeext'
12831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12832   (eval $ac_try) 2>&5
12833   ac_status=$?
12834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835   (exit $ac_status); }; }; then
12836   eval "$as_ac_var=yes"
12837 else
12838   echo "$as_me: failed program was:" >&5
12839 cat conftest.$ac_ext >&5
12840 eval "$as_ac_var=no"
12841 fi
12842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12843 fi
12844 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12845 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12846 if test `eval echo '${'$as_ac_var'}'` = yes; then
12847   cat >>confdefs.h <<_ACEOF
12848 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12849 _ACEOF
12850
12851 else
12852
12853 for ac_func in on_exit
12854 do
12855 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12856 echo "$as_me:$LINENO: checking for $ac_func" >&5
12857 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12858 if eval "test \"\${$as_ac_var+set}\" = set"; then
12859   echo $ECHO_N "(cached) $ECHO_C" >&6
12860 else
12861   cat >conftest.$ac_ext <<_ACEOF
12862 #line $LINENO "configure"
12863 #include "confdefs.h"
12864 /* System header to define __stub macros and hopefully few prototypes,
12865     which can conflict with char $ac_func (); below.  */
12866 #include <assert.h>
12867 /* Override any gcc2 internal prototype to avoid an error.  */
12868 #ifdef __cplusplus
12869 extern "C"
12870 #endif
12871 /* We use char because int might match the return type of a gcc2
12872    builtin and then its argument prototype would still apply.  */
12873 char $ac_func ();
12874 char (*f) ();
12875
12876 #ifdef F77_DUMMY_MAIN
12877 #  ifdef __cplusplus
12878      extern "C"
12879 #  endif
12880    int F77_DUMMY_MAIN() { return 1; }
12881 #endif
12882 int
12883 main ()
12884 {
12885 /* The GNU C library defines this for functions which it implements
12886     to always fail with ENOSYS.  Some functions are actually named
12887     something starting with __ and the normal name is an alias.  */
12888 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12889 choke me
12890 #else
12891 f = $ac_func;
12892 #endif
12893
12894   ;
12895   return 0;
12896 }
12897 _ACEOF
12898 rm -f conftest.$ac_objext conftest$ac_exeext
12899 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12900   (eval $ac_link) 2>&5
12901   ac_status=$?
12902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12903   (exit $ac_status); } &&
12904          { ac_try='test -s conftest$ac_exeext'
12905   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12906   (eval $ac_try) 2>&5
12907   ac_status=$?
12908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12909   (exit $ac_status); }; }; then
12910   eval "$as_ac_var=yes"
12911 else
12912   echo "$as_me: failed program was:" >&5
12913 cat conftest.$ac_ext >&5
12914 eval "$as_ac_var=no"
12915 fi
12916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12917 fi
12918 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12919 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12920 if test `eval echo '${'$as_ac_var'}'` = yes; then
12921   cat >>confdefs.h <<_ACEOF
12922 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12923 _ACEOF
12924
12925 else
12926   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
12927 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
12928    { (exit 1); exit 1; }; }
12929 fi
12930 done
12931
12932 fi
12933 done
12934
12935
12936 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12937 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12938 if test "${ac_cv_sys_largefile_source+set}" = set; then
12939   echo $ECHO_N "(cached) $ECHO_C" >&6
12940 else
12941   while :; do
12942   ac_cv_sys_largefile_source=no
12943   cat >conftest.$ac_ext <<_ACEOF
12944 #line $LINENO "configure"
12945 #include "confdefs.h"
12946 #include <stdio.h>
12947 #ifdef F77_DUMMY_MAIN
12948 #  ifdef __cplusplus
12949      extern "C"
12950 #  endif
12951    int F77_DUMMY_MAIN() { return 1; }
12952 #endif
12953 int
12954 main ()
12955 {
12956 return !fseeko;
12957   ;
12958   return 0;
12959 }
12960 _ACEOF
12961 rm -f conftest.$ac_objext
12962 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12963   (eval $ac_compile) 2>&5
12964   ac_status=$?
12965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12966   (exit $ac_status); } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   break
12974 else
12975   echo "$as_me: failed program was:" >&5
12976 cat conftest.$ac_ext >&5
12977 fi
12978 rm -f conftest.$ac_objext conftest.$ac_ext
12979   cat >conftest.$ac_ext <<_ACEOF
12980 #line $LINENO "configure"
12981 #include "confdefs.h"
12982 #define _LARGEFILE_SOURCE 1
12983 #include <stdio.h>
12984 #ifdef F77_DUMMY_MAIN
12985 #  ifdef __cplusplus
12986      extern "C"
12987 #  endif
12988    int F77_DUMMY_MAIN() { return 1; }
12989 #endif
12990 int
12991 main ()
12992 {
12993 return !fseeko;
12994   ;
12995   return 0;
12996 }
12997 _ACEOF
12998 rm -f conftest.$ac_objext
12999 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13000   (eval $ac_compile) 2>&5
13001   ac_status=$?
13002   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13003   (exit $ac_status); } &&
13004          { ac_try='test -s conftest.$ac_objext'
13005   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13006   (eval $ac_try) 2>&5
13007   ac_status=$?
13008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13009   (exit $ac_status); }; }; then
13010   ac_cv_sys_largefile_source=1; break
13011 else
13012   echo "$as_me: failed program was:" >&5
13013 cat conftest.$ac_ext >&5
13014 fi
13015 rm -f conftest.$ac_objext conftest.$ac_ext
13016   break
13017 done
13018 fi
13019 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
13020 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13021 if test "$ac_cv_sys_largefile_source" != no; then
13022
13023 cat >>confdefs.h <<_ACEOF
13024 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13025 _ACEOF
13026
13027 fi
13028 rm -f conftest*
13029
13030 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13031 # in glibc 2.1.3, but that breaks too many other things.
13032 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13033 echo "$as_me:$LINENO: checking for fseeko" >&5
13034 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13035 if test "${ac_cv_func_fseeko+set}" = set; then
13036   echo $ECHO_N "(cached) $ECHO_C" >&6
13037 else
13038   cat >conftest.$ac_ext <<_ACEOF
13039 #line $LINENO "configure"
13040 #include "confdefs.h"
13041 #include <stdio.h>
13042 #ifdef F77_DUMMY_MAIN
13043 #  ifdef __cplusplus
13044      extern "C"
13045 #  endif
13046    int F77_DUMMY_MAIN() { return 1; }
13047 #endif
13048 int
13049 main ()
13050 {
13051 return fseeko && fseeko (stdin, 0, 0);
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f conftest.$ac_objext conftest$ac_exeext
13057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13061   (exit $ac_status); } &&
13062          { ac_try='test -s conftest$ac_exeext'
13063   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13067   (exit $ac_status); }; }; then
13068   ac_cv_func_fseeko=yes
13069 else
13070   echo "$as_me: failed program was:" >&5
13071 cat conftest.$ac_ext >&5
13072 ac_cv_func_fseeko=no
13073 fi
13074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13075 fi
13076 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
13077 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13078 if test $ac_cv_func_fseeko = yes; then
13079
13080 cat >>confdefs.h <<\_ACEOF
13081 #define HAVE_FSEEKO 1
13082 _ACEOF
13083
13084 fi
13085
13086
13087 #
13088 # Pthreads
13089 #
13090 # For each platform, we need to know about any special compile and link
13091 # libraries, and whether the normal C function names are thread-safe.
13092 # See the comment at the top of src/port/thread.c for more information.
13093 #
13094 if test "$enable_thread_safety" = yes; then
13095
13096
13097
13098
13099 ac_ext=c
13100 ac_cpp='$CPP $CPPFLAGS'
13101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13104
13105 acx_pthread_ok=no
13106
13107 # We used to check for pthread.h first, but this fails if pthread.h
13108 # requires special compiler flags (e.g. on True64 or Sequent).
13109 # It gets checked for in the link test anyway.
13110
13111 # First of all, check if the user has set any of the PTHREAD_LIBS,
13112 # etcetera environment variables, and if threads linking works using
13113 # them:
13114 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
13115         save_CFLAGS="$CFLAGS"
13116         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13117         save_LIBS="$LIBS"
13118         LIBS="$PTHREAD_LIBS $LIBS"
13119         echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
13120 echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
13121         cat >conftest.$ac_ext <<_ACEOF
13122 #line $LINENO "configure"
13123 #include "confdefs.h"
13124
13125 /* Override any gcc2 internal prototype to avoid an error.  */
13126 #ifdef __cplusplus
13127 extern "C"
13128 #endif
13129 /* We use char because int might match the return type of a gcc2
13130    builtin and then its argument prototype would still apply.  */
13131 char pthread_join ();
13132 #ifdef F77_DUMMY_MAIN
13133 #  ifdef __cplusplus
13134      extern "C"
13135 #  endif
13136    int F77_DUMMY_MAIN() { return 1; }
13137 #endif
13138 int
13139 main ()
13140 {
13141 pthread_join ();
13142   ;
13143   return 0;
13144 }
13145 _ACEOF
13146 rm -f conftest.$ac_objext conftest$ac_exeext
13147 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13148   (eval $ac_link) 2>&5
13149   ac_status=$?
13150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13151   (exit $ac_status); } &&
13152          { ac_try='test -s conftest$ac_exeext'
13153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13154   (eval $ac_try) 2>&5
13155   ac_status=$?
13156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157   (exit $ac_status); }; }; then
13158   acx_pthread_ok=yes
13159 else
13160   echo "$as_me: failed program was:" >&5
13161 cat conftest.$ac_ext >&5
13162 fi
13163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13164         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
13165 echo "${ECHO_T}$acx_pthread_ok" >&6
13166         if test x"$acx_pthread_ok" = xno; then
13167                 PTHREAD_LIBS=""
13168                 PTHREAD_CFLAGS=""
13169         fi
13170         LIBS="$save_LIBS"
13171         CFLAGS="$save_CFLAGS"
13172 fi
13173
13174 # We must check for the threads library under a number of different
13175 # names; the ordering is very important because some systems
13176 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13177 # libraries is broken (non-POSIX).
13178
13179 # Create a list of thread flags to try.  Items starting with a "-" are
13180 # C compiler flags, and other items are library names, except for "none"
13181 # which indicates that we try without any flags at all, and "pthread-config"
13182 # which is a program returning the flags for the Pth emulation library.
13183
13184 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13185
13186 # The ordering *is* (sometimes) important.  Some notes on the
13187 # individual items follow:
13188
13189 # pthreads: AIX (must check this before -lpthread)
13190 # none: in case threads are in libc; should be tried before -Kthread and
13191 #       other compiler flags to prevent continual compiler warnings
13192 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13193 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13194 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13195 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
13196 # -pthreads: Solaris/gcc
13197 # -mthreads: Mingw32/gcc, Lynx/gcc
13198 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13199 #      doesn't hurt to check since this sometimes defines pthreads too;
13200 #      also defines -D_REENTRANT)
13201 # pthread: Linux, etcetera
13202 # --thread-safe: KAI C++
13203 # pthread-config: use pthread-config program (for GNU Pth library)
13204
13205 case "${host_cpu}-${host_os}" in
13206         *solaris*)
13207
13208         # On Solaris (at least, for some versions), libc contains stubbed
13209         # (non-functional) versions of the pthreads routines, so link-based
13210         # tests will erroneously succeed.  (We need to link with -pthread or
13211         # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
13212         # a function called by this macro, so we could check for that, but
13213         # who knows whether they'll stub that too in a future libc.)  So,
13214         # we'll just look for -pthreads and -lpthread first:
13215
13216         acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
13217         ;;
13218 esac
13219
13220 if test x"$acx_pthread_ok" = xno; then
13221 for flag in $acx_pthread_flags; do
13222
13223         tryPTHREAD_CFLAGS=""
13224         tryPTHREAD_LIBS=""
13225         case $flag in
13226                 none)
13227                 echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
13228 echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
13229                 ;;
13230
13231                 -*)
13232                 echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
13233 echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
13234                 tryPTHREAD_CFLAGS="$flag"
13235                 ;;
13236
13237                 pthread-config)
13238                 # skip this if we already have flags defined, for PostgreSQL
13239                 if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
13240                 # Extract the first word of "pthread-config", so it can be a program name with args.
13241 set dummy pthread-config; ac_word=$2
13242 echo "$as_me:$LINENO: checking for $ac_word" >&5
13243 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13244 if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
13245   echo $ECHO_N "(cached) $ECHO_C" >&6
13246 else
13247   if test -n "$acx_pthread_config"; then
13248   ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
13249 else
13250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13251 for as_dir in $PATH
13252 do
13253   IFS=$as_save_IFS
13254   test -z "$as_dir" && as_dir=.
13255   for ac_exec_ext in '' $ac_executable_extensions; do
13256   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13257     ac_cv_prog_acx_pthread_config="yes"
13258     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13259     break 2
13260   fi
13261 done
13262 done
13263
13264   test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
13265 fi
13266 fi
13267 acx_pthread_config=$ac_cv_prog_acx_pthread_config
13268 if test -n "$acx_pthread_config"; then
13269   echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
13270 echo "${ECHO_T}$acx_pthread_config" >&6
13271 else
13272   echo "$as_me:$LINENO: result: no" >&5
13273 echo "${ECHO_T}no" >&6
13274 fi
13275
13276                 if test x"$acx_pthread_config" = xno; then continue; fi
13277                 tryPTHREAD_CFLAGS="`pthread-config --cflags`"
13278                 tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13279                 ;;
13280
13281                 *)
13282                 echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
13283 echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
13284                 tryPTHREAD_LIBS="-l$flag"
13285                 ;;
13286         esac
13287
13288         save_LIBS="$LIBS"
13289         save_CFLAGS="$CFLAGS"
13290         LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
13291         CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
13292
13293         # Check for various functions.  We must include pthread.h,
13294         # since some functions may be macros.  (On the Sequent, we
13295         # need a special flag -Kthread to make this header compile.)
13296         # We check for pthread_join because it is in -lpthread on IRIX
13297         # while pthread_create is in libc.  We check for pthread_attr_init
13298         # due to DEC craziness with -lpthreads.  We check for
13299         # pthread_cleanup_push because it is one of the few pthread
13300         # functions on Solaris that doesn't have a non-functional libc stub.
13301         # We try pthread_create on general principles.
13302         cat >conftest.$ac_ext <<_ACEOF
13303 #line $LINENO "configure"
13304 #include "confdefs.h"
13305 #include <pthread.h>
13306 #ifdef F77_DUMMY_MAIN
13307 #  ifdef __cplusplus
13308      extern "C"
13309 #  endif
13310    int F77_DUMMY_MAIN() { return 1; }
13311 #endif
13312 int
13313 main ()
13314 {
13315 pthread_t th; pthread_join(th, 0);
13316                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
13317                      pthread_create(0,0,0,0); pthread_cleanup_pop(0);
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 rm -f conftest.$ac_objext conftest$ac_exeext
13323 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>&5
13325   ac_status=$?
13326   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13327   (exit $ac_status); } &&
13328          { ac_try='test -s conftest$ac_exeext'
13329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13333   (exit $ac_status); }; }; then
13334   acx_pthread_ok=yes
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 cat conftest.$ac_ext >&5
13338 acx_pthread_ok=no
13339 fi
13340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13341
13342         if test "x$acx_pthread_ok" = xyes; then
13343             # Don't use options that are ignored by the compiler.
13344             # We find them by checking stderror.
13345             cat >conftest.$ac_ext <<_ACEOF
13346 int
13347 main ()
13348 {
13349   return 0;
13350 }
13351 _ACEOF
13352             rm -f conftest.$ac_objext conftest$ac_exeext
13353             if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
13354                 # we continue with more flags because Linux needs -lpthread
13355                 # for libpq builds on PostgreSQL.  The test above only
13356                 # tests for building binaries, not shared libraries.
13357                 PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
13358                 PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
13359             else   acx_pthread_ok=no
13360             fi
13361         fi
13362
13363         LIBS="$save_LIBS"
13364         CFLAGS="$save_CFLAGS"
13365
13366         echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
13367 echo "${ECHO_T}$acx_pthread_ok" >&6
13368 done
13369 fi
13370
13371 # Various other checks:
13372 if test "x$acx_pthread_ok" = xyes; then
13373         save_LIBS="$LIBS"
13374         LIBS="$PTHREAD_LIBS $LIBS"
13375         save_CFLAGS="$CFLAGS"
13376         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13377
13378         # Detect AIX lossage: threads are created detached by default
13379         # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
13380         echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
13381 echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
13382         cat >conftest.$ac_ext <<_ACEOF
13383 #line $LINENO "configure"
13384 #include "confdefs.h"
13385 #include <pthread.h>
13386 #ifdef F77_DUMMY_MAIN
13387 #  ifdef __cplusplus
13388      extern "C"
13389 #  endif
13390    int F77_DUMMY_MAIN() { return 1; }
13391 #endif
13392 int
13393 main ()
13394 {
13395 int attr=PTHREAD_CREATE_JOINABLE;
13396   ;
13397   return 0;
13398 }
13399 _ACEOF
13400 rm -f conftest.$ac_objext conftest$ac_exeext
13401 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13402   (eval $ac_link) 2>&5
13403   ac_status=$?
13404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13405   (exit $ac_status); } &&
13406          { ac_try='test -s conftest$ac_exeext'
13407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13408   (eval $ac_try) 2>&5
13409   ac_status=$?
13410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411   (exit $ac_status); }; }; then
13412   ok=PTHREAD_CREATE_JOINABLE
13413 else
13414   echo "$as_me: failed program was:" >&5
13415 cat conftest.$ac_ext >&5
13416 ok=unknown
13417 fi
13418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13419         if test x"$ok" = xunknown; then
13420                 cat >conftest.$ac_ext <<_ACEOF
13421 #line $LINENO "configure"
13422 #include "confdefs.h"
13423 #include <pthread.h>
13424 #ifdef F77_DUMMY_MAIN
13425 #  ifdef __cplusplus
13426      extern "C"
13427 #  endif
13428    int F77_DUMMY_MAIN() { return 1; }
13429 #endif
13430 int
13431 main ()
13432 {
13433 int attr=PTHREAD_CREATE_UNDETACHED;
13434   ;
13435   return 0;
13436 }
13437 _ACEOF
13438 rm -f conftest.$ac_objext conftest$ac_exeext
13439 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13440   (eval $ac_link) 2>&5
13441   ac_status=$?
13442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13443   (exit $ac_status); } &&
13444          { ac_try='test -s conftest$ac_exeext'
13445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13446   (eval $ac_try) 2>&5
13447   ac_status=$?
13448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13449   (exit $ac_status); }; }; then
13450   ok=PTHREAD_CREATE_UNDETACHED
13451 else
13452   echo "$as_me: failed program was:" >&5
13453 cat conftest.$ac_ext >&5
13454 ok=unknown
13455 fi
13456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13457         fi
13458         if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
13459
13460 cat >>confdefs.h <<\_ACEOF
13461 #define PTHREAD_CREATE_JOINABLE $ok
13462 _ACEOF
13463
13464         fi
13465         echo "$as_me:$LINENO: result: ${ok}" >&5
13466 echo "${ECHO_T}${ok}" >&6
13467         if test x"$ok" = xunknown; then
13468                 { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
13469 echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
13470         fi
13471
13472         echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
13473 echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
13474         flag=no
13475 # We always add these in PostgreSQL
13476 #       case "${host_cpu}-${host_os}" in
13477 #               *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
13478 #               *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
13479 #       esac
13480         echo "$as_me:$LINENO: result: ${flag}" >&5
13481 echo "${ECHO_T}${flag}" >&6
13482         if test "x$flag" != xno; then
13483                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
13484         fi
13485
13486         LIBS="$save_LIBS"
13487         CFLAGS="$save_CFLAGS"
13488
13489         # More AIX lossage: must compile with cc_r
13490         # Extract the first word of "cc_r", so it can be a program name with args.
13491 set dummy cc_r; ac_word=$2
13492 echo "$as_me:$LINENO: checking for $ac_word" >&5
13493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13494 if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
13495   echo $ECHO_N "(cached) $ECHO_C" >&6
13496 else
13497   if test -n "$PTHREAD_CC"; then
13498   ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13499 else
13500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13501 for as_dir in $PATH
13502 do
13503   IFS=$as_save_IFS
13504   test -z "$as_dir" && as_dir=.
13505   for ac_exec_ext in '' $ac_executable_extensions; do
13506   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13507     ac_cv_prog_PTHREAD_CC="cc_r"
13508     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13509     break 2
13510   fi
13511 done
13512 done
13513
13514   test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
13515 fi
13516 fi
13517 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13518 if test -n "$PTHREAD_CC"; then
13519   echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
13520 echo "${ECHO_T}$PTHREAD_CC" >&6
13521 else
13522   echo "$as_me:$LINENO: result: no" >&5
13523 echo "${ECHO_T}no" >&6
13524 fi
13525
13526 else
13527         PTHREAD_CC="$CC"
13528 fi
13529
13530
13531
13532
13533
13534 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13535 if test x"$acx_pthread_ok" = xyes; then
13536
13537 cat >>confdefs.h <<\_ACEOF
13538 #define HAVE_PTHREAD 1
13539 _ACEOF
13540
13541         :
13542 else
13543         acx_pthread_ok=no
13544
13545 fi
13546 ac_ext=c
13547 ac_cpp='$CPP $CPPFLAGS'
13548 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13549 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13550 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13551
13552         # set thread flags
13553
13554 # Some platforms use these, so just defineed them.  They can't hurt if they
13555 # are not supported.
13556 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
13557
13558
13559 # At this point, we don't want to muck with the compiler name for threading.
13560 # Let's see who fails, perhaps AIX.  2004-04-23
13561 if test "$PTHREAD_CC" != "$CC"; then
13562 { { echo "$as_me:$LINENO: error:
13563 PostgreSQL does not support platforms that require a special
13564 compiler binary for thread-safety.
13565 " >&5
13566 echo "$as_me: error:
13567 PostgreSQL does not support platforms that require a special
13568 compiler binary for thread-safety.
13569 " >&2;}
13570    { (exit 1); exit 1; }; }
13571 fi
13572
13573 if test "$THREAD_SUPPORT" = no; then
13574 { { echo "$as_me:$LINENO: error:
13575 Cannot enable threads on your platform.
13576 Your platform is known to not support thread-safe programs.
13577 For details, compile and run src/bin/pg_thread_test.
13578 " >&5
13579 echo "$as_me: error:
13580 Cannot enable threads on your platform.
13581 Your platform is known to not support thread-safe programs.
13582 For details, compile and run src/bin/pg_thread_test.
13583 " >&2;}
13584    { (exit 1); exit 1; }; }
13585 fi
13586
13587 if test "${ac_cv_header_pthread_h+set}" = set; then
13588   echo "$as_me:$LINENO: checking for pthread.h" >&5
13589 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13590 if test "${ac_cv_header_pthread_h+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 fi
13593 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
13594 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13595 else
13596   # Is the header compilable?
13597 echo "$as_me:$LINENO: checking pthread.h usability" >&5
13598 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
13599 cat >conftest.$ac_ext <<_ACEOF
13600 #line $LINENO "configure"
13601 #include "confdefs.h"
13602 $ac_includes_default
13603 #include <pthread.h>
13604 _ACEOF
13605 rm -f conftest.$ac_objext
13606 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13607   (eval $ac_compile) 2>&5
13608   ac_status=$?
13609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13610   (exit $ac_status); } &&
13611          { ac_try='test -s conftest.$ac_objext'
13612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13613   (eval $ac_try) 2>&5
13614   ac_status=$?
13615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13616   (exit $ac_status); }; }; then
13617   ac_header_compiler=yes
13618 else
13619   echo "$as_me: failed program was:" >&5
13620 cat conftest.$ac_ext >&5
13621 ac_header_compiler=no
13622 fi
13623 rm -f conftest.$ac_objext conftest.$ac_ext
13624 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13625 echo "${ECHO_T}$ac_header_compiler" >&6
13626
13627 # Is the header present?
13628 echo "$as_me:$LINENO: checking pthread.h presence" >&5
13629 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
13630 cat >conftest.$ac_ext <<_ACEOF
13631 #line $LINENO "configure"
13632 #include "confdefs.h"
13633 #include <pthread.h>
13634 _ACEOF
13635 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13636   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13637   ac_status=$?
13638   egrep -v '^ *\+' conftest.er1 >conftest.err
13639   rm -f conftest.er1
13640   cat conftest.err >&5
13641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13642   (exit $ac_status); } >/dev/null; then
13643   if test -s conftest.err; then
13644     ac_cpp_err=$ac_c_preproc_warn_flag
13645   else
13646     ac_cpp_err=
13647   fi
13648 else
13649   ac_cpp_err=yes
13650 fi
13651 if test -z "$ac_cpp_err"; then
13652   ac_header_preproc=yes
13653 else
13654   echo "$as_me: failed program was:" >&5
13655   cat conftest.$ac_ext >&5
13656   ac_header_preproc=no
13657 fi
13658 rm -f conftest.err conftest.$ac_ext
13659 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13660 echo "${ECHO_T}$ac_header_preproc" >&6
13661
13662 # So?  What about this header?
13663 case $ac_header_compiler:$ac_header_preproc in
13664   yes:no )
13665     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
13666 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13667     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
13668 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};;
13669   no:yes )
13670     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
13671 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
13672     { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
13673 echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
13674     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
13675 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};;
13676 esac
13677 echo "$as_me:$LINENO: checking for pthread.h" >&5
13678 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13679 if test "${ac_cv_header_pthread_h+set}" = set; then
13680   echo $ECHO_N "(cached) $ECHO_C" >&6
13681 else
13682   ac_cv_header_pthread_h=$ac_header_preproc
13683 fi
13684 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
13685 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13686
13687 fi
13688 if test $ac_cv_header_pthread_h = yes; then
13689   :
13690 else
13691   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safety" >&5
13692 echo "$as_me: error: pthread.h not found, required for --enable-thread-safety" >&2;}
13693    { (exit 1); exit 1; }; }
13694 fi
13695
13696
13697
13698 # Check for *_r functions
13699 _CFLAGS="$CFLAGS"
13700 _LIBS="$LIBS"
13701 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13702 LIBS="$LIBS $PTHREAD_LIBS"
13703
13704
13705
13706 for ac_func in strerror_r getpwuid_r gethostbyname_r
13707 do
13708 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13709 echo "$as_me:$LINENO: checking for $ac_func" >&5
13710 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13711 if eval "test \"\${$as_ac_var+set}\" = set"; then
13712   echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714   cat >conftest.$ac_ext <<_ACEOF
13715 #line $LINENO "configure"
13716 #include "confdefs.h"
13717 /* System header to define __stub macros and hopefully few prototypes,
13718     which can conflict with char $ac_func (); below.  */
13719 #include <assert.h>
13720 /* Override any gcc2 internal prototype to avoid an error.  */
13721 #ifdef __cplusplus
13722 extern "C"
13723 #endif
13724 /* We use char because int might match the return type of a gcc2
13725    builtin and then its argument prototype would still apply.  */
13726 char $ac_func ();
13727 char (*f) ();
13728
13729 #ifdef F77_DUMMY_MAIN
13730 #  ifdef __cplusplus
13731      extern "C"
13732 #  endif
13733    int F77_DUMMY_MAIN() { return 1; }
13734 #endif
13735 int
13736 main ()
13737 {
13738 /* The GNU C library defines this for functions which it implements
13739     to always fail with ENOSYS.  Some functions are actually named
13740     something starting with __ and the normal name is an alias.  */
13741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13742 choke me
13743 #else
13744 f = $ac_func;
13745 #endif
13746
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 rm -f conftest.$ac_objext conftest$ac_exeext
13752 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13753   (eval $ac_link) 2>&5
13754   ac_status=$?
13755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13756   (exit $ac_status); } &&
13757          { ac_try='test -s conftest$ac_exeext'
13758   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13759   (eval $ac_try) 2>&5
13760   ac_status=$?
13761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13762   (exit $ac_status); }; }; then
13763   eval "$as_ac_var=yes"
13764 else
13765   echo "$as_me: failed program was:" >&5
13766 cat conftest.$ac_ext >&5
13767 eval "$as_ac_var=no"
13768 fi
13769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13770 fi
13771 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13772 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13773 if test `eval echo '${'$as_ac_var'}'` = yes; then
13774   cat >>confdefs.h <<_ACEOF
13775 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13776 _ACEOF
13777
13778 fi
13779 done
13780
13781
13782 # Do test here with the proper thread flags
13783 echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
13784 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6
13785 if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788   cat >conftest.$ac_ext <<_ACEOF
13789 #line $LINENO "configure"
13790 #include "confdefs.h"
13791 #include <sys/types.h>
13792 #include <pwd.h>
13793 #ifdef F77_DUMMY_MAIN
13794 #  ifdef __cplusplus
13795      extern "C"
13796 #  endif
13797    int F77_DUMMY_MAIN() { return 1; }
13798 #endif
13799 int
13800 main ()
13801 {
13802 uid_t uid;
13803 struct passwd *space;
13804 char *buf;
13805 size_t bufsize;
13806 struct passwd **result;
13807 getpwuid_r(uid, space, buf, bufsize, result);
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext
13813 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13814   (eval $ac_compile) 2>&5
13815   ac_status=$?
13816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13817   (exit $ac_status); } &&
13818          { ac_try='test -s conftest.$ac_objext'
13819   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   pgac_func_getpwuid_r_5arg=yes
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 cat conftest.$ac_ext >&5
13828 pgac_func_getpwuid_r_5arg=no
13829 fi
13830 rm -f conftest.$ac_objext conftest.$ac_ext
13831 fi
13832 echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
13833 echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6
13834 if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
13835
13836 cat >>confdefs.h <<\_ACEOF
13837 #define GETPWUID_R_5ARG
13838 _ACEOF
13839
13840 fi
13841
13842 echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
13843 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6
13844 if test "${pgac_func_strerror_r_int+set}" = set; then
13845   echo $ECHO_N "(cached) $ECHO_C" >&6
13846 else
13847   cat >conftest.$ac_ext <<_ACEOF
13848 #line $LINENO "configure"
13849 #include "confdefs.h"
13850 #include <string.h>
13851 #ifdef F77_DUMMY_MAIN
13852 #  ifdef __cplusplus
13853      extern "C"
13854 #  endif
13855    int F77_DUMMY_MAIN() { return 1; }
13856 #endif
13857 int
13858 main ()
13859 {
13860 int strerror_r(int, char *, size_t);
13861   ;
13862   return 0;
13863 }
13864 _ACEOF
13865 rm -f conftest.$ac_objext
13866 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13867   (eval $ac_compile) 2>&5
13868   ac_status=$?
13869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870   (exit $ac_status); } &&
13871          { ac_try='test -s conftest.$ac_objext'
13872   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13873   (eval $ac_try) 2>&5
13874   ac_status=$?
13875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13876   (exit $ac_status); }; }; then
13877   pgac_func_strerror_r_int=yes
13878 else
13879   echo "$as_me: failed program was:" >&5
13880 cat conftest.$ac_ext >&5
13881 pgac_func_strerror_r_int=no
13882 fi
13883 rm -f conftest.$ac_objext conftest.$ac_ext
13884 fi
13885 echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
13886 echo "${ECHO_T}$pgac_func_strerror_r_int" >&6
13887 if test x"$pgac_func_strerror_r_int" = xyes ; then
13888
13889 cat >>confdefs.h <<\_ACEOF
13890 #define STRERROR_R_INT
13891 _ACEOF
13892
13893 fi
13894
13895
13896 CFLAGS="$_CFLAGS"
13897 LIBS="$_LIBS"
13898
13899 else
13900 # do not use values from template file
13901 PTHREAD_CFLAGS=
13902 PTHREAD_LIBS=
13903 fi
13904
13905
13906
13907
13908
13909 # This test makes sure that run tests work at all.  Sometimes a shared
13910 # library is found by the linker, but the runtime linker can't find it.
13911 # This check should come after all modifications of compiler or linker
13912 # variables, and before any other run tests.
13913 echo "$as_me:$LINENO: checking test program" >&5
13914 echo $ECHO_N "checking test program... $ECHO_C" >&6
13915 if test "$cross_compiling" = yes; then
13916   echo "$as_me:$LINENO: result: cross-compiling" >&5
13917 echo "${ECHO_T}cross-compiling" >&6
13918 else
13919   cat >conftest.$ac_ext <<_ACEOF
13920 #line $LINENO "configure"
13921 #include "confdefs.h"
13922 int main() { return 0; }
13923 _ACEOF
13924 rm -f conftest$ac_exeext
13925 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13926   (eval $ac_link) 2>&5
13927   ac_status=$?
13928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13930   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   echo "$as_me:$LINENO: result: ok" >&5
13936 echo "${ECHO_T}ok" >&6
13937 else
13938   echo "$as_me: program exited with status $ac_status" >&5
13939 echo "$as_me: failed program was:" >&5
13940 cat conftest.$ac_ext >&5
13941 ( exit $ac_status )
13942 echo "$as_me:$LINENO: result: failed" >&5
13943 echo "${ECHO_T}failed" >&6
13944 { { echo "$as_me:$LINENO: error:
13945 *** Could not execute a simple test program.  This may be a problem
13946 *** related to locating shared libraries.  Check the file 'config.log'
13947 *** for the exact reason." >&5
13948 echo "$as_me: error:
13949 *** Could not execute a simple test program.  This may be a problem
13950 *** related to locating shared libraries.  Check the file 'config.log'
13951 *** for the exact reason." >&2;}
13952    { (exit 1); exit 1; }; }
13953 fi
13954 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13955 fi
13956
13957
13958
13959 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
13960 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
13961 if test "${pgac_cv_type_long_int_64+set}" = set; then
13962   echo $ECHO_N "(cached) $ECHO_C" >&6
13963 else
13964   if test "$cross_compiling" = yes; then
13965   # If cross-compiling, check the size reported by the compiler and
13966 # trust that the arithmetic works.
13967 cat >conftest.$ac_ext <<_ACEOF
13968 #line $LINENO "configure"
13969 #include "confdefs.h"
13970
13971 #ifdef F77_DUMMY_MAIN
13972 #  ifdef __cplusplus
13973      extern "C"
13974 #  endif
13975    int F77_DUMMY_MAIN() { return 1; }
13976 #endif
13977 int
13978 main ()
13979 {
13980 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13981 test_array [0] = 0
13982
13983   ;
13984   return 0;
13985 }
13986 _ACEOF
13987 rm -f conftest.$ac_objext
13988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13989   (eval $ac_compile) 2>&5
13990   ac_status=$?
13991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13992   (exit $ac_status); } &&
13993          { ac_try='test -s conftest.$ac_objext'
13994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13995   (eval $ac_try) 2>&5
13996   ac_status=$?
13997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13998   (exit $ac_status); }; }; then
13999   pgac_cv_type_long_int_64=yes
14000 else
14001   echo "$as_me: failed program was:" >&5
14002 cat conftest.$ac_ext >&5
14003 pgac_cv_type_long_int_64=no
14004 fi
14005 rm -f conftest.$ac_objext conftest.$ac_ext
14006 else
14007   cat >conftest.$ac_ext <<_ACEOF
14008 #line $LINENO "configure"
14009 #include "confdefs.h"
14010 typedef long int int64;
14011
14012 /*
14013  * These are globals to discourage the compiler from folding all the
14014  * arithmetic tests down to compile-time constants.
14015  */
14016 int64 a = 20000001;
14017 int64 b = 40000005;
14018
14019 int does_int64_work()
14020 {
14021   int64 c,d;
14022
14023   if (sizeof(int64) != 8)
14024     return 0;                   /* definitely not the right size */
14025
14026   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14027   c = a * b;
14028   d = (c + b) / b;
14029   if (d != a+1)
14030     return 0;
14031   return 1;
14032 }
14033 main() {
14034   exit(! does_int64_work());
14035 }
14036 _ACEOF
14037 rm -f conftest$ac_exeext
14038 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14039   (eval $ac_link) 2>&5
14040   ac_status=$?
14041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14042   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14043   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14044   (eval $ac_try) 2>&5
14045   ac_status=$?
14046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14047   (exit $ac_status); }; }; then
14048   pgac_cv_type_long_int_64=yes
14049 else
14050   echo "$as_me: program exited with status $ac_status" >&5
14051 echo "$as_me: failed program was:" >&5
14052 cat conftest.$ac_ext >&5
14053 ( exit $ac_status )
14054 pgac_cv_type_long_int_64=no
14055 fi
14056 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14057 fi
14058 fi
14059 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
14060 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
14061
14062 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14063 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14064
14065 cat >>confdefs.h <<\_ACEOF
14066 #define HAVE_LONG_INT_64
14067 _ACEOF
14068
14069 fi
14070
14071
14072 if test x"$HAVE_LONG_INT_64" = x"no" ; then
14073   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
14074 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
14075 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
14076   echo $ECHO_N "(cached) $ECHO_C" >&6
14077 else
14078   if test "$cross_compiling" = yes; then
14079   # If cross-compiling, check the size reported by the compiler and
14080 # trust that the arithmetic works.
14081 cat >conftest.$ac_ext <<_ACEOF
14082 #line $LINENO "configure"
14083 #include "confdefs.h"
14084
14085 #ifdef F77_DUMMY_MAIN
14086 #  ifdef __cplusplus
14087      extern "C"
14088 #  endif
14089    int F77_DUMMY_MAIN() { return 1; }
14090 #endif
14091 int
14092 main ()
14093 {
14094 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14095 test_array [0] = 0
14096
14097   ;
14098   return 0;
14099 }
14100 _ACEOF
14101 rm -f conftest.$ac_objext
14102 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14103   (eval $ac_compile) 2>&5
14104   ac_status=$?
14105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14106   (exit $ac_status); } &&
14107          { ac_try='test -s conftest.$ac_objext'
14108   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14109   (eval $ac_try) 2>&5
14110   ac_status=$?
14111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14112   (exit $ac_status); }; }; then
14113   pgac_cv_type_long_long_int_64=yes
14114 else
14115   echo "$as_me: failed program was:" >&5
14116 cat conftest.$ac_ext >&5
14117 pgac_cv_type_long_long_int_64=no
14118 fi
14119 rm -f conftest.$ac_objext conftest.$ac_ext
14120 else
14121   cat >conftest.$ac_ext <<_ACEOF
14122 #line $LINENO "configure"
14123 #include "confdefs.h"
14124 typedef long long int int64;
14125
14126 /*
14127  * These are globals to discourage the compiler from folding all the
14128  * arithmetic tests down to compile-time constants.
14129  */
14130 int64 a = 20000001;
14131 int64 b = 40000005;
14132
14133 int does_int64_work()
14134 {
14135   int64 c,d;
14136
14137   if (sizeof(int64) != 8)
14138     return 0;                   /* definitely not the right size */
14139
14140   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14141   c = a * b;
14142   d = (c + b) / b;
14143   if (d != a+1)
14144     return 0;
14145   return 1;
14146 }
14147 main() {
14148   exit(! does_int64_work());
14149 }
14150 _ACEOF
14151 rm -f conftest$ac_exeext
14152 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14153   (eval $ac_link) 2>&5
14154   ac_status=$?
14155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14156   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14158   (eval $ac_try) 2>&5
14159   ac_status=$?
14160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14161   (exit $ac_status); }; }; then
14162   pgac_cv_type_long_long_int_64=yes
14163 else
14164   echo "$as_me: program exited with status $ac_status" >&5
14165 echo "$as_me: failed program was:" >&5
14166 cat conftest.$ac_ext >&5
14167 ( exit $ac_status )
14168 pgac_cv_type_long_long_int_64=no
14169 fi
14170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14171 fi
14172 fi
14173 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
14174 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
14175
14176 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14177 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14178
14179 cat >>confdefs.h <<\_ACEOF
14180 #define HAVE_LONG_LONG_INT_64
14181 _ACEOF
14182
14183 fi
14184
14185 fi
14186
14187
14188
14189 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
14190   cat >conftest.$ac_ext <<_ACEOF
14191 #line $LINENO "configure"
14192 #include "confdefs.h"
14193
14194 #define INT64CONST(x)  x##LL
14195 long long int foo = INT64CONST(0x1234567890123456);
14196
14197 #ifdef F77_DUMMY_MAIN
14198 #  ifdef __cplusplus
14199      extern "C"
14200 #  endif
14201    int F77_DUMMY_MAIN() { return 1; }
14202 #endif
14203 int
14204 main ()
14205 {
14206
14207   ;
14208   return 0;
14209 }
14210 _ACEOF
14211 rm -f conftest.$ac_objext
14212 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14213   (eval $ac_compile) 2>&5
14214   ac_status=$?
14215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14216   (exit $ac_status); } &&
14217          { ac_try='test -s conftest.$ac_objext'
14218   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14219   (eval $ac_try) 2>&5
14220   ac_status=$?
14221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222   (exit $ac_status); }; }; then
14223
14224 cat >>confdefs.h <<\_ACEOF
14225 #define HAVE_LL_CONSTANTS 1
14226 _ACEOF
14227
14228 else
14229   echo "$as_me: failed program was:" >&5
14230 cat conftest.$ac_ext >&5
14231 fi
14232 rm -f conftest.$ac_objext conftest.$ac_ext
14233 fi
14234
14235
14236 # If we found "long int" is 64 bits, assume snprintf handles it.  If
14237 # we found we need to use "long long int", better check.  We cope with
14238 # snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14239 # work, fall back to our own snprintf emulation (which we know uses %lld).
14240
14241 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14242   if test $pgac_need_repl_snprintf = no; then
14243     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
14244 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
14245 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248   for pgac_format in '%lld' '%qd' '%I64d'; do
14249 if test "$cross_compiling" = yes; then
14250   pgac_cv_snprintf_long_long_int_format=cross; break
14251 else
14252   cat >conftest.$ac_ext <<_ACEOF
14253 #line $LINENO "configure"
14254 #include "confdefs.h"
14255 #include <stdio.h>
14256 typedef long long int int64;
14257 #define INT64_FORMAT "$pgac_format"
14258
14259 int64 a = 20000001;
14260 int64 b = 40000005;
14261
14262 int does_int64_snprintf_work()
14263 {
14264   int64 c;
14265   char buf[100];
14266
14267   if (sizeof(int64) != 8)
14268     return 0;                   /* doesn't look like the right size */
14269
14270   c = a * b;
14271   snprintf(buf, 100, INT64_FORMAT, c);
14272   if (strcmp(buf, "800000140000005") != 0)
14273     return 0;                   /* either multiply or snprintf is busted */
14274   return 1;
14275 }
14276 main() {
14277   exit(! does_int64_snprintf_work());
14278 }
14279 _ACEOF
14280 rm -f conftest$ac_exeext
14281 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14282   (eval $ac_link) 2>&5
14283   ac_status=$?
14284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
14292 else
14293   echo "$as_me: program exited with status $ac_status" >&5
14294 echo "$as_me: failed program was:" >&5
14295 cat conftest.$ac_ext >&5
14296 fi
14297 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14298 fi
14299 done
14300 fi
14301
14302 LONG_LONG_INT_FORMAT=''
14303
14304 case $pgac_cv_snprintf_long_long_int_format in
14305   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
14306 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
14307   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
14308 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
14309          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
14310   *)     echo "$as_me:$LINENO: result: none" >&5
14311 echo "${ECHO_T}none" >&6;;
14312 esac
14313     if test "$LONG_LONG_INT_FORMAT" = ""; then
14314       # Force usage of our own snprintf, since system snprintf is broken
14315       pgac_need_repl_snprintf=yes
14316       LONG_LONG_INT_FORMAT='%lld'
14317     fi
14318   else
14319     # Here if we previously decided we needed to use our own snprintf
14320     LONG_LONG_INT_FORMAT='%lld'
14321   fi
14322   LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
14323   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
14324   UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
14325 else
14326   # Here if we are not using 'long long int' at all
14327   INT64_FORMAT='"%ld"'
14328   UINT64_FORMAT='"%lu"'
14329 fi
14330
14331
14332 cat >>confdefs.h <<_ACEOF
14333 #define INT64_FORMAT $INT64_FORMAT
14334 _ACEOF
14335
14336
14337
14338 cat >>confdefs.h <<_ACEOF
14339 #define UINT64_FORMAT $UINT64_FORMAT
14340 _ACEOF
14341
14342
14343 if test $pgac_need_repl_snprintf = yes; then
14344   LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14345 fi
14346
14347 # Need a #define for the size of Datum (unsigned long)
14348 echo "$as_me:$LINENO: checking for unsigned long" >&5
14349 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
14350 if test "${ac_cv_type_unsigned_long+set}" = set; then
14351   echo $ECHO_N "(cached) $ECHO_C" >&6
14352 else
14353   cat >conftest.$ac_ext <<_ACEOF
14354 #line $LINENO "configure"
14355 #include "confdefs.h"
14356 $ac_includes_default
14357 #ifdef F77_DUMMY_MAIN
14358 #  ifdef __cplusplus
14359      extern "C"
14360 #  endif
14361    int F77_DUMMY_MAIN() { return 1; }
14362 #endif
14363 int
14364 main ()
14365 {
14366 if ((unsigned long *) 0)
14367   return 0;
14368 if (sizeof (unsigned long))
14369   return 0;
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f conftest.$ac_objext
14375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14376   (eval $ac_compile) 2>&5
14377   ac_status=$?
14378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14379   (exit $ac_status); } &&
14380          { ac_try='test -s conftest.$ac_objext'
14381   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14385   (exit $ac_status); }; }; then
14386   ac_cv_type_unsigned_long=yes
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat conftest.$ac_ext >&5
14390 ac_cv_type_unsigned_long=no
14391 fi
14392 rm -f conftest.$ac_objext conftest.$ac_ext
14393 fi
14394 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
14395 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
14396
14397 echo "$as_me:$LINENO: checking size of unsigned long" >&5
14398 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
14399 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
14400   echo $ECHO_N "(cached) $ECHO_C" >&6
14401 else
14402   if test "$ac_cv_type_unsigned_long" = yes; then
14403   # The cast to unsigned long works around a bug in the HP C Compiler
14404   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14405   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14406   # This bug is HP SR number 8606223364.
14407   if test "$cross_compiling" = yes; then
14408   # Depending upon the size, compute the lo and hi bounds.
14409 cat >conftest.$ac_ext <<_ACEOF
14410 #line $LINENO "configure"
14411 #include "confdefs.h"
14412 $ac_includes_default
14413 #ifdef F77_DUMMY_MAIN
14414 #  ifdef __cplusplus
14415      extern "C"
14416 #  endif
14417    int F77_DUMMY_MAIN() { return 1; }
14418 #endif
14419 int
14420 main ()
14421 {
14422 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
14423 test_array [0] = 0
14424
14425   ;
14426   return 0;
14427 }
14428 _ACEOF
14429 rm -f conftest.$ac_objext
14430 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14431   (eval $ac_compile) 2>&5
14432   ac_status=$?
14433   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14434   (exit $ac_status); } &&
14435          { ac_try='test -s conftest.$ac_objext'
14436   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14437   (eval $ac_try) 2>&5
14438   ac_status=$?
14439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14440   (exit $ac_status); }; }; then
14441   ac_lo=0 ac_mid=0
14442   while :; do
14443     cat >conftest.$ac_ext <<_ACEOF
14444 #line $LINENO "configure"
14445 #include "confdefs.h"
14446 $ac_includes_default
14447 #ifdef F77_DUMMY_MAIN
14448 #  ifdef __cplusplus
14449      extern "C"
14450 #  endif
14451    int F77_DUMMY_MAIN() { return 1; }
14452 #endif
14453 int
14454 main ()
14455 {
14456 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
14457 test_array [0] = 0
14458
14459   ;
14460   return 0;
14461 }
14462 _ACEOF
14463 rm -f conftest.$ac_objext
14464 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14465   (eval $ac_compile) 2>&5
14466   ac_status=$?
14467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468   (exit $ac_status); } &&
14469          { ac_try='test -s conftest.$ac_objext'
14470   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14471   (eval $ac_try) 2>&5
14472   ac_status=$?
14473   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474   (exit $ac_status); }; }; then
14475   ac_hi=$ac_mid; break
14476 else
14477   echo "$as_me: failed program was:" >&5
14478 cat conftest.$ac_ext >&5
14479 ac_lo=`expr $ac_mid + 1`
14480                     if test $ac_lo -le $ac_mid; then
14481                       ac_lo= ac_hi=
14482                       break
14483                     fi
14484                     ac_mid=`expr 2 '*' $ac_mid + 1`
14485 fi
14486 rm -f conftest.$ac_objext conftest.$ac_ext
14487   done
14488 else
14489   echo "$as_me: failed program was:" >&5
14490 cat conftest.$ac_ext >&5
14491 cat >conftest.$ac_ext <<_ACEOF
14492 #line $LINENO "configure"
14493 #include "confdefs.h"
14494 $ac_includes_default
14495 #ifdef F77_DUMMY_MAIN
14496 #  ifdef __cplusplus
14497      extern "C"
14498 #  endif
14499    int F77_DUMMY_MAIN() { return 1; }
14500 #endif
14501 int
14502 main ()
14503 {
14504 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
14505 test_array [0] = 0
14506
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 rm -f conftest.$ac_objext
14512 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14513   (eval $ac_compile) 2>&5
14514   ac_status=$?
14515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -s conftest.$ac_objext'
14518   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14519   (eval $ac_try) 2>&5
14520   ac_status=$?
14521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14522   (exit $ac_status); }; }; then
14523   ac_hi=-1 ac_mid=-1
14524   while :; do
14525     cat >conftest.$ac_ext <<_ACEOF
14526 #line $LINENO "configure"
14527 #include "confdefs.h"
14528 $ac_includes_default
14529 #ifdef F77_DUMMY_MAIN
14530 #  ifdef __cplusplus
14531      extern "C"
14532 #  endif
14533    int F77_DUMMY_MAIN() { return 1; }
14534 #endif
14535 int
14536 main ()
14537 {
14538 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
14539 test_array [0] = 0
14540
14541   ;
14542   return 0;
14543 }
14544 _ACEOF
14545 rm -f conftest.$ac_objext
14546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14547   (eval $ac_compile) 2>&5
14548   ac_status=$?
14549   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14550   (exit $ac_status); } &&
14551          { ac_try='test -s conftest.$ac_objext'
14552   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14553   (eval $ac_try) 2>&5
14554   ac_status=$?
14555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556   (exit $ac_status); }; }; then
14557   ac_lo=$ac_mid; break
14558 else
14559   echo "$as_me: failed program was:" >&5
14560 cat conftest.$ac_ext >&5
14561 ac_hi=`expr '(' $ac_mid ')' - 1`
14562                        if test $ac_mid -le $ac_hi; then
14563                          ac_lo= ac_hi=
14564                          break
14565                        fi
14566                        ac_mid=`expr 2 '*' $ac_mid`
14567 fi
14568 rm -f conftest.$ac_objext conftest.$ac_ext
14569   done
14570 else
14571   echo "$as_me: failed program was:" >&5
14572 cat conftest.$ac_ext >&5
14573 ac_lo= ac_hi=
14574 fi
14575 rm -f conftest.$ac_objext conftest.$ac_ext
14576 fi
14577 rm -f conftest.$ac_objext conftest.$ac_ext
14578 # Binary search between lo and hi bounds.
14579 while test "x$ac_lo" != "x$ac_hi"; do
14580   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14581   cat >conftest.$ac_ext <<_ACEOF
14582 #line $LINENO "configure"
14583 #include "confdefs.h"
14584 $ac_includes_default
14585 #ifdef F77_DUMMY_MAIN
14586 #  ifdef __cplusplus
14587      extern "C"
14588 #  endif
14589    int F77_DUMMY_MAIN() { return 1; }
14590 #endif
14591 int
14592 main ()
14593 {
14594 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
14595 test_array [0] = 0
14596
14597   ;
14598   return 0;
14599 }
14600 _ACEOF
14601 rm -f conftest.$ac_objext
14602 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14603   (eval $ac_compile) 2>&5
14604   ac_status=$?
14605   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14606   (exit $ac_status); } &&
14607          { ac_try='test -s conftest.$ac_objext'
14608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14609   (eval $ac_try) 2>&5
14610   ac_status=$?
14611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14612   (exit $ac_status); }; }; then
14613   ac_hi=$ac_mid
14614 else
14615   echo "$as_me: failed program was:" >&5
14616 cat conftest.$ac_ext >&5
14617 ac_lo=`expr '(' $ac_mid ')' + 1`
14618 fi
14619 rm -f conftest.$ac_objext conftest.$ac_ext
14620 done
14621 case $ac_lo in
14622 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
14623 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
14624 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
14625    { (exit 1); exit 1; }; } ;;
14626 esac
14627 else
14628   if test "$cross_compiling" = yes; then
14629   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14630 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14631    { (exit 1); exit 1; }; }
14632 else
14633   cat >conftest.$ac_ext <<_ACEOF
14634 #line $LINENO "configure"
14635 #include "confdefs.h"
14636 $ac_includes_default
14637 long longval () { return (long) (sizeof (unsigned long)); }
14638 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
14639 #include <stdio.h>
14640 #include <stdlib.h>
14641 #ifdef F77_DUMMY_MAIN
14642 #  ifdef __cplusplus
14643      extern "C"
14644 #  endif
14645    int F77_DUMMY_MAIN() { return 1; }
14646 #endif
14647 int
14648 main ()
14649 {
14650
14651   FILE *f = fopen ("conftest.val", "w");
14652   if (! f)
14653     exit (1);
14654   if (((long) (sizeof (unsigned long))) < 0)
14655     {
14656       long i = longval ();
14657       if (i != ((long) (sizeof (unsigned long))))
14658         exit (1);
14659       fprintf (f, "%ld\n", i);
14660     }
14661   else
14662     {
14663       unsigned long i = ulongval ();
14664       if (i != ((long) (sizeof (unsigned long))))
14665         exit (1);
14666       fprintf (f, "%lu\n", i);
14667     }
14668   exit (ferror (f) || fclose (f) != 0);
14669
14670   ;
14671   return 0;
14672 }
14673 _ACEOF
14674 rm -f conftest$ac_exeext
14675 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14676   (eval $ac_link) 2>&5
14677   ac_status=$?
14678   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14679   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14681   (eval $ac_try) 2>&5
14682   ac_status=$?
14683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14684   (exit $ac_status); }; }; then
14685   ac_cv_sizeof_unsigned_long=`cat conftest.val`
14686 else
14687   echo "$as_me: program exited with status $ac_status" >&5
14688 echo "$as_me: failed program was:" >&5
14689 cat conftest.$ac_ext >&5
14690 ( exit $ac_status )
14691 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
14692 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
14693    { (exit 1); exit 1; }; }
14694 fi
14695 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14696 fi
14697 fi
14698 rm -f conftest.val
14699 else
14700   ac_cv_sizeof_unsigned_long=0
14701 fi
14702 fi
14703 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
14704 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
14705 cat >>confdefs.h <<_ACEOF
14706 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
14707 _ACEOF
14708
14709
14710
14711 # Determine memory alignment requirements for the basic C data types.
14712
14713 echo "$as_me:$LINENO: checking for short" >&5
14714 echo $ECHO_N "checking for short... $ECHO_C" >&6
14715 if test "${ac_cv_type_short+set}" = set; then
14716   echo $ECHO_N "(cached) $ECHO_C" >&6
14717 else
14718   cat >conftest.$ac_ext <<_ACEOF
14719 #line $LINENO "configure"
14720 #include "confdefs.h"
14721 $ac_includes_default
14722 #ifdef F77_DUMMY_MAIN
14723 #  ifdef __cplusplus
14724      extern "C"
14725 #  endif
14726    int F77_DUMMY_MAIN() { return 1; }
14727 #endif
14728 int
14729 main ()
14730 {
14731 if ((short *) 0)
14732   return 0;
14733 if (sizeof (short))
14734   return 0;
14735   ;
14736   return 0;
14737 }
14738 _ACEOF
14739 rm -f conftest.$ac_objext
14740 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14741   (eval $ac_compile) 2>&5
14742   ac_status=$?
14743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14744   (exit $ac_status); } &&
14745          { ac_try='test -s conftest.$ac_objext'
14746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14747   (eval $ac_try) 2>&5
14748   ac_status=$?
14749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750   (exit $ac_status); }; }; then
14751   ac_cv_type_short=yes
14752 else
14753   echo "$as_me: failed program was:" >&5
14754 cat conftest.$ac_ext >&5
14755 ac_cv_type_short=no
14756 fi
14757 rm -f conftest.$ac_objext conftest.$ac_ext
14758 fi
14759 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
14760 echo "${ECHO_T}$ac_cv_type_short" >&6
14761
14762 echo "$as_me:$LINENO: checking alignment of short" >&5
14763 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
14764 if test "${pgac_cv_alignof_short+set}" = set; then
14765   echo $ECHO_N "(cached) $ECHO_C" >&6
14766 else
14767   if test "$ac_cv_type_short" = yes; then
14768   if test "$cross_compiling" = yes; then
14769   # Depending upon the size, compute the lo and hi bounds.
14770 cat >conftest.$ac_ext <<_ACEOF
14771 #line $LINENO "configure"
14772 #include "confdefs.h"
14773 $ac_includes_default
14774 struct { char filler; short field; } pgac_struct;
14775 #ifdef F77_DUMMY_MAIN
14776 #  ifdef __cplusplus
14777      extern "C"
14778 #  endif
14779    int F77_DUMMY_MAIN() { return 1; }
14780 #endif
14781 int
14782 main ()
14783 {
14784 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14785 test_array [0] = 0
14786
14787   ;
14788   return 0;
14789 }
14790 _ACEOF
14791 rm -f conftest.$ac_objext
14792 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14793   (eval $ac_compile) 2>&5
14794   ac_status=$?
14795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14796   (exit $ac_status); } &&
14797          { ac_try='test -s conftest.$ac_objext'
14798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14799   (eval $ac_try) 2>&5
14800   ac_status=$?
14801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14802   (exit $ac_status); }; }; then
14803   ac_lo=0 ac_mid=0
14804   while :; do
14805     cat >conftest.$ac_ext <<_ACEOF
14806 #line $LINENO "configure"
14807 #include "confdefs.h"
14808 $ac_includes_default
14809 struct { char filler; short field; } pgac_struct;
14810 #ifdef F77_DUMMY_MAIN
14811 #  ifdef __cplusplus
14812      extern "C"
14813 #  endif
14814    int F77_DUMMY_MAIN() { return 1; }
14815 #endif
14816 int
14817 main ()
14818 {
14819 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14820 test_array [0] = 0
14821
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 rm -f conftest.$ac_objext
14827 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14828   (eval $ac_compile) 2>&5
14829   ac_status=$?
14830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14831   (exit $ac_status); } &&
14832          { ac_try='test -s conftest.$ac_objext'
14833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14837   (exit $ac_status); }; }; then
14838   ac_hi=$ac_mid; break
14839 else
14840   echo "$as_me: failed program was:" >&5
14841 cat conftest.$ac_ext >&5
14842 ac_lo=`expr $ac_mid + 1`
14843                     if test $ac_lo -le $ac_mid; then
14844                       ac_lo= ac_hi=
14845                       break
14846                     fi
14847                     ac_mid=`expr 2 '*' $ac_mid + 1`
14848 fi
14849 rm -f conftest.$ac_objext conftest.$ac_ext
14850   done
14851 else
14852   echo "$as_me: failed program was:" >&5
14853 cat conftest.$ac_ext >&5
14854 cat >conftest.$ac_ext <<_ACEOF
14855 #line $LINENO "configure"
14856 #include "confdefs.h"
14857 $ac_includes_default
14858 struct { char filler; short field; } pgac_struct;
14859 #ifdef F77_DUMMY_MAIN
14860 #  ifdef __cplusplus
14861      extern "C"
14862 #  endif
14863    int F77_DUMMY_MAIN() { return 1; }
14864 #endif
14865 int
14866 main ()
14867 {
14868 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
14869 test_array [0] = 0
14870
14871   ;
14872   return 0;
14873 }
14874 _ACEOF
14875 rm -f conftest.$ac_objext
14876 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14877   (eval $ac_compile) 2>&5
14878   ac_status=$?
14879   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880   (exit $ac_status); } &&
14881          { ac_try='test -s conftest.$ac_objext'
14882   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14883   (eval $ac_try) 2>&5
14884   ac_status=$?
14885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886   (exit $ac_status); }; }; then
14887   ac_hi=-1 ac_mid=-1
14888   while :; do
14889     cat >conftest.$ac_ext <<_ACEOF
14890 #line $LINENO "configure"
14891 #include "confdefs.h"
14892 $ac_includes_default
14893 struct { char filler; short field; } pgac_struct;
14894 #ifdef F77_DUMMY_MAIN
14895 #  ifdef __cplusplus
14896      extern "C"
14897 #  endif
14898    int F77_DUMMY_MAIN() { return 1; }
14899 #endif
14900 int
14901 main ()
14902 {
14903 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
14904 test_array [0] = 0
14905
14906   ;
14907   return 0;
14908 }
14909 _ACEOF
14910 rm -f conftest.$ac_objext
14911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14912   (eval $ac_compile) 2>&5
14913   ac_status=$?
14914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915   (exit $ac_status); } &&
14916          { ac_try='test -s conftest.$ac_objext'
14917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14918   (eval $ac_try) 2>&5
14919   ac_status=$?
14920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14921   (exit $ac_status); }; }; then
14922   ac_lo=$ac_mid; break
14923 else
14924   echo "$as_me: failed program was:" >&5
14925 cat conftest.$ac_ext >&5
14926 ac_hi=`expr '(' $ac_mid ')' - 1`
14927                        if test $ac_mid -le $ac_hi; then
14928                          ac_lo= ac_hi=
14929                          break
14930                        fi
14931                        ac_mid=`expr 2 '*' $ac_mid`
14932 fi
14933 rm -f conftest.$ac_objext conftest.$ac_ext
14934   done
14935 else
14936   echo "$as_me: failed program was:" >&5
14937 cat conftest.$ac_ext >&5
14938 ac_lo= ac_hi=
14939 fi
14940 rm -f conftest.$ac_objext conftest.$ac_ext
14941 fi
14942 rm -f conftest.$ac_objext conftest.$ac_ext
14943 # Binary search between lo and hi bounds.
14944 while test "x$ac_lo" != "x$ac_hi"; do
14945   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14946   cat >conftest.$ac_ext <<_ACEOF
14947 #line $LINENO "configure"
14948 #include "confdefs.h"
14949 $ac_includes_default
14950 struct { char filler; short field; } pgac_struct;
14951 #ifdef F77_DUMMY_MAIN
14952 #  ifdef __cplusplus
14953      extern "C"
14954 #  endif
14955    int F77_DUMMY_MAIN() { return 1; }
14956 #endif
14957 int
14958 main ()
14959 {
14960 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14961 test_array [0] = 0
14962
14963   ;
14964   return 0;
14965 }
14966 _ACEOF
14967 rm -f conftest.$ac_objext
14968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14969   (eval $ac_compile) 2>&5
14970   ac_status=$?
14971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14972   (exit $ac_status); } &&
14973          { ac_try='test -s conftest.$ac_objext'
14974   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14975   (eval $ac_try) 2>&5
14976   ac_status=$?
14977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978   (exit $ac_status); }; }; then
14979   ac_hi=$ac_mid
14980 else
14981   echo "$as_me: failed program was:" >&5
14982 cat conftest.$ac_ext >&5
14983 ac_lo=`expr '(' $ac_mid ')' + 1`
14984 fi
14985 rm -f conftest.$ac_objext conftest.$ac_ext
14986 done
14987 case $ac_lo in
14988 ?*) pgac_cv_alignof_short=$ac_lo;;
14989 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
14990 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
14991    { (exit 1); exit 1; }; } ;;
14992 esac
14993 else
14994   if test "$cross_compiling" = yes; then
14995   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14996 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14997    { (exit 1); exit 1; }; }
14998 else
14999   cat >conftest.$ac_ext <<_ACEOF
15000 #line $LINENO "configure"
15001 #include "confdefs.h"
15002 $ac_includes_default
15003 struct { char filler; short field; } pgac_struct;
15004 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15005 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15006 #include <stdio.h>
15007 #include <stdlib.h>
15008 #ifdef F77_DUMMY_MAIN
15009 #  ifdef __cplusplus
15010      extern "C"
15011 #  endif
15012    int F77_DUMMY_MAIN() { return 1; }
15013 #endif
15014 int
15015 main ()
15016 {
15017
15018   FILE *f = fopen ("conftest.val", "w");
15019   if (! f)
15020     exit (1);
15021   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15022     {
15023       long i = longval ();
15024       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15025         exit (1);
15026       fprintf (f, "%ld\n", i);
15027     }
15028   else
15029     {
15030       unsigned long i = ulongval ();
15031       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15032         exit (1);
15033       fprintf (f, "%lu\n", i);
15034     }
15035   exit (ferror (f) || fclose (f) != 0);
15036
15037   ;
15038   return 0;
15039 }
15040 _ACEOF
15041 rm -f conftest$ac_exeext
15042 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15043   (eval $ac_link) 2>&5
15044   ac_status=$?
15045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15046   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15047   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15048   (eval $ac_try) 2>&5
15049   ac_status=$?
15050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15051   (exit $ac_status); }; }; then
15052   pgac_cv_alignof_short=`cat conftest.val`
15053 else
15054   echo "$as_me: program exited with status $ac_status" >&5
15055 echo "$as_me: failed program was:" >&5
15056 cat conftest.$ac_ext >&5
15057 ( exit $ac_status )
15058 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
15059 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
15060    { (exit 1); exit 1; }; }
15061 fi
15062 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15063 fi
15064 fi
15065 rm -f conftest.val
15066 else
15067   pgac_cv_alignof_short=0
15068 fi
15069 fi
15070 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
15071 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
15072 cat >>confdefs.h <<_ACEOF
15073 #define ALIGNOF_SHORT $pgac_cv_alignof_short
15074 _ACEOF
15075
15076
15077 echo "$as_me:$LINENO: checking for int" >&5
15078 echo $ECHO_N "checking for int... $ECHO_C" >&6
15079 if test "${ac_cv_type_int+set}" = set; then
15080   echo $ECHO_N "(cached) $ECHO_C" >&6
15081 else
15082   cat >conftest.$ac_ext <<_ACEOF
15083 #line $LINENO "configure"
15084 #include "confdefs.h"
15085 $ac_includes_default
15086 #ifdef F77_DUMMY_MAIN
15087 #  ifdef __cplusplus
15088      extern "C"
15089 #  endif
15090    int F77_DUMMY_MAIN() { return 1; }
15091 #endif
15092 int
15093 main ()
15094 {
15095 if ((int *) 0)
15096   return 0;
15097 if (sizeof (int))
15098   return 0;
15099   ;
15100   return 0;
15101 }
15102 _ACEOF
15103 rm -f conftest.$ac_objext
15104 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15105   (eval $ac_compile) 2>&5
15106   ac_status=$?
15107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15108   (exit $ac_status); } &&
15109          { ac_try='test -s conftest.$ac_objext'
15110   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15111   (eval $ac_try) 2>&5
15112   ac_status=$?
15113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15114   (exit $ac_status); }; }; then
15115   ac_cv_type_int=yes
15116 else
15117   echo "$as_me: failed program was:" >&5
15118 cat conftest.$ac_ext >&5
15119 ac_cv_type_int=no
15120 fi
15121 rm -f conftest.$ac_objext conftest.$ac_ext
15122 fi
15123 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
15124 echo "${ECHO_T}$ac_cv_type_int" >&6
15125
15126 echo "$as_me:$LINENO: checking alignment of int" >&5
15127 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
15128 if test "${pgac_cv_alignof_int+set}" = set; then
15129   echo $ECHO_N "(cached) $ECHO_C" >&6
15130 else
15131   if test "$ac_cv_type_int" = yes; then
15132   if test "$cross_compiling" = yes; then
15133   # Depending upon the size, compute the lo and hi bounds.
15134 cat >conftest.$ac_ext <<_ACEOF
15135 #line $LINENO "configure"
15136 #include "confdefs.h"
15137 $ac_includes_default
15138 struct { char filler; int field; } pgac_struct;
15139 #ifdef F77_DUMMY_MAIN
15140 #  ifdef __cplusplus
15141      extern "C"
15142 #  endif
15143    int F77_DUMMY_MAIN() { return 1; }
15144 #endif
15145 int
15146 main ()
15147 {
15148 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
15149 test_array [0] = 0
15150
15151   ;
15152   return 0;
15153 }
15154 _ACEOF
15155 rm -f conftest.$ac_objext
15156 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15157   (eval $ac_compile) 2>&5
15158   ac_status=$?
15159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15160   (exit $ac_status); } &&
15161          { ac_try='test -s conftest.$ac_objext'
15162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15163   (eval $ac_try) 2>&5
15164   ac_status=$?
15165   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166   (exit $ac_status); }; }; then
15167   ac_lo=0 ac_mid=0
15168   while :; do
15169     cat >conftest.$ac_ext <<_ACEOF
15170 #line $LINENO "configure"
15171 #include "confdefs.h"
15172 $ac_includes_default
15173 struct { char filler; int field; } pgac_struct;
15174 #ifdef F77_DUMMY_MAIN
15175 #  ifdef __cplusplus
15176      extern "C"
15177 #  endif
15178    int F77_DUMMY_MAIN() { return 1; }
15179 #endif
15180 int
15181 main ()
15182 {
15183 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15184 test_array [0] = 0
15185
15186   ;
15187   return 0;
15188 }
15189 _ACEOF
15190 rm -f conftest.$ac_objext
15191 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15192   (eval $ac_compile) 2>&5
15193   ac_status=$?
15194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15195   (exit $ac_status); } &&
15196          { ac_try='test -s conftest.$ac_objext'
15197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15198   (eval $ac_try) 2>&5
15199   ac_status=$?
15200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15201   (exit $ac_status); }; }; then
15202   ac_hi=$ac_mid; break
15203 else
15204   echo "$as_me: failed program was:" >&5
15205 cat conftest.$ac_ext >&5
15206 ac_lo=`expr $ac_mid + 1`
15207                     if test $ac_lo -le $ac_mid; then
15208                       ac_lo= ac_hi=
15209                       break
15210                     fi
15211                     ac_mid=`expr 2 '*' $ac_mid + 1`
15212 fi
15213 rm -f conftest.$ac_objext conftest.$ac_ext
15214   done
15215 else
15216   echo "$as_me: failed program was:" >&5
15217 cat conftest.$ac_ext >&5
15218 cat >conftest.$ac_ext <<_ACEOF
15219 #line $LINENO "configure"
15220 #include "confdefs.h"
15221 $ac_includes_default
15222 struct { char filler; int field; } pgac_struct;
15223 #ifdef F77_DUMMY_MAIN
15224 #  ifdef __cplusplus
15225      extern "C"
15226 #  endif
15227    int F77_DUMMY_MAIN() { return 1; }
15228 #endif
15229 int
15230 main ()
15231 {
15232 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15233 test_array [0] = 0
15234
15235   ;
15236   return 0;
15237 }
15238 _ACEOF
15239 rm -f conftest.$ac_objext
15240 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15241   (eval $ac_compile) 2>&5
15242   ac_status=$?
15243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244   (exit $ac_status); } &&
15245          { ac_try='test -s conftest.$ac_objext'
15246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15247   (eval $ac_try) 2>&5
15248   ac_status=$?
15249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250   (exit $ac_status); }; }; then
15251   ac_hi=-1 ac_mid=-1
15252   while :; do
15253     cat >conftest.$ac_ext <<_ACEOF
15254 #line $LINENO "configure"
15255 #include "confdefs.h"
15256 $ac_includes_default
15257 struct { char filler; int field; } pgac_struct;
15258 #ifdef F77_DUMMY_MAIN
15259 #  ifdef __cplusplus
15260      extern "C"
15261 #  endif
15262    int F77_DUMMY_MAIN() { return 1; }
15263 #endif
15264 int
15265 main ()
15266 {
15267 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15268 test_array [0] = 0
15269
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 rm -f conftest.$ac_objext
15275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15276   (eval $ac_compile) 2>&5
15277   ac_status=$?
15278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279   (exit $ac_status); } &&
15280          { ac_try='test -s conftest.$ac_objext'
15281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282   (eval $ac_try) 2>&5
15283   ac_status=$?
15284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285   (exit $ac_status); }; }; then
15286   ac_lo=$ac_mid; break
15287 else
15288   echo "$as_me: failed program was:" >&5
15289 cat conftest.$ac_ext >&5
15290 ac_hi=`expr '(' $ac_mid ')' - 1`
15291                        if test $ac_mid -le $ac_hi; then
15292                          ac_lo= ac_hi=
15293                          break
15294                        fi
15295                        ac_mid=`expr 2 '*' $ac_mid`
15296 fi
15297 rm -f conftest.$ac_objext conftest.$ac_ext
15298   done
15299 else
15300   echo "$as_me: failed program was:" >&5
15301 cat conftest.$ac_ext >&5
15302 ac_lo= ac_hi=
15303 fi
15304 rm -f conftest.$ac_objext conftest.$ac_ext
15305 fi
15306 rm -f conftest.$ac_objext conftest.$ac_ext
15307 # Binary search between lo and hi bounds.
15308 while test "x$ac_lo" != "x$ac_hi"; do
15309   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15310   cat >conftest.$ac_ext <<_ACEOF
15311 #line $LINENO "configure"
15312 #include "confdefs.h"
15313 $ac_includes_default
15314 struct { char filler; int field; } pgac_struct;
15315 #ifdef F77_DUMMY_MAIN
15316 #  ifdef __cplusplus
15317      extern "C"
15318 #  endif
15319    int F77_DUMMY_MAIN() { return 1; }
15320 #endif
15321 int
15322 main ()
15323 {
15324 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15325 test_array [0] = 0
15326
15327   ;
15328   return 0;
15329 }
15330 _ACEOF
15331 rm -f conftest.$ac_objext
15332 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15333   (eval $ac_compile) 2>&5
15334   ac_status=$?
15335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336   (exit $ac_status); } &&
15337          { ac_try='test -s conftest.$ac_objext'
15338   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15339   (eval $ac_try) 2>&5
15340   ac_status=$?
15341   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15342   (exit $ac_status); }; }; then
15343   ac_hi=$ac_mid
15344 else
15345   echo "$as_me: failed program was:" >&5
15346 cat conftest.$ac_ext >&5
15347 ac_lo=`expr '(' $ac_mid ')' + 1`
15348 fi
15349 rm -f conftest.$ac_objext conftest.$ac_ext
15350 done
15351 case $ac_lo in
15352 ?*) pgac_cv_alignof_int=$ac_lo;;
15353 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
15354 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
15355    { (exit 1); exit 1; }; } ;;
15356 esac
15357 else
15358   if test "$cross_compiling" = yes; then
15359   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15360 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15361    { (exit 1); exit 1; }; }
15362 else
15363   cat >conftest.$ac_ext <<_ACEOF
15364 #line $LINENO "configure"
15365 #include "confdefs.h"
15366 $ac_includes_default
15367 struct { char filler; int field; } pgac_struct;
15368 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15369 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15370 #include <stdio.h>
15371 #include <stdlib.h>
15372 #ifdef F77_DUMMY_MAIN
15373 #  ifdef __cplusplus
15374      extern "C"
15375 #  endif
15376    int F77_DUMMY_MAIN() { return 1; }
15377 #endif
15378 int
15379 main ()
15380 {
15381
15382   FILE *f = fopen ("conftest.val", "w");
15383   if (! f)
15384     exit (1);
15385   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15386     {
15387       long i = longval ();
15388       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15389         exit (1);
15390       fprintf (f, "%ld\n", i);
15391     }
15392   else
15393     {
15394       unsigned long i = ulongval ();
15395       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15396         exit (1);
15397       fprintf (f, "%lu\n", i);
15398     }
15399   exit (ferror (f) || fclose (f) != 0);
15400
15401   ;
15402   return 0;
15403 }
15404 _ACEOF
15405 rm -f conftest$ac_exeext
15406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15407   (eval $ac_link) 2>&5
15408   ac_status=$?
15409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15412   (eval $ac_try) 2>&5
15413   ac_status=$?
15414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15415   (exit $ac_status); }; }; then
15416   pgac_cv_alignof_int=`cat conftest.val`
15417 else
15418   echo "$as_me: program exited with status $ac_status" >&5
15419 echo "$as_me: failed program was:" >&5
15420 cat conftest.$ac_ext >&5
15421 ( exit $ac_status )
15422 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
15423 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
15424    { (exit 1); exit 1; }; }
15425 fi
15426 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15427 fi
15428 fi
15429 rm -f conftest.val
15430 else
15431   pgac_cv_alignof_int=0
15432 fi
15433 fi
15434 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
15435 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
15436 cat >>confdefs.h <<_ACEOF
15437 #define ALIGNOF_INT $pgac_cv_alignof_int
15438 _ACEOF
15439
15440
15441 echo "$as_me:$LINENO: checking for long" >&5
15442 echo $ECHO_N "checking for long... $ECHO_C" >&6
15443 if test "${ac_cv_type_long+set}" = set; then
15444   echo $ECHO_N "(cached) $ECHO_C" >&6
15445 else
15446   cat >conftest.$ac_ext <<_ACEOF
15447 #line $LINENO "configure"
15448 #include "confdefs.h"
15449 $ac_includes_default
15450 #ifdef F77_DUMMY_MAIN
15451 #  ifdef __cplusplus
15452      extern "C"
15453 #  endif
15454    int F77_DUMMY_MAIN() { return 1; }
15455 #endif
15456 int
15457 main ()
15458 {
15459 if ((long *) 0)
15460   return 0;
15461 if (sizeof (long))
15462   return 0;
15463   ;
15464   return 0;
15465 }
15466 _ACEOF
15467 rm -f conftest.$ac_objext
15468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15469   (eval $ac_compile) 2>&5
15470   ac_status=$?
15471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472   (exit $ac_status); } &&
15473          { ac_try='test -s conftest.$ac_objext'
15474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15475   (eval $ac_try) 2>&5
15476   ac_status=$?
15477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15478   (exit $ac_status); }; }; then
15479   ac_cv_type_long=yes
15480 else
15481   echo "$as_me: failed program was:" >&5
15482 cat conftest.$ac_ext >&5
15483 ac_cv_type_long=no
15484 fi
15485 rm -f conftest.$ac_objext conftest.$ac_ext
15486 fi
15487 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
15488 echo "${ECHO_T}$ac_cv_type_long" >&6
15489
15490 echo "$as_me:$LINENO: checking alignment of long" >&5
15491 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
15492 if test "${pgac_cv_alignof_long+set}" = set; then
15493   echo $ECHO_N "(cached) $ECHO_C" >&6
15494 else
15495   if test "$ac_cv_type_long" = yes; then
15496   if test "$cross_compiling" = yes; then
15497   # Depending upon the size, compute the lo and hi bounds.
15498 cat >conftest.$ac_ext <<_ACEOF
15499 #line $LINENO "configure"
15500 #include "confdefs.h"
15501 $ac_includes_default
15502 struct { char filler; long field; } pgac_struct;
15503 #ifdef F77_DUMMY_MAIN
15504 #  ifdef __cplusplus
15505      extern "C"
15506 #  endif
15507    int F77_DUMMY_MAIN() { return 1; }
15508 #endif
15509 int
15510 main ()
15511 {
15512 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
15513 test_array [0] = 0
15514
15515   ;
15516   return 0;
15517 }
15518 _ACEOF
15519 rm -f conftest.$ac_objext
15520 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15521   (eval $ac_compile) 2>&5
15522   ac_status=$?
15523   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15524   (exit $ac_status); } &&
15525          { ac_try='test -s conftest.$ac_objext'
15526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15530   (exit $ac_status); }; }; then
15531   ac_lo=0 ac_mid=0
15532   while :; do
15533     cat >conftest.$ac_ext <<_ACEOF
15534 #line $LINENO "configure"
15535 #include "confdefs.h"
15536 $ac_includes_default
15537 struct { char filler; long field; } pgac_struct;
15538 #ifdef F77_DUMMY_MAIN
15539 #  ifdef __cplusplus
15540      extern "C"
15541 #  endif
15542    int F77_DUMMY_MAIN() { return 1; }
15543 #endif
15544 int
15545 main ()
15546 {
15547 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15548 test_array [0] = 0
15549
15550   ;
15551   return 0;
15552 }
15553 _ACEOF
15554 rm -f conftest.$ac_objext
15555 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15556   (eval $ac_compile) 2>&5
15557   ac_status=$?
15558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15559   (exit $ac_status); } &&
15560          { ac_try='test -s conftest.$ac_objext'
15561   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15562   (eval $ac_try) 2>&5
15563   ac_status=$?
15564   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15565   (exit $ac_status); }; }; then
15566   ac_hi=$ac_mid; break
15567 else
15568   echo "$as_me: failed program was:" >&5
15569 cat conftest.$ac_ext >&5
15570 ac_lo=`expr $ac_mid + 1`
15571                     if test $ac_lo -le $ac_mid; then
15572                       ac_lo= ac_hi=
15573                       break
15574                     fi
15575                     ac_mid=`expr 2 '*' $ac_mid + 1`
15576 fi
15577 rm -f conftest.$ac_objext conftest.$ac_ext
15578   done
15579 else
15580   echo "$as_me: failed program was:" >&5
15581 cat conftest.$ac_ext >&5
15582 cat >conftest.$ac_ext <<_ACEOF
15583 #line $LINENO "configure"
15584 #include "confdefs.h"
15585 $ac_includes_default
15586 struct { char filler; long field; } pgac_struct;
15587 #ifdef F77_DUMMY_MAIN
15588 #  ifdef __cplusplus
15589      extern "C"
15590 #  endif
15591    int F77_DUMMY_MAIN() { return 1; }
15592 #endif
15593 int
15594 main ()
15595 {
15596 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15597 test_array [0] = 0
15598
15599   ;
15600   return 0;
15601 }
15602 _ACEOF
15603 rm -f conftest.$ac_objext
15604 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15605   (eval $ac_compile) 2>&5
15606   ac_status=$?
15607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608   (exit $ac_status); } &&
15609          { ac_try='test -s conftest.$ac_objext'
15610   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15611   (eval $ac_try) 2>&5
15612   ac_status=$?
15613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15614   (exit $ac_status); }; }; then
15615   ac_hi=-1 ac_mid=-1
15616   while :; do
15617     cat >conftest.$ac_ext <<_ACEOF
15618 #line $LINENO "configure"
15619 #include "confdefs.h"
15620 $ac_includes_default
15621 struct { char filler; long field; } pgac_struct;
15622 #ifdef F77_DUMMY_MAIN
15623 #  ifdef __cplusplus
15624      extern "C"
15625 #  endif
15626    int F77_DUMMY_MAIN() { return 1; }
15627 #endif
15628 int
15629 main ()
15630 {
15631 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15632 test_array [0] = 0
15633
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext
15639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15640   (eval $ac_compile) 2>&5
15641   ac_status=$?
15642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest.$ac_objext'
15645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   ac_lo=$ac_mid; break
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 ac_hi=`expr '(' $ac_mid ')' - 1`
15655                        if test $ac_mid -le $ac_hi; then
15656                          ac_lo= ac_hi=
15657                          break
15658                        fi
15659                        ac_mid=`expr 2 '*' $ac_mid`
15660 fi
15661 rm -f conftest.$ac_objext conftest.$ac_ext
15662   done
15663 else
15664   echo "$as_me: failed program was:" >&5
15665 cat conftest.$ac_ext >&5
15666 ac_lo= ac_hi=
15667 fi
15668 rm -f conftest.$ac_objext conftest.$ac_ext
15669 fi
15670 rm -f conftest.$ac_objext conftest.$ac_ext
15671 # Binary search between lo and hi bounds.
15672 while test "x$ac_lo" != "x$ac_hi"; do
15673   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15674   cat >conftest.$ac_ext <<_ACEOF
15675 #line $LINENO "configure"
15676 #include "confdefs.h"
15677 $ac_includes_default
15678 struct { char filler; long field; } pgac_struct;
15679 #ifdef F77_DUMMY_MAIN
15680 #  ifdef __cplusplus
15681      extern "C"
15682 #  endif
15683    int F77_DUMMY_MAIN() { return 1; }
15684 #endif
15685 int
15686 main ()
15687 {
15688 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15689 test_array [0] = 0
15690
15691   ;
15692   return 0;
15693 }
15694 _ACEOF
15695 rm -f conftest.$ac_objext
15696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15697   (eval $ac_compile) 2>&5
15698   ac_status=$?
15699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15700   (exit $ac_status); } &&
15701          { ac_try='test -s conftest.$ac_objext'
15702   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15703   (eval $ac_try) 2>&5
15704   ac_status=$?
15705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15706   (exit $ac_status); }; }; then
15707   ac_hi=$ac_mid
15708 else
15709   echo "$as_me: failed program was:" >&5
15710 cat conftest.$ac_ext >&5
15711 ac_lo=`expr '(' $ac_mid ')' + 1`
15712 fi
15713 rm -f conftest.$ac_objext conftest.$ac_ext
15714 done
15715 case $ac_lo in
15716 ?*) pgac_cv_alignof_long=$ac_lo;;
15717 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
15718 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
15719    { (exit 1); exit 1; }; } ;;
15720 esac
15721 else
15722   if test "$cross_compiling" = yes; then
15723   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15724 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15725    { (exit 1); exit 1; }; }
15726 else
15727   cat >conftest.$ac_ext <<_ACEOF
15728 #line $LINENO "configure"
15729 #include "confdefs.h"
15730 $ac_includes_default
15731 struct { char filler; long field; } pgac_struct;
15732 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15733 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15734 #include <stdio.h>
15735 #include <stdlib.h>
15736 #ifdef F77_DUMMY_MAIN
15737 #  ifdef __cplusplus
15738      extern "C"
15739 #  endif
15740    int F77_DUMMY_MAIN() { return 1; }
15741 #endif
15742 int
15743 main ()
15744 {
15745
15746   FILE *f = fopen ("conftest.val", "w");
15747   if (! f)
15748     exit (1);
15749   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15750     {
15751       long i = longval ();
15752       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15753         exit (1);
15754       fprintf (f, "%ld\n", i);
15755     }
15756   else
15757     {
15758       unsigned long i = ulongval ();
15759       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15760         exit (1);
15761       fprintf (f, "%lu\n", i);
15762     }
15763   exit (ferror (f) || fclose (f) != 0);
15764
15765   ;
15766   return 0;
15767 }
15768 _ACEOF
15769 rm -f conftest$ac_exeext
15770 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15771   (eval $ac_link) 2>&5
15772   ac_status=$?
15773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15774   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15776   (eval $ac_try) 2>&5
15777   ac_status=$?
15778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15779   (exit $ac_status); }; }; then
15780   pgac_cv_alignof_long=`cat conftest.val`
15781 else
15782   echo "$as_me: program exited with status $ac_status" >&5
15783 echo "$as_me: failed program was:" >&5
15784 cat conftest.$ac_ext >&5
15785 ( exit $ac_status )
15786 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
15787 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
15788    { (exit 1); exit 1; }; }
15789 fi
15790 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15791 fi
15792 fi
15793 rm -f conftest.val
15794 else
15795   pgac_cv_alignof_long=0
15796 fi
15797 fi
15798 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
15799 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
15800 cat >>confdefs.h <<_ACEOF
15801 #define ALIGNOF_LONG $pgac_cv_alignof_long
15802 _ACEOF
15803
15804
15805 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
15806   echo "$as_me:$LINENO: checking for long long int" >&5
15807 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
15808 if test "${ac_cv_type_long_long_int+set}" = set; then
15809   echo $ECHO_N "(cached) $ECHO_C" >&6
15810 else
15811   cat >conftest.$ac_ext <<_ACEOF
15812 #line $LINENO "configure"
15813 #include "confdefs.h"
15814 $ac_includes_default
15815 #ifdef F77_DUMMY_MAIN
15816 #  ifdef __cplusplus
15817      extern "C"
15818 #  endif
15819    int F77_DUMMY_MAIN() { return 1; }
15820 #endif
15821 int
15822 main ()
15823 {
15824 if ((long long int *) 0)
15825   return 0;
15826 if (sizeof (long long int))
15827   return 0;
15828   ;
15829   return 0;
15830 }
15831 _ACEOF
15832 rm -f conftest.$ac_objext
15833 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15834   (eval $ac_compile) 2>&5
15835   ac_status=$?
15836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837   (exit $ac_status); } &&
15838          { ac_try='test -s conftest.$ac_objext'
15839   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15840   (eval $ac_try) 2>&5
15841   ac_status=$?
15842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15843   (exit $ac_status); }; }; then
15844   ac_cv_type_long_long_int=yes
15845 else
15846   echo "$as_me: failed program was:" >&5
15847 cat conftest.$ac_ext >&5
15848 ac_cv_type_long_long_int=no
15849 fi
15850 rm -f conftest.$ac_objext conftest.$ac_ext
15851 fi
15852 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
15853 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
15854
15855 echo "$as_me:$LINENO: checking alignment of long long int" >&5
15856 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
15857 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860   if test "$ac_cv_type_long_long_int" = yes; then
15861   if test "$cross_compiling" = yes; then
15862   # Depending upon the size, compute the lo and hi bounds.
15863 cat >conftest.$ac_ext <<_ACEOF
15864 #line $LINENO "configure"
15865 #include "confdefs.h"
15866 $ac_includes_default
15867 struct { char filler; long long int field; } pgac_struct;
15868 #ifdef F77_DUMMY_MAIN
15869 #  ifdef __cplusplus
15870      extern "C"
15871 #  endif
15872    int F77_DUMMY_MAIN() { return 1; }
15873 #endif
15874 int
15875 main ()
15876 {
15877 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
15878 test_array [0] = 0
15879
15880   ;
15881   return 0;
15882 }
15883 _ACEOF
15884 rm -f conftest.$ac_objext
15885 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15886   (eval $ac_compile) 2>&5
15887   ac_status=$?
15888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15889   (exit $ac_status); } &&
15890          { ac_try='test -s conftest.$ac_objext'
15891   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15892   (eval $ac_try) 2>&5
15893   ac_status=$?
15894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15895   (exit $ac_status); }; }; then
15896   ac_lo=0 ac_mid=0
15897   while :; do
15898     cat >conftest.$ac_ext <<_ACEOF
15899 #line $LINENO "configure"
15900 #include "confdefs.h"
15901 $ac_includes_default
15902 struct { char filler; long long int field; } pgac_struct;
15903 #ifdef F77_DUMMY_MAIN
15904 #  ifdef __cplusplus
15905      extern "C"
15906 #  endif
15907    int F77_DUMMY_MAIN() { return 1; }
15908 #endif
15909 int
15910 main ()
15911 {
15912 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15913 test_array [0] = 0
15914
15915   ;
15916   return 0;
15917 }
15918 _ACEOF
15919 rm -f conftest.$ac_objext
15920 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15921   (eval $ac_compile) 2>&5
15922   ac_status=$?
15923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15924   (exit $ac_status); } &&
15925          { ac_try='test -s conftest.$ac_objext'
15926   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15927   (eval $ac_try) 2>&5
15928   ac_status=$?
15929   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15930   (exit $ac_status); }; }; then
15931   ac_hi=$ac_mid; break
15932 else
15933   echo "$as_me: failed program was:" >&5
15934 cat conftest.$ac_ext >&5
15935 ac_lo=`expr $ac_mid + 1`
15936                     if test $ac_lo -le $ac_mid; then
15937                       ac_lo= ac_hi=
15938                       break
15939                     fi
15940                     ac_mid=`expr 2 '*' $ac_mid + 1`
15941 fi
15942 rm -f conftest.$ac_objext conftest.$ac_ext
15943   done
15944 else
15945   echo "$as_me: failed program was:" >&5
15946 cat conftest.$ac_ext >&5
15947 cat >conftest.$ac_ext <<_ACEOF
15948 #line $LINENO "configure"
15949 #include "confdefs.h"
15950 $ac_includes_default
15951 struct { char filler; long long int field; } pgac_struct;
15952 #ifdef F77_DUMMY_MAIN
15953 #  ifdef __cplusplus
15954      extern "C"
15955 #  endif
15956    int F77_DUMMY_MAIN() { return 1; }
15957 #endif
15958 int
15959 main ()
15960 {
15961 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15962 test_array [0] = 0
15963
15964   ;
15965   return 0;
15966 }
15967 _ACEOF
15968 rm -f conftest.$ac_objext
15969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15970   (eval $ac_compile) 2>&5
15971   ac_status=$?
15972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15973   (exit $ac_status); } &&
15974          { ac_try='test -s conftest.$ac_objext'
15975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15976   (eval $ac_try) 2>&5
15977   ac_status=$?
15978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979   (exit $ac_status); }; }; then
15980   ac_hi=-1 ac_mid=-1
15981   while :; do
15982     cat >conftest.$ac_ext <<_ACEOF
15983 #line $LINENO "configure"
15984 #include "confdefs.h"
15985 $ac_includes_default
15986 struct { char filler; long long int field; } pgac_struct;
15987 #ifdef F77_DUMMY_MAIN
15988 #  ifdef __cplusplus
15989      extern "C"
15990 #  endif
15991    int F77_DUMMY_MAIN() { return 1; }
15992 #endif
15993 int
15994 main ()
15995 {
15996 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15997 test_array [0] = 0
15998
15999   ;
16000   return 0;
16001 }
16002 _ACEOF
16003 rm -f conftest.$ac_objext
16004 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16005   (eval $ac_compile) 2>&5
16006   ac_status=$?
16007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008   (exit $ac_status); } &&
16009          { ac_try='test -s conftest.$ac_objext'
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); }; }; then
16015   ac_lo=$ac_mid; break
16016 else
16017   echo "$as_me: failed program was:" >&5
16018 cat conftest.$ac_ext >&5
16019 ac_hi=`expr '(' $ac_mid ')' - 1`
16020                        if test $ac_mid -le $ac_hi; then
16021                          ac_lo= ac_hi=
16022                          break
16023                        fi
16024                        ac_mid=`expr 2 '*' $ac_mid`
16025 fi
16026 rm -f conftest.$ac_objext conftest.$ac_ext
16027   done
16028 else
16029   echo "$as_me: failed program was:" >&5
16030 cat conftest.$ac_ext >&5
16031 ac_lo= ac_hi=
16032 fi
16033 rm -f conftest.$ac_objext conftest.$ac_ext
16034 fi
16035 rm -f conftest.$ac_objext conftest.$ac_ext
16036 # Binary search between lo and hi bounds.
16037 while test "x$ac_lo" != "x$ac_hi"; do
16038   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16039   cat >conftest.$ac_ext <<_ACEOF
16040 #line $LINENO "configure"
16041 #include "confdefs.h"
16042 $ac_includes_default
16043 struct { char filler; long long int field; } pgac_struct;
16044 #ifdef F77_DUMMY_MAIN
16045 #  ifdef __cplusplus
16046      extern "C"
16047 #  endif
16048    int F77_DUMMY_MAIN() { return 1; }
16049 #endif
16050 int
16051 main ()
16052 {
16053 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
16054 test_array [0] = 0
16055
16056   ;
16057   return 0;
16058 }
16059 _ACEOF
16060 rm -f conftest.$ac_objext
16061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16062   (eval $ac_compile) 2>&5
16063   ac_status=$?
16064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16065   (exit $ac_status); } &&
16066          { ac_try='test -s conftest.$ac_objext'
16067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16068   (eval $ac_try) 2>&5
16069   ac_status=$?
16070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16071   (exit $ac_status); }; }; then
16072   ac_hi=$ac_mid
16073 else
16074   echo "$as_me: failed program was:" >&5
16075 cat conftest.$ac_ext >&5
16076 ac_lo=`expr '(' $ac_mid ')' + 1`
16077 fi
16078 rm -f conftest.$ac_objext conftest.$ac_ext
16079 done
16080 case $ac_lo in
16081 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
16082 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
16083 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
16084    { (exit 1); exit 1; }; } ;;
16085 esac
16086 else
16087   if test "$cross_compiling" = yes; then
16088   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16089 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16090    { (exit 1); exit 1; }; }
16091 else
16092   cat >conftest.$ac_ext <<_ACEOF
16093 #line $LINENO "configure"
16094 #include "confdefs.h"
16095 $ac_includes_default
16096 struct { char filler; long long int field; } pgac_struct;
16097 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
16098 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
16099 #include <stdio.h>
16100 #include <stdlib.h>
16101 #ifdef F77_DUMMY_MAIN
16102 #  ifdef __cplusplus
16103      extern "C"
16104 #  endif
16105    int F77_DUMMY_MAIN() { return 1; }
16106 #endif
16107 int
16108 main ()
16109 {
16110
16111   FILE *f = fopen ("conftest.val", "w");
16112   if (! f)
16113     exit (1);
16114   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
16115     {
16116       long i = longval ();
16117       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
16118         exit (1);
16119       fprintf (f, "%ld\n", i);
16120     }
16121   else
16122     {
16123       unsigned long i = ulongval ();
16124       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
16125         exit (1);
16126       fprintf (f, "%lu\n", i);
16127     }
16128   exit (ferror (f) || fclose (f) != 0);
16129
16130   ;
16131   return 0;
16132 }
16133 _ACEOF
16134 rm -f conftest$ac_exeext
16135 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16136   (eval $ac_link) 2>&5
16137   ac_status=$?
16138   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16139   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16140   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16141   (eval $ac_try) 2>&5
16142   ac_status=$?
16143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16144   (exit $ac_status); }; }; then
16145   pgac_cv_alignof_long_long_int=`cat conftest.val`
16146 else
16147   echo "$as_me: program exited with status $ac_status" >&5
16148 echo "$as_me: failed program was:" >&5
16149 cat conftest.$ac_ext >&5
16150 ( exit $ac_status )
16151 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
16152 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
16153    { (exit 1); exit 1; }; }
16154 fi
16155 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16156 fi
16157 fi
16158 rm -f conftest.val
16159 else
16160   pgac_cv_alignof_long_long_int=0
16161 fi
16162 fi
16163 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
16164 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
16165 cat >>confdefs.h <<_ACEOF
16166 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
16167 _ACEOF
16168
16169
16170 fi
16171 echo "$as_me:$LINENO: checking for double" >&5
16172 echo $ECHO_N "checking for double... $ECHO_C" >&6
16173 if test "${ac_cv_type_double+set}" = set; then
16174   echo $ECHO_N "(cached) $ECHO_C" >&6
16175 else
16176   cat >conftest.$ac_ext <<_ACEOF
16177 #line $LINENO "configure"
16178 #include "confdefs.h"
16179 $ac_includes_default
16180 #ifdef F77_DUMMY_MAIN
16181 #  ifdef __cplusplus
16182      extern "C"
16183 #  endif
16184    int F77_DUMMY_MAIN() { return 1; }
16185 #endif
16186 int
16187 main ()
16188 {
16189 if ((double *) 0)
16190   return 0;
16191 if (sizeof (double))
16192   return 0;
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext
16198 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16199   (eval $ac_compile) 2>&5
16200   ac_status=$?
16201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16202   (exit $ac_status); } &&
16203          { ac_try='test -s conftest.$ac_objext'
16204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16205   (eval $ac_try) 2>&5
16206   ac_status=$?
16207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16208   (exit $ac_status); }; }; then
16209   ac_cv_type_double=yes
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat conftest.$ac_ext >&5
16213 ac_cv_type_double=no
16214 fi
16215 rm -f conftest.$ac_objext conftest.$ac_ext
16216 fi
16217 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
16218 echo "${ECHO_T}$ac_cv_type_double" >&6
16219
16220 echo "$as_me:$LINENO: checking alignment of double" >&5
16221 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
16222 if test "${pgac_cv_alignof_double+set}" = set; then
16223   echo $ECHO_N "(cached) $ECHO_C" >&6
16224 else
16225   if test "$ac_cv_type_double" = yes; then
16226   if test "$cross_compiling" = yes; then
16227   # Depending upon the size, compute the lo and hi bounds.
16228 cat >conftest.$ac_ext <<_ACEOF
16229 #line $LINENO "configure"
16230 #include "confdefs.h"
16231 $ac_includes_default
16232 struct { char filler; double field; } pgac_struct;
16233 #ifdef F77_DUMMY_MAIN
16234 #  ifdef __cplusplus
16235      extern "C"
16236 #  endif
16237    int F77_DUMMY_MAIN() { return 1; }
16238 #endif
16239 int
16240 main ()
16241 {
16242 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
16243 test_array [0] = 0
16244
16245   ;
16246   return 0;
16247 }
16248 _ACEOF
16249 rm -f conftest.$ac_objext
16250 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16251   (eval $ac_compile) 2>&5
16252   ac_status=$?
16253   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254   (exit $ac_status); } &&
16255          { ac_try='test -s conftest.$ac_objext'
16256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16257   (eval $ac_try) 2>&5
16258   ac_status=$?
16259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16260   (exit $ac_status); }; }; then
16261   ac_lo=0 ac_mid=0
16262   while :; do
16263     cat >conftest.$ac_ext <<_ACEOF
16264 #line $LINENO "configure"
16265 #include "confdefs.h"
16266 $ac_includes_default
16267 struct { char filler; double field; } pgac_struct;
16268 #ifdef F77_DUMMY_MAIN
16269 #  ifdef __cplusplus
16270      extern "C"
16271 #  endif
16272    int F77_DUMMY_MAIN() { return 1; }
16273 #endif
16274 int
16275 main ()
16276 {
16277 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
16278 test_array [0] = 0
16279
16280   ;
16281   return 0;
16282 }
16283 _ACEOF
16284 rm -f conftest.$ac_objext
16285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16286   (eval $ac_compile) 2>&5
16287   ac_status=$?
16288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289   (exit $ac_status); } &&
16290          { ac_try='test -s conftest.$ac_objext'
16291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16292   (eval $ac_try) 2>&5
16293   ac_status=$?
16294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295   (exit $ac_status); }; }; then
16296   ac_hi=$ac_mid; break
16297 else
16298   echo "$as_me: failed program was:" >&5
16299 cat conftest.$ac_ext >&5
16300 ac_lo=`expr $ac_mid + 1`
16301                     if test $ac_lo -le $ac_mid; then
16302                       ac_lo= ac_hi=
16303                       break
16304                     fi
16305                     ac_mid=`expr 2 '*' $ac_mid + 1`
16306 fi
16307 rm -f conftest.$ac_objext conftest.$ac_ext
16308   done
16309 else
16310   echo "$as_me: failed program was:" >&5
16311 cat conftest.$ac_ext >&5
16312 cat >conftest.$ac_ext <<_ACEOF
16313 #line $LINENO "configure"
16314 #include "confdefs.h"
16315 $ac_includes_default
16316 struct { char filler; double field; } pgac_struct;
16317 #ifdef F77_DUMMY_MAIN
16318 #  ifdef __cplusplus
16319      extern "C"
16320 #  endif
16321    int F77_DUMMY_MAIN() { return 1; }
16322 #endif
16323 int
16324 main ()
16325 {
16326 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
16327 test_array [0] = 0
16328
16329   ;
16330   return 0;
16331 }
16332 _ACEOF
16333 rm -f conftest.$ac_objext
16334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16335   (eval $ac_compile) 2>&5
16336   ac_status=$?
16337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16338   (exit $ac_status); } &&
16339          { ac_try='test -s conftest.$ac_objext'
16340   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16341   (eval $ac_try) 2>&5
16342   ac_status=$?
16343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16344   (exit $ac_status); }; }; then
16345   ac_hi=-1 ac_mid=-1
16346   while :; do
16347     cat >conftest.$ac_ext <<_ACEOF
16348 #line $LINENO "configure"
16349 #include "confdefs.h"
16350 $ac_includes_default
16351 struct { char filler; double field; } pgac_struct;
16352 #ifdef F77_DUMMY_MAIN
16353 #  ifdef __cplusplus
16354      extern "C"
16355 #  endif
16356    int F77_DUMMY_MAIN() { return 1; }
16357 #endif
16358 int
16359 main ()
16360 {
16361 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
16362 test_array [0] = 0
16363
16364   ;
16365   return 0;
16366 }
16367 _ACEOF
16368 rm -f conftest.$ac_objext
16369 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16370   (eval $ac_compile) 2>&5
16371   ac_status=$?
16372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16373   (exit $ac_status); } &&
16374          { ac_try='test -s conftest.$ac_objext'
16375   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16376   (eval $ac_try) 2>&5
16377   ac_status=$?
16378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16379   (exit $ac_status); }; }; then
16380   ac_lo=$ac_mid; break
16381 else
16382   echo "$as_me: failed program was:" >&5
16383 cat conftest.$ac_ext >&5
16384 ac_hi=`expr '(' $ac_mid ')' - 1`
16385                        if test $ac_mid -le $ac_hi; then
16386                          ac_lo= ac_hi=
16387                          break
16388                        fi
16389                        ac_mid=`expr 2 '*' $ac_mid`
16390 fi
16391 rm -f conftest.$ac_objext conftest.$ac_ext
16392   done
16393 else
16394   echo "$as_me: failed program was:" >&5
16395 cat conftest.$ac_ext >&5
16396 ac_lo= ac_hi=
16397 fi
16398 rm -f conftest.$ac_objext conftest.$ac_ext
16399 fi
16400 rm -f conftest.$ac_objext conftest.$ac_ext
16401 # Binary search between lo and hi bounds.
16402 while test "x$ac_lo" != "x$ac_hi"; do
16403   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16404   cat >conftest.$ac_ext <<_ACEOF
16405 #line $LINENO "configure"
16406 #include "confdefs.h"
16407 $ac_includes_default
16408 struct { char filler; double field; } pgac_struct;
16409 #ifdef F77_DUMMY_MAIN
16410 #  ifdef __cplusplus
16411      extern "C"
16412 #  endif
16413    int F77_DUMMY_MAIN() { return 1; }
16414 #endif
16415 int
16416 main ()
16417 {
16418 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
16419 test_array [0] = 0
16420
16421   ;
16422   return 0;
16423 }
16424 _ACEOF
16425 rm -f conftest.$ac_objext
16426 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16427   (eval $ac_compile) 2>&5
16428   ac_status=$?
16429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430   (exit $ac_status); } &&
16431          { ac_try='test -s conftest.$ac_objext'
16432   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16433   (eval $ac_try) 2>&5
16434   ac_status=$?
16435   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16436   (exit $ac_status); }; }; then
16437   ac_hi=$ac_mid
16438 else
16439   echo "$as_me: failed program was:" >&5
16440 cat conftest.$ac_ext >&5
16441 ac_lo=`expr '(' $ac_mid ')' + 1`
16442 fi
16443 rm -f conftest.$ac_objext conftest.$ac_ext
16444 done
16445 case $ac_lo in
16446 ?*) pgac_cv_alignof_double=$ac_lo;;
16447 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
16448 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
16449    { (exit 1); exit 1; }; } ;;
16450 esac
16451 else
16452   if test "$cross_compiling" = yes; then
16453   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
16454 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16455    { (exit 1); exit 1; }; }
16456 else
16457   cat >conftest.$ac_ext <<_ACEOF
16458 #line $LINENO "configure"
16459 #include "confdefs.h"
16460 $ac_includes_default
16461 struct { char filler; double field; } pgac_struct;
16462 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
16463 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
16464 #include <stdio.h>
16465 #include <stdlib.h>
16466 #ifdef F77_DUMMY_MAIN
16467 #  ifdef __cplusplus
16468      extern "C"
16469 #  endif
16470    int F77_DUMMY_MAIN() { return 1; }
16471 #endif
16472 int
16473 main ()
16474 {
16475
16476   FILE *f = fopen ("conftest.val", "w");
16477   if (! f)
16478     exit (1);
16479   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
16480     {
16481       long i = longval ();
16482       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
16483         exit (1);
16484       fprintf (f, "%ld\n", i);
16485     }
16486   else
16487     {
16488       unsigned long i = ulongval ();
16489       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
16490         exit (1);
16491       fprintf (f, "%lu\n", i);
16492     }
16493   exit (ferror (f) || fclose (f) != 0);
16494
16495   ;
16496   return 0;
16497 }
16498 _ACEOF
16499 rm -f conftest$ac_exeext
16500 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16501   (eval $ac_link) 2>&5
16502   ac_status=$?
16503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16504   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16506   (eval $ac_try) 2>&5
16507   ac_status=$?
16508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16509   (exit $ac_status); }; }; then
16510   pgac_cv_alignof_double=`cat conftest.val`
16511 else
16512   echo "$as_me: program exited with status $ac_status" >&5
16513 echo "$as_me: failed program was:" >&5
16514 cat conftest.$ac_ext >&5
16515 ( exit $ac_status )
16516 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
16517 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
16518    { (exit 1); exit 1; }; }
16519 fi
16520 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16521 fi
16522 fi
16523 rm -f conftest.val
16524 else
16525   pgac_cv_alignof_double=0
16526 fi
16527 fi
16528 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
16529 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
16530 cat >>confdefs.h <<_ACEOF
16531 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
16532 _ACEOF
16533
16534
16535
16536 # Compute maximum alignment of any basic type.
16537 # We assume long's alignment is at least as strong as char, short, or int;
16538 # but we must check long long (if it exists) and double.
16539
16540 MAX_ALIGNOF=$pgac_cv_alignof_long
16541 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
16542   MAX_ALIGNOF=$pgac_cv_alignof_double
16543 fi
16544 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
16545   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
16546 fi
16547
16548 cat >>confdefs.h <<_ACEOF
16549 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16550 _ACEOF
16551
16552
16553
16554 # Some platforms predefine the types int8, int16, etc.  Only check
16555 # a (hopefully) representative subset.
16556 echo "$as_me:$LINENO: checking for int8" >&5
16557 echo $ECHO_N "checking for int8... $ECHO_C" >&6
16558 if test "${ac_cv_type_int8+set}" = set; then
16559   echo $ECHO_N "(cached) $ECHO_C" >&6
16560 else
16561   cat >conftest.$ac_ext <<_ACEOF
16562 #line $LINENO "configure"
16563 #include "confdefs.h"
16564 #include <stdio.h>
16565 #ifdef HAVE_SUPPORTDEFS_H
16566 #include <SupportDefs.h>
16567 #endif
16568
16569 #ifdef F77_DUMMY_MAIN
16570 #  ifdef __cplusplus
16571      extern "C"
16572 #  endif
16573    int F77_DUMMY_MAIN() { return 1; }
16574 #endif
16575 int
16576 main ()
16577 {
16578 if ((int8 *) 0)
16579   return 0;
16580 if (sizeof (int8))
16581   return 0;
16582   ;
16583   return 0;
16584 }
16585 _ACEOF
16586 rm -f conftest.$ac_objext
16587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16588   (eval $ac_compile) 2>&5
16589   ac_status=$?
16590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16591   (exit $ac_status); } &&
16592          { ac_try='test -s conftest.$ac_objext'
16593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16594   (eval $ac_try) 2>&5
16595   ac_status=$?
16596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16597   (exit $ac_status); }; }; then
16598   ac_cv_type_int8=yes
16599 else
16600   echo "$as_me: failed program was:" >&5
16601 cat conftest.$ac_ext >&5
16602 ac_cv_type_int8=no
16603 fi
16604 rm -f conftest.$ac_objext conftest.$ac_ext
16605 fi
16606 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
16607 echo "${ECHO_T}$ac_cv_type_int8" >&6
16608 if test $ac_cv_type_int8 = yes; then
16609
16610 cat >>confdefs.h <<_ACEOF
16611 #define HAVE_INT8 1
16612 _ACEOF
16613
16614
16615 fi
16616 echo "$as_me:$LINENO: checking for uint8" >&5
16617 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
16618 if test "${ac_cv_type_uint8+set}" = set; then
16619   echo $ECHO_N "(cached) $ECHO_C" >&6
16620 else
16621   cat >conftest.$ac_ext <<_ACEOF
16622 #line $LINENO "configure"
16623 #include "confdefs.h"
16624 #include <stdio.h>
16625 #ifdef HAVE_SUPPORTDEFS_H
16626 #include <SupportDefs.h>
16627 #endif
16628
16629 #ifdef F77_DUMMY_MAIN
16630 #  ifdef __cplusplus
16631      extern "C"
16632 #  endif
16633    int F77_DUMMY_MAIN() { return 1; }
16634 #endif
16635 int
16636 main ()
16637 {
16638 if ((uint8 *) 0)
16639   return 0;
16640 if (sizeof (uint8))
16641   return 0;
16642   ;
16643   return 0;
16644 }
16645 _ACEOF
16646 rm -f conftest.$ac_objext
16647 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16648   (eval $ac_compile) 2>&5
16649   ac_status=$?
16650   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16651   (exit $ac_status); } &&
16652          { ac_try='test -s conftest.$ac_objext'
16653   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16654   (eval $ac_try) 2>&5
16655   ac_status=$?
16656   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16657   (exit $ac_status); }; }; then
16658   ac_cv_type_uint8=yes
16659 else
16660   echo "$as_me: failed program was:" >&5
16661 cat conftest.$ac_ext >&5
16662 ac_cv_type_uint8=no
16663 fi
16664 rm -f conftest.$ac_objext conftest.$ac_ext
16665 fi
16666 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
16667 echo "${ECHO_T}$ac_cv_type_uint8" >&6
16668 if test $ac_cv_type_uint8 = yes; then
16669
16670 cat >>confdefs.h <<_ACEOF
16671 #define HAVE_UINT8 1
16672 _ACEOF
16673
16674
16675 fi
16676 echo "$as_me:$LINENO: checking for int64" >&5
16677 echo $ECHO_N "checking for int64... $ECHO_C" >&6
16678 if test "${ac_cv_type_int64+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681   cat >conftest.$ac_ext <<_ACEOF
16682 #line $LINENO "configure"
16683 #include "confdefs.h"
16684 #include <stdio.h>
16685 #ifdef HAVE_SUPPORTDEFS_H
16686 #include <SupportDefs.h>
16687 #endif
16688
16689 #ifdef F77_DUMMY_MAIN
16690 #  ifdef __cplusplus
16691      extern "C"
16692 #  endif
16693    int F77_DUMMY_MAIN() { return 1; }
16694 #endif
16695 int
16696 main ()
16697 {
16698 if ((int64 *) 0)
16699   return 0;
16700 if (sizeof (int64))
16701   return 0;
16702   ;
16703   return 0;
16704 }
16705 _ACEOF
16706 rm -f conftest.$ac_objext
16707 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16708   (eval $ac_compile) 2>&5
16709   ac_status=$?
16710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16711   (exit $ac_status); } &&
16712          { ac_try='test -s conftest.$ac_objext'
16713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16714   (eval $ac_try) 2>&5
16715   ac_status=$?
16716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16717   (exit $ac_status); }; }; then
16718   ac_cv_type_int64=yes
16719 else
16720   echo "$as_me: failed program was:" >&5
16721 cat conftest.$ac_ext >&5
16722 ac_cv_type_int64=no
16723 fi
16724 rm -f conftest.$ac_objext conftest.$ac_ext
16725 fi
16726 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
16727 echo "${ECHO_T}$ac_cv_type_int64" >&6
16728 if test $ac_cv_type_int64 = yes; then
16729
16730 cat >>confdefs.h <<_ACEOF
16731 #define HAVE_INT64 1
16732 _ACEOF
16733
16734
16735 fi
16736 echo "$as_me:$LINENO: checking for uint64" >&5
16737 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
16738 if test "${ac_cv_type_uint64+set}" = set; then
16739   echo $ECHO_N "(cached) $ECHO_C" >&6
16740 else
16741   cat >conftest.$ac_ext <<_ACEOF
16742 #line $LINENO "configure"
16743 #include "confdefs.h"
16744 #include <stdio.h>
16745 #ifdef HAVE_SUPPORTDEFS_H
16746 #include <SupportDefs.h>
16747 #endif
16748
16749 #ifdef F77_DUMMY_MAIN
16750 #  ifdef __cplusplus
16751      extern "C"
16752 #  endif
16753    int F77_DUMMY_MAIN() { return 1; }
16754 #endif
16755 int
16756 main ()
16757 {
16758 if ((uint64 *) 0)
16759   return 0;
16760 if (sizeof (uint64))
16761   return 0;
16762   ;
16763   return 0;
16764 }
16765 _ACEOF
16766 rm -f conftest.$ac_objext
16767 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16768   (eval $ac_compile) 2>&5
16769   ac_status=$?
16770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16771   (exit $ac_status); } &&
16772          { ac_try='test -s conftest.$ac_objext'
16773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16774   (eval $ac_try) 2>&5
16775   ac_status=$?
16776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16777   (exit $ac_status); }; }; then
16778   ac_cv_type_uint64=yes
16779 else
16780   echo "$as_me: failed program was:" >&5
16781 cat conftest.$ac_ext >&5
16782 ac_cv_type_uint64=no
16783 fi
16784 rm -f conftest.$ac_objext conftest.$ac_ext
16785 fi
16786 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
16787 echo "${ECHO_T}$ac_cv_type_uint64" >&6
16788 if test $ac_cv_type_uint64 = yes; then
16789
16790 cat >>confdefs.h <<_ACEOF
16791 #define HAVE_UINT64 1
16792 _ACEOF
16793
16794
16795 fi
16796
16797
16798 # We also check for sig_atomic_t, which *should* be defined per ANSI
16799 # C, but is missing on some old platforms.
16800 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
16801 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
16802 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
16803   echo $ECHO_N "(cached) $ECHO_C" >&6
16804 else
16805   cat >conftest.$ac_ext <<_ACEOF
16806 #line $LINENO "configure"
16807 #include "confdefs.h"
16808 #include <signal.h>
16809
16810 #ifdef F77_DUMMY_MAIN
16811 #  ifdef __cplusplus
16812      extern "C"
16813 #  endif
16814    int F77_DUMMY_MAIN() { return 1; }
16815 #endif
16816 int
16817 main ()
16818 {
16819 if ((sig_atomic_t *) 0)
16820   return 0;
16821 if (sizeof (sig_atomic_t))
16822   return 0;
16823   ;
16824   return 0;
16825 }
16826 _ACEOF
16827 rm -f conftest.$ac_objext
16828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16829   (eval $ac_compile) 2>&5
16830   ac_status=$?
16831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832   (exit $ac_status); } &&
16833          { ac_try='test -s conftest.$ac_objext'
16834   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16835   (eval $ac_try) 2>&5
16836   ac_status=$?
16837   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16838   (exit $ac_status); }; }; then
16839   ac_cv_type_sig_atomic_t=yes
16840 else
16841   echo "$as_me: failed program was:" >&5
16842 cat conftest.$ac_ext >&5
16843 ac_cv_type_sig_atomic_t=no
16844 fi
16845 rm -f conftest.$ac_objext conftest.$ac_ext
16846 fi
16847 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
16848 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
16849 if test $ac_cv_type_sig_atomic_t = yes; then
16850
16851 cat >>confdefs.h <<_ACEOF
16852 #define HAVE_SIG_ATOMIC_T 1
16853 _ACEOF
16854
16855
16856 fi
16857
16858
16859
16860 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
16861 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
16862 if test "${pgac_cv_func_posix_signals+set}" = set; then
16863   echo $ECHO_N "(cached) $ECHO_C" >&6
16864 else
16865   cat >conftest.$ac_ext <<_ACEOF
16866 #line $LINENO "configure"
16867 #include "confdefs.h"
16868 #include <signal.h>
16869
16870 #ifdef F77_DUMMY_MAIN
16871 #  ifdef __cplusplus
16872      extern "C"
16873 #  endif
16874    int F77_DUMMY_MAIN() { return 1; }
16875 #endif
16876 int
16877 main ()
16878 {
16879 struct sigaction act, oact;
16880 sigemptyset(&act.sa_mask);
16881 act.sa_flags = SA_RESTART;
16882 sigaction(0, &act, &oact);
16883   ;
16884   return 0;
16885 }
16886 _ACEOF
16887 rm -f conftest.$ac_objext conftest$ac_exeext
16888 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16889   (eval $ac_link) 2>&5
16890   ac_status=$?
16891   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16892   (exit $ac_status); } &&
16893          { ac_try='test -s conftest$ac_exeext'
16894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16895   (eval $ac_try) 2>&5
16896   ac_status=$?
16897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16898   (exit $ac_status); }; }; then
16899   pgac_cv_func_posix_signals=yes
16900 else
16901   echo "$as_me: failed program was:" >&5
16902 cat conftest.$ac_ext >&5
16903 pgac_cv_func_posix_signals=no
16904 fi
16905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16906 fi
16907 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
16908 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
16909 if test x"$pgac_cv_func_posix_signals" = xyes ; then
16910
16911 cat >>confdefs.h <<\_ACEOF
16912 #define HAVE_POSIX_SIGNALS
16913 _ACEOF
16914
16915 fi
16916 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
16917
16918 if test $ac_cv_func_fseeko = yes; then
16919 # Check whether --enable-largefile or --disable-largefile was given.
16920 if test "${enable_largefile+set}" = set; then
16921   enableval="$enable_largefile"
16922
16923 fi;
16924 if test "$enable_largefile" != no; then
16925
16926   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
16927 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
16928 if test "${ac_cv_sys_largefile_CC+set}" = set; then
16929   echo $ECHO_N "(cached) $ECHO_C" >&6
16930 else
16931   ac_cv_sys_largefile_CC=no
16932      if test "$GCC" != yes; then
16933        ac_save_CC=$CC
16934        while :; do
16935          # IRIX 6.2 and later do not support large files by default,
16936          # so use the C compiler's -n32 option if that helps.
16937          cat >conftest.$ac_ext <<_ACEOF
16938 #line $LINENO "configure"
16939 #include "confdefs.h"
16940 #include <sys/types.h>
16941  /* Check that off_t can represent 2**63 - 1 correctly.
16942     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16943     since some C++ compilers masquerading as C compilers
16944     incorrectly reject 9223372036854775807.  */
16945 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16946   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16947                        && LARGE_OFF_T % 2147483647 == 1)
16948                       ? 1 : -1];
16949 #ifdef F77_DUMMY_MAIN
16950 #  ifdef __cplusplus
16951      extern "C"
16952 #  endif
16953    int F77_DUMMY_MAIN() { return 1; }
16954 #endif
16955 int
16956 main ()
16957 {
16958
16959   ;
16960   return 0;
16961 }
16962 _ACEOF
16963          rm -f conftest.$ac_objext
16964 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16965   (eval $ac_compile) 2>&5
16966   ac_status=$?
16967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16968   (exit $ac_status); } &&
16969          { ac_try='test -s conftest.$ac_objext'
16970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16971   (eval $ac_try) 2>&5
16972   ac_status=$?
16973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16974   (exit $ac_status); }; }; then
16975   break
16976 else
16977   echo "$as_me: failed program was:" >&5
16978 cat conftest.$ac_ext >&5
16979 fi
16980 rm -f conftest.$ac_objext
16981          CC="$CC -n32"
16982          rm -f conftest.$ac_objext
16983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16984   (eval $ac_compile) 2>&5
16985   ac_status=$?
16986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16987   (exit $ac_status); } &&
16988          { ac_try='test -s conftest.$ac_objext'
16989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16990   (eval $ac_try) 2>&5
16991   ac_status=$?
16992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993   (exit $ac_status); }; }; then
16994   ac_cv_sys_largefile_CC=' -n32'; break
16995 else
16996   echo "$as_me: failed program was:" >&5
16997 cat conftest.$ac_ext >&5
16998 fi
16999 rm -f conftest.$ac_objext
17000          break
17001        done
17002        CC=$ac_save_CC
17003        rm -f conftest.$ac_ext
17004     fi
17005 fi
17006 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
17007 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
17008   if test "$ac_cv_sys_largefile_CC" != no; then
17009     CC=$CC$ac_cv_sys_largefile_CC
17010   fi
17011
17012   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
17013 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
17014 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
17015   echo $ECHO_N "(cached) $ECHO_C" >&6
17016 else
17017   while :; do
17018   ac_cv_sys_file_offset_bits=no
17019   cat >conftest.$ac_ext <<_ACEOF
17020 #line $LINENO "configure"
17021 #include "confdefs.h"
17022 #include <sys/types.h>
17023  /* Check that off_t can represent 2**63 - 1 correctly.
17024     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17025     since some C++ compilers masquerading as C compilers
17026     incorrectly reject 9223372036854775807.  */
17027 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17028   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17029                        && LARGE_OFF_T % 2147483647 == 1)
17030                       ? 1 : -1];
17031 #ifdef F77_DUMMY_MAIN
17032 #  ifdef __cplusplus
17033      extern "C"
17034 #  endif
17035    int F77_DUMMY_MAIN() { return 1; }
17036 #endif
17037 int
17038 main ()
17039 {
17040
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>&5
17048   ac_status=$?
17049   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17050   (exit $ac_status); } &&
17051          { ac_try='test -s conftest.$ac_objext'
17052   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17053   (eval $ac_try) 2>&5
17054   ac_status=$?
17055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17056   (exit $ac_status); }; }; then
17057   break
17058 else
17059   echo "$as_me: failed program was:" >&5
17060 cat conftest.$ac_ext >&5
17061 fi
17062 rm -f conftest.$ac_objext conftest.$ac_ext
17063   cat >conftest.$ac_ext <<_ACEOF
17064 #line $LINENO "configure"
17065 #include "confdefs.h"
17066 #define _FILE_OFFSET_BITS 64
17067 #include <sys/types.h>
17068  /* Check that off_t can represent 2**63 - 1 correctly.
17069     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17070     since some C++ compilers masquerading as C compilers
17071     incorrectly reject 9223372036854775807.  */
17072 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17073   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17074                        && LARGE_OFF_T % 2147483647 == 1)
17075                       ? 1 : -1];
17076 #ifdef F77_DUMMY_MAIN
17077 #  ifdef __cplusplus
17078      extern "C"
17079 #  endif
17080    int F77_DUMMY_MAIN() { return 1; }
17081 #endif
17082 int
17083 main ()
17084 {
17085
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 rm -f conftest.$ac_objext
17091 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17092   (eval $ac_compile) 2>&5
17093   ac_status=$?
17094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17095   (exit $ac_status); } &&
17096          { ac_try='test -s conftest.$ac_objext'
17097   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17098   (eval $ac_try) 2>&5
17099   ac_status=$?
17100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17101   (exit $ac_status); }; }; then
17102   ac_cv_sys_file_offset_bits=64; break
17103 else
17104   echo "$as_me: failed program was:" >&5
17105 cat conftest.$ac_ext >&5
17106 fi
17107 rm -f conftest.$ac_objext conftest.$ac_ext
17108   break
17109 done
17110 fi
17111 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
17112 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
17113 if test "$ac_cv_sys_file_offset_bits" != no; then
17114
17115 cat >>confdefs.h <<_ACEOF
17116 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
17117 _ACEOF
17118
17119 fi
17120 rm -f conftest*
17121   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
17122 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
17123 if test "${ac_cv_sys_large_files+set}" = set; then
17124   echo $ECHO_N "(cached) $ECHO_C" >&6
17125 else
17126   while :; do
17127   ac_cv_sys_large_files=no
17128   cat >conftest.$ac_ext <<_ACEOF
17129 #line $LINENO "configure"
17130 #include "confdefs.h"
17131 #include <sys/types.h>
17132  /* Check that off_t can represent 2**63 - 1 correctly.
17133     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17134     since some C++ compilers masquerading as C compilers
17135     incorrectly reject 9223372036854775807.  */
17136 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17137   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17138                        && LARGE_OFF_T % 2147483647 == 1)
17139                       ? 1 : -1];
17140 #ifdef F77_DUMMY_MAIN
17141 #  ifdef __cplusplus
17142      extern "C"
17143 #  endif
17144    int F77_DUMMY_MAIN() { return 1; }
17145 #endif
17146 int
17147 main ()
17148 {
17149
17150   ;
17151   return 0;
17152 }
17153 _ACEOF
17154 rm -f conftest.$ac_objext
17155 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17156   (eval $ac_compile) 2>&5
17157   ac_status=$?
17158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17159   (exit $ac_status); } &&
17160          { ac_try='test -s conftest.$ac_objext'
17161   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17162   (eval $ac_try) 2>&5
17163   ac_status=$?
17164   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17165   (exit $ac_status); }; }; then
17166   break
17167 else
17168   echo "$as_me: failed program was:" >&5
17169 cat conftest.$ac_ext >&5
17170 fi
17171 rm -f conftest.$ac_objext conftest.$ac_ext
17172   cat >conftest.$ac_ext <<_ACEOF
17173 #line $LINENO "configure"
17174 #include "confdefs.h"
17175 #define _LARGE_FILES 1
17176 #include <sys/types.h>
17177  /* Check that off_t can represent 2**63 - 1 correctly.
17178     We can't simply define LARGE_OFF_T to be 9223372036854775807,
17179     since some C++ compilers masquerading as C compilers
17180     incorrectly reject 9223372036854775807.  */
17181 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
17182   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
17183                        && LARGE_OFF_T % 2147483647 == 1)
17184                       ? 1 : -1];
17185 #ifdef F77_DUMMY_MAIN
17186 #  ifdef __cplusplus
17187      extern "C"
17188 #  endif
17189    int F77_DUMMY_MAIN() { return 1; }
17190 #endif
17191 int
17192 main ()
17193 {
17194
17195   ;
17196   return 0;
17197 }
17198 _ACEOF
17199 rm -f conftest.$ac_objext
17200 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17201   (eval $ac_compile) 2>&5
17202   ac_status=$?
17203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204   (exit $ac_status); } &&
17205          { ac_try='test -s conftest.$ac_objext'
17206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17207   (eval $ac_try) 2>&5
17208   ac_status=$?
17209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17210   (exit $ac_status); }; }; then
17211   ac_cv_sys_large_files=1; break
17212 else
17213   echo "$as_me: failed program was:" >&5
17214 cat conftest.$ac_ext >&5
17215 fi
17216 rm -f conftest.$ac_objext conftest.$ac_ext
17217   break
17218 done
17219 fi
17220 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
17221 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
17222 if test "$ac_cv_sys_large_files" != no; then
17223
17224 cat >>confdefs.h <<_ACEOF
17225 #define _LARGE_FILES $ac_cv_sys_large_files
17226 _ACEOF
17227
17228 fi
17229 rm -f conftest*
17230 fi
17231
17232 fi
17233
17234
17235 # Select semaphore implementation type.
17236 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17237
17238 cat >>confdefs.h <<\_ACEOF
17239 #define USE_NAMED_POSIX_SEMAPHORES 1
17240 _ACEOF
17241
17242   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17243 else
17244   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17245
17246 cat >>confdefs.h <<\_ACEOF
17247 #define USE_UNNAMED_POSIX_SEMAPHORES 1
17248 _ACEOF
17249
17250     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17251   else
17252
17253 cat >>confdefs.h <<\_ACEOF
17254 #define USE_SYSV_SEMAPHORES 1
17255 _ACEOF
17256
17257     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17258   fi
17259 fi
17260
17261
17262 # Select shared-memory implementation type.
17263
17264 cat >>confdefs.h <<\_ACEOF
17265 #define USE_SYSV_SHARED_MEMORY 1
17266 _ACEOF
17267
17268 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17269
17270
17271 if test "$enable_nls" = yes ; then
17272
17273   echo "$as_me:$LINENO: checking for library containing gettext" >&5
17274 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
17275 if test "${ac_cv_search_gettext+set}" = set; then
17276   echo $ECHO_N "(cached) $ECHO_C" >&6
17277 else
17278   ac_func_search_save_LIBS=$LIBS
17279 ac_cv_search_gettext=no
17280 cat >conftest.$ac_ext <<_ACEOF
17281 #line $LINENO "configure"
17282 #include "confdefs.h"
17283
17284 /* Override any gcc2 internal prototype to avoid an error.  */
17285 #ifdef __cplusplus
17286 extern "C"
17287 #endif
17288 /* We use char because int might match the return type of a gcc2
17289    builtin and then its argument prototype would still apply.  */
17290 char gettext ();
17291 #ifdef F77_DUMMY_MAIN
17292 #  ifdef __cplusplus
17293      extern "C"
17294 #  endif
17295    int F77_DUMMY_MAIN() { return 1; }
17296 #endif
17297 int
17298 main ()
17299 {
17300 gettext ();
17301   ;
17302   return 0;
17303 }
17304 _ACEOF
17305 rm -f conftest.$ac_objext conftest$ac_exeext
17306 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17307   (eval $ac_link) 2>&5
17308   ac_status=$?
17309   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17310   (exit $ac_status); } &&
17311          { ac_try='test -s conftest$ac_exeext'
17312   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17313   (eval $ac_try) 2>&5
17314   ac_status=$?
17315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17316   (exit $ac_status); }; }; then
17317   ac_cv_search_gettext="none required"
17318 else
17319   echo "$as_me: failed program was:" >&5
17320 cat conftest.$ac_ext >&5
17321 fi
17322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17323 if test "$ac_cv_search_gettext" = no; then
17324   for ac_lib in intl; do
17325     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17326     cat >conftest.$ac_ext <<_ACEOF
17327 #line $LINENO "configure"
17328 #include "confdefs.h"
17329
17330 /* Override any gcc2 internal prototype to avoid an error.  */
17331 #ifdef __cplusplus
17332 extern "C"
17333 #endif
17334 /* We use char because int might match the return type of a gcc2
17335    builtin and then its argument prototype would still apply.  */
17336 char gettext ();
17337 #ifdef F77_DUMMY_MAIN
17338 #  ifdef __cplusplus
17339      extern "C"
17340 #  endif
17341    int F77_DUMMY_MAIN() { return 1; }
17342 #endif
17343 int
17344 main ()
17345 {
17346 gettext ();
17347   ;
17348   return 0;
17349 }
17350 _ACEOF
17351 rm -f conftest.$ac_objext conftest$ac_exeext
17352 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17353   (eval $ac_link) 2>&5
17354   ac_status=$?
17355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17356   (exit $ac_status); } &&
17357          { ac_try='test -s conftest$ac_exeext'
17358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17359   (eval $ac_try) 2>&5
17360   ac_status=$?
17361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17362   (exit $ac_status); }; }; then
17363   ac_cv_search_gettext="-l$ac_lib"
17364 break
17365 else
17366   echo "$as_me: failed program was:" >&5
17367 cat conftest.$ac_ext >&5
17368 fi
17369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17370   done
17371 fi
17372 LIBS=$ac_func_search_save_LIBS
17373 fi
17374 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
17375 echo "${ECHO_T}$ac_cv_search_gettext" >&6
17376 if test "$ac_cv_search_gettext" != no; then
17377   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
17378
17379 else
17380   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
17381 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
17382    { (exit 1); exit 1; }; }
17383 fi
17384
17385   if test "${ac_cv_header_libintl_h+set}" = set; then
17386   echo "$as_me:$LINENO: checking for libintl.h" >&5
17387 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
17388 if test "${ac_cv_header_libintl_h+set}" = set; then
17389   echo $ECHO_N "(cached) $ECHO_C" >&6
17390 fi
17391 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
17392 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
17393 else
17394   # Is the header compilable?
17395 echo "$as_me:$LINENO: checking libintl.h usability" >&5
17396 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
17397 cat >conftest.$ac_ext <<_ACEOF
17398 #line $LINENO "configure"
17399 #include "confdefs.h"
17400 $ac_includes_default
17401 #include <libintl.h>
17402 _ACEOF
17403 rm -f conftest.$ac_objext
17404 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17405   (eval $ac_compile) 2>&5
17406   ac_status=$?
17407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17408   (exit $ac_status); } &&
17409          { ac_try='test -s conftest.$ac_objext'
17410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411   (eval $ac_try) 2>&5
17412   ac_status=$?
17413   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414   (exit $ac_status); }; }; then
17415   ac_header_compiler=yes
17416 else
17417   echo "$as_me: failed program was:" >&5
17418 cat conftest.$ac_ext >&5
17419 ac_header_compiler=no
17420 fi
17421 rm -f conftest.$ac_objext conftest.$ac_ext
17422 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17423 echo "${ECHO_T}$ac_header_compiler" >&6
17424
17425 # Is the header present?
17426 echo "$as_me:$LINENO: checking libintl.h presence" >&5
17427 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
17428 cat >conftest.$ac_ext <<_ACEOF
17429 #line $LINENO "configure"
17430 #include "confdefs.h"
17431 #include <libintl.h>
17432 _ACEOF
17433 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17434   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17435   ac_status=$?
17436   egrep -v '^ *\+' conftest.er1 >conftest.err
17437   rm -f conftest.er1
17438   cat conftest.err >&5
17439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17440   (exit $ac_status); } >/dev/null; then
17441   if test -s conftest.err; then
17442     ac_cpp_err=$ac_c_preproc_warn_flag
17443   else
17444     ac_cpp_err=
17445   fi
17446 else
17447   ac_cpp_err=yes
17448 fi
17449 if test -z "$ac_cpp_err"; then
17450   ac_header_preproc=yes
17451 else
17452   echo "$as_me: failed program was:" >&5
17453   cat conftest.$ac_ext >&5
17454   ac_header_preproc=no
17455 fi
17456 rm -f conftest.err conftest.$ac_ext
17457 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17458 echo "${ECHO_T}$ac_header_preproc" >&6
17459
17460 # So?  What about this header?
17461 case $ac_header_compiler:$ac_header_preproc in
17462   yes:no )
17463     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
17464 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17465     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
17466 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
17467   no:yes )
17468     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
17469 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
17470     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
17471 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
17472     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
17473 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
17474 esac
17475 echo "$as_me:$LINENO: checking for libintl.h" >&5
17476 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
17477 if test "${ac_cv_header_libintl_h+set}" = set; then
17478   echo $ECHO_N "(cached) $ECHO_C" >&6
17479 else
17480   ac_cv_header_libintl_h=$ac_header_preproc
17481 fi
17482 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
17483 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
17484
17485 fi
17486 if test $ac_cv_header_libintl_h = yes; then
17487   :
17488 else
17489   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
17490 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
17491    { (exit 1); exit 1; }; }
17492 fi
17493
17494
17495   for ac_prog in msgfmt
17496 do
17497   # Extract the first word of "$ac_prog", so it can be a program name with args.
17498 set dummy $ac_prog; ac_word=$2
17499 echo "$as_me:$LINENO: checking for $ac_word" >&5
17500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17501 if test "${ac_cv_prog_MSGFMT+set}" = set; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504   if test -n "$MSGFMT"; then
17505   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
17506 else
17507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17508 for as_dir in $PATH
17509 do
17510   IFS=$as_save_IFS
17511   test -z "$as_dir" && as_dir=.
17512   for ac_exec_ext in '' $ac_executable_extensions; do
17513   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17514     ac_cv_prog_MSGFMT="$ac_prog"
17515     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17516     break 2
17517   fi
17518 done
17519 done
17520
17521 fi
17522 fi
17523 MSGFMT=$ac_cv_prog_MSGFMT
17524 if test -n "$MSGFMT"; then
17525   echo "$as_me:$LINENO: result: $MSGFMT" >&5
17526 echo "${ECHO_T}$MSGFMT" >&6
17527 else
17528   echo "$as_me:$LINENO: result: no" >&5
17529 echo "${ECHO_T}no" >&6
17530 fi
17531
17532   test -n "$MSGFMT" && break
17533 done
17534
17535   if test -z "$MSGFMT"; then
17536     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
17537 echo "$as_me: error: msgfmt is required for NLS" >&2;}
17538    { (exit 1); exit 1; }; }
17539   fi
17540   for ac_prog in msgmerge
17541 do
17542   # Extract the first word of "$ac_prog", so it can be a program name with args.
17543 set dummy $ac_prog; ac_word=$2
17544 echo "$as_me:$LINENO: checking for $ac_word" >&5
17545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17546 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
17547   echo $ECHO_N "(cached) $ECHO_C" >&6
17548 else
17549   if test -n "$MSGMERGE"; then
17550   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
17551 else
17552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17553 for as_dir in $PATH
17554 do
17555   IFS=$as_save_IFS
17556   test -z "$as_dir" && as_dir=.
17557   for ac_exec_ext in '' $ac_executable_extensions; do
17558   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17559     ac_cv_prog_MSGMERGE="$ac_prog"
17560     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17561     break 2
17562   fi
17563 done
17564 done
17565
17566 fi
17567 fi
17568 MSGMERGE=$ac_cv_prog_MSGMERGE
17569 if test -n "$MSGMERGE"; then
17570   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
17571 echo "${ECHO_T}$MSGMERGE" >&6
17572 else
17573   echo "$as_me:$LINENO: result: no" >&5
17574 echo "${ECHO_T}no" >&6
17575 fi
17576
17577   test -n "$MSGMERGE" && break
17578 done
17579
17580   for ac_prog in xgettext
17581 do
17582   # Extract the first word of "$ac_prog", so it can be a program name with args.
17583 set dummy $ac_prog; ac_word=$2
17584 echo "$as_me:$LINENO: checking for $ac_word" >&5
17585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17586 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
17587   echo $ECHO_N "(cached) $ECHO_C" >&6
17588 else
17589   if test -n "$XGETTEXT"; then
17590   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
17591 else
17592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17593 for as_dir in $PATH
17594 do
17595   IFS=$as_save_IFS
17596   test -z "$as_dir" && as_dir=.
17597   for ac_exec_ext in '' $ac_executable_extensions; do
17598   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17599     ac_cv_prog_XGETTEXT="$ac_prog"
17600     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17601     break 2
17602   fi
17603 done
17604 done
17605
17606 fi
17607 fi
17608 XGETTEXT=$ac_cv_prog_XGETTEXT
17609 if test -n "$XGETTEXT"; then
17610   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
17611 echo "${ECHO_T}$XGETTEXT" >&6
17612 else
17613   echo "$as_me:$LINENO: result: no" >&5
17614 echo "${ECHO_T}no" >&6
17615 fi
17616
17617   test -n "$XGETTEXT" && break
17618 done
17619
17620
17621   # Note: share/locale is always the default, independent of $datadir
17622   localedir='${prefix}/share/locale'
17623   if test x"$prefix" = x"NONE"; then
17624     exp_localedir="$ac_default_prefix/share/locale"
17625   else
17626     exp_localedir="$prefix/share/locale"
17627   fi
17628
17629
17630
17631 cat >>confdefs.h <<_ACEOF
17632 #define LOCALEDIR "$exp_localedir"
17633 _ACEOF
17634
17635
17636 fi
17637
17638 # Check for Tcl configuration script tclConfig.sh
17639 if test "$with_tcl" = yes; then
17640     for ac_prog in tclsh tcl
17641 do
17642   # Extract the first word of "$ac_prog", so it can be a program name with args.
17643 set dummy $ac_prog; ac_word=$2
17644 echo "$as_me:$LINENO: checking for $ac_word" >&5
17645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17646 if test "${ac_cv_path_TCLSH+set}" = set; then
17647   echo $ECHO_N "(cached) $ECHO_C" >&6
17648 else
17649   case $TCLSH in
17650   [\\/]* | ?:[\\/]*)
17651   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
17652   ;;
17653   *)
17654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17655 for as_dir in $PATH
17656 do
17657   IFS=$as_save_IFS
17658   test -z "$as_dir" && as_dir=.
17659   for ac_exec_ext in '' $ac_executable_extensions; do
17660   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17661     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
17662     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17663     break 2
17664   fi
17665 done
17666 done
17667
17668   ;;
17669 esac
17670 fi
17671 TCLSH=$ac_cv_path_TCLSH
17672
17673 if test -n "$TCLSH"; then
17674   echo "$as_me:$LINENO: result: $TCLSH" >&5
17675 echo "${ECHO_T}$TCLSH" >&6
17676 else
17677   echo "$as_me:$LINENO: result: no" >&5
17678 echo "${ECHO_T}no" >&6
17679 fi
17680
17681   test -n "$TCLSH" && break
17682 done
17683
17684 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
17685 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
17686 # Let user override test
17687 if test -z "$TCL_CONFIG_SH"; then
17688     pgac_test_dirs="$with_tclconfig"
17689
17690     set X $pgac_test_dirs; shift
17691     if test $# -eq 0; then
17692         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
17693 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
17694    { (exit 1); exit 1; }; }
17695         set X `echo 'puts $auto_path' | $TCLSH`; shift
17696     fi
17697
17698     for pgac_dir do
17699         if test -r "$pgac_dir/tclConfig.sh"; then
17700             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
17701             break
17702         fi
17703     done
17704 fi
17705
17706 if test -z "$TCL_CONFIG_SH"; then
17707     echo "$as_me:$LINENO: result: no" >&5
17708 echo "${ECHO_T}no" >&6
17709     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
17710 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
17711    { (exit 1); exit 1; }; }
17712 else
17713     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
17714 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
17715 fi
17716
17717
17718
17719     . "$TCL_CONFIG_SH"
17720 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
17721 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
17722 eval TCL_LIBS=\"$TCL_LIBS\"
17723 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
17724 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
17725
17726     fi
17727
17728 #
17729 # Check for DocBook and tools
17730 #
17731 for ac_prog in onsgmls nsgmls
17732 do
17733   # Extract the first word of "$ac_prog", so it can be a program name with args.
17734 set dummy $ac_prog; ac_word=$2
17735 echo "$as_me:$LINENO: checking for $ac_word" >&5
17736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17737 if test "${ac_cv_prog_NSGMLS+set}" = set; then
17738   echo $ECHO_N "(cached) $ECHO_C" >&6
17739 else
17740   if test -n "$NSGMLS"; then
17741   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
17742 else
17743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17744 for as_dir in $PATH
17745 do
17746   IFS=$as_save_IFS
17747   test -z "$as_dir" && as_dir=.
17748   for ac_exec_ext in '' $ac_executable_extensions; do
17749   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17750     ac_cv_prog_NSGMLS="$ac_prog"
17751     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17752     break 2
17753   fi
17754 done
17755 done
17756
17757 fi
17758 fi
17759 NSGMLS=$ac_cv_prog_NSGMLS
17760 if test -n "$NSGMLS"; then
17761   echo "$as_me:$LINENO: result: $NSGMLS" >&5
17762 echo "${ECHO_T}$NSGMLS" >&6
17763 else
17764   echo "$as_me:$LINENO: result: no" >&5
17765 echo "${ECHO_T}no" >&6
17766 fi
17767
17768   test -n "$NSGMLS" && break
17769 done
17770
17771 for ac_prog in openjade jade
17772 do
17773   # Extract the first word of "$ac_prog", so it can be a program name with args.
17774 set dummy $ac_prog; ac_word=$2
17775 echo "$as_me:$LINENO: checking for $ac_word" >&5
17776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17777 if test "${ac_cv_prog_JADE+set}" = set; then
17778   echo $ECHO_N "(cached) $ECHO_C" >&6
17779 else
17780   if test -n "$JADE"; then
17781   ac_cv_prog_JADE="$JADE" # Let the user override the test.
17782 else
17783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17784 for as_dir in $PATH
17785 do
17786   IFS=$as_save_IFS
17787   test -z "$as_dir" && as_dir=.
17788   for ac_exec_ext in '' $ac_executable_extensions; do
17789   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17790     ac_cv_prog_JADE="$ac_prog"
17791     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17792     break 2
17793   fi
17794 done
17795 done
17796
17797 fi
17798 fi
17799 JADE=$ac_cv_prog_JADE
17800 if test -n "$JADE"; then
17801   echo "$as_me:$LINENO: result: $JADE" >&5
17802 echo "${ECHO_T}$JADE" >&6
17803 else
17804   echo "$as_me:$LINENO: result: no" >&5
17805 echo "${ECHO_T}no" >&6
17806 fi
17807
17808   test -n "$JADE" && break
17809 done
17810
17811
17812 echo "$as_me:$LINENO: checking for DocBook V4.2" >&5
17813 echo $ECHO_N "checking for DocBook V4.2... $ECHO_C" >&6
17814 if test "${pgac_cv_check_docbook+set}" = set; then
17815   echo $ECHO_N "(cached) $ECHO_C" >&6
17816 else
17817   cat >conftest.sgml <<EOF
17818 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
17819 <book>
17820  <title>test</title>
17821  <chapter>
17822   <title>random</title>
17823    <sect1>
17824     <title>testsect</title>
17825     <para>text</para>
17826   </sect1>
17827  </chapter>
17828 </book>
17829 EOF
17830
17831 pgac_cv_check_docbook=no
17832
17833 if test -n "$NSGMLS"; then
17834   $NSGMLS -s conftest.sgml 1>&5 2>&1
17835   if test $? -eq 0; then
17836     pgac_cv_check_docbook=yes
17837   fi
17838 fi
17839 rm -f conftest.sgml
17840 fi
17841 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
17842 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
17843
17844 have_docbook=$pgac_cv_check_docbook
17845
17846
17847 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
17848 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
17849 if test "${pgac_cv_path_stylesheets+set}" = set; then
17850   echo $ECHO_N "(cached) $ECHO_C" >&6
17851 else
17852   if test -n "$DOCBOOKSTYLE"; then
17853   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
17854 else
17855   for pgac_prefix in /usr /usr/local /opt; do
17856     for pgac_infix in share lib; do
17857       for pgac_postfix in \
17858         sgml/stylesheets/nwalsh-modular \
17859         sgml/stylesheets/docbook \
17860                 sgml/docbook-dsssl \
17861         sgml/docbook/dsssl/modular \
17862         sgml/docbook/stylesheet/dsssl/modular \
17863         sgml/docbook/dsssl-stylesheets
17864       do
17865         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
17866         if test -r "$pgac_candidate/html/docbook.dsl" \
17867            && test -r "$pgac_candidate/print/docbook.dsl"
17868         then
17869           pgac_cv_path_stylesheets=$pgac_candidate
17870           break 3
17871         fi
17872       done
17873     done
17874   done
17875 fi
17876 fi
17877
17878 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
17879
17880 if test -n "$DOCBOOKSTYLE"; then
17881   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
17882 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
17883 else
17884   echo "$as_me:$LINENO: result: no" >&5
17885 echo "${ECHO_T}no" >&6
17886 fi
17887 if test -n "$DOCBOOKSTYLE"; then
17888   for ac_prog in collateindex.pl
17889 do
17890   # Extract the first word of "$ac_prog", so it can be a program name with args.
17891 set dummy $ac_prog; ac_word=$2
17892 echo "$as_me:$LINENO: checking for $ac_word" >&5
17893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17894 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
17895   echo $ECHO_N "(cached) $ECHO_C" >&6
17896 else
17897   case $COLLATEINDEX in
17898   [\\/]* | ?:[\\/]*)
17899   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
17900   ;;
17901   *)
17902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17903 for as_dir in $DOCBOOKSTYLE/bin $PATH
17904 do
17905   IFS=$as_save_IFS
17906   test -z "$as_dir" && as_dir=.
17907   for ac_exec_ext in '' $ac_executable_extensions; do
17908   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17909     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
17910     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17911     break 2
17912   fi
17913 done
17914 done
17915
17916   ;;
17917 esac
17918 fi
17919 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
17920
17921 if test -n "$COLLATEINDEX"; then
17922   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
17923 echo "${ECHO_T}$COLLATEINDEX" >&6
17924 else
17925   echo "$as_me:$LINENO: result: no" >&5
17926 echo "${ECHO_T}no" >&6
17927 fi
17928
17929   test -n "$COLLATEINDEX" && break
17930 done
17931
17932 else
17933   for ac_prog in collateindex.pl
17934 do
17935   # Extract the first word of "$ac_prog", so it can be a program name with args.
17936 set dummy $ac_prog; ac_word=$2
17937 echo "$as_me:$LINENO: checking for $ac_word" >&5
17938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17939 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
17940   echo $ECHO_N "(cached) $ECHO_C" >&6
17941 else
17942   case $COLLATEINDEX in
17943   [\\/]* | ?:[\\/]*)
17944   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
17945   ;;
17946   *)
17947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17948 for as_dir in $PATH
17949 do
17950   IFS=$as_save_IFS
17951   test -z "$as_dir" && as_dir=.
17952   for ac_exec_ext in '' $ac_executable_extensions; do
17953   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17954     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
17955     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17956     break 2
17957   fi
17958 done
17959 done
17960
17961   ;;
17962 esac
17963 fi
17964 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
17965
17966 if test -n "$COLLATEINDEX"; then
17967   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
17968 echo "${ECHO_T}$COLLATEINDEX" >&6
17969 else
17970   echo "$as_me:$LINENO: result: no" >&5
17971 echo "${ECHO_T}no" >&6
17972 fi
17973
17974   test -n "$COLLATEINDEX" && break
17975 done
17976
17977 fi
17978 for ac_prog in sgmlspl
17979 do
17980   # Extract the first word of "$ac_prog", so it can be a program name with args.
17981 set dummy $ac_prog; ac_word=$2
17982 echo "$as_me:$LINENO: checking for $ac_word" >&5
17983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17984 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
17985   echo $ECHO_N "(cached) $ECHO_C" >&6
17986 else
17987   if test -n "$SGMLSPL"; then
17988   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
17989 else
17990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17991 for as_dir in $PATH
17992 do
17993   IFS=$as_save_IFS
17994   test -z "$as_dir" && as_dir=.
17995   for ac_exec_ext in '' $ac_executable_extensions; do
17996   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17997     ac_cv_prog_SGMLSPL="$ac_prog"
17998     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17999     break 2
18000   fi
18001 done
18002 done
18003
18004 fi
18005 fi
18006 SGMLSPL=$ac_cv_prog_SGMLSPL
18007 if test -n "$SGMLSPL"; then
18008   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
18009 echo "${ECHO_T}$SGMLSPL" >&6
18010 else
18011   echo "$as_me:$LINENO: result: no" >&5
18012 echo "${ECHO_T}no" >&6
18013 fi
18014
18015   test -n "$SGMLSPL" && break
18016 done
18017
18018
18019 # Thread testing
18020
18021 # We have to run the thread test near the end so we have all our symbols
18022 # defined.  Cross compiling throws a warning.
18023 #
18024 if test "$enable_thread_safety_force" = yes; then
18025   { echo "$as_me:$LINENO: WARNING:
18026 *** Skipping thread test program.  --enable-thread-safety-force was used.
18027 *** Run the program in src/tools/thread on the your machine and add
18028 proper locking function calls to your applications to guarantee thread
18029 safety.
18030 " >&5
18031 echo "$as_me: WARNING:
18032 *** Skipping thread test program.  --enable-thread-safety-force was used.
18033 *** Run the program in src/tools/thread on the your machine and add
18034 proper locking function calls to your applications to guarantee thread
18035 safety.
18036 " >&2;}
18037 elif test "$enable_thread_safety" = yes; then
18038 echo "$as_me:$LINENO: checking thread safety of required library functions" >&5
18039 echo $ECHO_N "checking thread safety of required library functions... $ECHO_C" >&6
18040
18041 _CFLAGS="$CFLAGS"
18042 _LIBS="$LIBS"
18043 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18044 LIBS="$LIBS $PTHREAD_LIBS"
18045 if test "$cross_compiling" = yes; then
18046   echo "$as_me:$LINENO: result: maybe" >&5
18047 echo "${ECHO_T}maybe" >&6
18048   { echo "$as_me:$LINENO: WARNING:
18049 *** Skipping thread test program because of cross-compile build.
18050 *** Run the program in src/tools/thread on the target machine.
18051 " >&5
18052 echo "$as_me: WARNING:
18053 *** Skipping thread test program because of cross-compile build.
18054 *** Run the program in src/tools/thread on the target machine.
18055 " >&2;}
18056 else
18057   cat >conftest.$ac_ext <<_ACEOF
18058 #line $LINENO "configure"
18059 #include "confdefs.h"
18060 #include "$srcdir/src/tools/thread/thread_test.c"
18061 _ACEOF
18062 rm -f conftest$ac_exeext
18063 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18064   (eval $ac_link) 2>&5
18065   ac_status=$?
18066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18067   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18068   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18069   (eval $ac_try) 2>&5
18070   ac_status=$?
18071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18072   (exit $ac_status); }; }; then
18073   echo "$as_me:$LINENO: result: yes" >&5
18074 echo "${ECHO_T}yes" >&6
18075 else
18076   echo "$as_me: program exited with status $ac_status" >&5
18077 echo "$as_me: failed program was:" >&5
18078 cat conftest.$ac_ext >&5
18079 ( exit $ac_status )
18080 echo "$as_me:$LINENO: result: no" >&5
18081 echo "${ECHO_T}no" >&6
18082   { { echo "$as_me:$LINENO: error:
18083 *** Thread test program failed.  Your platform is not thread-safe.
18084 *** Check the file 'config.log'for the exact reason.
18085 ***
18086 *** You can use the configure option --enable-thread-safety-force
18087 *** to force threads to be enabled.  However, you must then run
18088 *** the program in src/tools/thread and add locking function calls
18089 *** to your applications to guarantee thread safety.
18090 " >&5
18091 echo "$as_me: error:
18092 *** Thread test program failed.  Your platform is not thread-safe.
18093 *** Check the file 'config.log'for the exact reason.
18094 ***
18095 *** You can use the configure option --enable-thread-safety-force
18096 *** to force threads to be enabled.  However, you must then run
18097 *** the program in src/tools/thread and add locking function calls
18098 *** to your applications to guarantee thread safety.
18099 " >&2;}
18100    { (exit 1); exit 1; }; }
18101 fi
18102 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18103 fi
18104 CFLAGS="$_CFLAGS"
18105 LIBS="$_LIBS"
18106 fi
18107
18108 # prepare build tree if outside source tree
18109 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18110 # Note 2: /bin/pwd might be better than shell's built-in at getting
18111 #         a symlink-free name.
18112 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18113   vpath_build=no
18114 else
18115   vpath_build=yes
18116   if test "$no_create" != yes; then
18117     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
18118     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18119     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18120       || { { echo "$as_me:$LINENO: error: failed" >&5
18121 echo "$as_me: error: failed" >&2;}
18122    { (exit 1); exit 1; }; }
18123     echo "$as_me:$LINENO: result: done" >&5
18124 echo "${ECHO_T}done" >&6
18125   fi
18126 fi
18127
18128
18129
18130 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18131
18132
18133 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}"
18134
18135
18136 if test "$PORTNAME" = "win32"; then
18137 ac_config_commands="$ac_config_commands check_win32_symlinks"
18138
18139 fi
18140
18141 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18142
18143
18144 cat >confcache <<\_ACEOF
18145 # This file is a shell script that caches the results of configure
18146 # tests run on this system so they can be shared between configure
18147 # scripts and configure runs, see configure's option --config-cache.
18148 # It is not useful on other systems.  If it contains results you don't
18149 # want to keep, you may remove or edit it.
18150 #
18151 # config.status only pays attention to the cache file if you give it
18152 # the --recheck option to rerun configure.
18153 #
18154 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18155 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18156 # following values.
18157
18158 _ACEOF
18159
18160 # The following way of writing the cache mishandles newlines in values,
18161 # but we know of no workaround that is simple, portable, and efficient.
18162 # So, don't put newlines in cache variables' values.
18163 # Ultrix sh set writes to stderr and can't be redirected directly,
18164 # and sets the high bit in the cache file unless we assign to the vars.
18165 {
18166   (set) 2>&1 |
18167     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18168     *ac_space=\ *)
18169       # `set' does not quote correctly, so add quotes (double-quote
18170       # substitution turns \\\\ into \\, and sed turns \\ into \).
18171       sed -n \
18172         "s/'/'\\\\''/g;
18173           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18174       ;;
18175     *)
18176       # `set' quotes correctly as required by POSIX, so do not add quotes.
18177       sed -n \
18178         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18179       ;;
18180     esac;
18181 } |
18182   sed '
18183      t clear
18184      : clear
18185      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18186      t end
18187      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18188      : end' >>confcache
18189 if cmp -s $cache_file confcache; then :; else
18190   if test -w $cache_file; then
18191     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18192     cat confcache >$cache_file
18193   else
18194     echo "not updating unwritable cache $cache_file"
18195   fi
18196 fi
18197 rm -f confcache
18198
18199 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18200 # Let make expand exec_prefix.
18201 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18202
18203 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18204 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18205 # trailing colons and then remove the whole line if VPATH becomes empty
18206 # (actually we leave an empty line to preserve line numbers).
18207 if test "x$srcdir" = x.; then
18208   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18209 s/:*\$(srcdir):*/:/;
18210 s/:*\${srcdir}:*/:/;
18211 s/:*@srcdir@:*/:/;
18212 s/^\([^=]*=[    ]*\):*/\1/;
18213 s/:*$//;
18214 s/^[^=]*=[      ]*$//;
18215 }'
18216 fi
18217
18218 DEFS=-DHAVE_CONFIG_H
18219
18220
18221 : ${CONFIG_STATUS=./config.status}
18222 ac_clean_files_save=$ac_clean_files
18223 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18224 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18225 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18226 cat >$CONFIG_STATUS <<_ACEOF
18227 #! $SHELL
18228 # Generated by $as_me.
18229 # Run this file to recreate the current configuration.
18230 # Compiler output produced by configure, useful for debugging
18231 # configure, is in config.log if it exists.
18232
18233 debug=false
18234 SHELL=\${CONFIG_SHELL-$SHELL}
18235 _ACEOF
18236
18237 cat >>$CONFIG_STATUS <<\_ACEOF
18238
18239 ## --------------------- ##
18240 ## M4sh Initialization.  ##
18241 ## --------------------- ##
18242
18243 # Be Bourne compatible
18244 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18245   emulate sh
18246   NULLCMD=:
18247 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18248   set -o posix
18249 fi
18250
18251 # NLS nuisances.
18252 # Support unset when possible.
18253 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18254   as_unset=unset
18255 else
18256   as_unset=false
18257 fi
18258
18259 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
18260     { $as_unset LANG || test "${LANG+set}" != set; } ||
18261       { LANG=C; export LANG; }
18262 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
18263     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
18264       { LC_ALL=C; export LC_ALL; }
18265 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
18266     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
18267       { LC_TIME=C; export LC_TIME; }
18268 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
18269     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
18270       { LC_CTYPE=C; export LC_CTYPE; }
18271 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
18272     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
18273       { LANGUAGE=C; export LANGUAGE; }
18274 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
18275     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
18276       { LC_COLLATE=C; export LC_COLLATE; }
18277 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
18278     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
18279       { LC_NUMERIC=C; export LC_NUMERIC; }
18280 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
18281     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
18282       { LC_MESSAGES=C; export LC_MESSAGES; }
18283
18284
18285 # Name of the executable.
18286 as_me=`(basename "$0") 2>/dev/null ||
18287 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18288          X"$0" : 'X\(//\)$' \| \
18289          X"$0" : 'X\(/\)$' \| \
18290          .     : '\(.\)' 2>/dev/null ||
18291 echo X/"$0" |
18292     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18293           /^X\/\(\/\/\)$/{ s//\1/; q; }
18294           /^X\/\(\/\).*/{ s//\1/; q; }
18295           s/.*/./; q'`
18296
18297 # PATH needs CR, and LINENO needs CR and PATH.
18298 # Avoid depending upon Character Ranges.
18299 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18300 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18301 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18302 as_cr_digits='0123456789'
18303 as_cr_alnum=$as_cr_Letters$as_cr_digits
18304
18305 # The user is always right.
18306 if test "${PATH_SEPARATOR+set}" != set; then
18307   echo "#! /bin/sh" >conftest.sh
18308   echo  "exit 0"   >>conftest.sh
18309   chmod +x conftest.sh
18310   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
18311     PATH_SEPARATOR=';'
18312   else
18313     PATH_SEPARATOR=:
18314   fi
18315   rm -f conftest.sh
18316 fi
18317
18318
18319   as_lineno_1=$LINENO
18320   as_lineno_2=$LINENO
18321   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18322   test "x$as_lineno_1" != "x$as_lineno_2" &&
18323   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
18324   # Find who we are.  Look in the path if we contain no path at all
18325   # relative or not.
18326   case $0 in
18327     *[\\/]* ) as_myself=$0 ;;
18328     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18329 for as_dir in $PATH
18330 do
18331   IFS=$as_save_IFS
18332   test -z "$as_dir" && as_dir=.
18333   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18334 done
18335
18336        ;;
18337   esac
18338   # We did not find ourselves, most probably we were run as `sh COMMAND'
18339   # in which case we are not to be found in the path.
18340   if test "x$as_myself" = x; then
18341     as_myself=$0
18342   fi
18343   if test ! -f "$as_myself"; then
18344     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18345 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18346    { (exit 1); exit 1; }; }
18347   fi
18348   case $CONFIG_SHELL in
18349   '')
18350     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18351 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18352 do
18353   IFS=$as_save_IFS
18354   test -z "$as_dir" && as_dir=.
18355   for as_base in sh bash ksh sh5; do
18356          case $as_dir in
18357          /*)
18358            if ("$as_dir/$as_base" -c '
18359   as_lineno_1=$LINENO
18360   as_lineno_2=$LINENO
18361   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18362   test "x$as_lineno_1" != "x$as_lineno_2" &&
18363   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
18364              CONFIG_SHELL=$as_dir/$as_base
18365              export CONFIG_SHELL
18366              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18367            fi;;
18368          esac
18369        done
18370 done
18371 ;;
18372   esac
18373
18374   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18375   # uniformly replaced by the line number.  The first 'sed' inserts a
18376   # line-number line before each line; the second 'sed' does the real
18377   # work.  The second script uses 'N' to pair each line-number line
18378   # with the numbered line, and appends trailing '-' during
18379   # substitution so that $LINENO is not a special case at line end.
18380   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18381   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
18382   sed '=' <$as_myself |
18383     sed '
18384       N
18385       s,$,-,
18386       : loop
18387       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18388       t loop
18389       s,-$,,
18390       s,^['$as_cr_digits']*\n,,
18391     ' >$as_me.lineno &&
18392   chmod +x $as_me.lineno ||
18393     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18394 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18395    { (exit 1); exit 1; }; }
18396
18397   # Don't try to exec as it changes $[0], causing all sort of problems
18398   # (the dirname of $[0] is not the place where we might find the
18399   # original and so on.  Autoconf is especially sensible to this).
18400   . ./$as_me.lineno
18401   # Exit status is that of the last command.
18402   exit
18403 }
18404
18405
18406 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18407   *c*,-n*) ECHO_N= ECHO_C='
18408 ' ECHO_T='      ' ;;
18409   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18410   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
18411 esac
18412
18413 if expr a : '\(a\)' >/dev/null 2>&1; then
18414   as_expr=expr
18415 else
18416   as_expr=false
18417 fi
18418
18419 rm -f conf$$ conf$$.exe conf$$.file
18420 echo >conf$$.file
18421 if ln -s conf$$.file conf$$ 2>/dev/null; then
18422   # We could just check for DJGPP; but this test a) works b) is more generic
18423   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18424   if test -f conf$$.exe; then
18425     # Don't use ln at all; we don't have any links
18426     as_ln_s='cp -p'
18427   else
18428     as_ln_s='ln -s'
18429   fi
18430 elif ln conf$$.file conf$$ 2>/dev/null; then
18431   as_ln_s=ln
18432 else
18433   as_ln_s='cp -p'
18434 fi
18435 rm -f conf$$ conf$$.exe conf$$.file
18436
18437 as_executable_p="test -f"
18438
18439 # Sed expression to map a string onto a valid CPP name.
18440 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
18441
18442 # Sed expression to map a string onto a valid variable name.
18443 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
18444
18445
18446 # IFS
18447 # We need space, tab and new line, in precisely that order.
18448 as_nl='
18449 '
18450 IFS="   $as_nl"
18451
18452 # CDPATH.
18453 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
18454
18455 exec 6>&1
18456
18457 # Open the log real soon, to keep \$[0] and so on meaningful, and to
18458 # report actual input values of CONFIG_FILES etc. instead of their
18459 # values after options handling.  Logging --version etc. is OK.
18460 exec 5>>config.log
18461 {
18462   echo
18463   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18464 ## Running $as_me. ##
18465 _ASBOX
18466 } >&5
18467 cat >&5 <<_CSEOF
18468
18469 This file was extended by PostgreSQL $as_me 8.0.0beta3, which was
18470 generated by GNU Autoconf 2.53.  Invocation command line was
18471
18472   CONFIG_FILES    = $CONFIG_FILES
18473   CONFIG_HEADERS  = $CONFIG_HEADERS
18474   CONFIG_LINKS    = $CONFIG_LINKS
18475   CONFIG_COMMANDS = $CONFIG_COMMANDS
18476   $ $0 $@
18477
18478 _CSEOF
18479 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18480 echo >&5
18481 _ACEOF
18482
18483 # Files that config.status was made for.
18484 if test -n "$ac_config_files"; then
18485   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18486 fi
18487
18488 if test -n "$ac_config_headers"; then
18489   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18490 fi
18491
18492 if test -n "$ac_config_links"; then
18493   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18494 fi
18495
18496 if test -n "$ac_config_commands"; then
18497   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18498 fi
18499
18500 cat >>$CONFIG_STATUS <<\_ACEOF
18501
18502 ac_cs_usage="\
18503 \`$as_me' instantiates files from templates according to the
18504 current configuration.
18505
18506 Usage: $0 [OPTIONS] [FILE]...
18507
18508   -h, --help       print this help, then exit
18509   -V, --version    print version number, then exit
18510   -d, --debug      don't remove temporary files
18511       --recheck    update $as_me by reconfiguring in the same conditions
18512   --file=FILE[:TEMPLATE]
18513                    instantiate the configuration file FILE
18514   --header=FILE[:TEMPLATE]
18515                    instantiate the configuration header FILE
18516
18517 Configuration files:
18518 $config_files
18519
18520 Configuration headers:
18521 $config_headers
18522
18523 Configuration links:
18524 $config_links
18525
18526 Configuration commands:
18527 $config_commands
18528
18529 Report bugs to <bug-autoconf@gnu.org>."
18530 _ACEOF
18531
18532 cat >>$CONFIG_STATUS <<_ACEOF
18533 ac_cs_version="\\
18534 PostgreSQL config.status 8.0.0beta3
18535 configured by $0, generated by GNU Autoconf 2.53,
18536   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18537
18538 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18539 Free Software Foundation, Inc.
18540 This config.status script is free software; the Free Software Foundation
18541 gives unlimited permission to copy, distribute and modify it."
18542 srcdir=$srcdir
18543 _ACEOF
18544
18545 cat >>$CONFIG_STATUS <<\_ACEOF
18546 # If no file are specified by the user, then we need to provide default
18547 # value.  By we need to know if files were specified by the user.
18548 ac_need_defaults=:
18549 while test $# != 0
18550 do
18551   case $1 in
18552   --*=*)
18553     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18554     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18555     shift
18556     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18557     shift
18558     ;;
18559   -*);;
18560   *) # This is not an option, so the user has probably given explicit
18561      # arguments.
18562      ac_need_defaults=false;;
18563   esac
18564
18565   case $1 in
18566   # Handling of the options.
18567 _ACEOF
18568 cat >>$CONFIG_STATUS <<_ACEOF
18569   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18570     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18571     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18572 _ACEOF
18573 cat >>$CONFIG_STATUS <<\_ACEOF
18574   --version | --vers* | -V )
18575     echo "$ac_cs_version"; exit 0 ;;
18576   --he | --h)
18577     # Conflict between --help and --header
18578     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18579 Try \`$0 --help' for more information." >&5
18580 echo "$as_me: error: ambiguous option: $1
18581 Try \`$0 --help' for more information." >&2;}
18582    { (exit 1); exit 1; }; };;
18583   --help | --hel | -h )
18584     echo "$ac_cs_usage"; exit 0 ;;
18585   --debug | --d* | -d )
18586     debug=: ;;
18587   --file | --fil | --fi | --f )
18588     shift
18589     CONFIG_FILES="$CONFIG_FILES $1"
18590     ac_need_defaults=false;;
18591   --header | --heade | --head | --hea )
18592     shift
18593     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18594     ac_need_defaults=false;;
18595
18596   # This is an error.
18597   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18598 Try \`$0 --help' for more information." >&5
18599 echo "$as_me: error: unrecognized option: $1
18600 Try \`$0 --help' for more information." >&2;}
18601    { (exit 1); exit 1; }; } ;;
18602
18603   *) ac_config_targets="$ac_config_targets $1" ;;
18604
18605   esac
18606   shift
18607 done
18608
18609 _ACEOF
18610
18611
18612
18613
18614
18615 cat >>$CONFIG_STATUS <<\_ACEOF
18616 for ac_config_target in $ac_config_targets
18617 do
18618   case "$ac_config_target" in
18619   # Handling of arguments.
18620   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
18621   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
18622   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
18623   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
18624   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
18625   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
18626   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
18627   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
18628   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
18629   "check_win32_symlinks" ) CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
18630   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
18631   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18632 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18633    { (exit 1); exit 1; }; };;
18634   esac
18635 done
18636
18637 # If the user did not use the arguments to specify the items to instantiate,
18638 # then the envvar interface is used.  Set only those that are not.
18639 # We use the long form for the default assignment because of an extremely
18640 # bizarre bug on SunOS 4.1.3.
18641 if $ac_need_defaults; then
18642   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18643   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18644   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18645   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18646 fi
18647
18648 # Create a temporary directory, and hook for its removal unless debugging.
18649 $debug ||
18650 {
18651   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18652   trap '{ (exit 1); exit 1; }' 1 2 13 15
18653 }
18654
18655 # Create a (secure) tmp directory for tmp files.
18656 : ${TMPDIR=/tmp}
18657 {
18658   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18659   test -n "$tmp" && test -d "$tmp"
18660 }  ||
18661 {
18662   tmp=$TMPDIR/cs$$-$RANDOM
18663   (umask 077 && mkdir $tmp)
18664 } ||
18665 {
18666    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18667    { (exit 1); exit 1; }
18668 }
18669
18670 _ACEOF
18671
18672 cat >>$CONFIG_STATUS <<_ACEOF
18673
18674 #
18675 # CONFIG_FILES section.
18676 #
18677
18678 # No need to generate the scripts if there are no CONFIG_FILES.
18679 # This happens for instance when ./config.status config.h
18680 if test -n "\$CONFIG_FILES"; then
18681   # Protect against being on the right side of a sed subst in config.status.
18682   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18683    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18684 s,@SHELL@,$SHELL,;t t
18685 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18686 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18687 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18688 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18689 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18690 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18691 s,@exec_prefix@,$exec_prefix,;t t
18692 s,@prefix@,$prefix,;t t
18693 s,@program_transform_name@,$program_transform_name,;t t
18694 s,@bindir@,$bindir,;t t
18695 s,@sbindir@,$sbindir,;t t
18696 s,@libexecdir@,$libexecdir,;t t
18697 s,@datadir@,$datadir,;t t
18698 s,@sysconfdir@,$sysconfdir,;t t
18699 s,@sharedstatedir@,$sharedstatedir,;t t
18700 s,@localstatedir@,$localstatedir,;t t
18701 s,@libdir@,$libdir,;t t
18702 s,@includedir@,$includedir,;t t
18703 s,@oldincludedir@,$oldincludedir,;t t
18704 s,@infodir@,$infodir,;t t
18705 s,@mandir@,$mandir,;t t
18706 s,@build_alias@,$build_alias,;t t
18707 s,@host_alias@,$host_alias,;t t
18708 s,@target_alias@,$target_alias,;t t
18709 s,@DEFS@,$DEFS,;t t
18710 s,@ECHO_C@,$ECHO_C,;t t
18711 s,@ECHO_N@,$ECHO_N,;t t
18712 s,@ECHO_T@,$ECHO_T,;t t
18713 s,@LIBS@,$LIBS,;t t
18714 s,@configure_args@,$configure_args,;t t
18715 s,@build@,$build,;t t
18716 s,@build_cpu@,$build_cpu,;t t
18717 s,@build_vendor@,$build_vendor,;t t
18718 s,@build_os@,$build_os,;t t
18719 s,@host@,$host,;t t
18720 s,@host_cpu@,$host_cpu,;t t
18721 s,@host_vendor@,$host_vendor,;t t
18722 s,@host_os@,$host_os,;t t
18723 s,@PORTNAME@,$PORTNAME,;t t
18724 s,@docdir@,$docdir,;t t
18725 s,@enable_nls@,$enable_nls,;t t
18726 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
18727 s,@default_port@,$default_port,;t t
18728 s,@enable_shared@,$enable_shared,;t t
18729 s,@enable_rpath@,$enable_rpath,;t t
18730 s,@enable_debug@,$enable_debug,;t t
18731 s,@CC@,$CC,;t t
18732 s,@CFLAGS@,$CFLAGS,;t t
18733 s,@LDFLAGS@,$LDFLAGS,;t t
18734 s,@CPPFLAGS@,$CPPFLAGS,;t t
18735 s,@ac_ct_CC@,$ac_ct_CC,;t t
18736 s,@EXEEXT@,$EXEEXT,;t t
18737 s,@OBJEXT@,$OBJEXT,;t t
18738 s,@CPP@,$CPP,;t t
18739 s,@GCC@,$GCC,;t t
18740 s,@TAS@,$TAS,;t t
18741 s,@autodepend@,$autodepend,;t t
18742 s,@INCLUDES@,$INCLUDES,;t t
18743 s,@enable_thread_safety@,$enable_thread_safety,;t t
18744 s,@with_tcl@,$with_tcl,;t t
18745 s,@with_perl@,$with_perl,;t t
18746 s,@with_python@,$with_python,;t t
18747 s,@with_krb4@,$with_krb4,;t t
18748 s,@with_krb5@,$with_krb5,;t t
18749 s,@krb_srvtab@,$krb_srvtab,;t t
18750 s,@with_pam@,$with_pam,;t t
18751 s,@with_rendezvous@,$with_rendezvous,;t t
18752 s,@with_openssl@,$with_openssl,;t t
18753 s,@ELF_SYS@,$ELF_SYS,;t t
18754 s,@AWK@,$AWK,;t t
18755 s,@FLEX@,$FLEX,;t t
18756 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
18757 s,@LN_S@,$LN_S,;t t
18758 s,@LD@,$LD,;t t
18759 s,@with_gnu_ld@,$with_gnu_ld,;t t
18760 s,@ld_R_works@,$ld_R_works,;t t
18761 s,@RANLIB@,$RANLIB,;t t
18762 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18763 s,@LORDER@,$LORDER,;t t
18764 s,@TAR@,$TAR,;t t
18765 s,@STRIP@,$STRIP,;t t
18766 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
18767 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
18768 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
18769 s,@YACC@,$YACC,;t t
18770 s,@YFLAGS@,$YFLAGS,;t t
18771 s,@PERL@,$PERL,;t t
18772 s,@perl_archlibexp@,$perl_archlibexp,;t t
18773 s,@perl_privlibexp@,$perl_privlibexp,;t t
18774 s,@perl_useshrplib@,$perl_useshrplib,;t t
18775 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
18776 s,@PYTHON@,$PYTHON,;t t
18777 s,@python_prefix@,$python_prefix,;t t
18778 s,@python_execprefix@,$python_execprefix,;t t
18779 s,@python_configdir@,$python_configdir,;t t
18780 s,@python_includespec@,$python_includespec,;t t
18781 s,@python_libspec@,$python_libspec,;t t
18782 s,@LIBOBJS@,$LIBOBJS,;t t
18783 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
18784 s,@acx_pthread_config@,$acx_pthread_config,;t t
18785 s,@PTHREAD_CC@,$PTHREAD_CC,;t t
18786 s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
18787 s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
18788 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
18789 s,@MSGFMT@,$MSGFMT,;t t
18790 s,@MSGMERGE@,$MSGMERGE,;t t
18791 s,@XGETTEXT@,$XGETTEXT,;t t
18792 s,@localedir@,$localedir,;t t
18793 s,@TCLSH@,$TCLSH,;t t
18794 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
18795 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
18796 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
18797 s,@TCL_LIBS@,$TCL_LIBS,;t t
18798 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
18799 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
18800 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
18801 s,@NSGMLS@,$NSGMLS,;t t
18802 s,@JADE@,$JADE,;t t
18803 s,@have_docbook@,$have_docbook,;t t
18804 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
18805 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
18806 s,@SGMLSPL@,$SGMLSPL,;t t
18807 s,@vpath_build@,$vpath_build,;t t
18808 CEOF
18809
18810 _ACEOF
18811
18812   cat >>$CONFIG_STATUS <<\_ACEOF
18813   # Split the substitutions into bite-sized pieces for seds with
18814   # small command number limits, like on Digital OSF/1 and HP-UX.
18815   ac_max_sed_lines=48
18816   ac_sed_frag=1 # Number of current file.
18817   ac_beg=1 # First line for current file.
18818   ac_end=$ac_max_sed_lines # Line after last line for current file.
18819   ac_more_lines=:
18820   ac_sed_cmds=
18821   while $ac_more_lines; do
18822     if test $ac_beg -gt 1; then
18823       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18824     else
18825       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18826     fi
18827     if test ! -s $tmp/subs.frag; then
18828       ac_more_lines=false
18829     else
18830       # The purpose of the label and of the branching condition is to
18831       # speed up the sed processing (if there are no `@' at all, there
18832       # is no need to browse any of the substitutions).
18833       # These are the two extra sed commands mentioned above.
18834       (echo ':t
18835   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18836       if test -z "$ac_sed_cmds"; then
18837         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18838       else
18839         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18840       fi
18841       ac_sed_frag=`expr $ac_sed_frag + 1`
18842       ac_beg=$ac_end
18843       ac_end=`expr $ac_end + $ac_max_sed_lines`
18844     fi
18845   done
18846   if test -z "$ac_sed_cmds"; then
18847     ac_sed_cmds=cat
18848   fi
18849 fi # test -n "$CONFIG_FILES"
18850
18851 _ACEOF
18852 cat >>$CONFIG_STATUS <<\_ACEOF
18853 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18854   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18855   case $ac_file in
18856   - | *:- | *:-:* ) # input from stdin
18857         cat >$tmp/stdin
18858         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18859         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18860   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18861         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18862   * )   ac_file_in=$ac_file.in ;;
18863   esac
18864
18865   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18866   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18867 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18868          X"$ac_file" : 'X\(//\)[^/]' \| \
18869          X"$ac_file" : 'X\(//\)$' \| \
18870          X"$ac_file" : 'X\(/\)' \| \
18871          .     : '\(.\)' 2>/dev/null ||
18872 echo X"$ac_file" |
18873     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18874           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18875           /^X\(\/\/\)$/{ s//\1/; q; }
18876           /^X\(\/\).*/{ s//\1/; q; }
18877           s/.*/./; q'`
18878   { case "$ac_dir" in
18879   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18880   *)                      as_incr_dir=.;;
18881 esac
18882 as_dummy="$ac_dir"
18883 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18884   case $as_mkdir_dir in
18885     # Skip DOS drivespec
18886     ?:) as_incr_dir=$as_mkdir_dir ;;
18887     *)
18888       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18889       test -d "$as_incr_dir" ||
18890         mkdir "$as_incr_dir" ||
18891         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18892 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18893    { (exit 1); exit 1; }; }
18894     ;;
18895   esac
18896 done; }
18897
18898   ac_builddir=.
18899
18900 if test "$ac_dir" != .; then
18901   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18902   # A "../" for each directory in $ac_dir_suffix.
18903   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18904 else
18905   ac_dir_suffix= ac_top_builddir=
18906 fi
18907
18908 case $srcdir in
18909   .)  # No --srcdir option.  We are building in place.
18910     ac_srcdir=.
18911     if test -z "$ac_top_builddir"; then
18912        ac_top_srcdir=.
18913     else
18914        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18915     fi ;;
18916   [\\/]* | ?:[\\/]* )  # Absolute path.
18917     ac_srcdir=$srcdir$ac_dir_suffix;
18918     ac_top_srcdir=$srcdir ;;
18919   *) # Relative path.
18920     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18921     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18922 esac
18923 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18924 # absolute.
18925 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18926 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18927 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18928 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18929
18930
18931
18932   if test x"$ac_file" != x-; then
18933     { echo "$as_me:$LINENO: creating $ac_file" >&5
18934 echo "$as_me: creating $ac_file" >&6;}
18935     rm -f "$ac_file"
18936   fi
18937   # Let's still pretend it is `configure' which instantiates (i.e., don't
18938   # use $as_me), people would be surprised to read:
18939   #    /* config.h.  Generated by config.status.  */
18940   if test x"$ac_file" = x-; then
18941     configure_input=
18942   else
18943     configure_input="$ac_file.  "
18944   fi
18945   configure_input=$configure_input"Generated from `echo $ac_file_in |
18946                                      sed 's,.*/,,'` by configure."
18947
18948   # First look for the input files in the build tree, otherwise in the
18949   # src tree.
18950   ac_file_inputs=`IFS=:
18951     for f in $ac_file_in; do
18952       case $f in
18953       -) echo $tmp/stdin ;;
18954       [\\/$]*)
18955          # Absolute (can't be DOS-style, as IFS=:)
18956          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18957 echo "$as_me: error: cannot find input file: $f" >&2;}
18958    { (exit 1); exit 1; }; }
18959          echo $f;;
18960       *) # Relative
18961          if test -f "$f"; then
18962            # Build tree
18963            echo $f
18964          elif test -f "$srcdir/$f"; then
18965            # Source tree
18966            echo $srcdir/$f
18967          else
18968            # /dev/null tree
18969            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18970 echo "$as_me: error: cannot find input file: $f" >&2;}
18971    { (exit 1); exit 1; }; }
18972          fi;;
18973       esac
18974     done` || { (exit 1); exit 1; }
18975 _ACEOF
18976 cat >>$CONFIG_STATUS <<_ACEOF
18977   sed "$ac_vpsub
18978 $extrasub
18979 _ACEOF
18980 cat >>$CONFIG_STATUS <<\_ACEOF
18981 :t
18982 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18983 s,@configure_input@,$configure_input,;t t
18984 s,@srcdir@,$ac_srcdir,;t t
18985 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18986 s,@top_srcdir@,$ac_top_srcdir,;t t
18987 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18988 s,@builddir@,$ac_builddir,;t t
18989 s,@abs_builddir@,$ac_abs_builddir,;t t
18990 s,@top_builddir@,$ac_top_builddir,;t t
18991 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18992 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18993   rm -f $tmp/stdin
18994   if test x"$ac_file" != x-; then
18995     mv $tmp/out $ac_file
18996   else
18997     cat $tmp/out
18998     rm -f $tmp/out
18999   fi
19000
19001 done
19002 _ACEOF
19003 cat >>$CONFIG_STATUS <<\_ACEOF
19004
19005 #
19006 # CONFIG_HEADER section.
19007 #
19008
19009 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19010 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19011 #
19012 # ac_d sets the value in "#define NAME VALUE" lines.
19013 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19014 ac_dB='[        ].*$,\1#\2'
19015 ac_dC=' '
19016 ac_dD=',;t'
19017 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19018 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19019 ac_uB='$,\1#\2define\3'
19020 ac_uC=' '
19021 ac_uD=',;t'
19022
19023 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19024   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19025   case $ac_file in
19026   - | *:- | *:-:* ) # input from stdin
19027         cat >$tmp/stdin
19028         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19029         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19030   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19031         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19032   * )   ac_file_in=$ac_file.in ;;
19033   esac
19034
19035   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19036 echo "$as_me: creating $ac_file" >&6;}
19037
19038   # First look for the input files in the build tree, otherwise in the
19039   # src tree.
19040   ac_file_inputs=`IFS=:
19041     for f in $ac_file_in; do
19042       case $f in
19043       -) echo $tmp/stdin ;;
19044       [\\/$]*)
19045          # Absolute (can't be DOS-style, as IFS=:)
19046          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19047 echo "$as_me: error: cannot find input file: $f" >&2;}
19048    { (exit 1); exit 1; }; }
19049          echo $f;;
19050       *) # Relative
19051          if test -f "$f"; then
19052            # Build tree
19053            echo $f
19054          elif test -f "$srcdir/$f"; then
19055            # Source tree
19056            echo $srcdir/$f
19057          else
19058            # /dev/null tree
19059            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
19060 echo "$as_me: error: cannot find input file: $f" >&2;}
19061    { (exit 1); exit 1; }; }
19062          fi;;
19063       esac
19064     done` || { (exit 1); exit 1; }
19065   # Remove the trailing spaces.
19066   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19067
19068 _ACEOF
19069
19070 # Transform confdefs.h into two sed scripts, `conftest.defines' and
19071 # `conftest.undefs', that substitutes the proper values into
19072 # config.h.in to produce config.h.  The first handles `#define'
19073 # templates, and the second `#undef' templates.
19074 # And first: Protect against being on the right side of a sed subst in
19075 # config.status.  Protect against being in an unquoted here document
19076 # in config.status.
19077 rm -f conftest.defines conftest.undefs
19078 # Using a here document instead of a string reduces the quoting nightmare.
19079 # Putting comments in sed scripts is not portable.
19080 #
19081 # `end' is used to avoid that the second main sed command (meant for
19082 # 0-ary CPP macros) applies to n-ary macro definitions.
19083 # See the Autoconf documentation for `clear'.
19084 cat >confdef2sed.sed <<\_ACEOF
19085 s/[\\&,]/\\&/g
19086 s,[\\$`],\\&,g
19087 t clear
19088 : clear
19089 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
19090 t end
19091 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
19092 : end
19093 _ACEOF
19094 # If some macros were called several times there might be several times
19095 # the same #defines, which is useless.  Nevertheless, we may not want to
19096 # sort them, since we want the *last* AC-DEFINE to be honored.
19097 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19098 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19099 rm -f confdef2sed.sed
19100
19101 # This sed command replaces #undef with comments.  This is necessary, for
19102 # example, in the case of _POSIX_SOURCE, which is predefined and required
19103 # on some systems where configure will not decide to define it.
19104 cat >>conftest.undefs <<\_ACEOF
19105 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
19106 _ACEOF
19107
19108 # Break up conftest.defines because some shells have a limit on the size
19109 # of here documents, and old seds have small limits too (100 cmds).
19110 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
19111 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
19112 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19113 echo '  :' >>$CONFIG_STATUS
19114 rm -f conftest.tail
19115 while grep . conftest.defines >/dev/null
19116 do
19117   # Write a limited-size here document to $tmp/defines.sed.
19118   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19119   # Speed up: don't consider the non `#define' lines.
19120   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
19121   # Work around the forget-to-reset-the-flag bug.
19122   echo 't clr' >>$CONFIG_STATUS
19123   echo ': clr' >>$CONFIG_STATUS
19124   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
19125   echo 'CEOF
19126   sed -f $tmp/defines.sed $tmp/in >$tmp/out
19127   rm -f $tmp/in
19128   mv $tmp/out $tmp/in
19129 ' >>$CONFIG_STATUS
19130   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19131   rm -f conftest.defines
19132   mv conftest.tail conftest.defines
19133 done
19134 rm -f conftest.defines
19135 echo '  fi # egrep' >>$CONFIG_STATUS
19136 echo >>$CONFIG_STATUS
19137
19138 # Break up conftest.undefs because some shells have a limit on the size
19139 # of here documents, and old seds have small limits too (100 cmds).
19140 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
19141 rm -f conftest.tail
19142 while grep . conftest.undefs >/dev/null
19143 do
19144   # Write a limited-size here document to $tmp/undefs.sed.
19145   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19146   # Speed up: don't consider the non `#undef'
19147   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
19148   # Work around the forget-to-reset-the-flag bug.
19149   echo 't clr' >>$CONFIG_STATUS
19150   echo ': clr' >>$CONFIG_STATUS
19151   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19152   echo 'CEOF
19153   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19154   rm -f $tmp/in
19155   mv $tmp/out $tmp/in
19156 ' >>$CONFIG_STATUS
19157   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19158   rm -f conftest.undefs
19159   mv conftest.tail conftest.undefs
19160 done
19161 rm -f conftest.undefs
19162
19163 cat >>$CONFIG_STATUS <<\_ACEOF
19164   # Let's still pretend it is `configure' which instantiates (i.e., don't
19165   # use $as_me), people would be surprised to read:
19166   #    /* config.h.  Generated by config.status.  */
19167   if test x"$ac_file" = x-; then
19168     echo "/* Generated by configure.  */" >$tmp/config.h
19169   else
19170     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
19171   fi
19172   cat $tmp/in >>$tmp/config.h
19173   rm -f $tmp/in
19174   if test x"$ac_file" != x-; then
19175     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19176       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19177 echo "$as_me: $ac_file is unchanged" >&6;}
19178     else
19179       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19180 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19181          X"$ac_file" : 'X\(//\)[^/]' \| \
19182          X"$ac_file" : 'X\(//\)$' \| \
19183          X"$ac_file" : 'X\(/\)' \| \
19184          .     : '\(.\)' 2>/dev/null ||
19185 echo X"$ac_file" |
19186     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19187           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19188           /^X\(\/\/\)$/{ s//\1/; q; }
19189           /^X\(\/\).*/{ s//\1/; q; }
19190           s/.*/./; q'`
19191       { case "$ac_dir" in
19192   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19193   *)                      as_incr_dir=.;;
19194 esac
19195 as_dummy="$ac_dir"
19196 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19197   case $as_mkdir_dir in
19198     # Skip DOS drivespec
19199     ?:) as_incr_dir=$as_mkdir_dir ;;
19200     *)
19201       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19202       test -d "$as_incr_dir" ||
19203         mkdir "$as_incr_dir" ||
19204         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
19205 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
19206    { (exit 1); exit 1; }; }
19207     ;;
19208   esac
19209 done; }
19210
19211       rm -f $ac_file
19212       mv $tmp/config.h $ac_file
19213     fi
19214   else
19215     cat $tmp/config.h
19216     rm -f $tmp/config.h
19217   fi
19218   # Run the commands associated with the file.
19219   case $ac_file in
19220     src/include/pg_config.h )
19221 # Update timestamp for pg_config.h (see Makefile.global)
19222 echo >src/include/stamp-h
19223  ;;
19224   esac
19225 done
19226 _ACEOF
19227 cat >>$CONFIG_STATUS <<\_ACEOF
19228
19229 #
19230 # CONFIG_LINKS section.
19231 #
19232
19233 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
19234   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19235   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19236
19237   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
19238 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
19239
19240   if test ! -r $srcdir/$ac_source; then
19241     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
19242 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
19243    { (exit 1); exit 1; }; }
19244   fi
19245   rm -f $ac_dest
19246
19247   # Make relative symlinks.
19248   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
19249 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19250          X"$ac_dest" : 'X\(//\)[^/]' \| \
19251          X"$ac_dest" : 'X\(//\)$' \| \
19252          X"$ac_dest" : 'X\(/\)' \| \
19253          .     : '\(.\)' 2>/dev/null ||
19254 echo X"$ac_dest" |
19255     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19256           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19257           /^X\(\/\/\)$/{ s//\1/; q; }
19258           /^X\(\/\).*/{ s//\1/; q; }
19259           s/.*/./; q'`
19260   { case "$ac_dest_dir" in
19261   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19262   *)                      as_incr_dir=.;;
19263 esac
19264 as_dummy="$ac_dest_dir"
19265 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19266   case $as_mkdir_dir in
19267     # Skip DOS drivespec
19268     ?:) as_incr_dir=$as_mkdir_dir ;;
19269     *)
19270       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19271       test -d "$as_incr_dir" ||
19272         mkdir "$as_incr_dir" ||
19273         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dest_dir\"" >&5
19274 echo "$as_me: error: cannot create \"$ac_dest_dir\"" >&2;}
19275    { (exit 1); exit 1; }; }
19276     ;;
19277   esac
19278 done; }
19279
19280   ac_builddir=.
19281
19282 if test "$ac_dest_dir" != .; then
19283   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
19284   # A "../" for each directory in $ac_dir_suffix.
19285   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19286 else
19287   ac_dir_suffix= ac_top_builddir=
19288 fi
19289
19290 case $srcdir in
19291   .)  # No --srcdir option.  We are building in place.
19292     ac_srcdir=.
19293     if test -z "$ac_top_builddir"; then
19294        ac_top_srcdir=.
19295     else
19296        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19297     fi ;;
19298   [\\/]* | ?:[\\/]* )  # Absolute path.
19299     ac_srcdir=$srcdir$ac_dir_suffix;
19300     ac_top_srcdir=$srcdir ;;
19301   *) # Relative path.
19302     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19303     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19304 esac
19305 # Don't blindly perform a `cd "$ac_dest_dir"/$ac_foo && pwd` since $ac_foo can be
19306 # absolute.
19307 ac_abs_builddir=`cd "$ac_dest_dir" && cd $ac_builddir && pwd`
19308 ac_abs_top_builddir=`cd "$ac_dest_dir" && cd $ac_top_builddir && pwd`
19309 ac_abs_srcdir=`cd "$ac_dest_dir" && cd $ac_srcdir && pwd`
19310 ac_abs_top_srcdir=`cd "$ac_dest_dir" && cd $ac_top_srcdir && pwd`
19311
19312
19313   case $srcdir in
19314   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
19315       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
19316   esac
19317
19318   # Make a symlink if possible; otherwise try a hard link.
19319   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
19320     ln $srcdir/$ac_source $ac_dest ||
19321     { { echo "$as_me:$LINENO: error: cannot link $ac_dest to $srcdir/$ac_source" >&5
19322 echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
19323    { (exit 1); exit 1; }; }
19324 done
19325 _ACEOF
19326 cat >>$CONFIG_STATUS <<\_ACEOF
19327
19328 #
19329 # CONFIG_COMMANDS section.
19330 #
19331 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19332   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19333   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19334   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
19335 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19336          X"$ac_dest" : 'X\(//\)[^/]' \| \
19337          X"$ac_dest" : 'X\(//\)$' \| \
19338          X"$ac_dest" : 'X\(/\)' \| \
19339          .     : '\(.\)' 2>/dev/null ||
19340 echo X"$ac_dest" |
19341     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19342           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19343           /^X\(\/\/\)$/{ s//\1/; q; }
19344           /^X\(\/\).*/{ s//\1/; q; }
19345           s/.*/./; q'`
19346   ac_builddir=.
19347
19348 if test "$ac_dir" != .; then
19349   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19350   # A "../" for each directory in $ac_dir_suffix.
19351   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19352 else
19353   ac_dir_suffix= ac_top_builddir=
19354 fi
19355
19356 case $srcdir in
19357   .)  # No --srcdir option.  We are building in place.
19358     ac_srcdir=.
19359     if test -z "$ac_top_builddir"; then
19360        ac_top_srcdir=.
19361     else
19362        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19363     fi ;;
19364   [\\/]* | ?:[\\/]* )  # Absolute path.
19365     ac_srcdir=$srcdir$ac_dir_suffix;
19366     ac_top_srcdir=$srcdir ;;
19367   *) # Relative path.
19368     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19369     ac_top_srcdir=$ac_top_builddir$srcdir ;;
19370 esac
19371 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19372 # absolute.
19373 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19374 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
19375 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19376 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
19377
19378
19379   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
19380 echo "$as_me: executing $ac_dest commands" >&6;}
19381   case $ac_dest in
19382     check_win32_symlinks )
19383 # Links sometimes fail undetected on Mingw -
19384 # so here we detect it and warn the user
19385 for FILE in $CONFIG_LINKS
19386  do
19387         # test -e works for symlinks in the MinGW console
19388         test -e `expr "$FILE" : '\([^:]*\)'` || { echo "$as_me:$LINENO: WARNING: *** link for $FILE - please fix by hand" >&5
19389 echo "$as_me: WARNING: *** link for $FILE - please fix by hand" >&2;}
19390  done
19391  ;;
19392   esac
19393 done
19394 _ACEOF
19395
19396 cat >>$CONFIG_STATUS <<\_ACEOF
19397
19398 { (exit 0); exit 0; }
19399 _ACEOF
19400 chmod +x $CONFIG_STATUS
19401 ac_clean_files=$ac_clean_files_save
19402
19403
19404 # configure is writing to config.log, and then calls config.status.
19405 # config.status does its own redirection, appending to config.log.
19406 # Unfortunately, on DOS this fails, as config.log is still kept open
19407 # by configure, so config.status won't be able to write to it; its
19408 # output is simply discarded.  So we exec the FD to /dev/null,
19409 # effectively closing config.log, so it can be properly (re)opened and
19410 # appended to by config.status.  When coming back to configure, we
19411 # need to make the FD available again.
19412 if test "$no_create" != yes; then
19413   ac_cs_success=:
19414   exec 5>/dev/null
19415   $SHELL $CONFIG_STATUS || ac_cs_success=false
19416   exec 5>>config.log
19417   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19418   # would make configure fail if this is the last instruction.
19419   $ac_cs_success || { (exit 1); exit 1; }
19420 fi
19421
19422