]> granicus.if.org Git - postgresql/blob - configure
Make the SQL command synopses appear less random.
[postgresql] / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.53 for PostgreSQL 7.4beta3.
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 2003 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='7.4beta3'
262 PACKAGE_STRING='PostgreSQL 7.4beta3'
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 docdir='${prefix}/doc'
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   -docdir | --docdir | --infodi | --infod | --doc | --inf)
440     ac_prev=docdir ;;
441   -docdir=* | --docdir=* | --infodi=* | --infod=* | --doc=* | --inf=*)
442     docdir=$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 docdir 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 7.4beta3 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 7.4beta3:";;
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   --disable-largefile     omit support for large files
850
851 Optional Packages:
852   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
853   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
854
855   --with-includes=DIRS    look for additional header files in DIRS
856   --with-libraries=DIRS   look for additional libraries in DIRS
857   --with-libs=DIRS        alternative spelling of --with-libraries
858   --with-pgport=PORTNUM   change default port number 5432
859   --with-tcl              build Tcl and Tk interfaces
860   --without-tk            do not build Tk interfaces if Tcl is enabled
861   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR
862   --with-tkconfig=DIR     tkConfig.sh is in DIR
863   --with-perl             build Perl modules (PL/Perl)
864   --with-python           build Python modules (PL/Python)
865   --with-java             build JDBC interface and Java tools
866   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]
867   --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]
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[=DIR]    build with OpenSSL support [/usr/local/ssl]
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 7.4beta3
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 2003 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 7.4beta3, 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
1253
1254
1255 ac_aux_dir=
1256 for ac_dir in config $srcdir/config; do
1257   if test -f $ac_dir/install-sh; then
1258     ac_aux_dir=$ac_dir
1259     ac_install_sh="$ac_aux_dir/install-sh -c"
1260     break
1261   elif test -f $ac_dir/install.sh; then
1262     ac_aux_dir=$ac_dir
1263     ac_install_sh="$ac_aux_dir/install.sh -c"
1264     break
1265   elif test -f $ac_dir/shtool; then
1266     ac_aux_dir=$ac_dir
1267     ac_install_sh="$ac_aux_dir/shtool install -c"
1268     break
1269   fi
1270 done
1271 if test -z "$ac_aux_dir"; then
1272   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1273 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1274    { (exit 1); exit 1; }; }
1275 fi
1276 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1277 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1278 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1279
1280
1281 configure_args=$ac_configure_args
1282
1283
1284
1285 cat >>confdefs.h <<_ACEOF
1286 #define PG_VERSION "$PACKAGE_VERSION"
1287 _ACEOF
1288
1289
1290 # Make sure we can run config.sub.
1291 $ac_config_sub sun4 >/dev/null 2>&1 ||
1292   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1293 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1294    { (exit 1); exit 1; }; }
1295
1296 echo "$as_me:$LINENO: checking build system type" >&5
1297 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1298 if test "${ac_cv_build+set}" = set; then
1299   echo $ECHO_N "(cached) $ECHO_C" >&6
1300 else
1301   ac_cv_build_alias=$build_alias
1302 test -z "$ac_cv_build_alias" &&
1303   ac_cv_build_alias=`$ac_config_guess`
1304 test -z "$ac_cv_build_alias" &&
1305   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1306 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1307    { (exit 1); exit 1; }; }
1308 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1309   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1310 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313 fi
1314 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1315 echo "${ECHO_T}$ac_cv_build" >&6
1316 build=$ac_cv_build
1317 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1318 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1319 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1320
1321
1322 echo "$as_me:$LINENO: checking host system type" >&5
1323 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1324 if test "${ac_cv_host+set}" = set; then
1325   echo $ECHO_N "(cached) $ECHO_C" >&6
1326 else
1327   ac_cv_host_alias=$host_alias
1328 test -z "$ac_cv_host_alias" &&
1329   ac_cv_host_alias=$ac_cv_build_alias
1330 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1331   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1332 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1333    { (exit 1); exit 1; }; }
1334
1335 fi
1336 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1337 echo "${ECHO_T}$ac_cv_host" >&6
1338 host=$ac_cv_host
1339 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1340 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1341 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1342
1343
1344
1345 template=
1346 echo "$as_me:$LINENO: checking which template to use" >&5
1347 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1348
1349
1350
1351
1352 # Check whether --with-template or --without-template was given.
1353 if test "${with_template+set}" = set; then
1354   withval="$with_template"
1355
1356   case $withval in
1357     yes)
1358       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1359 echo "$as_me: error: argument required for --with-template option" >&2;}
1360    { (exit 1); exit 1; }; }
1361       ;;
1362     no)
1363       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1364 echo "$as_me: error: argument required for --with-template option" >&2;}
1365    { (exit 1); exit 1; }; }
1366       ;;
1367     *)
1368
1369   case $withval in
1370     list)   echo; ls "$srcdir/src/template"; exit;;
1371     *)      if test -f "$srcdir/src/template/$with_template" ; then
1372               template=$withval
1373             else
1374               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1375 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1376    { (exit 1); exit 1; }; }
1377             fi;;
1378   esac
1379
1380       ;;
1381   esac
1382
1383 else
1384
1385 # --with-template not given
1386
1387 case $host_os in
1388      aix*) template=aix ;;
1389     beos*) template=beos ;;
1390     bsdi*) template=bsdi ;;
1391   cygwin*) template=cygwin ;;
1392   darwin*) template=darwin ;;
1393     dgux*) template=dgux ;;
1394  freebsd*) template=freebsd ;;
1395     hpux*) template=hpux ;;
1396     irix*) template=irix5 ;;
1397    linux*) template=linux ;;
1398    mingw*) template=win32 ;;
1399   netbsd*) template=netbsd ;;
1400 nextstep*) template=nextstep ;;
1401  openbsd*) template=openbsd ;;
1402      osf*) template=osf ;;
1403      qnx*) template=qnx4 ;;
1404      sco*) template=sco ;;
1405  solaris*) template=solaris ;;
1406    sunos*) template=sunos4 ;;
1407  sysv4.2*)
1408         case $host_vendor in
1409           univel) template=univel ;;
1410         esac ;;
1411    sysv4*) template=svr4 ;;
1412    sysv5*) template=unixware ;;
1413   ultrix*) template=ultrix4 ;;
1414 esac
1415
1416   if test x"$template" = x"" ; then
1417     { { echo "$as_me:$LINENO: error:
1418 *******************************************************************
1419 PostgreSQL has apparently not been ported to your platform yet.
1420 To try a manual configuration, look into the src/template directory
1421 for a similar platform and use the '--with-template=' option.
1422
1423 Please also contact <pgsql-ports@postgresql.org> to see about
1424 rectifying this.  Include the above 'checking host system type...'
1425 line.
1426 *******************************************************************
1427 " >&5
1428 echo "$as_me: error:
1429 *******************************************************************
1430 PostgreSQL has apparently not been ported to your platform yet.
1431 To try a manual configuration, look into the src/template directory
1432 for a similar platform and use the '--with-template=' option.
1433
1434 Please also contact <pgsql-ports@postgresql.org> to see about
1435 rectifying this.  Include the above 'checking host system type...'
1436 line.
1437 *******************************************************************
1438 " >&2;}
1439    { (exit 1); exit 1; }; }
1440   fi
1441
1442
1443 fi;
1444
1445
1446 echo "$as_me:$LINENO: result: $template" >&5
1447 echo "${ECHO_T}$template" >&6
1448
1449 PORTNAME=$template
1450
1451
1452 # Pick right test-and-set (TAS) code.  Most platforms have inline
1453 # assembler code in src/include/storage/s_lock.h, so we just use
1454 # a dummy file here.
1455 case $host in
1456   hppa*-*-hpux*)        need_tas=yes; tas_file=hpux_hppa.s ;;
1457   sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
1458   i?86-*-solaris*)   need_tas=yes; tas_file=solaris_i386.s ;;
1459   *)                need_tas=no;  tas_file=dummy.s ;;
1460 esac
1461 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
1462
1463
1464 if test "$need_tas" = yes ; then
1465   TAS=tas.o
1466 fi
1467
1468
1469
1470
1471 ##
1472 ## Command line options
1473 ##
1474
1475
1476 #
1477 # Add non-standard directories to the include path
1478 #
1479
1480
1481
1482 # Check whether --with-includes or --without-includes was given.
1483 if test "${with_includes+set}" = set; then
1484   withval="$with_includes"
1485
1486   case $withval in
1487     yes)
1488       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1489 echo "$as_me: error: argument required for --with-includes option" >&2;}
1490    { (exit 1); exit 1; }; }
1491       ;;
1492     no)
1493       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1494 echo "$as_me: error: argument required for --with-includes option" >&2;}
1495    { (exit 1); exit 1; }; }
1496       ;;
1497     *)
1498
1499       ;;
1500   esac
1501
1502 fi;
1503
1504
1505
1506 #
1507 # Add non-standard directories to the library search path
1508 #
1509
1510
1511
1512 # Check whether --with-libraries or --without-libraries was given.
1513 if test "${with_libraries+set}" = set; then
1514   withval="$with_libraries"
1515
1516   case $withval in
1517     yes)
1518       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1519 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1520    { (exit 1); exit 1; }; }
1521       ;;
1522     no)
1523       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1524 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1525    { (exit 1); exit 1; }; }
1526       ;;
1527     *)
1528       LIBRARY_DIRS=$withval
1529       ;;
1530   esac
1531
1532 fi;
1533
1534
1535
1536
1537
1538 # Check whether --with-libs or --without-libs was given.
1539 if test "${with_libs+set}" = set; then
1540   withval="$with_libs"
1541
1542   case $withval in
1543     yes)
1544       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1545 echo "$as_me: error: argument required for --with-libs option" >&2;}
1546    { (exit 1); exit 1; }; }
1547       ;;
1548     no)
1549       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1550 echo "$as_me: error: argument required for --with-libs option" >&2;}
1551    { (exit 1); exit 1; }; }
1552       ;;
1553     *)
1554       LIBRARY_DIRS=$withval
1555       ;;
1556   esac
1557
1558 fi;
1559
1560
1561
1562 #
1563 # 64-bit integer date/time storage (--enable-integer-datetimes)
1564 #
1565 echo "$as_me:$LINENO: checking whether to build with 64-bit integer date/time support" >&5
1566 echo $ECHO_N "checking whether to build with 64-bit integer date/time support... $ECHO_C" >&6
1567
1568
1569 # Check whether --enable-integer-datetimes or --disable-integer-datetimes was given.
1570 if test "${enable_integer_datetimes+set}" = set; then
1571   enableval="$enable_integer_datetimes"
1572
1573   case $enableval in
1574     yes)
1575
1576 cat >>confdefs.h <<\_ACEOF
1577 #define USE_INTEGER_DATETIMES 1
1578 _ACEOF
1579
1580       ;;
1581     no)
1582       :
1583       ;;
1584     *)
1585       { { echo "$as_me:$LINENO: error: no argument expected for --enable-integer-datetimes option" >&5
1586 echo "$as_me: error: no argument expected for --enable-integer-datetimes option" >&2;}
1587    { (exit 1); exit 1; }; }
1588       ;;
1589   esac
1590
1591 else
1592   enable_integer_datetimes=no
1593
1594 fi;
1595
1596 echo "$as_me:$LINENO: result: $enable_integer_datetimes" >&5
1597 echo "${ECHO_T}$enable_integer_datetimes" >&6
1598
1599
1600 #
1601 # NLS
1602 #
1603 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1604 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1605
1606
1607 # Check whether --enable-nls or --disable-nls was given.
1608 if test "${enable_nls+set}" = set; then
1609   enableval="$enable_nls"
1610
1611   case $enableval in
1612     yes)
1613       :
1614       ;;
1615     no)
1616       :
1617       ;;
1618     *)
1619       enable_nls=yes
1620 WANTED_LANGUAGES=$enableval
1621       ;;
1622   esac
1623
1624 else
1625   enable_nls=no
1626 fi;
1627
1628
1629 if test "$enable_nls" = yes; then
1630
1631 cat >>confdefs.h <<\_ACEOF
1632 #define ENABLE_NLS 1
1633 _ACEOF
1634
1635 fi
1636
1637 echo "$as_me:$LINENO: result: $enable_nls" >&5
1638 echo "${ECHO_T}$enable_nls" >&6
1639
1640
1641
1642 #
1643 # Default port number (--with-pgport), default 5432
1644 #
1645 echo "$as_me:$LINENO: checking for default port number" >&5
1646 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1647
1648
1649
1650 # Check whether --with-pgport or --without-pgport was given.
1651 if test "${with_pgport+set}" = set; then
1652   withval="$with_pgport"
1653
1654   case $withval in
1655     yes)
1656       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1657 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1658    { (exit 1); exit 1; }; }
1659       ;;
1660     no)
1661       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1662 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1663    { (exit 1); exit 1; }; }
1664       ;;
1665     *)
1666       default_port=$withval
1667       ;;
1668   esac
1669
1670 else
1671   default_port=5432
1672 fi;
1673
1674 echo "$as_me:$LINENO: result: $default_port" >&5
1675 echo "${ECHO_T}$default_port" >&6
1676 # Need both of these because some places want an integer and some a string
1677
1678 cat >>confdefs.h <<_ACEOF
1679 #define DEF_PGPORT ${default_port}
1680 _ACEOF
1681
1682
1683 cat >>confdefs.h <<_ACEOF
1684 #define DEF_PGPORT_STR "${default_port}"
1685 _ACEOF
1686
1687
1688
1689 #
1690 # Option to disable shared libraries
1691 #
1692
1693
1694 # Check whether --enable-shared or --disable-shared was given.
1695 if test "${enable_shared+set}" = set; then
1696   enableval="$enable_shared"
1697
1698   case $enableval in
1699     yes)
1700       :
1701       ;;
1702     no)
1703       :
1704       ;;
1705     *)
1706       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1707 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1708    { (exit 1); exit 1; }; }
1709       ;;
1710   esac
1711
1712 else
1713   enable_shared=yes
1714
1715 fi;
1716
1717
1718
1719 #
1720 # '-rpath'-like feature can be disabled
1721 #
1722
1723
1724 # Check whether --enable-rpath or --disable-rpath was given.
1725 if test "${enable_rpath+set}" = set; then
1726   enableval="$enable_rpath"
1727
1728   case $enableval in
1729     yes)
1730       :
1731       ;;
1732     no)
1733       :
1734       ;;
1735     *)
1736       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1737 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1738    { (exit 1); exit 1; }; }
1739       ;;
1740   esac
1741
1742 else
1743   enable_rpath=yes
1744
1745 fi;
1746
1747
1748
1749 #
1750 # Spinlocks
1751 #
1752
1753
1754 # Check whether --enable-spinlocks or --disable-spinlocks was given.
1755 if test "${enable_spinlocks+set}" = set; then
1756   enableval="$enable_spinlocks"
1757
1758   case $enableval in
1759     yes)
1760       :
1761       ;;
1762     no)
1763       :
1764       ;;
1765     *)
1766       { { echo "$as_me:$LINENO: error: no argument expected for --enable-spinlocks option" >&5
1767 echo "$as_me: error: no argument expected for --enable-spinlocks option" >&2;}
1768    { (exit 1); exit 1; }; }
1769       ;;
1770   esac
1771
1772 else
1773   enable_spinlocks=yes
1774
1775 fi;
1776
1777
1778 #
1779 # --enable-debug adds -g to compiler flags
1780 #
1781
1782
1783 # Check whether --enable-debug or --disable-debug was given.
1784 if test "${enable_debug+set}" = set; then
1785   enableval="$enable_debug"
1786
1787   case $enableval in
1788     yes)
1789       :
1790       ;;
1791     no)
1792       :
1793       ;;
1794     *)
1795       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1796 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1797    { (exit 1); exit 1; }; }
1798       ;;
1799   esac
1800
1801 else
1802   enable_debug=no
1803
1804 fi;
1805
1806
1807
1808 #
1809 # C compiler
1810 #
1811
1812 # For historical reasons you can also use --with-CC to specify the C compiler
1813 # to use, although the standard way to do this is to set the CC environment
1814 # variable.
1815
1816
1817
1818 # Check whether --with-CC or --without-CC was given.
1819 if test "${with_CC+set}" = set; then
1820   withval="$with_CC"
1821
1822   case $withval in
1823     yes)
1824       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1825 echo "$as_me: error: argument required for --with-CC option" >&2;}
1826    { (exit 1); exit 1; }; }
1827       ;;
1828     no)
1829       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1830 echo "$as_me: error: argument required for --with-CC option" >&2;}
1831    { (exit 1); exit 1; }; }
1832       ;;
1833     *)
1834       CC=$with_CC
1835       ;;
1836   esac
1837
1838 fi;
1839
1840
1841 case $template in
1842   aix) pgac_cc_list="gcc xlc";;
1843  irix) pgac_cc_list="cc";; # no gcc
1844     *) pgac_cc_list="gcc cc";;
1845 esac
1846
1847 ac_ext=c
1848 ac_cpp='$CPP $CPPFLAGS'
1849 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1850 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1851 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1852 if test -n "$ac_tool_prefix"; then
1853   for ac_prog in $pgac_cc_list
1854   do
1855     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1856 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1857 echo "$as_me:$LINENO: checking for $ac_word" >&5
1858 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1859 if test "${ac_cv_prog_CC+set}" = set; then
1860   echo $ECHO_N "(cached) $ECHO_C" >&6
1861 else
1862   if test -n "$CC"; then
1863   ac_cv_prog_CC="$CC" # Let the user override the test.
1864 else
1865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1866 for as_dir in $PATH
1867 do
1868   IFS=$as_save_IFS
1869   test -z "$as_dir" && as_dir=.
1870   for ac_exec_ext in '' $ac_executable_extensions; do
1871   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1872     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1873     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1874     break 2
1875   fi
1876 done
1877 done
1878
1879 fi
1880 fi
1881 CC=$ac_cv_prog_CC
1882 if test -n "$CC"; then
1883   echo "$as_me:$LINENO: result: $CC" >&5
1884 echo "${ECHO_T}$CC" >&6
1885 else
1886   echo "$as_me:$LINENO: result: no" >&5
1887 echo "${ECHO_T}no" >&6
1888 fi
1889
1890     test -n "$CC" && break
1891   done
1892 fi
1893 if test -z "$CC"; then
1894   ac_ct_CC=$CC
1895   for ac_prog in $pgac_cc_list
1896 do
1897   # Extract the first word of "$ac_prog", so it can be a program name with args.
1898 set dummy $ac_prog; ac_word=$2
1899 echo "$as_me:$LINENO: checking for $ac_word" >&5
1900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1901 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1902   echo $ECHO_N "(cached) $ECHO_C" >&6
1903 else
1904   if test -n "$ac_ct_CC"; then
1905   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1906 else
1907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1908 for as_dir in $PATH
1909 do
1910   IFS=$as_save_IFS
1911   test -z "$as_dir" && as_dir=.
1912   for ac_exec_ext in '' $ac_executable_extensions; do
1913   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1914     ac_cv_prog_ac_ct_CC="$ac_prog"
1915     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1916     break 2
1917   fi
1918 done
1919 done
1920
1921 fi
1922 fi
1923 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1924 if test -n "$ac_ct_CC"; then
1925   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1926 echo "${ECHO_T}$ac_ct_CC" >&6
1927 else
1928   echo "$as_me:$LINENO: result: no" >&5
1929 echo "${ECHO_T}no" >&6
1930 fi
1931
1932   test -n "$ac_ct_CC" && break
1933 done
1934
1935   CC=$ac_ct_CC
1936 fi
1937
1938
1939 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
1940 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
1941    { (exit 1); exit 1; }; }
1942
1943 # Provide some information about the compiler.
1944 echo "$as_me:$LINENO:" \
1945      "checking for C compiler version" >&5
1946 ac_compiler=`set X $ac_compile; echo $2`
1947 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1948   (eval $ac_compiler --version </dev/null >&5) 2>&5
1949   ac_status=$?
1950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1951   (exit $ac_status); }
1952 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1953   (eval $ac_compiler -v </dev/null >&5) 2>&5
1954   ac_status=$?
1955   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1956   (exit $ac_status); }
1957 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1958   (eval $ac_compiler -V </dev/null >&5) 2>&5
1959   ac_status=$?
1960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1961   (exit $ac_status); }
1962
1963 cat >conftest.$ac_ext <<_ACEOF
1964 #line $LINENO "configure"
1965 #include "confdefs.h"
1966
1967 #ifdef F77_DUMMY_MAIN
1968 #  ifdef __cplusplus
1969      extern "C"
1970 #  endif
1971    int F77_DUMMY_MAIN() { return 1; }
1972 #endif
1973 int
1974 main ()
1975 {
1976
1977   ;
1978   return 0;
1979 }
1980 _ACEOF
1981 ac_clean_files_save=$ac_clean_files
1982 ac_clean_files="$ac_clean_files a.out a.exe"
1983 # Try to create an executable without -o first, disregard a.out.
1984 # It will help us diagnose broken compilers, and finding out an intuition
1985 # of exeext.
1986 echo "$as_me:$LINENO: checking for C compiler default output" >&5
1987 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1988 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1989 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1990   (eval $ac_link_default) 2>&5
1991   ac_status=$?
1992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1993   (exit $ac_status); }; then
1994   # Find the output, starting from the most likely.  This scheme is
1995 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1996 # resort.
1997
1998 # Be careful to initialize this variable, since it used to be cached.
1999 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2000 ac_cv_exeext=
2001 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2002                 ls a.out conftest 2>/dev/null;
2003                 ls a.* conftest.* 2>/dev/null`; do
2004   case $ac_file in
2005     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2006     a.out ) # We found the default executable, but exeext='' is most
2007             # certainly right.
2008             break;;
2009     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2010           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2011           export ac_cv_exeext
2012           break;;
2013     * ) break;;
2014   esac
2015 done
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2020 echo "$as_me: error: C compiler cannot create executables" >&2;}
2021    { (exit 77); exit 77; }; }
2022 fi
2023
2024 ac_exeext=$ac_cv_exeext
2025 echo "$as_me:$LINENO: result: $ac_file" >&5
2026 echo "${ECHO_T}$ac_file" >&6
2027
2028 # Check the compiler produces executables we can run.  If not, either
2029 # the compiler is broken, or we cross compile.
2030 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2031 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2032 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2033 # If not cross compiling, check that we can run a simple program.
2034 if test "$cross_compiling" != yes; then
2035   if { ac_try='./$ac_file'
2036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2037   (eval $ac_try) 2>&5
2038   ac_status=$?
2039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2040   (exit $ac_status); }; }; then
2041     cross_compiling=no
2042   else
2043     if test "$cross_compiling" = maybe; then
2044         cross_compiling=yes
2045     else
2046         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2047 If you meant to cross compile, use \`--host'." >&5
2048 echo "$as_me: error: cannot run C compiled programs.
2049 If you meant to cross compile, use \`--host'." >&2;}
2050    { (exit 1); exit 1; }; }
2051     fi
2052   fi
2053 fi
2054 echo "$as_me:$LINENO: result: yes" >&5
2055 echo "${ECHO_T}yes" >&6
2056
2057 rm -f a.out a.exe conftest$ac_cv_exeext
2058 ac_clean_files=$ac_clean_files_save
2059 # Check the compiler produces executables we can run.  If not, either
2060 # the compiler is broken, or we cross compile.
2061 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2062 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2063 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2064 echo "${ECHO_T}$cross_compiling" >&6
2065
2066 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2067 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2068 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2069   (eval $ac_link) 2>&5
2070   ac_status=$?
2071   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2072   (exit $ac_status); }; then
2073   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2074 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2075 # work properly (i.e., refer to `conftest.exe'), while it won't with
2076 # `rm'.
2077 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2078   case $ac_file in
2079     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2080     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2081           export ac_cv_exeext
2082           break;;
2083     * ) break;;
2084   esac
2085 done
2086 else
2087   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2088 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2089    { (exit 1); exit 1; }; }
2090 fi
2091
2092 rm -f conftest$ac_cv_exeext
2093 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2094 echo "${ECHO_T}$ac_cv_exeext" >&6
2095
2096 rm -f conftest.$ac_ext
2097 EXEEXT=$ac_cv_exeext
2098 ac_exeext=$EXEEXT
2099 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2100 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2101 if test "${ac_cv_objext+set}" = set; then
2102   echo $ECHO_N "(cached) $ECHO_C" >&6
2103 else
2104   cat >conftest.$ac_ext <<_ACEOF
2105 #line $LINENO "configure"
2106 #include "confdefs.h"
2107
2108 #ifdef F77_DUMMY_MAIN
2109 #  ifdef __cplusplus
2110      extern "C"
2111 #  endif
2112    int F77_DUMMY_MAIN() { return 1; }
2113 #endif
2114 int
2115 main ()
2116 {
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 rm -f conftest.o conftest.obj
2123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2124   (eval $ac_compile) 2>&5
2125   ac_status=$?
2126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2127   (exit $ac_status); }; then
2128   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2129   case $ac_file in
2130     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2131     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2132        break;;
2133   esac
2134 done
2135 else
2136   echo "$as_me: failed program was:" >&5
2137 cat conftest.$ac_ext >&5
2138 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2139 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2140    { (exit 1); exit 1; }; }
2141 fi
2142
2143 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2144 fi
2145 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2146 echo "${ECHO_T}$ac_cv_objext" >&6
2147 OBJEXT=$ac_cv_objext
2148 ac_objext=$OBJEXT
2149 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2150 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2151 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2152   echo $ECHO_N "(cached) $ECHO_C" >&6
2153 else
2154   cat >conftest.$ac_ext <<_ACEOF
2155 #line $LINENO "configure"
2156 #include "confdefs.h"
2157
2158 #ifdef F77_DUMMY_MAIN
2159 #  ifdef __cplusplus
2160      extern "C"
2161 #  endif
2162    int F77_DUMMY_MAIN() { return 1; }
2163 #endif
2164 int
2165 main ()
2166 {
2167 #ifndef __GNUC__
2168        choke me
2169 #endif
2170
2171   ;
2172   return 0;
2173 }
2174 _ACEOF
2175 rm -f conftest.$ac_objext
2176 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2177   (eval $ac_compile) 2>&5
2178   ac_status=$?
2179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180   (exit $ac_status); } &&
2181          { ac_try='test -s conftest.$ac_objext'
2182   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2183   (eval $ac_try) 2>&5
2184   ac_status=$?
2185   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186   (exit $ac_status); }; }; then
2187   ac_compiler_gnu=yes
2188 else
2189   echo "$as_me: failed program was:" >&5
2190 cat conftest.$ac_ext >&5
2191 ac_compiler_gnu=no
2192 fi
2193 rm -f conftest.$ac_objext conftest.$ac_ext
2194 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2195
2196 fi
2197 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2198 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2199 GCC=`test $ac_compiler_gnu = yes && echo yes`
2200 ac_test_CFLAGS=${CFLAGS+set}
2201 ac_save_CFLAGS=$CFLAGS
2202 CFLAGS="-g"
2203 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2204 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2205 if test "${ac_cv_prog_cc_g+set}" = set; then
2206   echo $ECHO_N "(cached) $ECHO_C" >&6
2207 else
2208   cat >conftest.$ac_ext <<_ACEOF
2209 #line $LINENO "configure"
2210 #include "confdefs.h"
2211
2212 #ifdef F77_DUMMY_MAIN
2213 #  ifdef __cplusplus
2214      extern "C"
2215 #  endif
2216    int F77_DUMMY_MAIN() { return 1; }
2217 #endif
2218 int
2219 main ()
2220 {
2221
2222   ;
2223   return 0;
2224 }
2225 _ACEOF
2226 rm -f conftest.$ac_objext
2227 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2228   (eval $ac_compile) 2>&5
2229   ac_status=$?
2230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2231   (exit $ac_status); } &&
2232          { ac_try='test -s conftest.$ac_objext'
2233   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2234   (eval $ac_try) 2>&5
2235   ac_status=$?
2236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2237   (exit $ac_status); }; }; then
2238   ac_cv_prog_cc_g=yes
2239 else
2240   echo "$as_me: failed program was:" >&5
2241 cat conftest.$ac_ext >&5
2242 ac_cv_prog_cc_g=no
2243 fi
2244 rm -f conftest.$ac_objext conftest.$ac_ext
2245 fi
2246 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2247 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2248 if test "$ac_test_CFLAGS" = set; then
2249   CFLAGS=$ac_save_CFLAGS
2250 elif test $ac_cv_prog_cc_g = yes; then
2251   if test "$GCC" = yes; then
2252     CFLAGS="-g -O2"
2253   else
2254     CFLAGS="-g"
2255   fi
2256 else
2257   if test "$GCC" = yes; then
2258     CFLAGS="-O2"
2259   else
2260     CFLAGS=
2261   fi
2262 fi
2263 # Some people use a C++ compiler to compile C.  Since we use `exit',
2264 # in C++ we need to declare it.  In case someone uses the same compiler
2265 # for both compiling C and C++ we need to have the C++ compiler decide
2266 # the declaration of exit, since it's the most demanding environment.
2267 cat >conftest.$ac_ext <<_ACEOF
2268 #ifndef __cplusplus
2269   choke me
2270 #endif
2271 _ACEOF
2272 rm -f conftest.$ac_objext
2273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2274   (eval $ac_compile) 2>&5
2275   ac_status=$?
2276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277   (exit $ac_status); } &&
2278          { ac_try='test -s conftest.$ac_objext'
2279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2280   (eval $ac_try) 2>&5
2281   ac_status=$?
2282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283   (exit $ac_status); }; }; then
2284   for ac_declaration in \
2285    ''\
2286    '#include <stdlib.h>' \
2287    'extern "C" void std::exit (int) throw (); using std::exit;' \
2288    'extern "C" void std::exit (int); using std::exit;' \
2289    'extern "C" void exit (int) throw ();' \
2290    'extern "C" void exit (int);' \
2291    'void exit (int);'
2292 do
2293   cat >conftest.$ac_ext <<_ACEOF
2294 #line $LINENO "configure"
2295 #include "confdefs.h"
2296 #include <stdlib.h>
2297 $ac_declaration
2298 #ifdef F77_DUMMY_MAIN
2299 #  ifdef __cplusplus
2300      extern "C"
2301 #  endif
2302    int F77_DUMMY_MAIN() { return 1; }
2303 #endif
2304 int
2305 main ()
2306 {
2307 exit (42);
2308   ;
2309   return 0;
2310 }
2311 _ACEOF
2312 rm -f conftest.$ac_objext
2313 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2314   (eval $ac_compile) 2>&5
2315   ac_status=$?
2316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2317   (exit $ac_status); } &&
2318          { ac_try='test -s conftest.$ac_objext'
2319   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2320   (eval $ac_try) 2>&5
2321   ac_status=$?
2322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2323   (exit $ac_status); }; }; then
2324   :
2325 else
2326   echo "$as_me: failed program was:" >&5
2327 cat conftest.$ac_ext >&5
2328 continue
2329 fi
2330 rm -f conftest.$ac_objext conftest.$ac_ext
2331   cat >conftest.$ac_ext <<_ACEOF
2332 #line $LINENO "configure"
2333 #include "confdefs.h"
2334 $ac_declaration
2335 #ifdef F77_DUMMY_MAIN
2336 #  ifdef __cplusplus
2337      extern "C"
2338 #  endif
2339    int F77_DUMMY_MAIN() { return 1; }
2340 #endif
2341 int
2342 main ()
2343 {
2344 exit (42);
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f conftest.$ac_objext
2350 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2354   (exit $ac_status); } &&
2355          { ac_try='test -s conftest.$ac_objext'
2356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2360   (exit $ac_status); }; }; then
2361   break
2362 else
2363   echo "$as_me: failed program was:" >&5
2364 cat conftest.$ac_ext >&5
2365 fi
2366 rm -f conftest.$ac_objext conftest.$ac_ext
2367 done
2368 rm -f conftest*
2369 if test -n "$ac_declaration"; then
2370   echo '#ifdef __cplusplus' >>confdefs.h
2371   echo $ac_declaration      >>confdefs.h
2372   echo '#endif'             >>confdefs.h
2373 fi
2374
2375 else
2376   echo "$as_me: failed program was:" >&5
2377 cat conftest.$ac_ext >&5
2378 fi
2379 rm -f conftest.$ac_objext conftest.$ac_ext
2380 ac_ext=c
2381 ac_cpp='$CPP $CPPFLAGS'
2382 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2383 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2384 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2385
2386
2387 #
2388 # Read the template
2389 #
2390 . "$srcdir/src/template/$template" || exit
2391
2392 # adjust CFLAGS per template
2393 if test "$ac_env_CFLAGS_set" = set; then
2394   CFLAGS=$ac_env_CFLAGS_value
2395 fi
2396 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2397   CFLAGS="$CFLAGS -g"
2398 fi
2399 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2400 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2401
2402 # We already have this in Makefile.win32, but configure needs it too
2403 if test "$PORTNAME" = "win32"
2404 then
2405         CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
2406 fi
2407
2408 # Check if the compiler still works with the template settings
2409 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2410 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2411
2412 cat >conftest.$ac_ext <<_ACEOF
2413 #line $LINENO "configure"
2414 #include "confdefs.h"
2415
2416 #ifdef F77_DUMMY_MAIN
2417 #  ifdef __cplusplus
2418      extern "C"
2419 #  endif
2420    int F77_DUMMY_MAIN() { return 1; }
2421 #endif
2422 int
2423 main ()
2424 {
2425 return 0;
2426   ;
2427   return 0;
2428 }
2429 _ACEOF
2430 rm -f conftest.$ac_objext conftest$ac_exeext
2431 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2432   (eval $ac_link) 2>&5
2433   ac_status=$?
2434   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2435   (exit $ac_status); } &&
2436          { ac_try='test -s conftest$ac_exeext'
2437   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2438   (eval $ac_try) 2>&5
2439   ac_status=$?
2440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2441   (exit $ac_status); }; }; then
2442   echo "$as_me:$LINENO: result: yes" >&5
2443 echo "${ECHO_T}yes" >&6
2444 else
2445   echo "$as_me: failed program was:" >&5
2446 cat conftest.$ac_ext >&5
2447 echo "$as_me:$LINENO: result: no" >&5
2448 echo "${ECHO_T}no" >&6
2449    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2450 echo "$as_me: error: cannot proceed" >&2;}
2451    { (exit 1); exit 1; }; }
2452 fi
2453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2454
2455 # Defend against gcc -ffastmath
2456 if test "$GCC" = yes; then
2457 cat >conftest.$ac_ext <<_ACEOF
2458 #line $LINENO "configure"
2459 #include "confdefs.h"
2460
2461 #ifdef F77_DUMMY_MAIN
2462 #  ifdef __cplusplus
2463      extern "C"
2464 #  endif
2465    int F77_DUMMY_MAIN() { return 1; }
2466 #endif
2467 int
2468 main ()
2469 {
2470 #ifdef __FAST_MATH__
2471 choke me
2472 #endif
2473   ;
2474   return 0;
2475 }
2476 _ACEOF
2477 rm -f conftest.$ac_objext
2478 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2479   (eval $ac_compile) 2>&5
2480   ac_status=$?
2481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482   (exit $ac_status); } &&
2483          { ac_try='test -s conftest.$ac_objext'
2484   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2485   (eval $ac_try) 2>&5
2486   ac_status=$?
2487   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2488   (exit $ac_status); }; }; then
2489   :
2490 else
2491   echo "$as_me: failed program was:" >&5
2492 cat conftest.$ac_ext >&5
2493 { { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
2494 echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
2495    { (exit 1); exit 1; }; }
2496 fi
2497 rm -f conftest.$ac_objext conftest.$ac_ext
2498 fi
2499
2500 ac_ext=c
2501 ac_cpp='$CPP $CPPFLAGS'
2502 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2503 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2505 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2506 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2507 # On Suns, sometimes $CPP names a directory.
2508 if test -n "$CPP" && test -d "$CPP"; then
2509   CPP=
2510 fi
2511 if test -z "$CPP"; then
2512   if test "${ac_cv_prog_CPP+set}" = set; then
2513   echo $ECHO_N "(cached) $ECHO_C" >&6
2514 else
2515       # Double quotes because CPP needs to be expanded
2516     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2517     do
2518       ac_preproc_ok=false
2519 for ac_c_preproc_warn_flag in '' yes
2520 do
2521   # Use a header file that comes with gcc, so configuring glibc
2522   # with a fresh cross-compiler works.
2523   # On the NeXT, cc -E runs the code through the compiler's parser,
2524   # not just through cpp. "Syntax error" is here to catch this case.
2525   cat >conftest.$ac_ext <<_ACEOF
2526 #line $LINENO "configure"
2527 #include "confdefs.h"
2528 #include <assert.h>
2529                      Syntax error
2530 _ACEOF
2531 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2532   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2533   ac_status=$?
2534   egrep -v '^ *\+' conftest.er1 >conftest.err
2535   rm -f conftest.er1
2536   cat conftest.err >&5
2537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2538   (exit $ac_status); } >/dev/null; then
2539   if test -s conftest.err; then
2540     ac_cpp_err=$ac_c_preproc_warn_flag
2541   else
2542     ac_cpp_err=
2543   fi
2544 else
2545   ac_cpp_err=yes
2546 fi
2547 if test -z "$ac_cpp_err"; then
2548   :
2549 else
2550   echo "$as_me: failed program was:" >&5
2551   cat conftest.$ac_ext >&5
2552   # Broken: fails on valid input.
2553 continue
2554 fi
2555 rm -f conftest.err conftest.$ac_ext
2556
2557   # OK, works on sane cases.  Now check whether non-existent headers
2558   # can be detected and how.
2559   cat >conftest.$ac_ext <<_ACEOF
2560 #line $LINENO "configure"
2561 #include "confdefs.h"
2562 #include <ac_nonexistent.h>
2563 _ACEOF
2564 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2565   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2566   ac_status=$?
2567   egrep -v '^ *\+' conftest.er1 >conftest.err
2568   rm -f conftest.er1
2569   cat conftest.err >&5
2570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2571   (exit $ac_status); } >/dev/null; then
2572   if test -s conftest.err; then
2573     ac_cpp_err=$ac_c_preproc_warn_flag
2574   else
2575     ac_cpp_err=
2576   fi
2577 else
2578   ac_cpp_err=yes
2579 fi
2580 if test -z "$ac_cpp_err"; then
2581   # Broken: success on invalid input.
2582 continue
2583 else
2584   echo "$as_me: failed program was:" >&5
2585   cat conftest.$ac_ext >&5
2586   # Passes both tests.
2587 ac_preproc_ok=:
2588 break
2589 fi
2590 rm -f conftest.err conftest.$ac_ext
2591
2592 done
2593 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2594 rm -f conftest.err conftest.$ac_ext
2595 if $ac_preproc_ok; then
2596   break
2597 fi
2598
2599     done
2600     ac_cv_prog_CPP=$CPP
2601
2602 fi
2603   CPP=$ac_cv_prog_CPP
2604 else
2605   ac_cv_prog_CPP=$CPP
2606 fi
2607 echo "$as_me:$LINENO: result: $CPP" >&5
2608 echo "${ECHO_T}$CPP" >&6
2609 ac_preproc_ok=false
2610 for ac_c_preproc_warn_flag in '' yes
2611 do
2612   # Use a header file that comes with gcc, so configuring glibc
2613   # with a fresh cross-compiler works.
2614   # On the NeXT, cc -E runs the code through the compiler's parser,
2615   # not just through cpp. "Syntax error" is here to catch this case.
2616   cat >conftest.$ac_ext <<_ACEOF
2617 #line $LINENO "configure"
2618 #include "confdefs.h"
2619 #include <assert.h>
2620                      Syntax error
2621 _ACEOF
2622 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2624   ac_status=$?
2625   egrep -v '^ *\+' conftest.er1 >conftest.err
2626   rm -f conftest.er1
2627   cat conftest.err >&5
2628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629   (exit $ac_status); } >/dev/null; then
2630   if test -s conftest.err; then
2631     ac_cpp_err=$ac_c_preproc_warn_flag
2632   else
2633     ac_cpp_err=
2634   fi
2635 else
2636   ac_cpp_err=yes
2637 fi
2638 if test -z "$ac_cpp_err"; then
2639   :
2640 else
2641   echo "$as_me: failed program was:" >&5
2642   cat conftest.$ac_ext >&5
2643   # Broken: fails on valid input.
2644 continue
2645 fi
2646 rm -f conftest.err conftest.$ac_ext
2647
2648   # OK, works on sane cases.  Now check whether non-existent headers
2649   # can be detected and how.
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line $LINENO "configure"
2652 #include "confdefs.h"
2653 #include <ac_nonexistent.h>
2654 _ACEOF
2655 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2656   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2657   ac_status=$?
2658   egrep -v '^ *\+' conftest.er1 >conftest.err
2659   rm -f conftest.er1
2660   cat conftest.err >&5
2661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662   (exit $ac_status); } >/dev/null; then
2663   if test -s conftest.err; then
2664     ac_cpp_err=$ac_c_preproc_warn_flag
2665   else
2666     ac_cpp_err=
2667   fi
2668 else
2669   ac_cpp_err=yes
2670 fi
2671 if test -z "$ac_cpp_err"; then
2672   # Broken: success on invalid input.
2673 continue
2674 else
2675   echo "$as_me: failed program was:" >&5
2676   cat conftest.$ac_ext >&5
2677   # Passes both tests.
2678 ac_preproc_ok=:
2679 break
2680 fi
2681 rm -f conftest.err conftest.$ac_ext
2682
2683 done
2684 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2685 rm -f conftest.err conftest.$ac_ext
2686 if $ac_preproc_ok; then
2687   :
2688 else
2689   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2690 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2691    { (exit 1); exit 1; }; }
2692 fi
2693
2694 ac_ext=c
2695 ac_cpp='$CPP $CPPFLAGS'
2696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2699
2700
2701
2702 # Create compiler version string
2703 if test x"$GCC" = x"yes" ; then
2704   cc_string="GCC `${CC} --version | sed q`"
2705 else
2706   cc_string=$CC
2707 fi
2708
2709 cat >>confdefs.h <<_ACEOF
2710 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
2711 _ACEOF
2712
2713
2714
2715 #
2716 # Automatic dependency tracking
2717 #
2718
2719
2720 # Check whether --enable-depend or --disable-depend was given.
2721 if test "${enable_depend+set}" = set; then
2722   enableval="$enable_depend"
2723
2724   case $enableval in
2725     yes)
2726       autodepend=yes
2727       ;;
2728     no)
2729       :
2730       ;;
2731     *)
2732       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
2733 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
2734    { (exit 1); exit 1; }; }
2735       ;;
2736   esac
2737
2738 else
2739   enable_depend=no
2740
2741 fi;
2742
2743
2744
2745
2746 #
2747 # Enable assert checks
2748 #
2749
2750
2751 # Check whether --enable-cassert or --disable-cassert was given.
2752 if test "${enable_cassert+set}" = set; then
2753   enableval="$enable_cassert"
2754
2755   case $enableval in
2756     yes)
2757
2758 cat >>confdefs.h <<\_ACEOF
2759 #define USE_ASSERT_CHECKING 1
2760 _ACEOF
2761
2762       ;;
2763     no)
2764       :
2765       ;;
2766     *)
2767       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
2768 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
2769    { (exit 1); exit 1; }; }
2770       ;;
2771   esac
2772
2773 else
2774   enable_cassert=no
2775
2776 fi;
2777
2778
2779
2780 #
2781 # Include directories
2782 #
2783 ac_save_IFS=$IFS
2784 IFS="${IFS}:"
2785 # SRCH_INC comes from the template file
2786 for dir in $with_includes $SRCH_INC; do
2787   if test -d "$dir"; then
2788     INCLUDES="$INCLUDES -I$dir"
2789   else
2790     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
2791 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
2792   fi
2793 done
2794 IFS=$ac_save_IFS
2795
2796
2797
2798 #
2799 # Library directories
2800 #
2801 ac_save_IFS=$IFS
2802 IFS="${IFS}:"
2803 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
2804 for dir in $LIBRARY_DIRS $SRCH_LIB; do
2805   if test -d "$dir"; then
2806     LIBDIRS="$LIBDIRS -L$dir"
2807   else
2808     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
2809 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
2810   fi
2811 done
2812 IFS=$ac_save_IFS
2813
2814 #
2815 # Enable thread-safe client libraries
2816 #
2817 echo "$as_me:$LINENO: checking allow thread-safe client libraries" >&5
2818 echo $ECHO_N "checking allow thread-safe client libraries... $ECHO_C" >&6
2819
2820
2821 # Check whether --enable-thread-safety or --disable-thread-safety was given.
2822 if test "${enable_thread_safety+set}" = set; then
2823   enableval="$enable_thread_safety"
2824
2825   case $enableval in
2826     yes)
2827
2828 cat >>confdefs.h <<\_ACEOF
2829 #define USE_THREADS 1
2830 _ACEOF
2831
2832       ;;
2833     no)
2834       :
2835       ;;
2836     *)
2837       { { echo "$as_me:$LINENO: error: no argument expected for --enable-thread-safety option" >&5
2838 echo "$as_me: error: no argument expected for --enable-thread-safety option" >&2;}
2839    { (exit 1); exit 1; }; }
2840       ;;
2841   esac
2842
2843 else
2844   enable_thread_safety=no
2845
2846 fi;
2847
2848 echo "$as_me:$LINENO: result: $enable_thread_safety" >&5
2849 echo "${ECHO_T}$enable_thread_safety" >&6
2850
2851
2852 #
2853 # Tcl/Tk
2854 #
2855 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
2856 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
2857
2858
2859
2860 # Check whether --with-tcl or --without-tcl was given.
2861 if test "${with_tcl+set}" = set; then
2862   withval="$with_tcl"
2863
2864   case $withval in
2865     yes)
2866       :
2867       ;;
2868     no)
2869       :
2870       ;;
2871     *)
2872       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
2873 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
2874    { (exit 1); exit 1; }; }
2875       ;;
2876   esac
2877
2878 else
2879   with_tcl=no
2880
2881 fi;
2882
2883 echo "$as_me:$LINENO: result: $with_tcl" >&5
2884 echo "${ECHO_T}$with_tcl" >&6
2885
2886
2887 # If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
2888 echo "$as_me:$LINENO: checking whether to build with Tk" >&5
2889 echo $ECHO_N "checking whether to build with Tk... $ECHO_C" >&6
2890 if test "$with_tcl" = yes; then
2891
2892
2893
2894 # Check whether --with-tk or --without-tk was given.
2895 if test "${with_tk+set}" = set; then
2896   withval="$with_tk"
2897
2898   case $withval in
2899     yes)
2900       :
2901       ;;
2902     no)
2903       :
2904       ;;
2905     *)
2906       { { echo "$as_me:$LINENO: error: no argument expected for --with-tk option" >&5
2907 echo "$as_me: error: no argument expected for --with-tk option" >&2;}
2908    { (exit 1); exit 1; }; }
2909       ;;
2910   esac
2911
2912 else
2913   with_tk=yes
2914
2915 fi;
2916
2917 else
2918   with_tk=no
2919 fi
2920 echo "$as_me:$LINENO: result: $with_tk" >&5
2921 echo "${ECHO_T}$with_tk" >&6
2922
2923
2924
2925 # We see if the path to the Tcl/Tk configuration scripts is specified.
2926 # This will override the use of tclsh to find the paths to search.
2927
2928
2929
2930
2931 # Check whether --with-tclconfig or --without-tclconfig was given.
2932 if test "${with_tclconfig+set}" = set; then
2933   withval="$with_tclconfig"
2934
2935   case $withval in
2936     yes)
2937       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
2938 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
2939    { (exit 1); exit 1; }; }
2940       ;;
2941     no)
2942       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
2943 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
2944    { (exit 1); exit 1; }; }
2945       ;;
2946     *)
2947
2948       ;;
2949   esac
2950
2951 fi;
2952
2953
2954 # We see if the path to the Tk configuration scripts is specified.
2955 # This will override the use of tclsh to find the paths to search.
2956
2957
2958
2959
2960 # Check whether --with-tkconfig or --without-tkconfig was given.
2961 if test "${with_tkconfig+set}" = set; then
2962   withval="$with_tkconfig"
2963
2964   case $withval in
2965     yes)
2966       { { echo "$as_me:$LINENO: error: argument required for --with-tkconfig option" >&5
2967 echo "$as_me: error: argument required for --with-tkconfig option" >&2;}
2968    { (exit 1); exit 1; }; }
2969       ;;
2970     no)
2971       { { echo "$as_me:$LINENO: error: argument required for --with-tkconfig option" >&5
2972 echo "$as_me: error: argument required for --with-tkconfig option" >&2;}
2973    { (exit 1); exit 1; }; }
2974       ;;
2975     *)
2976
2977       ;;
2978   esac
2979
2980 fi;
2981
2982
2983 #
2984 # Optionally build Perl modules (PL/Perl)
2985 #
2986 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
2987 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
2988
2989
2990
2991 # Check whether --with-perl or --without-perl was given.
2992 if test "${with_perl+set}" = set; then
2993   withval="$with_perl"
2994
2995   case $withval in
2996     yes)
2997       :
2998       ;;
2999     no)
3000       :
3001       ;;
3002     *)
3003       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3004 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3005    { (exit 1); exit 1; }; }
3006       ;;
3007   esac
3008
3009 else
3010   with_perl=no
3011
3012 fi;
3013
3014 echo "$as_me:$LINENO: result: $with_perl" >&5
3015 echo "${ECHO_T}$with_perl" >&6
3016
3017
3018 #
3019 # Optionally build Python modules (PL/Python)
3020 #
3021 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3022 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3023
3024
3025
3026 # Check whether --with-python or --without-python was given.
3027 if test "${with_python+set}" = set; then
3028   withval="$with_python"
3029
3030   case $withval in
3031     yes)
3032       :
3033       ;;
3034     no)
3035       :
3036       ;;
3037     *)
3038       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3039 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3040    { (exit 1); exit 1; }; }
3041       ;;
3042   esac
3043
3044 else
3045   with_python=no
3046
3047 fi;
3048
3049 echo "$as_me:$LINENO: result: $with_python" >&5
3050 echo "${ECHO_T}$with_python" >&6
3051
3052
3053 #
3054 # Optionally build the Java/JDBC tools
3055 #
3056 echo "$as_me:$LINENO: checking whether to build Java/JDBC tools" >&5
3057 echo $ECHO_N "checking whether to build Java/JDBC tools... $ECHO_C" >&6
3058
3059
3060
3061 # Check whether --with-java or --without-java was given.
3062 if test "${with_java+set}" = set; then
3063   withval="$with_java"
3064
3065   case $withval in
3066     yes)
3067       echo "$as_me:$LINENO: result: yes" >&5
3068 echo "${ECHO_T}yes" >&6
3069
3070   for ac_prog in jakarta-ant ant ant.sh ant.bat
3071 do
3072   # Extract the first word of "$ac_prog", so it can be a program name with args.
3073 set dummy $ac_prog; ac_word=$2
3074 echo "$as_me:$LINENO: checking for $ac_word" >&5
3075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3076 if test "${ac_cv_path_ANT+set}" = set; then
3077   echo $ECHO_N "(cached) $ECHO_C" >&6
3078 else
3079   case $ANT in
3080   [\\/]* | ?:[\\/]*)
3081   ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
3082   ;;
3083   *)
3084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085 for as_dir in $PATH
3086 do
3087   IFS=$as_save_IFS
3088   test -z "$as_dir" && as_dir=.
3089   for ac_exec_ext in '' $ac_executable_extensions; do
3090   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3091     ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
3092     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3093     break 2
3094   fi
3095 done
3096 done
3097
3098   ;;
3099 esac
3100 fi
3101 ANT=$ac_cv_path_ANT
3102
3103 if test -n "$ANT"; then
3104   echo "$as_me:$LINENO: result: $ANT" >&5
3105 echo "${ECHO_T}$ANT" >&6
3106 else
3107   echo "$as_me:$LINENO: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 fi
3110
3111   test -n "$ANT" && break
3112 done
3113
3114
3115   echo "$as_me:$LINENO: checking whether $ANT works" >&5
3116 echo $ECHO_N "checking whether $ANT works... $ECHO_C" >&6
3117 if test "${pgac_cv_prog_ant_works+set}" = set; then
3118   echo $ECHO_N "(cached) $ECHO_C" >&6
3119 else
3120
3121     cat > conftest.java << EOF
3122 public class conftest {
3123     int testmethod(int a, int b) {
3124         return a + b;
3125     }
3126 }
3127 EOF
3128
3129     cat > conftest.xml << EOF
3130 <project name="conftest" default="conftest">
3131  <target name="conftest">
3132   <javac srcdir="." includes="conftest.java">
3133   </javac>
3134  </target>
3135 </project>
3136 EOF
3137
3138     pgac_cmd='$ANT -buildfile conftest.xml 1>&2'
3139     { (eval echo "$as_me:$LINENO: \"$pgac_cmd\"") >&5
3140   (eval $pgac_cmd) 2>&5
3141   ac_status=$?
3142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3143   (exit $ac_status); }
3144     pgac_save_status=$?
3145     if test $? = 0 && test -f ./conftest.class ; then
3146       pgac_cv_prog_ant_works=yes
3147     else
3148       echo "configure: failed java program was:" >&5
3149       cat conftest.java >&5
3150       echo "configure: failed build file was:" >&5
3151       cat conftest.xml >&5
3152       pgac_cv_prog_ant_works=no
3153     fi
3154
3155     rm -f conftest* core core.* *.core
3156
3157 fi
3158 echo "$as_me:$LINENO: result: $pgac_cv_prog_ant_works" >&5
3159 echo "${ECHO_T}$pgac_cv_prog_ant_works" >&6
3160
3161   if test "$pgac_cv_prog_ant_works" != yes; then
3162     { { echo "$as_me:$LINENO: error: ant does not work" >&5
3163 echo "$as_me: error: ant does not work" >&2;}
3164    { (exit 1); exit 1; }; }
3165   fi
3166
3167
3168 if test -z "$ANT"; then
3169   { { echo "$as_me:$LINENO: error: Ant is required to build Java components
3170 If you have Ant already installed, see config.log for details on the failure." >&5
3171 echo "$as_me: error: Ant is required to build Java components
3172 If you have Ant already installed, see config.log for details on the failure." >&2;}
3173    { (exit 1); exit 1; }; }
3174 fi
3175 if "$ANT" -version | sed q | egrep -v ' 1\.[5-9]| [2-9]\.' >/dev/null ; then
3176   { { echo "$as_me:$LINENO: error: Ant version >= 1.5 is required to build Java components" >&5
3177 echo "$as_me: error: Ant version >= 1.5 is required to build Java components" >&2;}
3178    { (exit 1); exit 1; }; }
3179 fi
3180       ;;
3181     no)
3182       echo "$as_me:$LINENO: result: no" >&5
3183 echo "${ECHO_T}no" >&6
3184       ;;
3185     *)
3186       { { echo "$as_me:$LINENO: error: no argument expected for --with-java option" >&5
3187 echo "$as_me: error: no argument expected for --with-java option" >&2;}
3188    { (exit 1); exit 1; }; }
3189       ;;
3190   esac
3191
3192 else
3193   with_java=no
3194 echo "$as_me:$LINENO: result: no" >&5
3195 echo "${ECHO_T}no" >&6
3196 fi;
3197
3198
3199
3200
3201 #
3202 # Kerberos 4
3203 #
3204 echo "$as_me:$LINENO: checking whether to build with Kerberos 4 support" >&5
3205 echo $ECHO_N "checking whether to build with Kerberos 4 support... $ECHO_C" >&6
3206
3207
3208
3209 # Check whether --with-krb4 or --without-krb4 was given.
3210 if test "${with_krb4+set}" = set; then
3211   withval="$with_krb4"
3212
3213   case $withval in
3214     yes)
3215       krb4_prefix=/usr/athena
3216       ;;
3217     no)
3218       :
3219       ;;
3220     *)
3221       with_krb4=yes
3222 krb4_prefix=$withval
3223       ;;
3224   esac
3225
3226 else
3227   with_krb4=no
3228 fi;
3229
3230
3231 if test "$with_krb4" = yes; then
3232
3233   echo "$as_me:$LINENO: result: yes" >&5
3234 echo "${ECHO_T}yes" >&6
3235
3236 cat >>confdefs.h <<\_ACEOF
3237 #define KRB4 1
3238 _ACEOF
3239
3240
3241   if test -d "$krb4_prefix/include"; then
3242     INCLUDES="$INCLUDES -I$krb4_prefix/include"
3243   fi
3244   if test -d "$krb4_prefix/lib"; then
3245     LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
3246   fi
3247
3248   krb_srvtab="/etc/srvtab"
3249
3250 else
3251   echo "$as_me:$LINENO: result: no" >&5
3252 echo "${ECHO_T}no" >&6
3253 fi
3254
3255
3256
3257
3258
3259 #
3260 # Kerberos 5
3261 #
3262 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3263 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3264
3265
3266
3267 # Check whether --with-krb5 or --without-krb5 was given.
3268 if test "${with_krb5+set}" = set; then
3269   withval="$with_krb5"
3270
3271   case $withval in
3272     yes)
3273       krb5_prefix=/usr/athena
3274       ;;
3275     no)
3276       :
3277       ;;
3278     *)
3279       with_krb5=yes
3280 krb5_prefix=$withval
3281       ;;
3282   esac
3283
3284 else
3285   with_krb5=no
3286 fi;
3287
3288
3289 if test "$with_krb5" = yes; then
3290
3291   echo "$as_me:$LINENO: result: yes" >&5
3292 echo "${ECHO_T}yes" >&6
3293
3294 cat >>confdefs.h <<\_ACEOF
3295 #define KRB5 1
3296 _ACEOF
3297
3298
3299   if test -d "$krb5_prefix/include"; then
3300     INCLUDES="$INCLUDES -I$krb5_prefix/include"
3301   fi
3302   if test -d "$krb5_prefix/lib"; then
3303     LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
3304   fi
3305
3306   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3307
3308 else
3309   echo "$as_me:$LINENO: result: no" >&5
3310 echo "${ECHO_T}no" >&6
3311 fi
3312
3313
3314
3315
3316
3317 # Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
3318 if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
3319   { { echo "$as_me:$LINENO: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&5
3320 echo "$as_me: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&2;}
3321    { (exit 1); exit 1; }; }
3322 fi
3323
3324
3325
3326
3327 #
3328 # Kerberos configuration parameters
3329 #
3330
3331
3332
3333 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3334 if test "${with_krb_srvnam+set}" = set; then
3335   withval="$with_krb_srvnam"
3336
3337   case $withval in
3338     yes)
3339       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3340 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3341    { (exit 1); exit 1; }; }
3342       ;;
3343     no)
3344       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3345 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3346    { (exit 1); exit 1; }; }
3347       ;;
3348     *)
3349
3350       ;;
3351   esac
3352
3353 else
3354   with_krb_srvnam="postgres"
3355 fi;
3356
3357
3358 cat >>confdefs.h <<_ACEOF
3359 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3360 _ACEOF
3361
3362
3363
3364 #
3365 # PAM
3366 #
3367 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3368 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3369
3370
3371
3372 # Check whether --with-pam or --without-pam was given.
3373 if test "${with_pam+set}" = set; then
3374   withval="$with_pam"
3375
3376   case $withval in
3377     yes)
3378
3379 cat >>confdefs.h <<\_ACEOF
3380 #define USE_PAM 1
3381 _ACEOF
3382
3383       ;;
3384     no)
3385       :
3386       ;;
3387     *)
3388       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3389 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3390    { (exit 1); exit 1; }; }
3391       ;;
3392   esac
3393
3394 else
3395   with_pam=no
3396
3397 fi;
3398
3399 echo "$as_me:$LINENO: result: $with_pam" >&5
3400 echo "${ECHO_T}$with_pam" >&6
3401
3402
3403
3404 #
3405 # Rendezvous
3406 #
3407 echo "$as_me:$LINENO: checking whether to build with Rendezvous support" >&5
3408 echo $ECHO_N "checking whether to build with Rendezvous support... $ECHO_C" >&6
3409
3410
3411
3412 # Check whether --with-rendezvous or --without-rendezvous was given.
3413 if test "${with_rendezvous+set}" = set; then
3414   withval="$with_rendezvous"
3415
3416   case $withval in
3417     yes)
3418
3419 cat >>confdefs.h <<\_ACEOF
3420 #define USE_RENDEZVOUS 1
3421 _ACEOF
3422
3423       ;;
3424     no)
3425       :
3426       ;;
3427     *)
3428       { { echo "$as_me:$LINENO: error: no argument expected for --with-rendezvous option" >&5
3429 echo "$as_me: error: no argument expected for --with-rendezvous option" >&2;}
3430    { (exit 1); exit 1; }; }
3431       ;;
3432   esac
3433
3434 else
3435   with_rendezvous=no
3436
3437 fi;
3438
3439 echo "$as_me:$LINENO: result: $with_rendezvous" >&5
3440 echo "${ECHO_T}$with_rendezvous" >&6
3441
3442
3443
3444 #
3445 # OpenSSL
3446 #
3447
3448
3449
3450 # Check whether --with-openssl or --without-openssl was given.
3451 if test "${with_openssl+set}" = set; then
3452   withval="$with_openssl"
3453
3454   case $withval in
3455     yes)
3456       openssl_prefix=/usr/local/ssl
3457       ;;
3458     no)
3459       :
3460       ;;
3461     *)
3462       with_openssl=yes
3463 openssl_prefix=$withval
3464       ;;
3465   esac
3466
3467 else
3468   with_openssl=no
3469 fi;
3470
3471
3472 if test "$with_openssl" = yes; then
3473
3474   echo "$as_me:$LINENO: result: building with OpenSSL support" >&5
3475 echo "${ECHO_T}building with OpenSSL support" >&6
3476
3477 cat >>confdefs.h <<\_ACEOF
3478 #define USE_SSL 1
3479 _ACEOF
3480
3481
3482   if test -d "${openssl_prefix}/include" ; then
3483     INCLUDES="$INCLUDES -I${openssl_prefix}/include"
3484   fi
3485   if test -d "${openssl_prefix}/lib" ; then
3486     LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
3487   fi
3488
3489 fi
3490
3491
3492
3493
3494
3495 #
3496 # Readline
3497 #
3498
3499
3500
3501 # Check whether --with-readline or --without-readline was given.
3502 if test "${with_readline+set}" = set; then
3503   withval="$with_readline"
3504
3505   case $withval in
3506     yes)
3507       :
3508       ;;
3509     no)
3510       :
3511       ;;
3512     *)
3513       { { echo "$as_me:$LINENO: error: no argument expected for --with-readline option" >&5
3514 echo "$as_me: error: no argument expected for --with-readline option" >&2;}
3515    { (exit 1); exit 1; }; }
3516       ;;
3517   esac
3518
3519 else
3520   with_readline=yes
3521
3522 fi;
3523
3524
3525 #
3526 # Zlib
3527 #
3528
3529
3530
3531 # Check whether --with-zlib or --without-zlib was given.
3532 if test "${with_zlib+set}" = set; then
3533   withval="$with_zlib"
3534
3535   case $withval in
3536     yes)
3537       :
3538       ;;
3539     no)
3540       :
3541       ;;
3542     *)
3543       { { echo "$as_me:$LINENO: error: no argument expected for --with-zlib option" >&5
3544 echo "$as_me: error: no argument expected for --with-zlib option" >&2;}
3545    { (exit 1); exit 1; }; }
3546       ;;
3547   esac
3548
3549 else
3550   with_zlib=yes
3551
3552 fi;
3553
3554
3555 #
3556 # Elf
3557 #
3558
3559 # Assume system is ELF if it predefines __ELF__ as 1,
3560 # otherwise believe host_os based default.
3561 case $host_os in
3562     freebsd1*|freebsd2*) elf=no;;
3563     freebsd3*|freebsd4*) elf=yes;;
3564 esac
3565
3566
3567 cat >conftest.$ac_ext <<_ACEOF
3568 #line $LINENO "configure"
3569 #include "confdefs.h"
3570 #if __ELF__
3571   yes
3572 #endif
3573
3574 _ACEOF
3575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3576   egrep "yes" >/dev/null 2>&1; then
3577   ELF_SYS=true
3578 else
3579   if test "X$elf" = "Xyes" ; then
3580   ELF_SYS=true
3581 else
3582   ELF_SYS=
3583 fi
3584 fi
3585 rm -f conftest*
3586
3587
3588
3589 #
3590 # Assignments
3591 #
3592
3593 CPPFLAGS="$CPPFLAGS $INCLUDES"
3594 LDFLAGS="$LDFLAGS $LIBDIRS"
3595
3596 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
3597 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
3598 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
3599 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
3600
3601
3602 for ac_prog in gawk mawk nawk awk
3603 do
3604   # Extract the first word of "$ac_prog", so it can be a program name with args.
3605 set dummy $ac_prog; ac_word=$2
3606 echo "$as_me:$LINENO: checking for $ac_word" >&5
3607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3608 if test "${ac_cv_prog_AWK+set}" = set; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   if test -n "$AWK"; then
3612   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3613 else
3614 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3615 for as_dir in $PATH
3616 do
3617   IFS=$as_save_IFS
3618   test -z "$as_dir" && as_dir=.
3619   for ac_exec_ext in '' $ac_executable_extensions; do
3620   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3621     ac_cv_prog_AWK="$ac_prog"
3622     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3623     break 2
3624   fi
3625 done
3626 done
3627
3628 fi
3629 fi
3630 AWK=$ac_cv_prog_AWK
3631 if test -n "$AWK"; then
3632   echo "$as_me:$LINENO: result: $AWK" >&5
3633 echo "${ECHO_T}$AWK" >&6
3634 else
3635   echo "$as_me:$LINENO: result: no" >&5
3636 echo "${ECHO_T}no" >&6
3637 fi
3638
3639   test -n "$AWK" && break
3640 done
3641
3642 echo "$as_me:$LINENO: checking for flex" >&5
3643 echo $ECHO_N "checking for flex... $ECHO_C" >&6
3644 if test "${pgac_cv_path_flex+set}" = set; then
3645   echo $ECHO_N "(cached) $ECHO_C" >&6
3646 else
3647   # Let the user override the test
3648 if test -n "$FLEX"; then
3649   pgac_cv_path_flex=$FLEX
3650 else
3651   pgac_save_IFS=$IFS
3652   IFS=:
3653   for pgac_dir in $PATH; do
3654     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
3655       pgac_dir=`pwd`
3656     fi
3657     for pgac_prog in flex lex; do
3658       pgac_candidate="$pgac_dir/$pgac_prog"
3659       if test -f "$pgac_candidate" \
3660         && $pgac_candidate --version </dev/null >/dev/null 2>&1
3661       then
3662         echo '%%'  > conftest.l
3663         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
3664           if $pgac_candidate --version | grep ' 2\.5\.3$' >/dev/null 2>&1; then
3665             pgac_broken_flex=$pgac_candidate
3666             continue
3667           fi
3668
3669           pgac_cv_path_flex=$pgac_candidate
3670           break 2
3671         fi
3672       fi
3673     done
3674   done
3675   IFS=$pgac_save_IFS
3676   rm -f conftest.l
3677   : ${pgac_cv_path_flex=no}
3678 fi
3679
3680 fi
3681 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
3682 echo "${ECHO_T}$pgac_cv_path_flex" >&6
3683 if test x"$pgac_cv_path_flex" = x"no"; then
3684   if test -n "$pgac_broken_flex"; then
3685     { echo "$as_me:$LINENO: WARNING:
3686 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
3687 *** should get version 2.5.4 or later." >&5
3688 echo "$as_me: WARNING:
3689 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
3690 *** should get version 2.5.4 or later." >&2;}
3691   fi
3692
3693   { echo "$as_me:$LINENO: WARNING:
3694 *** Without Flex you will not be able to build PostgreSQL from CVS or
3695 *** change any of the scanner definition files.  You can obtain Flex from
3696 *** a GNU mirror site.  (If you are using the official distribution of
3697 *** PostgreSQL then you do not need to worry about this because the Flex
3698 *** output is pre-generated.)" >&5
3699 echo "$as_me: WARNING:
3700 *** Without Flex you will not be able to build PostgreSQL from CVS or
3701 *** change any of the scanner definition files.  You can obtain Flex from
3702 *** a GNU mirror site.  (If you are using the official distribution of
3703 *** PostgreSQL then you do not need to worry about this because the Flex
3704 *** output is pre-generated.)" >&2;}
3705 fi
3706
3707 if test x"$pgac_cv_path_flex" = x"no"; then
3708   FLEX=
3709 else
3710   FLEX=$pgac_cv_path_flex
3711 fi
3712
3713
3714
3715
3716 echo "$as_me:$LINENO: checking whether ln -s works" >&5
3717 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3718 LN_S=$as_ln_s
3719 if test "$LN_S" = "ln -s"; then
3720   echo "$as_me:$LINENO: result: yes" >&5
3721 echo "${ECHO_T}yes" >&6
3722 else
3723   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3724 echo "${ECHO_T}no, using $LN_S" >&6
3725 fi
3726
3727
3728 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3729 if test "${with_gnu_ld+set}" = set; then
3730   withval="$with_gnu_ld"
3731   test "$withval" = no || with_gnu_ld=yes
3732 else
3733   with_gnu_ld=no
3734 fi;
3735 ac_prog=ld
3736 if test "$GCC" = yes; then
3737   # Check if gcc -print-prog-name=ld gives a path.
3738   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
3739 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
3740   case $host in
3741   *-*-mingw*)
3742     # gcc leaves a trailing carriage return which upsets mingw
3743     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3744   *)
3745     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3746   esac
3747   case "$ac_prog" in
3748     # Accept absolute paths.
3749     [\\/]* | [A-Za-z]:[\\/]*)
3750       re_direlt='/[^/][^/]*/\.\./'
3751       # Canonicalize the path of ld
3752       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3753       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3754         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3755       done
3756       test -z "$LD" && LD="$ac_prog"
3757       ;;
3758   "")
3759     # If it fails, then pretend we aren't using GCC.
3760     ac_prog=ld
3761     ;;
3762   *)
3763     # If it is relative, then search for the first ld in PATH.
3764     with_gnu_ld=unknown
3765     ;;
3766   esac
3767 elif test "$with_gnu_ld" = yes; then
3768   echo "$as_me:$LINENO: checking for GNU ld" >&5
3769 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
3770 else
3771   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
3772 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
3773 fi
3774 if test "${ac_cv_path_LD+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777   if test -z "$LD"; then
3778   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3779   for ac_dir in $PATH; do
3780     test -z "$ac_dir" && ac_dir=.
3781     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3782       ac_cv_path_LD="$ac_dir/$ac_prog"
3783       # Check to see if the program is GNU ld.  I'd rather use --version,
3784       # but apparently some GNU ld's only accept -v.
3785       # Break only if it was the GNU/non-GNU ld that we prefer.
3786       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3787         test "$with_gnu_ld" != no && break
3788       else
3789         test "$with_gnu_ld" != yes && break
3790       fi
3791     fi
3792   done
3793   IFS="$ac_save_ifs"
3794 else
3795   ac_cv_path_LD="$LD" # Let the user override the test with a path.
3796 fi
3797 fi
3798
3799 LD="$ac_cv_path_LD"
3800 if test -n "$LD"; then
3801   echo "$as_me:$LINENO: result: $LD" >&5
3802 echo "${ECHO_T}$LD" >&6
3803 else
3804   echo "$as_me:$LINENO: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
3808 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
3809    { (exit 1); exit 1; }; }
3810 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
3811 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
3812 if test "${ac_cv_prog_gnu_ld+set}" = set; then
3813   echo $ECHO_N "(cached) $ECHO_C" >&6
3814 else
3815   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3816 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3817   ac_cv_prog_gnu_ld=yes
3818 else
3819   ac_cv_prog_gnu_ld=no
3820 fi
3821 fi
3822 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
3823 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
3824 with_gnu_ld=$ac_cv_prog_gnu_ld
3825
3826
3827
3828
3829 case $host_os in sysv5*)
3830   echo "$as_me:$LINENO: checking whether ld -R works" >&5
3831 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
3832 if test "${pgac_cv_prog_ld_R+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835
3836     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
3837     cat >conftest.$ac_ext <<_ACEOF
3838 #line $LINENO "configure"
3839 #include "confdefs.h"
3840
3841 #ifdef F77_DUMMY_MAIN
3842 #  ifdef __cplusplus
3843      extern "C"
3844 #  endif
3845    int F77_DUMMY_MAIN() { return 1; }
3846 #endif
3847 int
3848 main ()
3849 {
3850
3851   ;
3852   return 0;
3853 }
3854 _ACEOF
3855 rm -f conftest.$ac_objext conftest$ac_exeext
3856 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3857   (eval $ac_link) 2>&5
3858   ac_status=$?
3859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860   (exit $ac_status); } &&
3861          { ac_try='test -s conftest$ac_exeext'
3862   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3863   (eval $ac_try) 2>&5
3864   ac_status=$?
3865   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3866   (exit $ac_status); }; }; then
3867   pgac_cv_prog_ld_R=yes
3868 else
3869   echo "$as_me: failed program was:" >&5
3870 cat conftest.$ac_ext >&5
3871 pgac_cv_prog_ld_R=no
3872 fi
3873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3874     LDFLAGS=$pgac_save_LDFLAGS
3875
3876 fi
3877 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
3878 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
3879   ld_R_works=$pgac_cv_prog_ld_R
3880
3881 esac
3882 if test -n "$ac_tool_prefix"; then
3883   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3885 echo "$as_me:$LINENO: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_RANLIB+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$RANLIB"; then
3891   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3892 else
3893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894 for as_dir in $PATH
3895 do
3896   IFS=$as_save_IFS
3897   test -z "$as_dir" && as_dir=.
3898   for ac_exec_ext in '' $ac_executable_extensions; do
3899   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3900     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3901     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3902     break 2
3903   fi
3904 done
3905 done
3906
3907 fi
3908 fi
3909 RANLIB=$ac_cv_prog_RANLIB
3910 if test -n "$RANLIB"; then
3911   echo "$as_me:$LINENO: result: $RANLIB" >&5
3912 echo "${ECHO_T}$RANLIB" >&6
3913 else
3914   echo "$as_me:$LINENO: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918 fi
3919 if test -z "$ac_cv_prog_RANLIB"; then
3920   ac_ct_RANLIB=$RANLIB
3921   # Extract the first word of "ranlib", so it can be a program name with args.
3922 set dummy ranlib; ac_word=$2
3923 echo "$as_me:$LINENO: checking for $ac_word" >&5
3924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3925 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3926   echo $ECHO_N "(cached) $ECHO_C" >&6
3927 else
3928   if test -n "$ac_ct_RANLIB"; then
3929   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3930 else
3931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3932 for as_dir in $PATH
3933 do
3934   IFS=$as_save_IFS
3935   test -z "$as_dir" && as_dir=.
3936   for ac_exec_ext in '' $ac_executable_extensions; do
3937   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3938     ac_cv_prog_ac_ct_RANLIB="ranlib"
3939     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3940     break 2
3941   fi
3942 done
3943 done
3944
3945   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3946 fi
3947 fi
3948 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3949 if test -n "$ac_ct_RANLIB"; then
3950   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3951 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3952 else
3953   echo "$as_me:$LINENO: result: no" >&5
3954 echo "${ECHO_T}no" >&6
3955 fi
3956
3957   RANLIB=$ac_ct_RANLIB
3958 else
3959   RANLIB="$ac_cv_prog_RANLIB"
3960 fi
3961
3962 for ac_prog in lorder
3963 do
3964   # Extract the first word of "$ac_prog", so it can be a program name with args.
3965 set dummy $ac_prog; ac_word=$2
3966 echo "$as_me:$LINENO: checking for $ac_word" >&5
3967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3968 if test "${ac_cv_prog_LORDER+set}" = set; then
3969   echo $ECHO_N "(cached) $ECHO_C" >&6
3970 else
3971   if test -n "$LORDER"; then
3972   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
3973 else
3974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3975 for as_dir in $PATH
3976 do
3977   IFS=$as_save_IFS
3978   test -z "$as_dir" && as_dir=.
3979   for ac_exec_ext in '' $ac_executable_extensions; do
3980   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3981     ac_cv_prog_LORDER="$ac_prog"
3982     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3983     break 2
3984   fi
3985 done
3986 done
3987
3988 fi
3989 fi
3990 LORDER=$ac_cv_prog_LORDER
3991 if test -n "$LORDER"; then
3992   echo "$as_me:$LINENO: result: $LORDER" >&5
3993 echo "${ECHO_T}$LORDER" >&6
3994 else
3995   echo "$as_me:$LINENO: result: no" >&5
3996 echo "${ECHO_T}no" >&6
3997 fi
3998
3999   test -n "$LORDER" && break
4000 done
4001
4002 # Extract the first word of "tar", so it can be a program name with args.
4003 set dummy tar; ac_word=$2
4004 echo "$as_me:$LINENO: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_TAR+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $TAR in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015 for as_dir in $PATH
4016 do
4017   IFS=$as_save_IFS
4018   test -z "$as_dir" && as_dir=.
4019   for ac_exec_ext in '' $ac_executable_extensions; do
4020   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4021     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4022     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4023     break 2
4024   fi
4025 done
4026 done
4027
4028   ;;
4029 esac
4030 fi
4031 TAR=$ac_cv_path_TAR
4032
4033 if test -n "$TAR"; then
4034   echo "$as_me:$LINENO: result: $TAR" >&5
4035 echo "${ECHO_T}$TAR" >&6
4036 else
4037   echo "$as_me:$LINENO: result: no" >&5
4038 echo "${ECHO_T}no" >&6
4039 fi
4040
4041
4042   if test -n "$ac_tool_prefix"; then
4043   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4044 set dummy ${ac_tool_prefix}strip; ac_word=$2
4045 echo "$as_me:$LINENO: checking for $ac_word" >&5
4046 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047 if test "${ac_cv_prog_STRIP+set}" = set; then
4048   echo $ECHO_N "(cached) $ECHO_C" >&6
4049 else
4050   if test -n "$STRIP"; then
4051   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4052 else
4053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4054 for as_dir in $PATH
4055 do
4056   IFS=$as_save_IFS
4057   test -z "$as_dir" && as_dir=.
4058   for ac_exec_ext in '' $ac_executable_extensions; do
4059   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4060     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4061     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4062     break 2
4063   fi
4064 done
4065 done
4066
4067 fi
4068 fi
4069 STRIP=$ac_cv_prog_STRIP
4070 if test -n "$STRIP"; then
4071   echo "$as_me:$LINENO: result: $STRIP" >&5
4072 echo "${ECHO_T}$STRIP" >&6
4073 else
4074   echo "$as_me:$LINENO: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078 fi
4079 if test -z "$ac_cv_prog_STRIP"; then
4080   ac_ct_STRIP=$STRIP
4081   # Extract the first word of "strip", so it can be a program name with args.
4082 set dummy strip; ac_word=$2
4083 echo "$as_me:$LINENO: checking for $ac_word" >&5
4084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4085 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   if test -n "$ac_ct_STRIP"; then
4089   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4090 else
4091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4092 for as_dir in $PATH
4093 do
4094   IFS=$as_save_IFS
4095   test -z "$as_dir" && as_dir=.
4096   for ac_exec_ext in '' $ac_executable_extensions; do
4097   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4098     ac_cv_prog_ac_ct_STRIP="strip"
4099     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4100     break 2
4101   fi
4102 done
4103 done
4104
4105   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4106 fi
4107 fi
4108 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4109 if test -n "$ac_ct_STRIP"; then
4110   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4111 echo "${ECHO_T}$ac_ct_STRIP" >&6
4112 else
4113   echo "$as_me:$LINENO: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117   STRIP=$ac_ct_STRIP
4118 else
4119   STRIP="$ac_cv_prog_STRIP"
4120 fi
4121
4122
4123   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4124 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4125   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4126     STRIP_STATIC_LIB="$STRIP -x"
4127     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4128     echo "$as_me:$LINENO: result: yes" >&5
4129 echo "${ECHO_T}yes" >&6
4130   else
4131     STRIP_STATIC_LIB=:
4132     STRIP_SHARED_LIB=:
4133     echo "$as_me:$LINENO: result: no" >&5
4134 echo "${ECHO_T}no" >&6
4135   fi
4136
4137
4138
4139
4140 for ac_prog in 'bison -y'
4141 do
4142   # Extract the first word of "$ac_prog", so it can be a program name with args.
4143 set dummy $ac_prog; ac_word=$2
4144 echo "$as_me:$LINENO: checking for $ac_word" >&5
4145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4146 if test "${ac_cv_prog_YACC+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   if test -n "$YACC"; then
4150   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4151 else
4152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153 for as_dir in $PATH
4154 do
4155   IFS=$as_save_IFS
4156   test -z "$as_dir" && as_dir=.
4157   for ac_exec_ext in '' $ac_executable_extensions; do
4158   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4159     ac_cv_prog_YACC="$ac_prog"
4160     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4161     break 2
4162   fi
4163 done
4164 done
4165
4166 fi
4167 fi
4168 YACC=$ac_cv_prog_YACC
4169 if test -n "$YACC"; then
4170   echo "$as_me:$LINENO: result: $YACC" >&5
4171 echo "${ECHO_T}$YACC" >&6
4172 else
4173   echo "$as_me:$LINENO: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177   test -n "$YACC" && break
4178 done
4179
4180
4181 if test "$YACC"; then
4182   if $YACC --version | sed q | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'; then
4183     { echo "$as_me:$LINENO: WARNING:
4184 *** The installed version of Bison is too old.  PostgreSQL needs
4185 *** Bison version 1.875 or later." >&5
4186 echo "$as_me: WARNING:
4187 *** The installed version of Bison is too old.  PostgreSQL needs
4188 *** Bison version 1.875 or later." >&2;}
4189   fi
4190 fi
4191
4192 if test -z "$YACC"; then
4193   { echo "$as_me:$LINENO: WARNING:
4194 *** Without Bison you will not be able to build PostgreSQL from CVS or
4195 *** change any of the parser definition files.  You can obtain Bison from
4196 *** a GNU mirror site.  (If you are using the official distribution of
4197 *** PostgreSQL then you do not need to worry about this because the Bison
4198 *** output is pre-generated.)  To use a different yacc program (possible,
4199 *** but not recommended), set the environment variable YACC before running
4200 *** 'configure'." >&5
4201 echo "$as_me: WARNING:
4202 *** Without Bison you will not be able to build PostgreSQL from CVS or
4203 *** change any of the parser definition files.  You can obtain Bison from
4204 *** a GNU mirror site.  (If you are using the official distribution of
4205 *** PostgreSQL then you do not need to worry about this because the Bison
4206 *** output is pre-generated.)  To use a different yacc program (possible,
4207 *** but not recommended), set the environment variable YACC before running
4208 *** 'configure'." >&2;}
4209 fi
4210
4211
4212 # Extract the first word of "perl", so it can be a program name with args.
4213 set dummy perl; ac_word=$2
4214 echo "$as_me:$LINENO: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_path_PERL+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   case $PERL in
4220   [\\/]* | ?:[\\/]*)
4221   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4222   ;;
4223   *)
4224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4225 for as_dir in $PATH
4226 do
4227   IFS=$as_save_IFS
4228   test -z "$as_dir" && as_dir=.
4229   for ac_exec_ext in '' $ac_executable_extensions; do
4230   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4231     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4232     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4233     break 2
4234   fi
4235 done
4236 done
4237
4238   ;;
4239 esac
4240 fi
4241 PERL=$ac_cv_path_PERL
4242
4243 if test -n "$PERL"; then
4244   echo "$as_me:$LINENO: result: $PERL" >&5
4245 echo "${ECHO_T}$PERL" >&6
4246 else
4247   echo "$as_me:$LINENO: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251 if test "$with_perl" = yes; then
4252
4253 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
4254 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
4255 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
4256 echo "$as_me:$LINENO: result: $perl_archlibexp" >&5
4257 echo "${ECHO_T}$perl_archlibexp" >&6
4258 echo "$as_me:$LINENO: checking for Perl privlibexp" >&5
4259 echo $ECHO_N "checking for Perl privlibexp... $ECHO_C" >&6
4260 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
4261 echo "$as_me:$LINENO: result: $perl_privlibexp" >&5
4262 echo "${ECHO_T}$perl_privlibexp" >&6
4263 echo "$as_me:$LINENO: checking for Perl useshrplib" >&5
4264 echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
4265 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
4266 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
4267 echo "${ECHO_T}$perl_useshrplib" >&6
4268
4269 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
4270 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
4271 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
4272 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
4273 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed "s/^X//;s%$pgac_tmp2%%"`
4274 echo "$as_me:$LINENO: result: $perl_embed_ldflags" >&5
4275 echo "${ECHO_T}$perl_embed_ldflags" >&6
4276 fi
4277
4278 if test "$with_python" = yes; then
4279   # Extract the first word of "python", so it can be a program name with args.
4280 set dummy python; ac_word=$2
4281 echo "$as_me:$LINENO: checking for $ac_word" >&5
4282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4283 if test "${ac_cv_path_PYTHON+set}" = set; then
4284   echo $ECHO_N "(cached) $ECHO_C" >&6
4285 else
4286   case $PYTHON in
4287   [\\/]* | ?:[\\/]*)
4288   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4289   ;;
4290   *)
4291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4292 for as_dir in $PATH
4293 do
4294   IFS=$as_save_IFS
4295   test -z "$as_dir" && as_dir=.
4296   for ac_exec_ext in '' $ac_executable_extensions; do
4297   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4298     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4299     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4300     break 2
4301   fi
4302 done
4303 done
4304
4305   ;;
4306 esac
4307 fi
4308 PYTHON=$ac_cv_path_PYTHON
4309
4310 if test -n "$PYTHON"; then
4311   echo "$as_me:$LINENO: result: $PYTHON" >&5
4312 echo "${ECHO_T}$PYTHON" >&6
4313 else
4314   echo "$as_me:$LINENO: result: no" >&5
4315 echo "${ECHO_T}no" >&6
4316 fi
4317
4318 if test x"$PYTHON" = x""; then
4319   { { echo "$as_me:$LINENO: error: Python not found" >&5
4320 echo "$as_me: error: Python not found" >&2;}
4321    { (exit 1); exit 1; }; }
4322 fi
4323
4324
4325 echo "$as_me:$LINENO: checking Python installation directories" >&5
4326 echo $ECHO_N "checking Python installation directories... $ECHO_C" >&6
4327 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4328 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
4329 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
4330 python_configdir="${python_execprefix}/lib/python${python_version}/config"
4331 python_includespec="-I${python_prefix}/include/python${python_version}"
4332 if test "$python_prefix" != "$python_execprefix"; then
4333   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
4334 fi
4335
4336 # This should be enough of a message.
4337 if test "$python_prefix" != "$python_execprefix"; then
4338   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&5
4339 echo "${ECHO_T}$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&6
4340 else
4341   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version}" >&5
4342 echo "${ECHO_T}$python_prefix/lib/python${python_version}" >&6
4343 fi
4344
4345
4346 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
4347 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
4348
4349 if test ! -f "$python_configdir/Makefile"; then
4350   echo "$as_me:$LINENO: result: no" >&5
4351 echo "${ECHO_T}no" >&6
4352   { { echo "$as_me:$LINENO: error: Python Makefile not found" >&5
4353 echo "$as_me: error: Python Makefile not found" >&2;}
4354    { (exit 1); exit 1; }; }
4355 fi
4356
4357 _python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4358 _python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
4359 _python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
4360 _python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4361 _python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
4362
4363 pgac_tab="      " # tab character
4364 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"`
4365
4366 echo "$as_me:$LINENO: result: ${python_libspec}" >&5
4367 echo "${ECHO_T}${python_libspec}" >&6
4368
4369
4370 fi
4371
4372
4373 ##
4374 ## Libraries
4375 ##
4376
4377 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
4378 then
4379
4380 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
4381 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
4382 if test "${ac_cv_lib_bsd_main+set}" = set; then
4383   echo $ECHO_N "(cached) $ECHO_C" >&6
4384 else
4385   ac_check_lib_save_LIBS=$LIBS
4386 LIBS="-lbsd  $LIBS"
4387 cat >conftest.$ac_ext <<_ACEOF
4388 #line $LINENO "configure"
4389 #include "confdefs.h"
4390
4391
4392 #ifdef F77_DUMMY_MAIN
4393 #  ifdef __cplusplus
4394      extern "C"
4395 #  endif
4396    int F77_DUMMY_MAIN() { return 1; }
4397 #endif
4398 int
4399 main ()
4400 {
4401 main ();
4402   ;
4403   return 0;
4404 }
4405 _ACEOF
4406 rm -f conftest.$ac_objext conftest$ac_exeext
4407 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4408   (eval $ac_link) 2>&5
4409   ac_status=$?
4410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411   (exit $ac_status); } &&
4412          { ac_try='test -s conftest$ac_exeext'
4413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4414   (eval $ac_try) 2>&5
4415   ac_status=$?
4416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417   (exit $ac_status); }; }; then
4418   ac_cv_lib_bsd_main=yes
4419 else
4420   echo "$as_me: failed program was:" >&5
4421 cat conftest.$ac_ext >&5
4422 ac_cv_lib_bsd_main=no
4423 fi
4424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4425 LIBS=$ac_check_lib_save_LIBS
4426 fi
4427 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
4428 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
4429 if test $ac_cv_lib_bsd_main = yes; then
4430   cat >>confdefs.h <<_ACEOF
4431 #define HAVE_LIBBSD 1
4432 _ACEOF
4433
4434   LIBS="-lbsd $LIBS"
4435
4436 fi
4437
4438 fi
4439
4440 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
4441 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
4442 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
4443   echo $ECHO_N "(cached) $ECHO_C" >&6
4444 else
4445   ac_check_lib_save_LIBS=$LIBS
4446 LIBS="-lutil  $LIBS"
4447 cat >conftest.$ac_ext <<_ACEOF
4448 #line $LINENO "configure"
4449 #include "confdefs.h"
4450
4451 /* Override any gcc2 internal prototype to avoid an error.  */
4452 #ifdef __cplusplus
4453 extern "C"
4454 #endif
4455 /* We use char because int might match the return type of a gcc2
4456    builtin and then its argument prototype would still apply.  */
4457 char setproctitle ();
4458 #ifdef F77_DUMMY_MAIN
4459 #  ifdef __cplusplus
4460      extern "C"
4461 #  endif
4462    int F77_DUMMY_MAIN() { return 1; }
4463 #endif
4464 int
4465 main ()
4466 {
4467 setproctitle ();
4468   ;
4469   return 0;
4470 }
4471 _ACEOF
4472 rm -f conftest.$ac_objext conftest$ac_exeext
4473 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4474   (eval $ac_link) 2>&5
4475   ac_status=$?
4476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477   (exit $ac_status); } &&
4478          { ac_try='test -s conftest$ac_exeext'
4479   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4480   (eval $ac_try) 2>&5
4481   ac_status=$?
4482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4483   (exit $ac_status); }; }; then
4484   ac_cv_lib_util_setproctitle=yes
4485 else
4486   echo "$as_me: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 ac_cv_lib_util_setproctitle=no
4489 fi
4490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4491 LIBS=$ac_check_lib_save_LIBS
4492 fi
4493 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
4494 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
4495 if test $ac_cv_lib_util_setproctitle = yes; then
4496   cat >>confdefs.h <<_ACEOF
4497 #define HAVE_LIBUTIL 1
4498 _ACEOF
4499
4500   LIBS="-lutil $LIBS"
4501
4502 fi
4503
4504
4505 echo "$as_me:$LINENO: checking for main in -lm" >&5
4506 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
4507 if test "${ac_cv_lib_m_main+set}" = set; then
4508   echo $ECHO_N "(cached) $ECHO_C" >&6
4509 else
4510   ac_check_lib_save_LIBS=$LIBS
4511 LIBS="-lm  $LIBS"
4512 cat >conftest.$ac_ext <<_ACEOF
4513 #line $LINENO "configure"
4514 #include "confdefs.h"
4515
4516
4517 #ifdef F77_DUMMY_MAIN
4518 #  ifdef __cplusplus
4519      extern "C"
4520 #  endif
4521    int F77_DUMMY_MAIN() { return 1; }
4522 #endif
4523 int
4524 main ()
4525 {
4526 main ();
4527   ;
4528   return 0;
4529 }
4530 _ACEOF
4531 rm -f conftest.$ac_objext conftest$ac_exeext
4532 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4533   (eval $ac_link) 2>&5
4534   ac_status=$?
4535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536   (exit $ac_status); } &&
4537          { ac_try='test -s conftest$ac_exeext'
4538   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4539   (eval $ac_try) 2>&5
4540   ac_status=$?
4541   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4542   (exit $ac_status); }; }; then
4543   ac_cv_lib_m_main=yes
4544 else
4545   echo "$as_me: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4547 ac_cv_lib_m_main=no
4548 fi
4549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4550 LIBS=$ac_check_lib_save_LIBS
4551 fi
4552 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
4553 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
4554 if test $ac_cv_lib_m_main = yes; then
4555   cat >>confdefs.h <<_ACEOF
4556 #define HAVE_LIBM 1
4557 _ACEOF
4558
4559   LIBS="-lm $LIBS"
4560
4561 fi
4562
4563
4564 echo "$as_me:$LINENO: checking for main in -ldl" >&5
4565 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
4566 if test "${ac_cv_lib_dl_main+set}" = set; then
4567   echo $ECHO_N "(cached) $ECHO_C" >&6
4568 else
4569   ac_check_lib_save_LIBS=$LIBS
4570 LIBS="-ldl  $LIBS"
4571 cat >conftest.$ac_ext <<_ACEOF
4572 #line $LINENO "configure"
4573 #include "confdefs.h"
4574
4575
4576 #ifdef F77_DUMMY_MAIN
4577 #  ifdef __cplusplus
4578      extern "C"
4579 #  endif
4580    int F77_DUMMY_MAIN() { return 1; }
4581 #endif
4582 int
4583 main ()
4584 {
4585 main ();
4586   ;
4587   return 0;
4588 }
4589 _ACEOF
4590 rm -f conftest.$ac_objext conftest$ac_exeext
4591 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4592   (eval $ac_link) 2>&5
4593   ac_status=$?
4594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4595   (exit $ac_status); } &&
4596          { ac_try='test -s conftest$ac_exeext'
4597   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4598   (eval $ac_try) 2>&5
4599   ac_status=$?
4600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601   (exit $ac_status); }; }; then
4602   ac_cv_lib_dl_main=yes
4603 else
4604   echo "$as_me: failed program was:" >&5
4605 cat conftest.$ac_ext >&5
4606 ac_cv_lib_dl_main=no
4607 fi
4608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4609 LIBS=$ac_check_lib_save_LIBS
4610 fi
4611 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
4612 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
4613 if test $ac_cv_lib_dl_main = yes; then
4614   cat >>confdefs.h <<_ACEOF
4615 #define HAVE_LIBDL 1
4616 _ACEOF
4617
4618   LIBS="-ldl $LIBS"
4619
4620 fi
4621
4622
4623 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
4624 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
4625 if test "${ac_cv_lib_nsl_main+set}" = set; then
4626   echo $ECHO_N "(cached) $ECHO_C" >&6
4627 else
4628   ac_check_lib_save_LIBS=$LIBS
4629 LIBS="-lnsl  $LIBS"
4630 cat >conftest.$ac_ext <<_ACEOF
4631 #line $LINENO "configure"
4632 #include "confdefs.h"
4633
4634
4635 #ifdef F77_DUMMY_MAIN
4636 #  ifdef __cplusplus
4637      extern "C"
4638 #  endif
4639    int F77_DUMMY_MAIN() { return 1; }
4640 #endif
4641 int
4642 main ()
4643 {
4644 main ();
4645   ;
4646   return 0;
4647 }
4648 _ACEOF
4649 rm -f conftest.$ac_objext conftest$ac_exeext
4650 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4651   (eval $ac_link) 2>&5
4652   ac_status=$?
4653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654   (exit $ac_status); } &&
4655          { ac_try='test -s conftest$ac_exeext'
4656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4657   (eval $ac_try) 2>&5
4658   ac_status=$?
4659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660   (exit $ac_status); }; }; then
4661   ac_cv_lib_nsl_main=yes
4662 else
4663   echo "$as_me: failed program was:" >&5
4664 cat conftest.$ac_ext >&5
4665 ac_cv_lib_nsl_main=no
4666 fi
4667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4668 LIBS=$ac_check_lib_save_LIBS
4669 fi
4670 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
4671 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
4672 if test $ac_cv_lib_nsl_main = yes; then
4673   cat >>confdefs.h <<_ACEOF
4674 #define HAVE_LIBNSL 1
4675 _ACEOF
4676
4677   LIBS="-lnsl $LIBS"
4678
4679 fi
4680
4681
4682 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
4683 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
4684 if test "${ac_cv_lib_socket_main+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   ac_check_lib_save_LIBS=$LIBS
4688 LIBS="-lsocket  $LIBS"
4689 cat >conftest.$ac_ext <<_ACEOF
4690 #line $LINENO "configure"
4691 #include "confdefs.h"
4692
4693
4694 #ifdef F77_DUMMY_MAIN
4695 #  ifdef __cplusplus
4696      extern "C"
4697 #  endif
4698    int F77_DUMMY_MAIN() { return 1; }
4699 #endif
4700 int
4701 main ()
4702 {
4703 main ();
4704   ;
4705   return 0;
4706 }
4707 _ACEOF
4708 rm -f conftest.$ac_objext conftest$ac_exeext
4709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4710   (eval $ac_link) 2>&5
4711   ac_status=$?
4712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4713   (exit $ac_status); } &&
4714          { ac_try='test -s conftest$ac_exeext'
4715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4716   (eval $ac_try) 2>&5
4717   ac_status=$?
4718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4719   (exit $ac_status); }; }; then
4720   ac_cv_lib_socket_main=yes
4721 else
4722   echo "$as_me: failed program was:" >&5
4723 cat conftest.$ac_ext >&5
4724 ac_cv_lib_socket_main=no
4725 fi
4726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4727 LIBS=$ac_check_lib_save_LIBS
4728 fi
4729 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
4730 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
4731 if test $ac_cv_lib_socket_main = yes; then
4732   cat >>confdefs.h <<_ACEOF
4733 #define HAVE_LIBSOCKET 1
4734 _ACEOF
4735
4736   LIBS="-lsocket $LIBS"
4737
4738 fi
4739
4740
4741 echo "$as_me:$LINENO: checking for main in -lipc" >&5
4742 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
4743 if test "${ac_cv_lib_ipc_main+set}" = set; then
4744   echo $ECHO_N "(cached) $ECHO_C" >&6
4745 else
4746   ac_check_lib_save_LIBS=$LIBS
4747 LIBS="-lipc  $LIBS"
4748 cat >conftest.$ac_ext <<_ACEOF
4749 #line $LINENO "configure"
4750 #include "confdefs.h"
4751
4752
4753 #ifdef F77_DUMMY_MAIN
4754 #  ifdef __cplusplus
4755      extern "C"
4756 #  endif
4757    int F77_DUMMY_MAIN() { return 1; }
4758 #endif
4759 int
4760 main ()
4761 {
4762 main ();
4763   ;
4764   return 0;
4765 }
4766 _ACEOF
4767 rm -f conftest.$ac_objext conftest$ac_exeext
4768 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4769   (eval $ac_link) 2>&5
4770   ac_status=$?
4771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -s conftest$ac_exeext'
4774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775   (eval $ac_try) 2>&5
4776   ac_status=$?
4777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778   (exit $ac_status); }; }; then
4779   ac_cv_lib_ipc_main=yes
4780 else
4781   echo "$as_me: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 ac_cv_lib_ipc_main=no
4784 fi
4785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4786 LIBS=$ac_check_lib_save_LIBS
4787 fi
4788 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
4789 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
4790 if test $ac_cv_lib_ipc_main = yes; then
4791   cat >>confdefs.h <<_ACEOF
4792 #define HAVE_LIBIPC 1
4793 _ACEOF
4794
4795   LIBS="-lipc $LIBS"
4796
4797 fi
4798
4799
4800 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
4801 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
4802 if test "${ac_cv_lib_IPC_main+set}" = set; then
4803   echo $ECHO_N "(cached) $ECHO_C" >&6
4804 else
4805   ac_check_lib_save_LIBS=$LIBS
4806 LIBS="-lIPC  $LIBS"
4807 cat >conftest.$ac_ext <<_ACEOF
4808 #line $LINENO "configure"
4809 #include "confdefs.h"
4810
4811
4812 #ifdef F77_DUMMY_MAIN
4813 #  ifdef __cplusplus
4814      extern "C"
4815 #  endif
4816    int F77_DUMMY_MAIN() { return 1; }
4817 #endif
4818 int
4819 main ()
4820 {
4821 main ();
4822   ;
4823   return 0;
4824 }
4825 _ACEOF
4826 rm -f conftest.$ac_objext conftest$ac_exeext
4827 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4828   (eval $ac_link) 2>&5
4829   ac_status=$?
4830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4831   (exit $ac_status); } &&
4832          { ac_try='test -s conftest$ac_exeext'
4833   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4834   (eval $ac_try) 2>&5
4835   ac_status=$?
4836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4837   (exit $ac_status); }; }; then
4838   ac_cv_lib_IPC_main=yes
4839 else
4840   echo "$as_me: failed program was:" >&5
4841 cat conftest.$ac_ext >&5
4842 ac_cv_lib_IPC_main=no
4843 fi
4844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4845 LIBS=$ac_check_lib_save_LIBS
4846 fi
4847 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
4848 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
4849 if test $ac_cv_lib_IPC_main = yes; then
4850   cat >>confdefs.h <<_ACEOF
4851 #define HAVE_LIBIPC 1
4852 _ACEOF
4853
4854   LIBS="-lIPC $LIBS"
4855
4856 fi
4857
4858
4859 echo "$as_me:$LINENO: checking for main in -llc" >&5
4860 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
4861 if test "${ac_cv_lib_lc_main+set}" = set; then
4862   echo $ECHO_N "(cached) $ECHO_C" >&6
4863 else
4864   ac_check_lib_save_LIBS=$LIBS
4865 LIBS="-llc  $LIBS"
4866 cat >conftest.$ac_ext <<_ACEOF
4867 #line $LINENO "configure"
4868 #include "confdefs.h"
4869
4870
4871 #ifdef F77_DUMMY_MAIN
4872 #  ifdef __cplusplus
4873      extern "C"
4874 #  endif
4875    int F77_DUMMY_MAIN() { return 1; }
4876 #endif
4877 int
4878 main ()
4879 {
4880 main ();
4881   ;
4882   return 0;
4883 }
4884 _ACEOF
4885 rm -f conftest.$ac_objext conftest$ac_exeext
4886 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4887   (eval $ac_link) 2>&5
4888   ac_status=$?
4889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4890   (exit $ac_status); } &&
4891          { ac_try='test -s conftest$ac_exeext'
4892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4893   (eval $ac_try) 2>&5
4894   ac_status=$?
4895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896   (exit $ac_status); }; }; then
4897   ac_cv_lib_lc_main=yes
4898 else
4899   echo "$as_me: failed program was:" >&5
4900 cat conftest.$ac_ext >&5
4901 ac_cv_lib_lc_main=no
4902 fi
4903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4904 LIBS=$ac_check_lib_save_LIBS
4905 fi
4906 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
4907 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
4908 if test $ac_cv_lib_lc_main = yes; then
4909   cat >>confdefs.h <<_ACEOF
4910 #define HAVE_LIBLC 1
4911 _ACEOF
4912
4913   LIBS="-llc $LIBS"
4914
4915 fi
4916
4917
4918 echo "$as_me:$LINENO: checking for main in -ldld" >&5
4919 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
4920 if test "${ac_cv_lib_dld_main+set}" = set; then
4921   echo $ECHO_N "(cached) $ECHO_C" >&6
4922 else
4923   ac_check_lib_save_LIBS=$LIBS
4924 LIBS="-ldld  $LIBS"
4925 cat >conftest.$ac_ext <<_ACEOF
4926 #line $LINENO "configure"
4927 #include "confdefs.h"
4928
4929
4930 #ifdef F77_DUMMY_MAIN
4931 #  ifdef __cplusplus
4932      extern "C"
4933 #  endif
4934    int F77_DUMMY_MAIN() { return 1; }
4935 #endif
4936 int
4937 main ()
4938 {
4939 main ();
4940   ;
4941   return 0;
4942 }
4943 _ACEOF
4944 rm -f conftest.$ac_objext conftest$ac_exeext
4945 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4946   (eval $ac_link) 2>&5
4947   ac_status=$?
4948   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4949   (exit $ac_status); } &&
4950          { ac_try='test -s conftest$ac_exeext'
4951   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4952   (eval $ac_try) 2>&5
4953   ac_status=$?
4954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4955   (exit $ac_status); }; }; then
4956   ac_cv_lib_dld_main=yes
4957 else
4958   echo "$as_me: failed program was:" >&5
4959 cat conftest.$ac_ext >&5
4960 ac_cv_lib_dld_main=no
4961 fi
4962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4963 LIBS=$ac_check_lib_save_LIBS
4964 fi
4965 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
4966 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
4967 if test $ac_cv_lib_dld_main = yes; then
4968   cat >>confdefs.h <<_ACEOF
4969 #define HAVE_LIBDLD 1
4970 _ACEOF
4971
4972   LIBS="-ldld $LIBS"
4973
4974 fi
4975
4976
4977 echo "$as_me:$LINENO: checking for main in -lld" >&5
4978 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
4979 if test "${ac_cv_lib_ld_main+set}" = set; then
4980   echo $ECHO_N "(cached) $ECHO_C" >&6
4981 else
4982   ac_check_lib_save_LIBS=$LIBS
4983 LIBS="-lld  $LIBS"
4984 cat >conftest.$ac_ext <<_ACEOF
4985 #line $LINENO "configure"
4986 #include "confdefs.h"
4987
4988
4989 #ifdef F77_DUMMY_MAIN
4990 #  ifdef __cplusplus
4991      extern "C"
4992 #  endif
4993    int F77_DUMMY_MAIN() { return 1; }
4994 #endif
4995 int
4996 main ()
4997 {
4998 main ();
4999   ;
5000   return 0;
5001 }
5002 _ACEOF
5003 rm -f conftest.$ac_objext conftest$ac_exeext
5004 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5005   (eval $ac_link) 2>&5
5006   ac_status=$?
5007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5008   (exit $ac_status); } &&
5009          { ac_try='test -s conftest$ac_exeext'
5010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5011   (eval $ac_try) 2>&5
5012   ac_status=$?
5013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5014   (exit $ac_status); }; }; then
5015   ac_cv_lib_ld_main=yes
5016 else
5017   echo "$as_me: failed program was:" >&5
5018 cat conftest.$ac_ext >&5
5019 ac_cv_lib_ld_main=no
5020 fi
5021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5022 LIBS=$ac_check_lib_save_LIBS
5023 fi
5024 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5025 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5026 if test $ac_cv_lib_ld_main = yes; then
5027   cat >>confdefs.h <<_ACEOF
5028 #define HAVE_LIBLD 1
5029 _ACEOF
5030
5031   LIBS="-lld $LIBS"
5032
5033 fi
5034
5035
5036 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5037 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5038 if test "${ac_cv_lib_compat_main+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041   ac_check_lib_save_LIBS=$LIBS
5042 LIBS="-lcompat  $LIBS"
5043 cat >conftest.$ac_ext <<_ACEOF
5044 #line $LINENO "configure"
5045 #include "confdefs.h"
5046
5047
5048 #ifdef F77_DUMMY_MAIN
5049 #  ifdef __cplusplus
5050      extern "C"
5051 #  endif
5052    int F77_DUMMY_MAIN() { return 1; }
5053 #endif
5054 int
5055 main ()
5056 {
5057 main ();
5058   ;
5059   return 0;
5060 }
5061 _ACEOF
5062 rm -f conftest.$ac_objext conftest$ac_exeext
5063 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5064   (eval $ac_link) 2>&5
5065   ac_status=$?
5066   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5067   (exit $ac_status); } &&
5068          { ac_try='test -s conftest$ac_exeext'
5069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5070   (eval $ac_try) 2>&5
5071   ac_status=$?
5072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5073   (exit $ac_status); }; }; then
5074   ac_cv_lib_compat_main=yes
5075 else
5076   echo "$as_me: failed program was:" >&5
5077 cat conftest.$ac_ext >&5
5078 ac_cv_lib_compat_main=no
5079 fi
5080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5081 LIBS=$ac_check_lib_save_LIBS
5082 fi
5083 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5084 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5085 if test $ac_cv_lib_compat_main = yes; then
5086   cat >>confdefs.h <<_ACEOF
5087 #define HAVE_LIBCOMPAT 1
5088 _ACEOF
5089
5090   LIBS="-lcompat $LIBS"
5091
5092 fi
5093
5094
5095 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5096 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5097 if test "${ac_cv_lib_BSD_main+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100   ac_check_lib_save_LIBS=$LIBS
5101 LIBS="-lBSD  $LIBS"
5102 cat >conftest.$ac_ext <<_ACEOF
5103 #line $LINENO "configure"
5104 #include "confdefs.h"
5105
5106
5107 #ifdef F77_DUMMY_MAIN
5108 #  ifdef __cplusplus
5109      extern "C"
5110 #  endif
5111    int F77_DUMMY_MAIN() { return 1; }
5112 #endif
5113 int
5114 main ()
5115 {
5116 main ();
5117   ;
5118   return 0;
5119 }
5120 _ACEOF
5121 rm -f conftest.$ac_objext conftest$ac_exeext
5122 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5123   (eval $ac_link) 2>&5
5124   ac_status=$?
5125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126   (exit $ac_status); } &&
5127          { ac_try='test -s conftest$ac_exeext'
5128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5129   (eval $ac_try) 2>&5
5130   ac_status=$?
5131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132   (exit $ac_status); }; }; then
5133   ac_cv_lib_BSD_main=yes
5134 else
5135   echo "$as_me: failed program was:" >&5
5136 cat conftest.$ac_ext >&5
5137 ac_cv_lib_BSD_main=no
5138 fi
5139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5140 LIBS=$ac_check_lib_save_LIBS
5141 fi
5142 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5143 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5144 if test $ac_cv_lib_BSD_main = yes; then
5145   cat >>confdefs.h <<_ACEOF
5146 #define HAVE_LIBBSD 1
5147 _ACEOF
5148
5149   LIBS="-lBSD $LIBS"
5150
5151 fi
5152
5153
5154 echo "$as_me:$LINENO: checking for main in -lgen" >&5
5155 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
5156 if test "${ac_cv_lib_gen_main+set}" = set; then
5157   echo $ECHO_N "(cached) $ECHO_C" >&6
5158 else
5159   ac_check_lib_save_LIBS=$LIBS
5160 LIBS="-lgen  $LIBS"
5161 cat >conftest.$ac_ext <<_ACEOF
5162 #line $LINENO "configure"
5163 #include "confdefs.h"
5164
5165
5166 #ifdef F77_DUMMY_MAIN
5167 #  ifdef __cplusplus
5168      extern "C"
5169 #  endif
5170    int F77_DUMMY_MAIN() { return 1; }
5171 #endif
5172 int
5173 main ()
5174 {
5175 main ();
5176   ;
5177   return 0;
5178 }
5179 _ACEOF
5180 rm -f conftest.$ac_objext conftest$ac_exeext
5181 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5182   (eval $ac_link) 2>&5
5183   ac_status=$?
5184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5185   (exit $ac_status); } &&
5186          { ac_try='test -s conftest$ac_exeext'
5187   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5188   (eval $ac_try) 2>&5
5189   ac_status=$?
5190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5191   (exit $ac_status); }; }; then
5192   ac_cv_lib_gen_main=yes
5193 else
5194   echo "$as_me: failed program was:" >&5
5195 cat conftest.$ac_ext >&5
5196 ac_cv_lib_gen_main=no
5197 fi
5198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5199 LIBS=$ac_check_lib_save_LIBS
5200 fi
5201 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
5202 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
5203 if test $ac_cv_lib_gen_main = yes; then
5204   cat >>confdefs.h <<_ACEOF
5205 #define HAVE_LIBGEN 1
5206 _ACEOF
5207
5208   LIBS="-lgen $LIBS"
5209
5210 fi
5211
5212
5213 echo "$as_me:$LINENO: checking for main in -lPW" >&5
5214 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
5215 if test "${ac_cv_lib_PW_main+set}" = set; then
5216   echo $ECHO_N "(cached) $ECHO_C" >&6
5217 else
5218   ac_check_lib_save_LIBS=$LIBS
5219 LIBS="-lPW  $LIBS"
5220 cat >conftest.$ac_ext <<_ACEOF
5221 #line $LINENO "configure"
5222 #include "confdefs.h"
5223
5224
5225 #ifdef F77_DUMMY_MAIN
5226 #  ifdef __cplusplus
5227      extern "C"
5228 #  endif
5229    int F77_DUMMY_MAIN() { return 1; }
5230 #endif
5231 int
5232 main ()
5233 {
5234 main ();
5235   ;
5236   return 0;
5237 }
5238 _ACEOF
5239 rm -f conftest.$ac_objext conftest$ac_exeext
5240 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5241   (eval $ac_link) 2>&5
5242   ac_status=$?
5243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244   (exit $ac_status); } &&
5245          { ac_try='test -s conftest$ac_exeext'
5246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5247   (eval $ac_try) 2>&5
5248   ac_status=$?
5249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5250   (exit $ac_status); }; }; then
5251   ac_cv_lib_PW_main=yes
5252 else
5253   echo "$as_me: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 ac_cv_lib_PW_main=no
5256 fi
5257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5258 LIBS=$ac_check_lib_save_LIBS
5259 fi
5260 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
5261 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
5262 if test $ac_cv_lib_PW_main = yes; then
5263   cat >>confdefs.h <<_ACEOF
5264 #define HAVE_LIBPW 1
5265 _ACEOF
5266
5267   LIBS="-lPW $LIBS"
5268
5269 fi
5270
5271
5272 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
5273 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
5274 if test "${ac_cv_lib_resolv_main+set}" = set; then
5275   echo $ECHO_N "(cached) $ECHO_C" >&6
5276 else
5277   ac_check_lib_save_LIBS=$LIBS
5278 LIBS="-lresolv  $LIBS"
5279 cat >conftest.$ac_ext <<_ACEOF
5280 #line $LINENO "configure"
5281 #include "confdefs.h"
5282
5283
5284 #ifdef F77_DUMMY_MAIN
5285 #  ifdef __cplusplus
5286      extern "C"
5287 #  endif
5288    int F77_DUMMY_MAIN() { return 1; }
5289 #endif
5290 int
5291 main ()
5292 {
5293 main ();
5294   ;
5295   return 0;
5296 }
5297 _ACEOF
5298 rm -f conftest.$ac_objext conftest$ac_exeext
5299 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5300   (eval $ac_link) 2>&5
5301   ac_status=$?
5302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5303   (exit $ac_status); } &&
5304          { ac_try='test -s conftest$ac_exeext'
5305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5306   (eval $ac_try) 2>&5
5307   ac_status=$?
5308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5309   (exit $ac_status); }; }; then
5310   ac_cv_lib_resolv_main=yes
5311 else
5312   echo "$as_me: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 ac_cv_lib_resolv_main=no
5315 fi
5316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5317 LIBS=$ac_check_lib_save_LIBS
5318 fi
5319 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
5320 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
5321 if test $ac_cv_lib_resolv_main = yes; then
5322   cat >>confdefs.h <<_ACEOF
5323 #define HAVE_LIBRESOLV 1
5324 _ACEOF
5325
5326   LIBS="-lresolv $LIBS"
5327
5328 fi
5329
5330 echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
5331 echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
5332 if test "${ac_cv_search_getopt_long+set}" = set; then
5333   echo $ECHO_N "(cached) $ECHO_C" >&6
5334 else
5335   ac_func_search_save_LIBS=$LIBS
5336 ac_cv_search_getopt_long=no
5337 cat >conftest.$ac_ext <<_ACEOF
5338 #line $LINENO "configure"
5339 #include "confdefs.h"
5340
5341 /* Override any gcc2 internal prototype to avoid an error.  */
5342 #ifdef __cplusplus
5343 extern "C"
5344 #endif
5345 /* We use char because int might match the return type of a gcc2
5346    builtin and then its argument prototype would still apply.  */
5347 char getopt_long ();
5348 #ifdef F77_DUMMY_MAIN
5349 #  ifdef __cplusplus
5350      extern "C"
5351 #  endif
5352    int F77_DUMMY_MAIN() { return 1; }
5353 #endif
5354 int
5355 main ()
5356 {
5357 getopt_long ();
5358   ;
5359   return 0;
5360 }
5361 _ACEOF
5362 rm -f conftest.$ac_objext conftest$ac_exeext
5363 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5364   (eval $ac_link) 2>&5
5365   ac_status=$?
5366   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5367   (exit $ac_status); } &&
5368          { ac_try='test -s conftest$ac_exeext'
5369   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5370   (eval $ac_try) 2>&5
5371   ac_status=$?
5372   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373   (exit $ac_status); }; }; then
5374   ac_cv_search_getopt_long="none required"
5375 else
5376   echo "$as_me: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 fi
5379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5380 if test "$ac_cv_search_getopt_long" = no; then
5381   for ac_lib in getopt gnugetopt; do
5382     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5383     cat >conftest.$ac_ext <<_ACEOF
5384 #line $LINENO "configure"
5385 #include "confdefs.h"
5386
5387 /* Override any gcc2 internal prototype to avoid an error.  */
5388 #ifdef __cplusplus
5389 extern "C"
5390 #endif
5391 /* We use char because int might match the return type of a gcc2
5392    builtin and then its argument prototype would still apply.  */
5393 char getopt_long ();
5394 #ifdef F77_DUMMY_MAIN
5395 #  ifdef __cplusplus
5396      extern "C"
5397 #  endif
5398    int F77_DUMMY_MAIN() { return 1; }
5399 #endif
5400 int
5401 main ()
5402 {
5403 getopt_long ();
5404   ;
5405   return 0;
5406 }
5407 _ACEOF
5408 rm -f conftest.$ac_objext conftest$ac_exeext
5409 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5410   (eval $ac_link) 2>&5
5411   ac_status=$?
5412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5413   (exit $ac_status); } &&
5414          { ac_try='test -s conftest$ac_exeext'
5415   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5416   (eval $ac_try) 2>&5
5417   ac_status=$?
5418   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5419   (exit $ac_status); }; }; then
5420   ac_cv_search_getopt_long="-l$ac_lib"
5421 break
5422 else
5423   echo "$as_me: failed program was:" >&5
5424 cat conftest.$ac_ext >&5
5425 fi
5426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5427   done
5428 fi
5429 LIBS=$ac_func_search_save_LIBS
5430 fi
5431 echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
5432 echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
5433 if test "$ac_cv_search_getopt_long" != no; then
5434   test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
5435
5436 fi
5437
5438 # QNX:
5439
5440 echo "$as_me:$LINENO: checking for main in -lunix" >&5
5441 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
5442 if test "${ac_cv_lib_unix_main+set}" = set; then
5443   echo $ECHO_N "(cached) $ECHO_C" >&6
5444 else
5445   ac_check_lib_save_LIBS=$LIBS
5446 LIBS="-lunix  $LIBS"
5447 cat >conftest.$ac_ext <<_ACEOF
5448 #line $LINENO "configure"
5449 #include "confdefs.h"
5450
5451
5452 #ifdef F77_DUMMY_MAIN
5453 #  ifdef __cplusplus
5454      extern "C"
5455 #  endif
5456    int F77_DUMMY_MAIN() { return 1; }
5457 #endif
5458 int
5459 main ()
5460 {
5461 main ();
5462   ;
5463   return 0;
5464 }
5465 _ACEOF
5466 rm -f conftest.$ac_objext conftest$ac_exeext
5467 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5468   (eval $ac_link) 2>&5
5469   ac_status=$?
5470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5471   (exit $ac_status); } &&
5472          { ac_try='test -s conftest$ac_exeext'
5473   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5474   (eval $ac_try) 2>&5
5475   ac_status=$?
5476   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5477   (exit $ac_status); }; }; then
5478   ac_cv_lib_unix_main=yes
5479 else
5480   echo "$as_me: failed program was:" >&5
5481 cat conftest.$ac_ext >&5
5482 ac_cv_lib_unix_main=no
5483 fi
5484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5485 LIBS=$ac_check_lib_save_LIBS
5486 fi
5487 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
5488 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
5489 if test $ac_cv_lib_unix_main = yes; then
5490   cat >>confdefs.h <<_ACEOF
5491 #define HAVE_LIBUNIX 1
5492 _ACEOF
5493
5494   LIBS="-lunix $LIBS"
5495
5496 fi
5497
5498 echo "$as_me:$LINENO: checking for library containing crypt" >&5
5499 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
5500 if test "${ac_cv_search_crypt+set}" = set; then
5501   echo $ECHO_N "(cached) $ECHO_C" >&6
5502 else
5503   ac_func_search_save_LIBS=$LIBS
5504 ac_cv_search_crypt=no
5505 cat >conftest.$ac_ext <<_ACEOF
5506 #line $LINENO "configure"
5507 #include "confdefs.h"
5508
5509 /* Override any gcc2 internal prototype to avoid an error.  */
5510 #ifdef __cplusplus
5511 extern "C"
5512 #endif
5513 /* We use char because int might match the return type of a gcc2
5514    builtin and then its argument prototype would still apply.  */
5515 char crypt ();
5516 #ifdef F77_DUMMY_MAIN
5517 #  ifdef __cplusplus
5518      extern "C"
5519 #  endif
5520    int F77_DUMMY_MAIN() { return 1; }
5521 #endif
5522 int
5523 main ()
5524 {
5525 crypt ();
5526   ;
5527   return 0;
5528 }
5529 _ACEOF
5530 rm -f conftest.$ac_objext conftest$ac_exeext
5531 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5532   (eval $ac_link) 2>&5
5533   ac_status=$?
5534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5535   (exit $ac_status); } &&
5536          { ac_try='test -s conftest$ac_exeext'
5537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5538   (eval $ac_try) 2>&5
5539   ac_status=$?
5540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5541   (exit $ac_status); }; }; then
5542   ac_cv_search_crypt="none required"
5543 else
5544   echo "$as_me: failed program was:" >&5
5545 cat conftest.$ac_ext >&5
5546 fi
5547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5548 if test "$ac_cv_search_crypt" = no; then
5549   for ac_lib in crypt; do
5550     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5551     cat >conftest.$ac_ext <<_ACEOF
5552 #line $LINENO "configure"
5553 #include "confdefs.h"
5554
5555 /* Override any gcc2 internal prototype to avoid an error.  */
5556 #ifdef __cplusplus
5557 extern "C"
5558 #endif
5559 /* We use char because int might match the return type of a gcc2
5560    builtin and then its argument prototype would still apply.  */
5561 char crypt ();
5562 #ifdef F77_DUMMY_MAIN
5563 #  ifdef __cplusplus
5564      extern "C"
5565 #  endif
5566    int F77_DUMMY_MAIN() { return 1; }
5567 #endif
5568 int
5569 main ()
5570 {
5571 crypt ();
5572   ;
5573   return 0;
5574 }
5575 _ACEOF
5576 rm -f conftest.$ac_objext conftest$ac_exeext
5577 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5578   (eval $ac_link) 2>&5
5579   ac_status=$?
5580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581   (exit $ac_status); } &&
5582          { ac_try='test -s conftest$ac_exeext'
5583   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584   (eval $ac_try) 2>&5
5585   ac_status=$?
5586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587   (exit $ac_status); }; }; then
5588   ac_cv_search_crypt="-l$ac_lib"
5589 break
5590 else
5591   echo "$as_me: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5593 fi
5594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5595   done
5596 fi
5597 LIBS=$ac_func_search_save_LIBS
5598 fi
5599 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
5600 echo "${ECHO_T}$ac_cv_search_crypt" >&6
5601 if test "$ac_cv_search_crypt" != no; then
5602   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
5603
5604 fi
5605
5606 # BeOS:
5607 if test "$PORTNAME" = "beos"
5608 then
5609
5610 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
5611 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
5612 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
5613   echo $ECHO_N "(cached) $ECHO_C" >&6
5614 else
5615   ac_check_lib_save_LIBS=$LIBS
5616 LIBS="-lbind  $LIBS"
5617 cat >conftest.$ac_ext <<_ACEOF
5618 #line $LINENO "configure"
5619 #include "confdefs.h"
5620
5621 /* Override any gcc2 internal prototype to avoid an error.  */
5622 #ifdef __cplusplus
5623 extern "C"
5624 #endif
5625 /* We use char because int might match the return type of a gcc2
5626    builtin and then its argument prototype would still apply.  */
5627 char __inet_ntoa ();
5628 #ifdef F77_DUMMY_MAIN
5629 #  ifdef __cplusplus
5630      extern "C"
5631 #  endif
5632    int F77_DUMMY_MAIN() { return 1; }
5633 #endif
5634 int
5635 main ()
5636 {
5637 __inet_ntoa ();
5638   ;
5639   return 0;
5640 }
5641 _ACEOF
5642 rm -f conftest.$ac_objext conftest$ac_exeext
5643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5644   (eval $ac_link) 2>&5
5645   ac_status=$?
5646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647   (exit $ac_status); } &&
5648          { ac_try='test -s conftest$ac_exeext'
5649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5650   (eval $ac_try) 2>&5
5651   ac_status=$?
5652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653   (exit $ac_status); }; }; then
5654   ac_cv_lib_bind___inet_ntoa=yes
5655 else
5656   echo "$as_me: failed program was:" >&5
5657 cat conftest.$ac_ext >&5
5658 ac_cv_lib_bind___inet_ntoa=no
5659 fi
5660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5661 LIBS=$ac_check_lib_save_LIBS
5662 fi
5663 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
5664 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
5665 if test $ac_cv_lib_bind___inet_ntoa = yes; then
5666   cat >>confdefs.h <<_ACEOF
5667 #define HAVE_LIBBIND 1
5668 _ACEOF
5669
5670   LIBS="-lbind $LIBS"
5671
5672 fi
5673
5674 fi
5675 # Solaris:
5676 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
5677 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
5678 if test "${ac_cv_search_fdatasync+set}" = set; then
5679   echo $ECHO_N "(cached) $ECHO_C" >&6
5680 else
5681   ac_func_search_save_LIBS=$LIBS
5682 ac_cv_search_fdatasync=no
5683 cat >conftest.$ac_ext <<_ACEOF
5684 #line $LINENO "configure"
5685 #include "confdefs.h"
5686
5687 /* Override any gcc2 internal prototype to avoid an error.  */
5688 #ifdef __cplusplus
5689 extern "C"
5690 #endif
5691 /* We use char because int might match the return type of a gcc2
5692    builtin and then its argument prototype would still apply.  */
5693 char fdatasync ();
5694 #ifdef F77_DUMMY_MAIN
5695 #  ifdef __cplusplus
5696      extern "C"
5697 #  endif
5698    int F77_DUMMY_MAIN() { return 1; }
5699 #endif
5700 int
5701 main ()
5702 {
5703 fdatasync ();
5704   ;
5705   return 0;
5706 }
5707 _ACEOF
5708 rm -f conftest.$ac_objext conftest$ac_exeext
5709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5710   (eval $ac_link) 2>&5
5711   ac_status=$?
5712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5713   (exit $ac_status); } &&
5714          { ac_try='test -s conftest$ac_exeext'
5715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5716   (eval $ac_try) 2>&5
5717   ac_status=$?
5718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719   (exit $ac_status); }; }; then
5720   ac_cv_search_fdatasync="none required"
5721 else
5722   echo "$as_me: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 fi
5725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5726 if test "$ac_cv_search_fdatasync" = no; then
5727   for ac_lib in rt posix4; do
5728     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5729     cat >conftest.$ac_ext <<_ACEOF
5730 #line $LINENO "configure"
5731 #include "confdefs.h"
5732
5733 /* Override any gcc2 internal prototype to avoid an error.  */
5734 #ifdef __cplusplus
5735 extern "C"
5736 #endif
5737 /* We use char because int might match the return type of a gcc2
5738    builtin and then its argument prototype would still apply.  */
5739 char fdatasync ();
5740 #ifdef F77_DUMMY_MAIN
5741 #  ifdef __cplusplus
5742      extern "C"
5743 #  endif
5744    int F77_DUMMY_MAIN() { return 1; }
5745 #endif
5746 int
5747 main ()
5748 {
5749 fdatasync ();
5750   ;
5751   return 0;
5752 }
5753 _ACEOF
5754 rm -f conftest.$ac_objext conftest$ac_exeext
5755 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5756   (eval $ac_link) 2>&5
5757   ac_status=$?
5758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5759   (exit $ac_status); } &&
5760          { ac_try='test -s conftest$ac_exeext'
5761   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5762   (eval $ac_try) 2>&5
5763   ac_status=$?
5764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5765   (exit $ac_status); }; }; then
5766   ac_cv_search_fdatasync="-l$ac_lib"
5767 break
5768 else
5769   echo "$as_me: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 fi
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5773   done
5774 fi
5775 LIBS=$ac_func_search_save_LIBS
5776 fi
5777 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
5778 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
5779 if test "$ac_cv_search_fdatasync" != no; then
5780   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
5781
5782 fi
5783
5784 # Cygwin:
5785
5786 echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
5787 echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
5788 if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
5789   echo $ECHO_N "(cached) $ECHO_C" >&6
5790 else
5791   ac_check_lib_save_LIBS=$LIBS
5792 LIBS="-lcygipc  $LIBS"
5793 cat >conftest.$ac_ext <<_ACEOF
5794 #line $LINENO "configure"
5795 #include "confdefs.h"
5796
5797 /* Override any gcc2 internal prototype to avoid an error.  */
5798 #ifdef __cplusplus
5799 extern "C"
5800 #endif
5801 /* We use char because int might match the return type of a gcc2
5802    builtin and then its argument prototype would still apply.  */
5803 char shmget ();
5804 #ifdef F77_DUMMY_MAIN
5805 #  ifdef __cplusplus
5806      extern "C"
5807 #  endif
5808    int F77_DUMMY_MAIN() { return 1; }
5809 #endif
5810 int
5811 main ()
5812 {
5813 shmget ();
5814   ;
5815   return 0;
5816 }
5817 _ACEOF
5818 rm -f conftest.$ac_objext conftest$ac_exeext
5819 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5820   (eval $ac_link) 2>&5
5821   ac_status=$?
5822   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5823   (exit $ac_status); } &&
5824          { ac_try='test -s conftest$ac_exeext'
5825   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5826   (eval $ac_try) 2>&5
5827   ac_status=$?
5828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829   (exit $ac_status); }; }; then
5830   ac_cv_lib_cygipc_shmget=yes
5831 else
5832   echo "$as_me: failed program was:" >&5
5833 cat conftest.$ac_ext >&5
5834 ac_cv_lib_cygipc_shmget=no
5835 fi
5836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5837 LIBS=$ac_check_lib_save_LIBS
5838 fi
5839 echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
5840 echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
5841 if test $ac_cv_lib_cygipc_shmget = yes; then
5842   cat >>confdefs.h <<_ACEOF
5843 #define HAVE_LIBCYGIPC 1
5844 _ACEOF
5845
5846   LIBS="-lcygipc $LIBS"
5847
5848 fi
5849
5850 # WIN32:
5851 if test "$PORTNAME" = "win32"
5852 then
5853
5854 echo "$as_me:$LINENO: checking for main in -lwsock32" >&5
5855 echo $ECHO_N "checking for main in -lwsock32... $ECHO_C" >&6
5856 if test "${ac_cv_lib_wsock32_main+set}" = set; then
5857   echo $ECHO_N "(cached) $ECHO_C" >&6
5858 else
5859   ac_check_lib_save_LIBS=$LIBS
5860 LIBS="-lwsock32  $LIBS"
5861 cat >conftest.$ac_ext <<_ACEOF
5862 #line $LINENO "configure"
5863 #include "confdefs.h"
5864
5865
5866 #ifdef F77_DUMMY_MAIN
5867 #  ifdef __cplusplus
5868      extern "C"
5869 #  endif
5870    int F77_DUMMY_MAIN() { return 1; }
5871 #endif
5872 int
5873 main ()
5874 {
5875 main ();
5876   ;
5877   return 0;
5878 }
5879 _ACEOF
5880 rm -f conftest.$ac_objext conftest$ac_exeext
5881 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5882   (eval $ac_link) 2>&5
5883   ac_status=$?
5884   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5885   (exit $ac_status); } &&
5886          { ac_try='test -s conftest$ac_exeext'
5887   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5888   (eval $ac_try) 2>&5
5889   ac_status=$?
5890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5891   (exit $ac_status); }; }; then
5892   ac_cv_lib_wsock32_main=yes
5893 else
5894   echo "$as_me: failed program was:" >&5
5895 cat conftest.$ac_ext >&5
5896 ac_cv_lib_wsock32_main=no
5897 fi
5898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5899 LIBS=$ac_check_lib_save_LIBS
5900 fi
5901 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_main" >&5
5902 echo "${ECHO_T}$ac_cv_lib_wsock32_main" >&6
5903 if test $ac_cv_lib_wsock32_main = yes; then
5904   cat >>confdefs.h <<_ACEOF
5905 #define HAVE_LIBWSOCK32 1
5906 _ACEOF
5907
5908   LIBS="-lwsock32 $LIBS"
5909
5910 fi
5911
5912 fi
5913
5914 if test "$with_readline" = yes; then
5915
5916 echo "$as_me:$LINENO: checking for readline" >&5
5917 echo $ECHO_N "checking for readline... $ECHO_C" >&6
5918
5919 if test "${pgac_cv_check_readline+set}" = set; then
5920   echo $ECHO_N "(cached) $ECHO_C" >&6
5921 else
5922   pgac_cv_check_readline=no
5923 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
5924   for pgac_rllib in -lreadline -ledit ; do
5925     pgac_save_LIBS=$LIBS
5926     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
5927     cat >conftest.$ac_ext <<_ACEOF
5928 #line $LINENO "configure"
5929 #include "confdefs.h"
5930
5931 /* Override any gcc2 internal prototype to avoid an error.  */
5932 #ifdef __cplusplus
5933 extern "C"
5934 #endif
5935 /* We use char because int might match the return type of a gcc2
5936    builtin and then its argument prototype would still apply.  */
5937 char readline ();
5938 #ifdef F77_DUMMY_MAIN
5939 #  ifdef __cplusplus
5940      extern "C"
5941 #  endif
5942    int F77_DUMMY_MAIN() { return 1; }
5943 #endif
5944 int
5945 main ()
5946 {
5947 readline ();
5948   ;
5949   return 0;
5950 }
5951 _ACEOF
5952 rm -f conftest.$ac_objext conftest$ac_exeext
5953 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5954   (eval $ac_link) 2>&5
5955   ac_status=$?
5956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5957   (exit $ac_status); } &&
5958          { ac_try='test -s conftest$ac_exeext'
5959   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5960   (eval $ac_try) 2>&5
5961   ac_status=$?
5962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963   (exit $ac_status); }; }; then
5964
5965       # NetBSD and OpenBSD have a broken linker that does not
5966       # recognize dependent libraries
5967       case $host_os in netbsd* | openbsd* )
5968         case $pgac_lib in
5969           *curses*) ;;
5970           *) pgac_lib=" -lcurses" ;;
5971         esac
5972       esac
5973
5974       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
5975       break 2
5976
5977 else
5978   echo "$as_me: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 fi
5981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5982     LIBS=$pgac_save_LIBS
5983   done
5984 done
5985 LIBS=$pgac_save_LIBS
5986
5987 fi
5988
5989 if test "$pgac_cv_check_readline" != no ; then
5990
5991 cat >>confdefs.h <<\_ACEOF
5992 #define HAVE_LIBREADLINE 1
5993 _ACEOF
5994
5995   LIBS="$pgac_cv_check_readline $LIBS"
5996   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
5997 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
5998 else
5999   echo "$as_me:$LINENO: result: no" >&5
6000 echo "${ECHO_T}no" >&6
6001 fi
6002   if test x"$pgac_cv_check_readline" = x"no"; then
6003     { { echo "$as_me:$LINENO: error: readline library not found
6004 If you have readline already installed, see config.log for details on the
6005 failure.  It is possible the compiler isn't looking in the proper directory.
6006 Use --without-readline to disable readline support." >&5
6007 echo "$as_me: error: readline library not found
6008 If you have readline already installed, see config.log for details on the
6009 failure.  It is possible the compiler isn't looking in the proper directory.
6010 Use --without-readline to disable readline support." >&2;}
6011    { (exit 1); exit 1; }; }
6012   fi
6013 fi
6014
6015 if test "$with_zlib" = yes; then
6016
6017 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6018 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6019 if test "${ac_cv_lib_z_inflate+set}" = set; then
6020   echo $ECHO_N "(cached) $ECHO_C" >&6
6021 else
6022   ac_check_lib_save_LIBS=$LIBS
6023 LIBS="-lz  $LIBS"
6024 cat >conftest.$ac_ext <<_ACEOF
6025 #line $LINENO "configure"
6026 #include "confdefs.h"
6027
6028 /* Override any gcc2 internal prototype to avoid an error.  */
6029 #ifdef __cplusplus
6030 extern "C"
6031 #endif
6032 /* We use char because int might match the return type of a gcc2
6033    builtin and then its argument prototype would still apply.  */
6034 char inflate ();
6035 #ifdef F77_DUMMY_MAIN
6036 #  ifdef __cplusplus
6037      extern "C"
6038 #  endif
6039    int F77_DUMMY_MAIN() { return 1; }
6040 #endif
6041 int
6042 main ()
6043 {
6044 inflate ();
6045   ;
6046   return 0;
6047 }
6048 _ACEOF
6049 rm -f conftest.$ac_objext conftest$ac_exeext
6050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6051   (eval $ac_link) 2>&5
6052   ac_status=$?
6053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6054   (exit $ac_status); } &&
6055          { ac_try='test -s conftest$ac_exeext'
6056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6057   (eval $ac_try) 2>&5
6058   ac_status=$?
6059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6060   (exit $ac_status); }; }; then
6061   ac_cv_lib_z_inflate=yes
6062 else
6063   echo "$as_me: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 ac_cv_lib_z_inflate=no
6066 fi
6067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6068 LIBS=$ac_check_lib_save_LIBS
6069 fi
6070 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6071 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6072 if test $ac_cv_lib_z_inflate = yes; then
6073   cat >>confdefs.h <<_ACEOF
6074 #define HAVE_LIBZ 1
6075 _ACEOF
6076
6077   LIBS="-lz $LIBS"
6078
6079 else
6080   { { echo "$as_me:$LINENO: error: zlib library not found
6081 If you have zlib already installed, see config.log for details on the
6082 failure.  It is possible the compiler isn't looking in the proper directory.
6083 Use --without-zlib to disable zlib support." >&5
6084 echo "$as_me: error: zlib library not found
6085 If you have zlib already installed, see config.log for details on the
6086 failure.  It is possible the compiler isn't looking in the proper directory.
6087 Use --without-zlib to disable zlib support." >&2;}
6088    { (exit 1); exit 1; }; }
6089 fi
6090
6091 fi
6092
6093 if test "$enable_spinlocks" = yes; then
6094
6095 cat >>confdefs.h <<\_ACEOF
6096 #define HAVE_SPINLOCKS 1
6097 _ACEOF
6098
6099 else
6100   { echo "$as_me:$LINENO: WARNING:
6101 *** Not using spinlocks will cause poor performance." >&5
6102 echo "$as_me: WARNING:
6103 *** Not using spinlocks will cause poor performance." >&2;}
6104 fi
6105
6106 if test "$with_krb4" = yes ; then
6107
6108 echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
6109 echo $ECHO_N "checking for des_encrypt in -ldes... $ECHO_C" >&6
6110 if test "${ac_cv_lib_des_des_encrypt+set}" = set; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113   ac_check_lib_save_LIBS=$LIBS
6114 LIBS="-ldes  $LIBS"
6115 cat >conftest.$ac_ext <<_ACEOF
6116 #line $LINENO "configure"
6117 #include "confdefs.h"
6118
6119 /* Override any gcc2 internal prototype to avoid an error.  */
6120 #ifdef __cplusplus
6121 extern "C"
6122 #endif
6123 /* We use char because int might match the return type of a gcc2
6124    builtin and then its argument prototype would still apply.  */
6125 char des_encrypt ();
6126 #ifdef F77_DUMMY_MAIN
6127 #  ifdef __cplusplus
6128      extern "C"
6129 #  endif
6130    int F77_DUMMY_MAIN() { return 1; }
6131 #endif
6132 int
6133 main ()
6134 {
6135 des_encrypt ();
6136   ;
6137   return 0;
6138 }
6139 _ACEOF
6140 rm -f conftest.$ac_objext conftest$ac_exeext
6141 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6142   (eval $ac_link) 2>&5
6143   ac_status=$?
6144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6145   (exit $ac_status); } &&
6146          { ac_try='test -s conftest$ac_exeext'
6147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6148   (eval $ac_try) 2>&5
6149   ac_status=$?
6150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6151   (exit $ac_status); }; }; then
6152   ac_cv_lib_des_des_encrypt=yes
6153 else
6154   echo "$as_me: failed program was:" >&5
6155 cat conftest.$ac_ext >&5
6156 ac_cv_lib_des_des_encrypt=no
6157 fi
6158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6159 LIBS=$ac_check_lib_save_LIBS
6160 fi
6161 echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_encrypt" >&5
6162 echo "${ECHO_T}$ac_cv_lib_des_des_encrypt" >&6
6163 if test $ac_cv_lib_des_des_encrypt = yes; then
6164   cat >>confdefs.h <<_ACEOF
6165 #define HAVE_LIBDES 1
6166 _ACEOF
6167
6168   LIBS="-ldes $LIBS"
6169
6170 else
6171   { { echo "$as_me:$LINENO: error: library 'des' is required for Kerberos 4" >&5
6172 echo "$as_me: error: library 'des' is required for Kerberos 4" >&2;}
6173    { (exit 1); exit 1; }; }
6174 fi
6175
6176
6177 echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
6178 echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6
6179 if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
6180   echo $ECHO_N "(cached) $ECHO_C" >&6
6181 else
6182   ac_check_lib_save_LIBS=$LIBS
6183 LIBS="-lkrb  $LIBS"
6184 cat >conftest.$ac_ext <<_ACEOF
6185 #line $LINENO "configure"
6186 #include "confdefs.h"
6187
6188 /* Override any gcc2 internal prototype to avoid an error.  */
6189 #ifdef __cplusplus
6190 extern "C"
6191 #endif
6192 /* We use char because int might match the return type of a gcc2
6193    builtin and then its argument prototype would still apply.  */
6194 char krb_sendauth ();
6195 #ifdef F77_DUMMY_MAIN
6196 #  ifdef __cplusplus
6197      extern "C"
6198 #  endif
6199    int F77_DUMMY_MAIN() { return 1; }
6200 #endif
6201 int
6202 main ()
6203 {
6204 krb_sendauth ();
6205   ;
6206   return 0;
6207 }
6208 _ACEOF
6209 rm -f conftest.$ac_objext conftest$ac_exeext
6210 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6211   (eval $ac_link) 2>&5
6212   ac_status=$?
6213   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6214   (exit $ac_status); } &&
6215          { ac_try='test -s conftest$ac_exeext'
6216   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6217   (eval $ac_try) 2>&5
6218   ac_status=$?
6219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220   (exit $ac_status); }; }; then
6221   ac_cv_lib_krb_krb_sendauth=yes
6222 else
6223   echo "$as_me: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6225 ac_cv_lib_krb_krb_sendauth=no
6226 fi
6227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6228 LIBS=$ac_check_lib_save_LIBS
6229 fi
6230 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
6231 echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6
6232 if test $ac_cv_lib_krb_krb_sendauth = yes; then
6233   cat >>confdefs.h <<_ACEOF
6234 #define HAVE_LIBKRB 1
6235 _ACEOF
6236
6237   LIBS="-lkrb $LIBS"
6238
6239 else
6240   { { echo "$as_me:$LINENO: error: library 'krb' is required for Kerberos 4" >&5
6241 echo "$as_me: error: library 'krb' is required for Kerberos 4" >&2;}
6242    { (exit 1); exit 1; }; }
6243 fi
6244
6245
6246 for ac_func in gethostname
6247 do
6248 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6249 echo "$as_me:$LINENO: checking for $ac_func" >&5
6250 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6251 if eval "test \"\${$as_ac_var+set}\" = set"; then
6252   echo $ECHO_N "(cached) $ECHO_C" >&6
6253 else
6254   cat >conftest.$ac_ext <<_ACEOF
6255 #line $LINENO "configure"
6256 #include "confdefs.h"
6257 /* System header to define __stub macros and hopefully few prototypes,
6258     which can conflict with char $ac_func (); below.  */
6259 #include <assert.h>
6260 /* Override any gcc2 internal prototype to avoid an error.  */
6261 #ifdef __cplusplus
6262 extern "C"
6263 #endif
6264 /* We use char because int might match the return type of a gcc2
6265    builtin and then its argument prototype would still apply.  */
6266 char $ac_func ();
6267 char (*f) ();
6268
6269 #ifdef F77_DUMMY_MAIN
6270 #  ifdef __cplusplus
6271      extern "C"
6272 #  endif
6273    int F77_DUMMY_MAIN() { return 1; }
6274 #endif
6275 int
6276 main ()
6277 {
6278 /* The GNU C library defines this for functions which it implements
6279     to always fail with ENOSYS.  Some functions are actually named
6280     something starting with __ and the normal name is an alias.  */
6281 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6282 choke me
6283 #else
6284 f = $ac_func;
6285 #endif
6286
6287   ;
6288   return 0;
6289 }
6290 _ACEOF
6291 rm -f conftest.$ac_objext conftest$ac_exeext
6292 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6293   (eval $ac_link) 2>&5
6294   ac_status=$?
6295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296   (exit $ac_status); } &&
6297          { ac_try='test -s conftest$ac_exeext'
6298   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6299   (eval $ac_try) 2>&5
6300   ac_status=$?
6301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302   (exit $ac_status); }; }; then
6303   eval "$as_ac_var=yes"
6304 else
6305   echo "$as_me: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6307 eval "$as_ac_var=no"
6308 fi
6309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6310 fi
6311 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
6312 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6313 if test `eval echo '${'$as_ac_var'}'` = yes; then
6314   cat >>confdefs.h <<_ACEOF
6315 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6316 _ACEOF
6317
6318 else
6319   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
6320 fi
6321 done
6322
6323
6324 fi
6325
6326 if test "$with_krb5" = yes ; then
6327   echo "$as_me:$LINENO: checking for library containing com_err" >&5
6328 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6329 if test "${ac_cv_search_com_err+set}" = set; then
6330   echo $ECHO_N "(cached) $ECHO_C" >&6
6331 else
6332   ac_func_search_save_LIBS=$LIBS
6333 ac_cv_search_com_err=no
6334 cat >conftest.$ac_ext <<_ACEOF
6335 #line $LINENO "configure"
6336 #include "confdefs.h"
6337
6338 /* Override any gcc2 internal prototype to avoid an error.  */
6339 #ifdef __cplusplus
6340 extern "C"
6341 #endif
6342 /* We use char because int might match the return type of a gcc2
6343    builtin and then its argument prototype would still apply.  */
6344 char com_err ();
6345 #ifdef F77_DUMMY_MAIN
6346 #  ifdef __cplusplus
6347      extern "C"
6348 #  endif
6349    int F77_DUMMY_MAIN() { return 1; }
6350 #endif
6351 int
6352 main ()
6353 {
6354 com_err ();
6355   ;
6356   return 0;
6357 }
6358 _ACEOF
6359 rm -f conftest.$ac_objext conftest$ac_exeext
6360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6361   (eval $ac_link) 2>&5
6362   ac_status=$?
6363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6364   (exit $ac_status); } &&
6365          { ac_try='test -s conftest$ac_exeext'
6366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6367   (eval $ac_try) 2>&5
6368   ac_status=$?
6369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6370   (exit $ac_status); }; }; then
6371   ac_cv_search_com_err="none required"
6372 else
6373   echo "$as_me: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
6375 fi
6376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6377 if test "$ac_cv_search_com_err" = no; then
6378   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6379     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6380     cat >conftest.$ac_ext <<_ACEOF
6381 #line $LINENO "configure"
6382 #include "confdefs.h"
6383
6384 /* Override any gcc2 internal prototype to avoid an error.  */
6385 #ifdef __cplusplus
6386 extern "C"
6387 #endif
6388 /* We use char because int might match the return type of a gcc2
6389    builtin and then its argument prototype would still apply.  */
6390 char com_err ();
6391 #ifdef F77_DUMMY_MAIN
6392 #  ifdef __cplusplus
6393      extern "C"
6394 #  endif
6395    int F77_DUMMY_MAIN() { return 1; }
6396 #endif
6397 int
6398 main ()
6399 {
6400 com_err ();
6401   ;
6402   return 0;
6403 }
6404 _ACEOF
6405 rm -f conftest.$ac_objext conftest$ac_exeext
6406 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6407   (eval $ac_link) 2>&5
6408   ac_status=$?
6409   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6410   (exit $ac_status); } &&
6411          { ac_try='test -s conftest$ac_exeext'
6412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6413   (eval $ac_try) 2>&5
6414   ac_status=$?
6415   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6416   (exit $ac_status); }; }; then
6417   ac_cv_search_com_err="-l$ac_lib"
6418 break
6419 else
6420   echo "$as_me: failed program was:" >&5
6421 cat conftest.$ac_ext >&5
6422 fi
6423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6424   done
6425 fi
6426 LIBS=$ac_func_search_save_LIBS
6427 fi
6428 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6429 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6430 if test "$ac_cv_search_com_err" != no; then
6431   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6432
6433 else
6434   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6435 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6436    { (exit 1); exit 1; }; }
6437 fi
6438
6439   echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6440 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6441 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6442   echo $ECHO_N "(cached) $ECHO_C" >&6
6443 else
6444   ac_func_search_save_LIBS=$LIBS
6445 ac_cv_search_krb5_encrypt=no
6446 cat >conftest.$ac_ext <<_ACEOF
6447 #line $LINENO "configure"
6448 #include "confdefs.h"
6449
6450 /* Override any gcc2 internal prototype to avoid an error.  */
6451 #ifdef __cplusplus
6452 extern "C"
6453 #endif
6454 /* We use char because int might match the return type of a gcc2
6455    builtin and then its argument prototype would still apply.  */
6456 char krb5_encrypt ();
6457 #ifdef F77_DUMMY_MAIN
6458 #  ifdef __cplusplus
6459      extern "C"
6460 #  endif
6461    int F77_DUMMY_MAIN() { return 1; }
6462 #endif
6463 int
6464 main ()
6465 {
6466 krb5_encrypt ();
6467   ;
6468   return 0;
6469 }
6470 _ACEOF
6471 rm -f conftest.$ac_objext conftest$ac_exeext
6472 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6473   (eval $ac_link) 2>&5
6474   ac_status=$?
6475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476   (exit $ac_status); } &&
6477          { ac_try='test -s conftest$ac_exeext'
6478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6479   (eval $ac_try) 2>&5
6480   ac_status=$?
6481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482   (exit $ac_status); }; }; then
6483   ac_cv_search_krb5_encrypt="none required"
6484 else
6485   echo "$as_me: failed program was:" >&5
6486 cat conftest.$ac_ext >&5
6487 fi
6488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6489 if test "$ac_cv_search_krb5_encrypt" = no; then
6490   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6491     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6492     cat >conftest.$ac_ext <<_ACEOF
6493 #line $LINENO "configure"
6494 #include "confdefs.h"
6495
6496 /* Override any gcc2 internal prototype to avoid an error.  */
6497 #ifdef __cplusplus
6498 extern "C"
6499 #endif
6500 /* We use char because int might match the return type of a gcc2
6501    builtin and then its argument prototype would still apply.  */
6502 char krb5_encrypt ();
6503 #ifdef F77_DUMMY_MAIN
6504 #  ifdef __cplusplus
6505      extern "C"
6506 #  endif
6507    int F77_DUMMY_MAIN() { return 1; }
6508 #endif
6509 int
6510 main ()
6511 {
6512 krb5_encrypt ();
6513   ;
6514   return 0;
6515 }
6516 _ACEOF
6517 rm -f conftest.$ac_objext conftest$ac_exeext
6518 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6519   (eval $ac_link) 2>&5
6520   ac_status=$?
6521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522   (exit $ac_status); } &&
6523          { ac_try='test -s conftest$ac_exeext'
6524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6525   (eval $ac_try) 2>&5
6526   ac_status=$?
6527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6528   (exit $ac_status); }; }; then
6529   ac_cv_search_krb5_encrypt="-l$ac_lib"
6530 break
6531 else
6532   echo "$as_me: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6534 fi
6535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6536   done
6537 fi
6538 LIBS=$ac_func_search_save_LIBS
6539 fi
6540 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6541 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6542 if test "$ac_cv_search_krb5_encrypt" != no; then
6543   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6544
6545 else
6546   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6547 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6548    { (exit 1); exit 1; }; }
6549 fi
6550
6551   echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6552 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6553 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6554   echo $ECHO_N "(cached) $ECHO_C" >&6
6555 else
6556   ac_func_search_save_LIBS=$LIBS
6557 ac_cv_search_krb5_sendauth=no
6558 cat >conftest.$ac_ext <<_ACEOF
6559 #line $LINENO "configure"
6560 #include "confdefs.h"
6561
6562 /* Override any gcc2 internal prototype to avoid an error.  */
6563 #ifdef __cplusplus
6564 extern "C"
6565 #endif
6566 /* We use char because int might match the return type of a gcc2
6567    builtin and then its argument prototype would still apply.  */
6568 char krb5_sendauth ();
6569 #ifdef F77_DUMMY_MAIN
6570 #  ifdef __cplusplus
6571      extern "C"
6572 #  endif
6573    int F77_DUMMY_MAIN() { return 1; }
6574 #endif
6575 int
6576 main ()
6577 {
6578 krb5_sendauth ();
6579   ;
6580   return 0;
6581 }
6582 _ACEOF
6583 rm -f conftest.$ac_objext conftest$ac_exeext
6584 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6585   (eval $ac_link) 2>&5
6586   ac_status=$?
6587   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6588   (exit $ac_status); } &&
6589          { ac_try='test -s conftest$ac_exeext'
6590   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6591   (eval $ac_try) 2>&5
6592   ac_status=$?
6593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6594   (exit $ac_status); }; }; then
6595   ac_cv_search_krb5_sendauth="none required"
6596 else
6597   echo "$as_me: failed program was:" >&5
6598 cat conftest.$ac_ext >&5
6599 fi
6600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6601 if test "$ac_cv_search_krb5_sendauth" = no; then
6602   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
6603     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6604     cat >conftest.$ac_ext <<_ACEOF
6605 #line $LINENO "configure"
6606 #include "confdefs.h"
6607
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 #ifdef __cplusplus
6610 extern "C"
6611 #endif
6612 /* We use char because int might match the return type of a gcc2
6613    builtin and then its argument prototype would still apply.  */
6614 char krb5_sendauth ();
6615 #ifdef F77_DUMMY_MAIN
6616 #  ifdef __cplusplus
6617      extern "C"
6618 #  endif
6619    int F77_DUMMY_MAIN() { return 1; }
6620 #endif
6621 int
6622 main ()
6623 {
6624 krb5_sendauth ();
6625   ;
6626   return 0;
6627 }
6628 _ACEOF
6629 rm -f conftest.$ac_objext conftest$ac_exeext
6630 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6631   (eval $ac_link) 2>&5
6632   ac_status=$?
6633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634   (exit $ac_status); } &&
6635          { ac_try='test -s conftest$ac_exeext'
6636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6637   (eval $ac_try) 2>&5
6638   ac_status=$?
6639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6640   (exit $ac_status); }; }; then
6641   ac_cv_search_krb5_sendauth="-l$ac_lib"
6642 break
6643 else
6644   echo "$as_me: failed program was:" >&5
6645 cat conftest.$ac_ext >&5
6646 fi
6647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6648   done
6649 fi
6650 LIBS=$ac_func_search_save_LIBS
6651 fi
6652 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
6653 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
6654 if test "$ac_cv_search_krb5_sendauth" != no; then
6655   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
6656
6657 else
6658   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
6659 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
6660    { (exit 1); exit 1; }; }
6661 fi
6662
6663 fi
6664
6665 if test "$with_openssl" = yes ; then
6666
6667 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
6668 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
6669 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
6670   echo $ECHO_N "(cached) $ECHO_C" >&6
6671 else
6672   ac_check_lib_save_LIBS=$LIBS
6673 LIBS="-lcrypto  $LIBS"
6674 cat >conftest.$ac_ext <<_ACEOF
6675 #line $LINENO "configure"
6676 #include "confdefs.h"
6677
6678 /* Override any gcc2 internal prototype to avoid an error.  */
6679 #ifdef __cplusplus
6680 extern "C"
6681 #endif
6682 /* We use char because int might match the return type of a gcc2
6683    builtin and then its argument prototype would still apply.  */
6684 char CRYPTO_new_ex_data ();
6685 #ifdef F77_DUMMY_MAIN
6686 #  ifdef __cplusplus
6687      extern "C"
6688 #  endif
6689    int F77_DUMMY_MAIN() { return 1; }
6690 #endif
6691 int
6692 main ()
6693 {
6694 CRYPTO_new_ex_data ();
6695   ;
6696   return 0;
6697 }
6698 _ACEOF
6699 rm -f conftest.$ac_objext conftest$ac_exeext
6700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6701   (eval $ac_link) 2>&5
6702   ac_status=$?
6703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6704   (exit $ac_status); } &&
6705          { ac_try='test -s conftest$ac_exeext'
6706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6707   (eval $ac_try) 2>&5
6708   ac_status=$?
6709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6710   (exit $ac_status); }; }; then
6711   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
6712 else
6713   echo "$as_me: failed program was:" >&5
6714 cat conftest.$ac_ext >&5
6715 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
6716 fi
6717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718 LIBS=$ac_check_lib_save_LIBS
6719 fi
6720 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
6721 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
6722 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
6723   cat >>confdefs.h <<_ACEOF
6724 #define HAVE_LIBCRYPTO 1
6725 _ACEOF
6726
6727   LIBS="-lcrypto $LIBS"
6728
6729 else
6730   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
6731 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
6732    { (exit 1); exit 1; }; }
6733 fi
6734
6735
6736 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
6737 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
6738 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
6739   echo $ECHO_N "(cached) $ECHO_C" >&6
6740 else
6741   ac_check_lib_save_LIBS=$LIBS
6742 LIBS="-lssl  $LIBS"
6743 cat >conftest.$ac_ext <<_ACEOF
6744 #line $LINENO "configure"
6745 #include "confdefs.h"
6746
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 #ifdef __cplusplus
6749 extern "C"
6750 #endif
6751 /* We use char because int might match the return type of a gcc2
6752    builtin and then its argument prototype would still apply.  */
6753 char SSL_library_init ();
6754 #ifdef F77_DUMMY_MAIN
6755 #  ifdef __cplusplus
6756      extern "C"
6757 #  endif
6758    int F77_DUMMY_MAIN() { return 1; }
6759 #endif
6760 int
6761 main ()
6762 {
6763 SSL_library_init ();
6764   ;
6765   return 0;
6766 }
6767 _ACEOF
6768 rm -f conftest.$ac_objext conftest$ac_exeext
6769 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6770   (eval $ac_link) 2>&5
6771   ac_status=$?
6772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6773   (exit $ac_status); } &&
6774          { ac_try='test -s conftest$ac_exeext'
6775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6776   (eval $ac_try) 2>&5
6777   ac_status=$?
6778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6779   (exit $ac_status); }; }; then
6780   ac_cv_lib_ssl_SSL_library_init=yes
6781 else
6782   echo "$as_me: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 ac_cv_lib_ssl_SSL_library_init=no
6785 fi
6786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6787 LIBS=$ac_check_lib_save_LIBS
6788 fi
6789 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
6790 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
6791 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
6792   cat >>confdefs.h <<_ACEOF
6793 #define HAVE_LIBSSL 1
6794 _ACEOF
6795
6796   LIBS="-lssl $LIBS"
6797
6798 else
6799   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
6800 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
6801    { (exit 1); exit 1; }; }
6802 fi
6803
6804 fi
6805
6806 if test "$with_pam" = yes ; then
6807
6808 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
6809 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
6810 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
6811   echo $ECHO_N "(cached) $ECHO_C" >&6
6812 else
6813   ac_check_lib_save_LIBS=$LIBS
6814 LIBS="-lpam  $LIBS"
6815 cat >conftest.$ac_ext <<_ACEOF
6816 #line $LINENO "configure"
6817 #include "confdefs.h"
6818
6819 /* Override any gcc2 internal prototype to avoid an error.  */
6820 #ifdef __cplusplus
6821 extern "C"
6822 #endif
6823 /* We use char because int might match the return type of a gcc2
6824    builtin and then its argument prototype would still apply.  */
6825 char pam_start ();
6826 #ifdef F77_DUMMY_MAIN
6827 #  ifdef __cplusplus
6828      extern "C"
6829 #  endif
6830    int F77_DUMMY_MAIN() { return 1; }
6831 #endif
6832 int
6833 main ()
6834 {
6835 pam_start ();
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 rm -f conftest.$ac_objext conftest$ac_exeext
6841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6842   (eval $ac_link) 2>&5
6843   ac_status=$?
6844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845   (exit $ac_status); } &&
6846          { ac_try='test -s conftest$ac_exeext'
6847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6848   (eval $ac_try) 2>&5
6849   ac_status=$?
6850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6851   (exit $ac_status); }; }; then
6852   ac_cv_lib_pam_pam_start=yes
6853 else
6854   echo "$as_me: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6856 ac_cv_lib_pam_pam_start=no
6857 fi
6858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6859 LIBS=$ac_check_lib_save_LIBS
6860 fi
6861 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
6862 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
6863 if test $ac_cv_lib_pam_pam_start = yes; then
6864   cat >>confdefs.h <<_ACEOF
6865 #define HAVE_LIBPAM 1
6866 _ACEOF
6867
6868   LIBS="-lpam $LIBS"
6869
6870 else
6871   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
6872 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
6873    { (exit 1); exit 1; }; }
6874 fi
6875
6876 fi
6877
6878
6879 ##
6880 ## Header files
6881 ##
6882
6883 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6884 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6885 if test "${ac_cv_header_stdc+set}" = set; then
6886   echo $ECHO_N "(cached) $ECHO_C" >&6
6887 else
6888   cat >conftest.$ac_ext <<_ACEOF
6889 #line $LINENO "configure"
6890 #include "confdefs.h"
6891 #include <stdlib.h>
6892 #include <stdarg.h>
6893 #include <string.h>
6894 #include <float.h>
6895
6896 _ACEOF
6897 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6898   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6899   ac_status=$?
6900   egrep -v '^ *\+' conftest.er1 >conftest.err
6901   rm -f conftest.er1
6902   cat conftest.err >&5
6903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904   (exit $ac_status); } >/dev/null; then
6905   if test -s conftest.err; then
6906     ac_cpp_err=$ac_c_preproc_warn_flag
6907   else
6908     ac_cpp_err=
6909   fi
6910 else
6911   ac_cpp_err=yes
6912 fi
6913 if test -z "$ac_cpp_err"; then
6914   ac_cv_header_stdc=yes
6915 else
6916   echo "$as_me: failed program was:" >&5
6917   cat conftest.$ac_ext >&5
6918   ac_cv_header_stdc=no
6919 fi
6920 rm -f conftest.err conftest.$ac_ext
6921
6922 if test $ac_cv_header_stdc = yes; then
6923   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6924   cat >conftest.$ac_ext <<_ACEOF
6925 #line $LINENO "configure"
6926 #include "confdefs.h"
6927 #include <string.h>
6928
6929 _ACEOF
6930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6931   egrep "memchr" >/dev/null 2>&1; then
6932   :
6933 else
6934   ac_cv_header_stdc=no
6935 fi
6936 rm -f conftest*
6937
6938 fi
6939
6940 if test $ac_cv_header_stdc = yes; then
6941   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6942   cat >conftest.$ac_ext <<_ACEOF
6943 #line $LINENO "configure"
6944 #include "confdefs.h"
6945 #include <stdlib.h>
6946
6947 _ACEOF
6948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6949   egrep "free" >/dev/null 2>&1; then
6950   :
6951 else
6952   ac_cv_header_stdc=no
6953 fi
6954 rm -f conftest*
6955
6956 fi
6957
6958 if test $ac_cv_header_stdc = yes; then
6959   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6960   if test "$cross_compiling" = yes; then
6961   :
6962 else
6963   cat >conftest.$ac_ext <<_ACEOF
6964 #line $LINENO "configure"
6965 #include "confdefs.h"
6966 #include <ctype.h>
6967 #if ((' ' & 0x0FF) == 0x020)
6968 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6969 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6970 #else
6971 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6972                      || ('j' <= (c) && (c) <= 'r') \
6973                      || ('s' <= (c) && (c) <= 'z'))
6974 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6975 #endif
6976
6977 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6978 int
6979 main ()
6980 {
6981   int i;
6982   for (i = 0; i < 256; i++)
6983     if (XOR (islower (i), ISLOWER (i))
6984         || toupper (i) != TOUPPER (i))
6985       exit(2);
6986   exit (0);
6987 }
6988 _ACEOF
6989 rm -f conftest$ac_exeext
6990 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6991   (eval $ac_link) 2>&5
6992   ac_status=$?
6993   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6994   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6996   (eval $ac_try) 2>&5
6997   ac_status=$?
6998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6999   (exit $ac_status); }; }; then
7000   :
7001 else
7002   echo "$as_me: program exited with status $ac_status" >&5
7003 echo "$as_me: failed program was:" >&5
7004 cat conftest.$ac_ext >&5
7005 ( exit $ac_status )
7006 ac_cv_header_stdc=no
7007 fi
7008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7009 fi
7010 fi
7011 fi
7012 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7013 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7014 if test $ac_cv_header_stdc = yes; then
7015
7016 cat >>confdefs.h <<\_ACEOF
7017 #define STDC_HEADERS 1
7018 _ACEOF
7019
7020 fi
7021
7022 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7033                   inttypes.h stdint.h unistd.h
7034 do
7035 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7036 echo "$as_me:$LINENO: checking for $ac_header" >&5
7037 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7038 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7039   echo $ECHO_N "(cached) $ECHO_C" >&6
7040 else
7041   cat >conftest.$ac_ext <<_ACEOF
7042 #line $LINENO "configure"
7043 #include "confdefs.h"
7044 $ac_includes_default
7045
7046 #include <$ac_header>
7047 _ACEOF
7048 rm -f conftest.$ac_objext
7049 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7050   (eval $ac_compile) 2>&5
7051   ac_status=$?
7052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053   (exit $ac_status); } &&
7054          { ac_try='test -s conftest.$ac_objext'
7055   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7056   (eval $ac_try) 2>&5
7057   ac_status=$?
7058   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7059   (exit $ac_status); }; }; then
7060   eval "$as_ac_Header=yes"
7061 else
7062   echo "$as_me: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7064 eval "$as_ac_Header=no"
7065 fi
7066 rm -f conftest.$ac_objext conftest.$ac_ext
7067 fi
7068 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7069 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7070 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7071   cat >>confdefs.h <<_ACEOF
7072 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7073 _ACEOF
7074
7075 fi
7076
7077 done
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.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/un.h termios.h utime.h kernel/OS.h kernel/image.h SupportDefs.h
7102 do
7103 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7105   echo "$as_me:$LINENO: checking for $ac_header" >&5
7106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7108   echo $ECHO_N "(cached) $ECHO_C" >&6
7109 fi
7110 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7111 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7112 else
7113   # Is the header compilable?
7114 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7115 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7116 cat >conftest.$ac_ext <<_ACEOF
7117 #line $LINENO "configure"
7118 #include "confdefs.h"
7119 $ac_includes_default
7120 #include <$ac_header>
7121 _ACEOF
7122 rm -f conftest.$ac_objext
7123 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7124   (eval $ac_compile) 2>&5
7125   ac_status=$?
7126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127   (exit $ac_status); } &&
7128          { ac_try='test -s conftest.$ac_objext'
7129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7130   (eval $ac_try) 2>&5
7131   ac_status=$?
7132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133   (exit $ac_status); }; }; then
7134   ac_header_compiler=yes
7135 else
7136   echo "$as_me: failed program was:" >&5
7137 cat conftest.$ac_ext >&5
7138 ac_header_compiler=no
7139 fi
7140 rm -f conftest.$ac_objext conftest.$ac_ext
7141 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7142 echo "${ECHO_T}$ac_header_compiler" >&6
7143
7144 # Is the header present?
7145 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7146 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7147 cat >conftest.$ac_ext <<_ACEOF
7148 #line $LINENO "configure"
7149 #include "confdefs.h"
7150 #include <$ac_header>
7151 _ACEOF
7152 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7154   ac_status=$?
7155   egrep -v '^ *\+' conftest.er1 >conftest.err
7156   rm -f conftest.er1
7157   cat conftest.err >&5
7158   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7159   (exit $ac_status); } >/dev/null; then
7160   if test -s conftest.err; then
7161     ac_cpp_err=$ac_c_preproc_warn_flag
7162   else
7163     ac_cpp_err=
7164   fi
7165 else
7166   ac_cpp_err=yes
7167 fi
7168 if test -z "$ac_cpp_err"; then
7169   ac_header_preproc=yes
7170 else
7171   echo "$as_me: failed program was:" >&5
7172   cat conftest.$ac_ext >&5
7173   ac_header_preproc=no
7174 fi
7175 rm -f conftest.err conftest.$ac_ext
7176 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7177 echo "${ECHO_T}$ac_header_preproc" >&6
7178
7179 # So?  What about this header?
7180 case $ac_header_compiler:$ac_header_preproc in
7181   yes:no )
7182     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7183 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7184     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7185 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7186   no:yes )
7187     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7188 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7189     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7190 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7191     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7192 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7193 esac
7194 echo "$as_me:$LINENO: checking for $ac_header" >&5
7195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7197   echo $ECHO_N "(cached) $ECHO_C" >&6
7198 else
7199   eval "$as_ac_Header=$ac_header_preproc"
7200 fi
7201 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7202 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7203
7204 fi
7205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7206   cat >>confdefs.h <<_ACEOF
7207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7208 _ACEOF
7209
7210 fi
7211
7212 done
7213
7214
7215 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7216 # netinet/in.h is included first.
7217
7218 for ac_header in netinet/in.h
7219 do
7220 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7221 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7222   echo "$as_me:$LINENO: checking for $ac_header" >&5
7223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7225   echo $ECHO_N "(cached) $ECHO_C" >&6
7226 fi
7227 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7228 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7229 else
7230   # Is the header compilable?
7231 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7232 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7233 cat >conftest.$ac_ext <<_ACEOF
7234 #line $LINENO "configure"
7235 #include "confdefs.h"
7236 $ac_includes_default
7237 #include <$ac_header>
7238 _ACEOF
7239 rm -f conftest.$ac_objext
7240 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7241   (eval $ac_compile) 2>&5
7242   ac_status=$?
7243   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244   (exit $ac_status); } &&
7245          { ac_try='test -s conftest.$ac_objext'
7246   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7247   (eval $ac_try) 2>&5
7248   ac_status=$?
7249   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7250   (exit $ac_status); }; }; then
7251   ac_header_compiler=yes
7252 else
7253   echo "$as_me: failed program was:" >&5
7254 cat conftest.$ac_ext >&5
7255 ac_header_compiler=no
7256 fi
7257 rm -f conftest.$ac_objext conftest.$ac_ext
7258 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7259 echo "${ECHO_T}$ac_header_compiler" >&6
7260
7261 # Is the header present?
7262 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7263 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7264 cat >conftest.$ac_ext <<_ACEOF
7265 #line $LINENO "configure"
7266 #include "confdefs.h"
7267 #include <$ac_header>
7268 _ACEOF
7269 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7271   ac_status=$?
7272   egrep -v '^ *\+' conftest.er1 >conftest.err
7273   rm -f conftest.er1
7274   cat conftest.err >&5
7275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276   (exit $ac_status); } >/dev/null; then
7277   if test -s conftest.err; then
7278     ac_cpp_err=$ac_c_preproc_warn_flag
7279   else
7280     ac_cpp_err=
7281   fi
7282 else
7283   ac_cpp_err=yes
7284 fi
7285 if test -z "$ac_cpp_err"; then
7286   ac_header_preproc=yes
7287 else
7288   echo "$as_me: failed program was:" >&5
7289   cat conftest.$ac_ext >&5
7290   ac_header_preproc=no
7291 fi
7292 rm -f conftest.err conftest.$ac_ext
7293 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7294 echo "${ECHO_T}$ac_header_preproc" >&6
7295
7296 # So?  What about this header?
7297 case $ac_header_compiler:$ac_header_preproc in
7298   yes:no )
7299     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7300 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7301     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7302 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7303   no:yes )
7304     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7305 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7306     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7307 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7308     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7309 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7310 esac
7311 echo "$as_me:$LINENO: checking for $ac_header" >&5
7312 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7313 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7314   echo $ECHO_N "(cached) $ECHO_C" >&6
7315 else
7316   eval "$as_ac_Header=$ac_header_preproc"
7317 fi
7318 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7319 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7320
7321 fi
7322 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7323   cat >>confdefs.h <<_ACEOF
7324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7325 _ACEOF
7326
7327 fi
7328
7329 done
7330
7331
7332 for ac_header in netinet/tcp.h
7333 do
7334 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7335 echo "$as_me:$LINENO: checking for $ac_header" >&5
7336 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7337 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7338   echo $ECHO_N "(cached) $ECHO_C" >&6
7339 else
7340   cat >conftest.$ac_ext <<_ACEOF
7341 #line $LINENO "configure"
7342 #include "confdefs.h"
7343 $ac_includes_default
7344 #ifdef HAVE_NETINET_IN_H
7345 #include <netinet/in.h>
7346 #endif
7347
7348
7349 #include <$ac_header>
7350 _ACEOF
7351 rm -f conftest.$ac_objext
7352 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7353   (eval $ac_compile) 2>&5
7354   ac_status=$?
7355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7356   (exit $ac_status); } &&
7357          { ac_try='test -s conftest.$ac_objext'
7358   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7359   (eval $ac_try) 2>&5
7360   ac_status=$?
7361   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7362   (exit $ac_status); }; }; then
7363   eval "$as_ac_Header=yes"
7364 else
7365   echo "$as_me: failed program was:" >&5
7366 cat conftest.$ac_ext >&5
7367 eval "$as_ac_Header=no"
7368 fi
7369 rm -f conftest.$ac_objext conftest.$ac_ext
7370 fi
7371 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7372 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7373 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7374   cat >>confdefs.h <<_ACEOF
7375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7376 _ACEOF
7377
7378 fi
7379
7380 done
7381
7382
7383 if test "$with_readline" = yes; then
7384
7385 for ac_header in readline/readline.h
7386 do
7387 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7389   echo "$as_me:$LINENO: checking for $ac_header" >&5
7390 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7391 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7392   echo $ECHO_N "(cached) $ECHO_C" >&6
7393 fi
7394 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7396 else
7397   # Is the header compilable?
7398 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7399 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7400 cat >conftest.$ac_ext <<_ACEOF
7401 #line $LINENO "configure"
7402 #include "confdefs.h"
7403 $ac_includes_default
7404 #include <$ac_header>
7405 _ACEOF
7406 rm -f conftest.$ac_objext
7407 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7408   (eval $ac_compile) 2>&5
7409   ac_status=$?
7410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411   (exit $ac_status); } &&
7412          { ac_try='test -s conftest.$ac_objext'
7413   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7414   (eval $ac_try) 2>&5
7415   ac_status=$?
7416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7417   (exit $ac_status); }; }; then
7418   ac_header_compiler=yes
7419 else
7420   echo "$as_me: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 ac_header_compiler=no
7423 fi
7424 rm -f conftest.$ac_objext conftest.$ac_ext
7425 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7426 echo "${ECHO_T}$ac_header_compiler" >&6
7427
7428 # Is the header present?
7429 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7430 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7431 cat >conftest.$ac_ext <<_ACEOF
7432 #line $LINENO "configure"
7433 #include "confdefs.h"
7434 #include <$ac_header>
7435 _ACEOF
7436 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7437   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7438   ac_status=$?
7439   egrep -v '^ *\+' conftest.er1 >conftest.err
7440   rm -f conftest.er1
7441   cat conftest.err >&5
7442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443   (exit $ac_status); } >/dev/null; then
7444   if test -s conftest.err; then
7445     ac_cpp_err=$ac_c_preproc_warn_flag
7446   else
7447     ac_cpp_err=
7448   fi
7449 else
7450   ac_cpp_err=yes
7451 fi
7452 if test -z "$ac_cpp_err"; then
7453   ac_header_preproc=yes
7454 else
7455   echo "$as_me: failed program was:" >&5
7456   cat conftest.$ac_ext >&5
7457   ac_header_preproc=no
7458 fi
7459 rm -f conftest.err conftest.$ac_ext
7460 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7461 echo "${ECHO_T}$ac_header_preproc" >&6
7462
7463 # So?  What about this header?
7464 case $ac_header_compiler:$ac_header_preproc in
7465   yes:no )
7466     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7467 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7468     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7469 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7470   no:yes )
7471     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7472 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7473     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7474 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7475     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7476 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7477 esac
7478 echo "$as_me:$LINENO: checking for $ac_header" >&5
7479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7481   echo $ECHO_N "(cached) $ECHO_C" >&6
7482 else
7483   eval "$as_ac_Header=$ac_header_preproc"
7484 fi
7485 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7486 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7487
7488 fi
7489 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7490   cat >>confdefs.h <<_ACEOF
7491 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7492 _ACEOF
7493
7494 else
7495
7496 for ac_header in editline/readline.h
7497 do
7498 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7499 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7500   echo "$as_me:$LINENO: checking for $ac_header" >&5
7501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7503   echo $ECHO_N "(cached) $ECHO_C" >&6
7504 fi
7505 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7506 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7507 else
7508   # Is the header compilable?
7509 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7510 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7511 cat >conftest.$ac_ext <<_ACEOF
7512 #line $LINENO "configure"
7513 #include "confdefs.h"
7514 $ac_includes_default
7515 #include <$ac_header>
7516 _ACEOF
7517 rm -f conftest.$ac_objext
7518 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7519   (eval $ac_compile) 2>&5
7520   ac_status=$?
7521   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7522   (exit $ac_status); } &&
7523          { ac_try='test -s conftest.$ac_objext'
7524   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7525   (eval $ac_try) 2>&5
7526   ac_status=$?
7527   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7528   (exit $ac_status); }; }; then
7529   ac_header_compiler=yes
7530 else
7531   echo "$as_me: failed program was:" >&5
7532 cat conftest.$ac_ext >&5
7533 ac_header_compiler=no
7534 fi
7535 rm -f conftest.$ac_objext conftest.$ac_ext
7536 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7537 echo "${ECHO_T}$ac_header_compiler" >&6
7538
7539 # Is the header present?
7540 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7541 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7542 cat >conftest.$ac_ext <<_ACEOF
7543 #line $LINENO "configure"
7544 #include "confdefs.h"
7545 #include <$ac_header>
7546 _ACEOF
7547 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7548   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7549   ac_status=$?
7550   egrep -v '^ *\+' conftest.er1 >conftest.err
7551   rm -f conftest.er1
7552   cat conftest.err >&5
7553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554   (exit $ac_status); } >/dev/null; then
7555   if test -s conftest.err; then
7556     ac_cpp_err=$ac_c_preproc_warn_flag
7557   else
7558     ac_cpp_err=
7559   fi
7560 else
7561   ac_cpp_err=yes
7562 fi
7563 if test -z "$ac_cpp_err"; then
7564   ac_header_preproc=yes
7565 else
7566   echo "$as_me: failed program was:" >&5
7567   cat conftest.$ac_ext >&5
7568   ac_header_preproc=no
7569 fi
7570 rm -f conftest.err conftest.$ac_ext
7571 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7572 echo "${ECHO_T}$ac_header_preproc" >&6
7573
7574 # So?  What about this header?
7575 case $ac_header_compiler:$ac_header_preproc in
7576   yes:no )
7577     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7578 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7579     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7580 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7581   no:yes )
7582     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7583 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7584     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7585 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7586     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7587 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7588 esac
7589 echo "$as_me:$LINENO: checking for $ac_header" >&5
7590 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7591 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7592   echo $ECHO_N "(cached) $ECHO_C" >&6
7593 else
7594   eval "$as_ac_Header=$ac_header_preproc"
7595 fi
7596 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7598
7599 fi
7600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7601   cat >>confdefs.h <<_ACEOF
7602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7603 _ACEOF
7604
7605 else
7606
7607 for ac_header in readline.h
7608 do
7609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7610 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7611   echo "$as_me:$LINENO: checking for $ac_header" >&5
7612 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7613 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7614   echo $ECHO_N "(cached) $ECHO_C" >&6
7615 fi
7616 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7618 else
7619   # Is the header compilable?
7620 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7621 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7622 cat >conftest.$ac_ext <<_ACEOF
7623 #line $LINENO "configure"
7624 #include "confdefs.h"
7625 $ac_includes_default
7626 #include <$ac_header>
7627 _ACEOF
7628 rm -f conftest.$ac_objext
7629 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7630   (eval $ac_compile) 2>&5
7631   ac_status=$?
7632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7633   (exit $ac_status); } &&
7634          { ac_try='test -s conftest.$ac_objext'
7635   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7636   (eval $ac_try) 2>&5
7637   ac_status=$?
7638   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7639   (exit $ac_status); }; }; then
7640   ac_header_compiler=yes
7641 else
7642   echo "$as_me: failed program was:" >&5
7643 cat conftest.$ac_ext >&5
7644 ac_header_compiler=no
7645 fi
7646 rm -f conftest.$ac_objext conftest.$ac_ext
7647 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7648 echo "${ECHO_T}$ac_header_compiler" >&6
7649
7650 # Is the header present?
7651 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7652 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7653 cat >conftest.$ac_ext <<_ACEOF
7654 #line $LINENO "configure"
7655 #include "confdefs.h"
7656 #include <$ac_header>
7657 _ACEOF
7658 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7659   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7660   ac_status=$?
7661   egrep -v '^ *\+' conftest.er1 >conftest.err
7662   rm -f conftest.er1
7663   cat conftest.err >&5
7664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7665   (exit $ac_status); } >/dev/null; then
7666   if test -s conftest.err; then
7667     ac_cpp_err=$ac_c_preproc_warn_flag
7668   else
7669     ac_cpp_err=
7670   fi
7671 else
7672   ac_cpp_err=yes
7673 fi
7674 if test -z "$ac_cpp_err"; then
7675   ac_header_preproc=yes
7676 else
7677   echo "$as_me: failed program was:" >&5
7678   cat conftest.$ac_ext >&5
7679   ac_header_preproc=no
7680 fi
7681 rm -f conftest.err conftest.$ac_ext
7682 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7683 echo "${ECHO_T}$ac_header_preproc" >&6
7684
7685 # So?  What about this header?
7686 case $ac_header_compiler:$ac_header_preproc in
7687   yes:no )
7688     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7689 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7690     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7691 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7692   no:yes )
7693     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7694 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7695     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7696 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7697     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7698 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7699 esac
7700 echo "$as_me:$LINENO: checking for $ac_header" >&5
7701 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7703   echo $ECHO_N "(cached) $ECHO_C" >&6
7704 else
7705   eval "$as_ac_Header=$ac_header_preproc"
7706 fi
7707 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7708 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7709
7710 fi
7711 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7712   cat >>confdefs.h <<_ACEOF
7713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7714 _ACEOF
7715
7716 else
7717   { { echo "$as_me:$LINENO: error: readline header not found
7718 If you have readline already installed, see config.log for details on the
7719 failure.  It is possible the compiler isn't looking in the proper directory.
7720 Use --without-readline to disable readline support." >&5
7721 echo "$as_me: error: readline header not found
7722 If you have readline already installed, see config.log for details on the
7723 failure.  It is possible the compiler isn't looking in the proper directory.
7724 Use --without-readline to disable readline support." >&2;}
7725    { (exit 1); exit 1; }; }
7726 fi
7727
7728 done
7729
7730 fi
7731
7732 done
7733
7734 fi
7735
7736 done
7737
7738
7739 for ac_header in readline/history.h
7740 do
7741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7743   echo "$as_me:$LINENO: checking for $ac_header" >&5
7744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7746   echo $ECHO_N "(cached) $ECHO_C" >&6
7747 fi
7748 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7749 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7750 else
7751   # Is the header compilable?
7752 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7753 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7754 cat >conftest.$ac_ext <<_ACEOF
7755 #line $LINENO "configure"
7756 #include "confdefs.h"
7757 $ac_includes_default
7758 #include <$ac_header>
7759 _ACEOF
7760 rm -f conftest.$ac_objext
7761 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7762   (eval $ac_compile) 2>&5
7763   ac_status=$?
7764   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7765   (exit $ac_status); } &&
7766          { ac_try='test -s conftest.$ac_objext'
7767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7768   (eval $ac_try) 2>&5
7769   ac_status=$?
7770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7771   (exit $ac_status); }; }; then
7772   ac_header_compiler=yes
7773 else
7774   echo "$as_me: failed program was:" >&5
7775 cat conftest.$ac_ext >&5
7776 ac_header_compiler=no
7777 fi
7778 rm -f conftest.$ac_objext conftest.$ac_ext
7779 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7780 echo "${ECHO_T}$ac_header_compiler" >&6
7781
7782 # Is the header present?
7783 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7784 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7785 cat >conftest.$ac_ext <<_ACEOF
7786 #line $LINENO "configure"
7787 #include "confdefs.h"
7788 #include <$ac_header>
7789 _ACEOF
7790 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7791   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7792   ac_status=$?
7793   egrep -v '^ *\+' conftest.er1 >conftest.err
7794   rm -f conftest.er1
7795   cat conftest.err >&5
7796   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7797   (exit $ac_status); } >/dev/null; then
7798   if test -s conftest.err; then
7799     ac_cpp_err=$ac_c_preproc_warn_flag
7800   else
7801     ac_cpp_err=
7802   fi
7803 else
7804   ac_cpp_err=yes
7805 fi
7806 if test -z "$ac_cpp_err"; then
7807   ac_header_preproc=yes
7808 else
7809   echo "$as_me: failed program was:" >&5
7810   cat conftest.$ac_ext >&5
7811   ac_header_preproc=no
7812 fi
7813 rm -f conftest.err conftest.$ac_ext
7814 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7815 echo "${ECHO_T}$ac_header_preproc" >&6
7816
7817 # So?  What about this header?
7818 case $ac_header_compiler:$ac_header_preproc in
7819   yes:no )
7820     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7821 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7822     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7823 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7824   no:yes )
7825     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7826 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7827     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7828 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7829     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7830 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7831 esac
7832 echo "$as_me:$LINENO: checking for $ac_header" >&5
7833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7835   echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837   eval "$as_ac_Header=$ac_header_preproc"
7838 fi
7839 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7840 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7841
7842 fi
7843 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7844   cat >>confdefs.h <<_ACEOF
7845 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7846 _ACEOF
7847
7848 else
7849
7850 for ac_header in editline/history.h
7851 do
7852 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7854   echo "$as_me:$LINENO: checking for $ac_header" >&5
7855 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7857   echo $ECHO_N "(cached) $ECHO_C" >&6
7858 fi
7859 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7860 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7861 else
7862   # Is the header compilable?
7863 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7864 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7865 cat >conftest.$ac_ext <<_ACEOF
7866 #line $LINENO "configure"
7867 #include "confdefs.h"
7868 $ac_includes_default
7869 #include <$ac_header>
7870 _ACEOF
7871 rm -f conftest.$ac_objext
7872 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7873   (eval $ac_compile) 2>&5
7874   ac_status=$?
7875   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876   (exit $ac_status); } &&
7877          { ac_try='test -s conftest.$ac_objext'
7878   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7879   (eval $ac_try) 2>&5
7880   ac_status=$?
7881   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7882   (exit $ac_status); }; }; then
7883   ac_header_compiler=yes
7884 else
7885   echo "$as_me: failed program was:" >&5
7886 cat conftest.$ac_ext >&5
7887 ac_header_compiler=no
7888 fi
7889 rm -f conftest.$ac_objext conftest.$ac_ext
7890 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7891 echo "${ECHO_T}$ac_header_compiler" >&6
7892
7893 # Is the header present?
7894 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7895 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7896 cat >conftest.$ac_ext <<_ACEOF
7897 #line $LINENO "configure"
7898 #include "confdefs.h"
7899 #include <$ac_header>
7900 _ACEOF
7901 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7903   ac_status=$?
7904   egrep -v '^ *\+' conftest.er1 >conftest.err
7905   rm -f conftest.er1
7906   cat conftest.err >&5
7907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7908   (exit $ac_status); } >/dev/null; then
7909   if test -s conftest.err; then
7910     ac_cpp_err=$ac_c_preproc_warn_flag
7911   else
7912     ac_cpp_err=
7913   fi
7914 else
7915   ac_cpp_err=yes
7916 fi
7917 if test -z "$ac_cpp_err"; then
7918   ac_header_preproc=yes
7919 else
7920   echo "$as_me: failed program was:" >&5
7921   cat conftest.$ac_ext >&5
7922   ac_header_preproc=no
7923 fi
7924 rm -f conftest.err conftest.$ac_ext
7925 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7926 echo "${ECHO_T}$ac_header_preproc" >&6
7927
7928 # So?  What about this header?
7929 case $ac_header_compiler:$ac_header_preproc in
7930   yes:no )
7931     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7932 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7933     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7934 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7935   no:yes )
7936     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7937 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7938     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7939 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7940     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7941 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7942 esac
7943 echo "$as_me:$LINENO: checking for $ac_header" >&5
7944 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7946   echo $ECHO_N "(cached) $ECHO_C" >&6
7947 else
7948   eval "$as_ac_Header=$ac_header_preproc"
7949 fi
7950 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7951 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7952
7953 fi
7954 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7955   cat >>confdefs.h <<_ACEOF
7956 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7957 _ACEOF
7958
7959 else
7960
7961 for ac_header in history.h
7962 do
7963 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7964 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7965   echo "$as_me:$LINENO: checking for $ac_header" >&5
7966 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7967 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7968   echo $ECHO_N "(cached) $ECHO_C" >&6
7969 fi
7970 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7971 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7972 else
7973   # Is the header compilable?
7974 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7975 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7976 cat >conftest.$ac_ext <<_ACEOF
7977 #line $LINENO "configure"
7978 #include "confdefs.h"
7979 $ac_includes_default
7980 #include <$ac_header>
7981 _ACEOF
7982 rm -f conftest.$ac_objext
7983 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7984   (eval $ac_compile) 2>&5
7985   ac_status=$?
7986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7987   (exit $ac_status); } &&
7988          { ac_try='test -s conftest.$ac_objext'
7989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7990   (eval $ac_try) 2>&5
7991   ac_status=$?
7992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993   (exit $ac_status); }; }; then
7994   ac_header_compiler=yes
7995 else
7996   echo "$as_me: failed program was:" >&5
7997 cat conftest.$ac_ext >&5
7998 ac_header_compiler=no
7999 fi
8000 rm -f conftest.$ac_objext conftest.$ac_ext
8001 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8002 echo "${ECHO_T}$ac_header_compiler" >&6
8003
8004 # Is the header present?
8005 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8006 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8007 cat >conftest.$ac_ext <<_ACEOF
8008 #line $LINENO "configure"
8009 #include "confdefs.h"
8010 #include <$ac_header>
8011 _ACEOF
8012 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8014   ac_status=$?
8015   egrep -v '^ *\+' conftest.er1 >conftest.err
8016   rm -f conftest.er1
8017   cat conftest.err >&5
8018   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8019   (exit $ac_status); } >/dev/null; then
8020   if test -s conftest.err; then
8021     ac_cpp_err=$ac_c_preproc_warn_flag
8022   else
8023     ac_cpp_err=
8024   fi
8025 else
8026   ac_cpp_err=yes
8027 fi
8028 if test -z "$ac_cpp_err"; then
8029   ac_header_preproc=yes
8030 else
8031   echo "$as_me: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   ac_header_preproc=no
8034 fi
8035 rm -f conftest.err conftest.$ac_ext
8036 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8037 echo "${ECHO_T}$ac_header_preproc" >&6
8038
8039 # So?  What about this header?
8040 case $ac_header_compiler:$ac_header_preproc in
8041   yes:no )
8042     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8043 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8044     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8045 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8046   no:yes )
8047     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8048 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8049     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8050 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8051     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8052 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8053 esac
8054 echo "$as_me:$LINENO: checking for $ac_header" >&5
8055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8057   echo $ECHO_N "(cached) $ECHO_C" >&6
8058 else
8059   eval "$as_ac_Header=$ac_header_preproc"
8060 fi
8061 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8063
8064 fi
8065 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8066   cat >>confdefs.h <<_ACEOF
8067 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8068 _ACEOF
8069
8070 else
8071   { { echo "$as_me:$LINENO: error: history header not found
8072 If you have readline already installed, see config.log for details on the
8073 failure.  It is possible the compiler isn't looking in the proper directory.
8074 Use --without-readline to disable readline support." >&5
8075 echo "$as_me: error: history header not found
8076 If you have readline already installed, see config.log for details on the
8077 failure.  It is possible the compiler isn't looking in the proper directory.
8078 Use --without-readline to disable readline support." >&2;}
8079    { (exit 1); exit 1; }; }
8080 fi
8081
8082 done
8083
8084 fi
8085
8086 done
8087
8088 fi
8089
8090 done
8091
8092 fi
8093
8094 if test "$with_zlib" = yes; then
8095   if test "${ac_cv_header_zlib_h+set}" = set; then
8096   echo "$as_me:$LINENO: checking for zlib.h" >&5
8097 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
8098 if test "${ac_cv_header_zlib_h+set}" = set; then
8099   echo $ECHO_N "(cached) $ECHO_C" >&6
8100 fi
8101 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
8102 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
8103 else
8104   # Is the header compilable?
8105 echo "$as_me:$LINENO: checking zlib.h usability" >&5
8106 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
8107 cat >conftest.$ac_ext <<_ACEOF
8108 #line $LINENO "configure"
8109 #include "confdefs.h"
8110 $ac_includes_default
8111 #include <zlib.h>
8112 _ACEOF
8113 rm -f conftest.$ac_objext
8114 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8115   (eval $ac_compile) 2>&5
8116   ac_status=$?
8117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8118   (exit $ac_status); } &&
8119          { ac_try='test -s conftest.$ac_objext'
8120   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8121   (eval $ac_try) 2>&5
8122   ac_status=$?
8123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8124   (exit $ac_status); }; }; then
8125   ac_header_compiler=yes
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 ac_header_compiler=no
8130 fi
8131 rm -f conftest.$ac_objext conftest.$ac_ext
8132 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8133 echo "${ECHO_T}$ac_header_compiler" >&6
8134
8135 # Is the header present?
8136 echo "$as_me:$LINENO: checking zlib.h presence" >&5
8137 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
8138 cat >conftest.$ac_ext <<_ACEOF
8139 #line $LINENO "configure"
8140 #include "confdefs.h"
8141 #include <zlib.h>
8142 _ACEOF
8143 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8144   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8145   ac_status=$?
8146   egrep -v '^ *\+' conftest.er1 >conftest.err
8147   rm -f conftest.er1
8148   cat conftest.err >&5
8149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8150   (exit $ac_status); } >/dev/null; then
8151   if test -s conftest.err; then
8152     ac_cpp_err=$ac_c_preproc_warn_flag
8153   else
8154     ac_cpp_err=
8155   fi
8156 else
8157   ac_cpp_err=yes
8158 fi
8159 if test -z "$ac_cpp_err"; then
8160   ac_header_preproc=yes
8161 else
8162   echo "$as_me: failed program was:" >&5
8163   cat conftest.$ac_ext >&5
8164   ac_header_preproc=no
8165 fi
8166 rm -f conftest.err conftest.$ac_ext
8167 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8168 echo "${ECHO_T}$ac_header_preproc" >&6
8169
8170 # So?  What about this header?
8171 case $ac_header_compiler:$ac_header_preproc in
8172   yes:no )
8173     { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
8174 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8175     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
8176 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
8177   no:yes )
8178     { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
8179 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
8180     { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
8181 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
8182     { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
8183 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
8184 esac
8185 echo "$as_me:$LINENO: checking for zlib.h" >&5
8186 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
8187 if test "${ac_cv_header_zlib_h+set}" = set; then
8188   echo $ECHO_N "(cached) $ECHO_C" >&6
8189 else
8190   ac_cv_header_zlib_h=$ac_header_preproc
8191 fi
8192 echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
8193 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
8194
8195 fi
8196 if test $ac_cv_header_zlib_h = yes; then
8197   :
8198 else
8199   { { echo "$as_me:$LINENO: error: zlib header not found
8200 If you have zlib already installed, see config.log for details on the
8201 failure.  It is possible the compiler isn't looking in the proper directory.
8202 Use --without-zlib to disable zlib support." >&5
8203 echo "$as_me: error: zlib header not found
8204 If you have zlib already installed, see config.log for details on the
8205 failure.  It is possible the compiler isn't looking in the proper directory.
8206 Use --without-zlib to disable zlib support." >&2;}
8207    { (exit 1); exit 1; }; }
8208 fi
8209
8210
8211 fi
8212
8213 if test "$with_krb4" = yes ; then
8214   if test "${ac_cv_header_krb_h+set}" = set; then
8215   echo "$as_me:$LINENO: checking for krb.h" >&5
8216 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8217 if test "${ac_cv_header_krb_h+set}" = set; then
8218   echo $ECHO_N "(cached) $ECHO_C" >&6
8219 fi
8220 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8221 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8222 else
8223   # Is the header compilable?
8224 echo "$as_me:$LINENO: checking krb.h usability" >&5
8225 echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
8226 cat >conftest.$ac_ext <<_ACEOF
8227 #line $LINENO "configure"
8228 #include "confdefs.h"
8229 $ac_includes_default
8230 #include <krb.h>
8231 _ACEOF
8232 rm -f conftest.$ac_objext
8233 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8234   (eval $ac_compile) 2>&5
8235   ac_status=$?
8236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8237   (exit $ac_status); } &&
8238          { ac_try='test -s conftest.$ac_objext'
8239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8240   (eval $ac_try) 2>&5
8241   ac_status=$?
8242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8243   (exit $ac_status); }; }; then
8244   ac_header_compiler=yes
8245 else
8246   echo "$as_me: failed program was:" >&5
8247 cat conftest.$ac_ext >&5
8248 ac_header_compiler=no
8249 fi
8250 rm -f conftest.$ac_objext conftest.$ac_ext
8251 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8252 echo "${ECHO_T}$ac_header_compiler" >&6
8253
8254 # Is the header present?
8255 echo "$as_me:$LINENO: checking krb.h presence" >&5
8256 echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
8257 cat >conftest.$ac_ext <<_ACEOF
8258 #line $LINENO "configure"
8259 #include "confdefs.h"
8260 #include <krb.h>
8261 _ACEOF
8262 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8263   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8264   ac_status=$?
8265   egrep -v '^ *\+' conftest.er1 >conftest.err
8266   rm -f conftest.er1
8267   cat conftest.err >&5
8268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8269   (exit $ac_status); } >/dev/null; then
8270   if test -s conftest.err; then
8271     ac_cpp_err=$ac_c_preproc_warn_flag
8272   else
8273     ac_cpp_err=
8274   fi
8275 else
8276   ac_cpp_err=yes
8277 fi
8278 if test -z "$ac_cpp_err"; then
8279   ac_header_preproc=yes
8280 else
8281   echo "$as_me: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283   ac_header_preproc=no
8284 fi
8285 rm -f conftest.err conftest.$ac_ext
8286 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8287 echo "${ECHO_T}$ac_header_preproc" >&6
8288
8289 # So?  What about this header?
8290 case $ac_header_compiler:$ac_header_preproc in
8291   yes:no )
8292     { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
8293 echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8294     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8295 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8296   no:yes )
8297     { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
8298 echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
8299     { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
8300 echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
8301     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8302 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8303 esac
8304 echo "$as_me:$LINENO: checking for krb.h" >&5
8305 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8306 if test "${ac_cv_header_krb_h+set}" = set; then
8307   echo $ECHO_N "(cached) $ECHO_C" >&6
8308 else
8309   ac_cv_header_krb_h=$ac_header_preproc
8310 fi
8311 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8312 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8313
8314 fi
8315 if test $ac_cv_header_krb_h = yes; then
8316   :
8317 else
8318   { { echo "$as_me:$LINENO: error: header file <krb.h> is required for Kerberos 4" >&5
8319 echo "$as_me: error: header file <krb.h> is required for Kerberos 4" >&2;}
8320    { (exit 1); exit 1; }; }
8321 fi
8322
8323
8324 fi
8325
8326 if test "$with_krb5" = yes ; then
8327   if test "${ac_cv_header_krb5_h+set}" = set; then
8328   echo "$as_me:$LINENO: checking for krb5.h" >&5
8329 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8330 if test "${ac_cv_header_krb5_h+set}" = set; then
8331   echo $ECHO_N "(cached) $ECHO_C" >&6
8332 fi
8333 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8334 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8335 else
8336   # Is the header compilable?
8337 echo "$as_me:$LINENO: checking krb5.h usability" >&5
8338 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
8339 cat >conftest.$ac_ext <<_ACEOF
8340 #line $LINENO "configure"
8341 #include "confdefs.h"
8342 $ac_includes_default
8343 #include <krb5.h>
8344 _ACEOF
8345 rm -f conftest.$ac_objext
8346 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8347   (eval $ac_compile) 2>&5
8348   ac_status=$?
8349   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8350   (exit $ac_status); } &&
8351          { ac_try='test -s conftest.$ac_objext'
8352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8353   (eval $ac_try) 2>&5
8354   ac_status=$?
8355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8356   (exit $ac_status); }; }; then
8357   ac_header_compiler=yes
8358 else
8359   echo "$as_me: failed program was:" >&5
8360 cat conftest.$ac_ext >&5
8361 ac_header_compiler=no
8362 fi
8363 rm -f conftest.$ac_objext conftest.$ac_ext
8364 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8365 echo "${ECHO_T}$ac_header_compiler" >&6
8366
8367 # Is the header present?
8368 echo "$as_me:$LINENO: checking krb5.h presence" >&5
8369 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
8370 cat >conftest.$ac_ext <<_ACEOF
8371 #line $LINENO "configure"
8372 #include "confdefs.h"
8373 #include <krb5.h>
8374 _ACEOF
8375 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8376   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8377   ac_status=$?
8378   egrep -v '^ *\+' conftest.er1 >conftest.err
8379   rm -f conftest.er1
8380   cat conftest.err >&5
8381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8382   (exit $ac_status); } >/dev/null; then
8383   if test -s conftest.err; then
8384     ac_cpp_err=$ac_c_preproc_warn_flag
8385   else
8386     ac_cpp_err=
8387   fi
8388 else
8389   ac_cpp_err=yes
8390 fi
8391 if test -z "$ac_cpp_err"; then
8392   ac_header_preproc=yes
8393 else
8394   echo "$as_me: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   ac_header_preproc=no
8397 fi
8398 rm -f conftest.err conftest.$ac_ext
8399 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8400 echo "${ECHO_T}$ac_header_preproc" >&6
8401
8402 # So?  What about this header?
8403 case $ac_header_compiler:$ac_header_preproc in
8404   yes:no )
8405     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
8406 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8407     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8408 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8409   no:yes )
8410     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
8411 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
8412     { echo "$as_me:$LINENO: WARNING: krb5.h: check for missing prerequisite headers?" >&5
8413 echo "$as_me: WARNING: krb5.h: check for missing prerequisite headers?" >&2;}
8414     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8415 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8416 esac
8417 echo "$as_me:$LINENO: checking for krb5.h" >&5
8418 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8419 if test "${ac_cv_header_krb5_h+set}" = set; then
8420   echo $ECHO_N "(cached) $ECHO_C" >&6
8421 else
8422   ac_cv_header_krb5_h=$ac_header_preproc
8423 fi
8424 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8425 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8426
8427 fi
8428 if test $ac_cv_header_krb5_h = yes; then
8429   :
8430 else
8431   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
8432 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
8433    { (exit 1); exit 1; }; }
8434 fi
8435
8436
8437   if test "${ac_cv_header_com_err_h+set}" = set; then
8438   echo "$as_me:$LINENO: checking for com_err.h" >&5
8439 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8440 if test "${ac_cv_header_com_err_h+set}" = set; then
8441   echo $ECHO_N "(cached) $ECHO_C" >&6
8442 fi
8443 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8444 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8445 else
8446   # Is the header compilable?
8447 echo "$as_me:$LINENO: checking com_err.h usability" >&5
8448 echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
8449 cat >conftest.$ac_ext <<_ACEOF
8450 #line $LINENO "configure"
8451 #include "confdefs.h"
8452 $ac_includes_default
8453 #include <com_err.h>
8454 _ACEOF
8455 rm -f conftest.$ac_objext
8456 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8457   (eval $ac_compile) 2>&5
8458   ac_status=$?
8459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8460   (exit $ac_status); } &&
8461          { ac_try='test -s conftest.$ac_objext'
8462   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466   (exit $ac_status); }; }; then
8467   ac_header_compiler=yes
8468 else
8469   echo "$as_me: failed program was:" >&5
8470 cat conftest.$ac_ext >&5
8471 ac_header_compiler=no
8472 fi
8473 rm -f conftest.$ac_objext conftest.$ac_ext
8474 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8475 echo "${ECHO_T}$ac_header_compiler" >&6
8476
8477 # Is the header present?
8478 echo "$as_me:$LINENO: checking com_err.h presence" >&5
8479 echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
8480 cat >conftest.$ac_ext <<_ACEOF
8481 #line $LINENO "configure"
8482 #include "confdefs.h"
8483 #include <com_err.h>
8484 _ACEOF
8485 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8487   ac_status=$?
8488   egrep -v '^ *\+' conftest.er1 >conftest.err
8489   rm -f conftest.er1
8490   cat conftest.err >&5
8491   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8492   (exit $ac_status); } >/dev/null; then
8493   if test -s conftest.err; then
8494     ac_cpp_err=$ac_c_preproc_warn_flag
8495   else
8496     ac_cpp_err=
8497   fi
8498 else
8499   ac_cpp_err=yes
8500 fi
8501 if test -z "$ac_cpp_err"; then
8502   ac_header_preproc=yes
8503 else
8504   echo "$as_me: failed program was:" >&5
8505   cat conftest.$ac_ext >&5
8506   ac_header_preproc=no
8507 fi
8508 rm -f conftest.err conftest.$ac_ext
8509 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8510 echo "${ECHO_T}$ac_header_preproc" >&6
8511
8512 # So?  What about this header?
8513 case $ac_header_compiler:$ac_header_preproc in
8514   yes:no )
8515     { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8516 echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8517     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8518 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8519   no:yes )
8520     { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
8521 echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
8522     { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
8523 echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
8524     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8525 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8526 esac
8527 echo "$as_me:$LINENO: checking for com_err.h" >&5
8528 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8529 if test "${ac_cv_header_com_err_h+set}" = set; then
8530   echo $ECHO_N "(cached) $ECHO_C" >&6
8531 else
8532   ac_cv_header_com_err_h=$ac_header_preproc
8533 fi
8534 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8535 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8536
8537 fi
8538 if test $ac_cv_header_com_err_h = yes; then
8539   :
8540 else
8541   { { echo "$as_me:$LINENO: error: header file <com_err.h> is required for Kerberos 5" >&5
8542 echo "$as_me: error: header file <com_err.h> is required for Kerberos 5" >&2;}
8543    { (exit 1); exit 1; }; }
8544 fi
8545
8546
8547 fi
8548
8549 if test "$with_openssl" = yes ; then
8550   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8551   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8552 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8553 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8554   echo $ECHO_N "(cached) $ECHO_C" >&6
8555 fi
8556 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8557 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8558 else
8559   # Is the header compilable?
8560 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
8561 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
8562 cat >conftest.$ac_ext <<_ACEOF
8563 #line $LINENO "configure"
8564 #include "confdefs.h"
8565 $ac_includes_default
8566 #include <openssl/ssl.h>
8567 _ACEOF
8568 rm -f conftest.$ac_objext
8569 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8570   (eval $ac_compile) 2>&5
8571   ac_status=$?
8572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8573   (exit $ac_status); } &&
8574          { ac_try='test -s conftest.$ac_objext'
8575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8576   (eval $ac_try) 2>&5
8577   ac_status=$?
8578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8579   (exit $ac_status); }; }; then
8580   ac_header_compiler=yes
8581 else
8582   echo "$as_me: failed program was:" >&5
8583 cat conftest.$ac_ext >&5
8584 ac_header_compiler=no
8585 fi
8586 rm -f conftest.$ac_objext conftest.$ac_ext
8587 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8588 echo "${ECHO_T}$ac_header_compiler" >&6
8589
8590 # Is the header present?
8591 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
8592 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
8593 cat >conftest.$ac_ext <<_ACEOF
8594 #line $LINENO "configure"
8595 #include "confdefs.h"
8596 #include <openssl/ssl.h>
8597 _ACEOF
8598 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8599   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8600   ac_status=$?
8601   egrep -v '^ *\+' conftest.er1 >conftest.err
8602   rm -f conftest.er1
8603   cat conftest.err >&5
8604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8605   (exit $ac_status); } >/dev/null; then
8606   if test -s conftest.err; then
8607     ac_cpp_err=$ac_c_preproc_warn_flag
8608   else
8609     ac_cpp_err=
8610   fi
8611 else
8612   ac_cpp_err=yes
8613 fi
8614 if test -z "$ac_cpp_err"; then
8615   ac_header_preproc=yes
8616 else
8617   echo "$as_me: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   ac_header_preproc=no
8620 fi
8621 rm -f conftest.err conftest.$ac_ext
8622 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8623 echo "${ECHO_T}$ac_header_preproc" >&6
8624
8625 # So?  What about this header?
8626 case $ac_header_compiler:$ac_header_preproc in
8627   yes:no )
8628     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8629 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8630     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8631 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8632   no:yes )
8633     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
8634 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
8635     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5
8636 echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;}
8637     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8638 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8639 esac
8640 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8641 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8642 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8643   echo $ECHO_N "(cached) $ECHO_C" >&6
8644 else
8645   ac_cv_header_openssl_ssl_h=$ac_header_preproc
8646 fi
8647 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8648 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8649
8650 fi
8651 if test $ac_cv_header_openssl_ssl_h = yes; then
8652   :
8653 else
8654   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
8655 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
8656    { (exit 1); exit 1; }; }
8657 fi
8658
8659
8660   if test "${ac_cv_header_openssl_err_h+set}" = set; then
8661   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8662 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8663 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8664   echo $ECHO_N "(cached) $ECHO_C" >&6
8665 fi
8666 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8667 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8668 else
8669   # Is the header compilable?
8670 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
8671 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
8672 cat >conftest.$ac_ext <<_ACEOF
8673 #line $LINENO "configure"
8674 #include "confdefs.h"
8675 $ac_includes_default
8676 #include <openssl/err.h>
8677 _ACEOF
8678 rm -f conftest.$ac_objext
8679 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8680   (eval $ac_compile) 2>&5
8681   ac_status=$?
8682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8683   (exit $ac_status); } &&
8684          { ac_try='test -s conftest.$ac_objext'
8685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8686   (eval $ac_try) 2>&5
8687   ac_status=$?
8688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8689   (exit $ac_status); }; }; then
8690   ac_header_compiler=yes
8691 else
8692   echo "$as_me: failed program was:" >&5
8693 cat conftest.$ac_ext >&5
8694 ac_header_compiler=no
8695 fi
8696 rm -f conftest.$ac_objext conftest.$ac_ext
8697 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8698 echo "${ECHO_T}$ac_header_compiler" >&6
8699
8700 # Is the header present?
8701 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
8702 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line $LINENO "configure"
8705 #include "confdefs.h"
8706 #include <openssl/err.h>
8707 _ACEOF
8708 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8710   ac_status=$?
8711   egrep -v '^ *\+' conftest.er1 >conftest.err
8712   rm -f conftest.er1
8713   cat conftest.err >&5
8714   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8715   (exit $ac_status); } >/dev/null; then
8716   if test -s conftest.err; then
8717     ac_cpp_err=$ac_c_preproc_warn_flag
8718   else
8719     ac_cpp_err=
8720   fi
8721 else
8722   ac_cpp_err=yes
8723 fi
8724 if test -z "$ac_cpp_err"; then
8725   ac_header_preproc=yes
8726 else
8727   echo "$as_me: failed program was:" >&5
8728   cat conftest.$ac_ext >&5
8729   ac_header_preproc=no
8730 fi
8731 rm -f conftest.err conftest.$ac_ext
8732 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8733 echo "${ECHO_T}$ac_header_preproc" >&6
8734
8735 # So?  What about this header?
8736 case $ac_header_compiler:$ac_header_preproc in
8737   yes:no )
8738     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8739 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8740     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8741 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8742   no:yes )
8743     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
8744 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
8745     { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5
8746 echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;}
8747     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8748 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8749 esac
8750 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8751 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8752 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8753   echo $ECHO_N "(cached) $ECHO_C" >&6
8754 else
8755   ac_cv_header_openssl_err_h=$ac_header_preproc
8756 fi
8757 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8758 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8759
8760 fi
8761 if test $ac_cv_header_openssl_err_h = yes; then
8762   :
8763 else
8764   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
8765 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
8766    { (exit 1); exit 1; }; }
8767 fi
8768
8769
8770 fi
8771
8772 if test "$with_pam" = yes ; then
8773
8774 for ac_header in security/pam_appl.h
8775 do
8776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8777 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8778   echo "$as_me:$LINENO: checking for $ac_header" >&5
8779 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8780 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8781   echo $ECHO_N "(cached) $ECHO_C" >&6
8782 fi
8783 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8784 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8785 else
8786   # Is the header compilable?
8787 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8788 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8789 cat >conftest.$ac_ext <<_ACEOF
8790 #line $LINENO "configure"
8791 #include "confdefs.h"
8792 $ac_includes_default
8793 #include <$ac_header>
8794 _ACEOF
8795 rm -f conftest.$ac_objext
8796 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8797   (eval $ac_compile) 2>&5
8798   ac_status=$?
8799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8800   (exit $ac_status); } &&
8801          { ac_try='test -s conftest.$ac_objext'
8802   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8803   (eval $ac_try) 2>&5
8804   ac_status=$?
8805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806   (exit $ac_status); }; }; then
8807   ac_header_compiler=yes
8808 else
8809   echo "$as_me: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8811 ac_header_compiler=no
8812 fi
8813 rm -f conftest.$ac_objext conftest.$ac_ext
8814 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8815 echo "${ECHO_T}$ac_header_compiler" >&6
8816
8817 # Is the header present?
8818 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8819 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8820 cat >conftest.$ac_ext <<_ACEOF
8821 #line $LINENO "configure"
8822 #include "confdefs.h"
8823 #include <$ac_header>
8824 _ACEOF
8825 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8827   ac_status=$?
8828   egrep -v '^ *\+' conftest.er1 >conftest.err
8829   rm -f conftest.er1
8830   cat conftest.err >&5
8831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8832   (exit $ac_status); } >/dev/null; then
8833   if test -s conftest.err; then
8834     ac_cpp_err=$ac_c_preproc_warn_flag
8835   else
8836     ac_cpp_err=
8837   fi
8838 else
8839   ac_cpp_err=yes
8840 fi
8841 if test -z "$ac_cpp_err"; then
8842   ac_header_preproc=yes
8843 else
8844   echo "$as_me: failed program was:" >&5
8845   cat conftest.$ac_ext >&5
8846   ac_header_preproc=no
8847 fi
8848 rm -f conftest.err conftest.$ac_ext
8849 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8850 echo "${ECHO_T}$ac_header_preproc" >&6
8851
8852 # So?  What about this header?
8853 case $ac_header_compiler:$ac_header_preproc in
8854   yes:no )
8855     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8856 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8857     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8858 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8859   no:yes )
8860     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8861 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8862     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8863 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8864     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8865 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8866 esac
8867 echo "$as_me:$LINENO: checking for $ac_header" >&5
8868 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8869 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8870   echo $ECHO_N "(cached) $ECHO_C" >&6
8871 else
8872   eval "$as_ac_Header=$ac_header_preproc"
8873 fi
8874 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8876
8877 fi
8878 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8879   cat >>confdefs.h <<_ACEOF
8880 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8881 _ACEOF
8882
8883 else
8884
8885 for ac_header in pam/pam_appl.h
8886 do
8887 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8889   echo "$as_me:$LINENO: checking for $ac_header" >&5
8890 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8891 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 fi
8894 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8895 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8896 else
8897   # Is the header compilable?
8898 echo "$as_me:$LINENO: checking $ac_header usability" >&5
8899 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8900 cat >conftest.$ac_ext <<_ACEOF
8901 #line $LINENO "configure"
8902 #include "confdefs.h"
8903 $ac_includes_default
8904 #include <$ac_header>
8905 _ACEOF
8906 rm -f conftest.$ac_objext
8907 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8908   (eval $ac_compile) 2>&5
8909   ac_status=$?
8910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8911   (exit $ac_status); } &&
8912          { ac_try='test -s conftest.$ac_objext'
8913   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8914   (eval $ac_try) 2>&5
8915   ac_status=$?
8916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917   (exit $ac_status); }; }; then
8918   ac_header_compiler=yes
8919 else
8920   echo "$as_me: failed program was:" >&5
8921 cat conftest.$ac_ext >&5
8922 ac_header_compiler=no
8923 fi
8924 rm -f conftest.$ac_objext conftest.$ac_ext
8925 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8926 echo "${ECHO_T}$ac_header_compiler" >&6
8927
8928 # Is the header present?
8929 echo "$as_me:$LINENO: checking $ac_header presence" >&5
8930 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8931 cat >conftest.$ac_ext <<_ACEOF
8932 #line $LINENO "configure"
8933 #include "confdefs.h"
8934 #include <$ac_header>
8935 _ACEOF
8936 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8937   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8938   ac_status=$?
8939   egrep -v '^ *\+' conftest.er1 >conftest.err
8940   rm -f conftest.er1
8941   cat conftest.err >&5
8942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8943   (exit $ac_status); } >/dev/null; then
8944   if test -s conftest.err; then
8945     ac_cpp_err=$ac_c_preproc_warn_flag
8946   else
8947     ac_cpp_err=
8948   fi
8949 else
8950   ac_cpp_err=yes
8951 fi
8952 if test -z "$ac_cpp_err"; then
8953   ac_header_preproc=yes
8954 else
8955   echo "$as_me: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   ac_header_preproc=no
8958 fi
8959 rm -f conftest.err conftest.$ac_ext
8960 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8961 echo "${ECHO_T}$ac_header_preproc" >&6
8962
8963 # So?  What about this header?
8964 case $ac_header_compiler:$ac_header_preproc in
8965   yes:no )
8966     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8967 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8968     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8969 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8970   no:yes )
8971     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8972 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8973     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8974 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8975     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8976 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8977 esac
8978 echo "$as_me:$LINENO: checking for $ac_header" >&5
8979 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8980 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8981   echo $ECHO_N "(cached) $ECHO_C" >&6
8982 else
8983   eval "$as_ac_Header=$ac_header_preproc"
8984 fi
8985 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8986 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8987
8988 fi
8989 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8990   cat >>confdefs.h <<_ACEOF
8991 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8992 _ACEOF
8993
8994 else
8995   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&5
8996 echo "$as_me: error: header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." >&2;}
8997    { (exit 1); exit 1; }; }
8998 fi
8999
9000 done
9001
9002 fi
9003
9004 done
9005
9006 fi
9007
9008 if test "$with_rendezvous" = yes ; then
9009   if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
9010   echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
9011 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
9012 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
9013   echo $ECHO_N "(cached) $ECHO_C" >&6
9014 fi
9015 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
9016 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
9017 else
9018   # Is the header compilable?
9019 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h usability" >&5
9020 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h usability... $ECHO_C" >&6
9021 cat >conftest.$ac_ext <<_ACEOF
9022 #line $LINENO "configure"
9023 #include "confdefs.h"
9024 $ac_includes_default
9025 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
9026 _ACEOF
9027 rm -f conftest.$ac_objext
9028 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9029   (eval $ac_compile) 2>&5
9030   ac_status=$?
9031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032   (exit $ac_status); } &&
9033          { ac_try='test -s conftest.$ac_objext'
9034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9035   (eval $ac_try) 2>&5
9036   ac_status=$?
9037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9038   (exit $ac_status); }; }; then
9039   ac_header_compiler=yes
9040 else
9041   echo "$as_me: failed program was:" >&5
9042 cat conftest.$ac_ext >&5
9043 ac_header_compiler=no
9044 fi
9045 rm -f conftest.$ac_objext conftest.$ac_ext
9046 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9047 echo "${ECHO_T}$ac_header_compiler" >&6
9048
9049 # Is the header present?
9050 echo "$as_me:$LINENO: checking DNSServiceDiscovery/DNSServiceDiscovery.h presence" >&5
9051 echo $ECHO_N "checking DNSServiceDiscovery/DNSServiceDiscovery.h presence... $ECHO_C" >&6
9052 cat >conftest.$ac_ext <<_ACEOF
9053 #line $LINENO "configure"
9054 #include "confdefs.h"
9055 #include <DNSServiceDiscovery/DNSServiceDiscovery.h>
9056 _ACEOF
9057 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9059   ac_status=$?
9060   egrep -v '^ *\+' conftest.er1 >conftest.err
9061   rm -f conftest.er1
9062   cat conftest.err >&5
9063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9064   (exit $ac_status); } >/dev/null; then
9065   if test -s conftest.err; then
9066     ac_cpp_err=$ac_c_preproc_warn_flag
9067   else
9068     ac_cpp_err=
9069   fi
9070 else
9071   ac_cpp_err=yes
9072 fi
9073 if test -z "$ac_cpp_err"; then
9074   ac_header_preproc=yes
9075 else
9076   echo "$as_me: failed program was:" >&5
9077   cat conftest.$ac_ext >&5
9078   ac_header_preproc=no
9079 fi
9080 rm -f conftest.err conftest.$ac_ext
9081 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9082 echo "${ECHO_T}$ac_header_preproc" >&6
9083
9084 # So?  What about this header?
9085 case $ac_header_compiler:$ac_header_preproc in
9086   yes:no )
9087     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&5
9088 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9089     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
9090 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
9091   no:yes )
9092     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&5
9093 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: present but cannot be compiled" >&2;}
9094     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&5
9095 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: check for missing prerequisite headers?" >&2;}
9096     { echo "$as_me:$LINENO: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&5
9097 echo "$as_me: WARNING: DNSServiceDiscovery/DNSServiceDiscovery.h: proceeding with the preprocessor's result" >&2;};;
9098 esac
9099 echo "$as_me:$LINENO: checking for DNSServiceDiscovery/DNSServiceDiscovery.h" >&5
9100 echo $ECHO_N "checking for DNSServiceDiscovery/DNSServiceDiscovery.h... $ECHO_C" >&6
9101 if test "${ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h+set}" = set; then
9102   echo $ECHO_N "(cached) $ECHO_C" >&6
9103 else
9104   ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h=$ac_header_preproc
9105 fi
9106 echo "$as_me:$LINENO: result: $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&5
9107 echo "${ECHO_T}$ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h" >&6
9108
9109 fi
9110 if test $ac_cv_header_DNSServiceDiscovery_DNSServiceDiscovery_h = yes; then
9111   :
9112 else
9113   { { echo "$as_me:$LINENO: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&5
9114 echo "$as_me: error: header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Rendezvous" >&2;}
9115    { (exit 1); exit 1; }; }
9116 fi
9117
9118
9119 fi
9120
9121
9122 ##
9123 ## Types, structures, compiler characteristics
9124 ##
9125
9126
9127 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
9128 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
9129 if test "${ac_cv_c_const+set}" = set; then
9130   echo $ECHO_N "(cached) $ECHO_C" >&6
9131 else
9132   cat >conftest.$ac_ext <<_ACEOF
9133 #line $LINENO "configure"
9134 #include "confdefs.h"
9135
9136 #ifdef F77_DUMMY_MAIN
9137 #  ifdef __cplusplus
9138      extern "C"
9139 #  endif
9140    int F77_DUMMY_MAIN() { return 1; }
9141 #endif
9142 int
9143 main ()
9144 {
9145 /* FIXME: Include the comments suggested by Paul. */
9146 #ifndef __cplusplus
9147   /* Ultrix mips cc rejects this.  */
9148   typedef int charset[2];
9149   const charset x;
9150   /* SunOS 4.1.1 cc rejects this.  */
9151   char const *const *ccp;
9152   char **p;
9153   /* NEC SVR4.0.2 mips cc rejects this.  */
9154   struct point {int x, y;};
9155   static struct point const zero = {0,0};
9156   /* AIX XL C 1.02.0.0 rejects this.
9157      It does not let you subtract one const X* pointer from another in
9158      an arm of an if-expression whose if-part is not a constant
9159      expression */
9160   const char *g = "string";
9161   ccp = &g + (g ? g-g : 0);
9162   /* HPUX 7.0 cc rejects these. */
9163   ++ccp;
9164   p = (char**) ccp;
9165   ccp = (char const *const *) p;
9166   { /* SCO 3.2v4 cc rejects this.  */
9167     char *t;
9168     char const *s = 0 ? (char *) 0 : (char const *) 0;
9169
9170     *t++ = 0;
9171   }
9172   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
9173     int x[] = {25, 17};
9174     const int *foo = &x[0];
9175     ++foo;
9176   }
9177   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9178     typedef const int *iptr;
9179     iptr p = 0;
9180     ++p;
9181   }
9182   { /* AIX XL C 1.02.0.0 rejects this saying
9183        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9184     struct s { int j; const int *ap[3]; };
9185     struct s *b; b->j = 5;
9186   }
9187   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9188     const int foo = 10;
9189   }
9190 #endif
9191
9192   ;
9193   return 0;
9194 }
9195 _ACEOF
9196 rm -f conftest.$ac_objext
9197 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9198   (eval $ac_compile) 2>&5
9199   ac_status=$?
9200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9201   (exit $ac_status); } &&
9202          { ac_try='test -s conftest.$ac_objext'
9203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9204   (eval $ac_try) 2>&5
9205   ac_status=$?
9206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9207   (exit $ac_status); }; }; then
9208   ac_cv_c_const=yes
9209 else
9210   echo "$as_me: failed program was:" >&5
9211 cat conftest.$ac_ext >&5
9212 ac_cv_c_const=no
9213 fi
9214 rm -f conftest.$ac_objext conftest.$ac_ext
9215 fi
9216 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9217 echo "${ECHO_T}$ac_cv_c_const" >&6
9218 if test $ac_cv_c_const = no; then
9219
9220 cat >>confdefs.h <<\_ACEOF
9221 #define const
9222 _ACEOF
9223
9224 fi
9225
9226 echo "$as_me:$LINENO: checking for inline" >&5
9227 echo $ECHO_N "checking for inline... $ECHO_C" >&6
9228 if test "${ac_cv_c_inline+set}" = set; then
9229   echo $ECHO_N "(cached) $ECHO_C" >&6
9230 else
9231   ac_cv_c_inline=no
9232 for ac_kw in inline __inline__ __inline; do
9233   cat >conftest.$ac_ext <<_ACEOF
9234 #line $LINENO "configure"
9235 #include "confdefs.h"
9236 #ifndef __cplusplus
9237 static $ac_kw int static_foo () {return 0; }
9238 $ac_kw int foo () {return 0; }
9239 #endif
9240
9241 _ACEOF
9242 rm -f conftest.$ac_objext
9243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9244   (eval $ac_compile) 2>&5
9245   ac_status=$?
9246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9247   (exit $ac_status); } &&
9248          { ac_try='test -s conftest.$ac_objext'
9249   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9250   (eval $ac_try) 2>&5
9251   ac_status=$?
9252   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9253   (exit $ac_status); }; }; then
9254   ac_cv_c_inline=$ac_kw; break
9255 else
9256   echo "$as_me: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 fi
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260 done
9261
9262 fi
9263 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
9264 echo "${ECHO_T}$ac_cv_c_inline" >&6
9265 case $ac_cv_c_inline in
9266   inline | yes) ;;
9267   no)
9268 cat >>confdefs.h <<\_ACEOF
9269 #define inline
9270 _ACEOF
9271  ;;
9272   *)  cat >>confdefs.h <<_ACEOF
9273 #define inline $ac_cv_c_inline
9274 _ACEOF
9275  ;;
9276 esac
9277
9278 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
9279 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
9280 if test "${ac_cv_c_stringize+set}" = set; then
9281   echo $ECHO_N "(cached) $ECHO_C" >&6
9282 else
9283   cat >conftest.$ac_ext <<_ACEOF
9284 #line $LINENO "configure"
9285 #include "confdefs.h"
9286 #define x(y) #y
9287
9288 char *s = x(teststring);
9289 _ACEOF
9290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9291   egrep "#teststring" >/dev/null 2>&1; then
9292   ac_cv_c_stringize=no
9293 else
9294   ac_cv_c_stringize=yes
9295 fi
9296 rm -f conftest*
9297
9298 fi
9299 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
9300 echo "${ECHO_T}$ac_cv_c_stringize" >&6
9301 if test $ac_cv_c_stringize = yes; then
9302
9303 cat >>confdefs.h <<\_ACEOF
9304 #define HAVE_STRINGIZE 1
9305 _ACEOF
9306
9307 fi
9308
9309 echo "$as_me:$LINENO: checking for signed types" >&5
9310 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
9311 if test "${pgac_cv_c_signed+set}" = set; then
9312   echo $ECHO_N "(cached) $ECHO_C" >&6
9313 else
9314   cat >conftest.$ac_ext <<_ACEOF
9315 #line $LINENO "configure"
9316 #include "confdefs.h"
9317
9318 #ifdef F77_DUMMY_MAIN
9319 #  ifdef __cplusplus
9320      extern "C"
9321 #  endif
9322    int F77_DUMMY_MAIN() { return 1; }
9323 #endif
9324 int
9325 main ()
9326 {
9327 signed char c; signed short s; signed int i;
9328   ;
9329   return 0;
9330 }
9331 _ACEOF
9332 rm -f conftest.$ac_objext
9333 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9334   (eval $ac_compile) 2>&5
9335   ac_status=$?
9336   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9337   (exit $ac_status); } &&
9338          { ac_try='test -s conftest.$ac_objext'
9339   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9340   (eval $ac_try) 2>&5
9341   ac_status=$?
9342   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9343   (exit $ac_status); }; }; then
9344   pgac_cv_c_signed=yes
9345 else
9346   echo "$as_me: failed program was:" >&5
9347 cat conftest.$ac_ext >&5
9348 pgac_cv_c_signed=no
9349 fi
9350 rm -f conftest.$ac_objext conftest.$ac_ext
9351 fi
9352 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
9353 echo "${ECHO_T}$pgac_cv_c_signed" >&6
9354 if test x"$pgac_cv_c_signed" = xno ; then
9355
9356 cat >>confdefs.h <<\_ACEOF
9357 #define signed
9358 _ACEOF
9359
9360 fi
9361 echo "$as_me:$LINENO: checking for working volatile" >&5
9362 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
9363 if test "${ac_cv_c_volatile+set}" = set; then
9364   echo $ECHO_N "(cached) $ECHO_C" >&6
9365 else
9366   cat >conftest.$ac_ext <<_ACEOF
9367 #line $LINENO "configure"
9368 #include "confdefs.h"
9369
9370 #ifdef F77_DUMMY_MAIN
9371 #  ifdef __cplusplus
9372      extern "C"
9373 #  endif
9374    int F77_DUMMY_MAIN() { return 1; }
9375 #endif
9376 int
9377 main ()
9378 {
9379
9380 volatile int x;
9381 int * volatile y;
9382   ;
9383   return 0;
9384 }
9385 _ACEOF
9386 rm -f conftest.$ac_objext
9387 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9388   (eval $ac_compile) 2>&5
9389   ac_status=$?
9390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9391   (exit $ac_status); } &&
9392          { ac_try='test -s conftest.$ac_objext'
9393   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9394   (eval $ac_try) 2>&5
9395   ac_status=$?
9396   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9397   (exit $ac_status); }; }; then
9398   ac_cv_c_volatile=yes
9399 else
9400   echo "$as_me: failed program was:" >&5
9401 cat conftest.$ac_ext >&5
9402 ac_cv_c_volatile=no
9403 fi
9404 rm -f conftest.$ac_objext conftest.$ac_ext
9405 fi
9406 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
9407 echo "${ECHO_T}$ac_cv_c_volatile" >&6
9408 if test $ac_cv_c_volatile = no; then
9409
9410 cat >>confdefs.h <<\_ACEOF
9411 #define volatile
9412 _ACEOF
9413
9414 fi
9415
9416 echo "$as_me:$LINENO: checking for __func__" >&5
9417 echo $ECHO_N "checking for __func__... $ECHO_C" >&6
9418 if test "${pgac_cv_funcname_func_support+set}" = set; then
9419   echo $ECHO_N "(cached) $ECHO_C" >&6
9420 else
9421   cat >conftest.$ac_ext <<_ACEOF
9422 #line $LINENO "configure"
9423 #include "confdefs.h"
9424 #include <stdio.h>
9425 #ifdef F77_DUMMY_MAIN
9426 #  ifdef __cplusplus
9427      extern "C"
9428 #  endif
9429    int F77_DUMMY_MAIN() { return 1; }
9430 #endif
9431 int
9432 main ()
9433 {
9434 printf("%s\n", __func__);
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f conftest.$ac_objext
9440 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9441   (eval $ac_compile) 2>&5
9442   ac_status=$?
9443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -s conftest.$ac_objext'
9446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9450   (exit $ac_status); }; }; then
9451   pgac_cv_funcname_func_support=yes
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9455 pgac_cv_funcname_func_support=no
9456 fi
9457 rm -f conftest.$ac_objext conftest.$ac_ext
9458 fi
9459 echo "$as_me:$LINENO: result: $pgac_cv_funcname_func_support" >&5
9460 echo "${ECHO_T}$pgac_cv_funcname_func_support" >&6
9461 if test x"$pgac_cv_funcname_func_support" = xyes ; then
9462
9463 cat >>confdefs.h <<\_ACEOF
9464 #define HAVE_FUNCNAME__FUNC 1
9465 _ACEOF
9466
9467 else
9468 echo "$as_me:$LINENO: checking for __FUNCTION__" >&5
9469 echo $ECHO_N "checking for __FUNCTION__... $ECHO_C" >&6
9470 if test "${pgac_cv_funcname_function_support+set}" = set; then
9471   echo $ECHO_N "(cached) $ECHO_C" >&6
9472 else
9473   cat >conftest.$ac_ext <<_ACEOF
9474 #line $LINENO "configure"
9475 #include "confdefs.h"
9476 #include <stdio.h>
9477 #ifdef F77_DUMMY_MAIN
9478 #  ifdef __cplusplus
9479      extern "C"
9480 #  endif
9481    int F77_DUMMY_MAIN() { return 1; }
9482 #endif
9483 int
9484 main ()
9485 {
9486 printf("%s\n", __FUNCTION__);
9487   ;
9488   return 0;
9489 }
9490 _ACEOF
9491 rm -f conftest.$ac_objext
9492 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9493   (eval $ac_compile) 2>&5
9494   ac_status=$?
9495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9496   (exit $ac_status); } &&
9497          { ac_try='test -s conftest.$ac_objext'
9498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9499   (eval $ac_try) 2>&5
9500   ac_status=$?
9501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502   (exit $ac_status); }; }; then
9503   pgac_cv_funcname_function_support=yes
9504 else
9505   echo "$as_me: failed program was:" >&5
9506 cat conftest.$ac_ext >&5
9507 pgac_cv_funcname_function_support=no
9508 fi
9509 rm -f conftest.$ac_objext conftest.$ac_ext
9510 fi
9511 echo "$as_me:$LINENO: result: $pgac_cv_funcname_function_support" >&5
9512 echo "${ECHO_T}$pgac_cv_funcname_function_support" >&6
9513 if test x"$pgac_cv_funcname_function_support" = xyes ; then
9514
9515 cat >>confdefs.h <<\_ACEOF
9516 #define HAVE_FUNCNAME__FUNCTION 1
9517 _ACEOF
9518
9519 fi
9520 fi
9521 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
9522 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
9523 if test "${ac_cv_struct_tm+set}" = set; then
9524   echo $ECHO_N "(cached) $ECHO_C" >&6
9525 else
9526   cat >conftest.$ac_ext <<_ACEOF
9527 #line $LINENO "configure"
9528 #include "confdefs.h"
9529 #include <sys/types.h>
9530 #include <time.h>
9531
9532 #ifdef F77_DUMMY_MAIN
9533 #  ifdef __cplusplus
9534      extern "C"
9535 #  endif
9536    int F77_DUMMY_MAIN() { return 1; }
9537 #endif
9538 int
9539 main ()
9540 {
9541 struct tm *tp; tp->tm_sec;
9542   ;
9543   return 0;
9544 }
9545 _ACEOF
9546 rm -f conftest.$ac_objext
9547 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9548   (eval $ac_compile) 2>&5
9549   ac_status=$?
9550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551   (exit $ac_status); } &&
9552          { ac_try='test -s conftest.$ac_objext'
9553   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9554   (eval $ac_try) 2>&5
9555   ac_status=$?
9556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9557   (exit $ac_status); }; }; then
9558   ac_cv_struct_tm=time.h
9559 else
9560   echo "$as_me: failed program was:" >&5
9561 cat conftest.$ac_ext >&5
9562 ac_cv_struct_tm=sys/time.h
9563 fi
9564 rm -f conftest.$ac_objext conftest.$ac_ext
9565 fi
9566 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
9567 echo "${ECHO_T}$ac_cv_struct_tm" >&6
9568 if test $ac_cv_struct_tm = sys/time.h; then
9569
9570 cat >>confdefs.h <<\_ACEOF
9571 #define TM_IN_SYS_TIME 1
9572 _ACEOF
9573
9574 fi
9575
9576 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
9577 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
9578 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
9579   echo $ECHO_N "(cached) $ECHO_C" >&6
9580 else
9581   cat >conftest.$ac_ext <<_ACEOF
9582 #line $LINENO "configure"
9583 #include "confdefs.h"
9584 #include <sys/types.h>
9585 #include <$ac_cv_struct_tm>
9586
9587
9588 #ifdef F77_DUMMY_MAIN
9589 #  ifdef __cplusplus
9590      extern "C"
9591 #  endif
9592    int F77_DUMMY_MAIN() { return 1; }
9593 #endif
9594 int
9595 main ()
9596 {
9597 static struct tm ac_aggr;
9598 if (ac_aggr.tm_zone)
9599 return 0;
9600   ;
9601   return 0;
9602 }
9603 _ACEOF
9604 rm -f conftest.$ac_objext
9605 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9606   (eval $ac_compile) 2>&5
9607   ac_status=$?
9608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9609   (exit $ac_status); } &&
9610          { ac_try='test -s conftest.$ac_objext'
9611   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9612   (eval $ac_try) 2>&5
9613   ac_status=$?
9614   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9615   (exit $ac_status); }; }; then
9616   ac_cv_member_struct_tm_tm_zone=yes
9617 else
9618   echo "$as_me: failed program was:" >&5
9619 cat conftest.$ac_ext >&5
9620 ac_cv_member_struct_tm_tm_zone=no
9621 fi
9622 rm -f conftest.$ac_objext conftest.$ac_ext
9623 fi
9624 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
9625 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
9626 if test $ac_cv_member_struct_tm_tm_zone = yes; then
9627
9628 cat >>confdefs.h <<_ACEOF
9629 #define HAVE_STRUCT_TM_TM_ZONE 1
9630 _ACEOF
9631
9632
9633 fi
9634
9635 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
9636
9637 cat >>confdefs.h <<\_ACEOF
9638 #define HAVE_TM_ZONE 1
9639 _ACEOF
9640
9641 fi
9642 echo "$as_me:$LINENO: checking for tzname" >&5
9643 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
9644 if test "${ac_cv_var_tzname+set}" = set; then
9645   echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647   cat >conftest.$ac_ext <<_ACEOF
9648 #line $LINENO "configure"
9649 #include "confdefs.h"
9650 #include <time.h>
9651 #ifndef tzname /* For SGI.  */
9652 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
9653 #endif
9654
9655 #ifdef F77_DUMMY_MAIN
9656 #  ifdef __cplusplus
9657      extern "C"
9658 #  endif
9659    int F77_DUMMY_MAIN() { return 1; }
9660 #endif
9661 int
9662 main ()
9663 {
9664 atoi(*tzname);
9665   ;
9666   return 0;
9667 }
9668 _ACEOF
9669 rm -f conftest.$ac_objext conftest$ac_exeext
9670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9671   (eval $ac_link) 2>&5
9672   ac_status=$?
9673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9674   (exit $ac_status); } &&
9675          { ac_try='test -s conftest$ac_exeext'
9676   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9677   (eval $ac_try) 2>&5
9678   ac_status=$?
9679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680   (exit $ac_status); }; }; then
9681   ac_cv_var_tzname=yes
9682 else
9683   echo "$as_me: failed program was:" >&5
9684 cat conftest.$ac_ext >&5
9685 ac_cv_var_tzname=no
9686 fi
9687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9688 fi
9689 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
9690 echo "${ECHO_T}$ac_cv_var_tzname" >&6
9691 if test $ac_cv_var_tzname = yes; then
9692
9693 cat >>confdefs.h <<\_ACEOF
9694 #define HAVE_TZNAME 1
9695 _ACEOF
9696
9697 fi
9698
9699 echo "$as_me:$LINENO: checking for union semun" >&5
9700 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
9701 if test "${ac_cv_type_union_semun+set}" = set; then
9702   echo $ECHO_N "(cached) $ECHO_C" >&6
9703 else
9704   cat >conftest.$ac_ext <<_ACEOF
9705 #line $LINENO "configure"
9706 #include "confdefs.h"
9707 #include <sys/types.h>
9708 #include <sys/ipc.h>
9709 #include <sys/sem.h>
9710
9711 #ifdef F77_DUMMY_MAIN
9712 #  ifdef __cplusplus
9713      extern "C"
9714 #  endif
9715    int F77_DUMMY_MAIN() { return 1; }
9716 #endif
9717 int
9718 main ()
9719 {
9720 if ((union semun *) 0)
9721   return 0;
9722 if (sizeof (union semun))
9723   return 0;
9724   ;
9725   return 0;
9726 }
9727 _ACEOF
9728 rm -f conftest.$ac_objext
9729 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9730   (eval $ac_compile) 2>&5
9731   ac_status=$?
9732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733   (exit $ac_status); } &&
9734          { ac_try='test -s conftest.$ac_objext'
9735   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9736   (eval $ac_try) 2>&5
9737   ac_status=$?
9738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9739   (exit $ac_status); }; }; then
9740   ac_cv_type_union_semun=yes
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 cat conftest.$ac_ext >&5
9744 ac_cv_type_union_semun=no
9745 fi
9746 rm -f conftest.$ac_objext conftest.$ac_ext
9747 fi
9748 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
9749 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
9750 if test $ac_cv_type_union_semun = yes; then
9751
9752 cat >>confdefs.h <<_ACEOF
9753 #define HAVE_UNION_SEMUN 1
9754 _ACEOF
9755
9756
9757 fi
9758
9759 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
9760 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
9761 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
9762   echo $ECHO_N "(cached) $ECHO_C" >&6
9763 else
9764   cat >conftest.$ac_ext <<_ACEOF
9765 #line $LINENO "configure"
9766 #include "confdefs.h"
9767 #include <sys/types.h>
9768 #ifdef HAVE_SYS_UN_H
9769 #include <sys/un.h>
9770 #endif
9771
9772
9773 #ifdef F77_DUMMY_MAIN
9774 #  ifdef __cplusplus
9775      extern "C"
9776 #  endif
9777    int F77_DUMMY_MAIN() { return 1; }
9778 #endif
9779 int
9780 main ()
9781 {
9782 if ((struct sockaddr_un *) 0)
9783   return 0;
9784 if (sizeof (struct sockaddr_un))
9785   return 0;
9786   ;
9787   return 0;
9788 }
9789 _ACEOF
9790 rm -f conftest.$ac_objext
9791 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9792   (eval $ac_compile) 2>&5
9793   ac_status=$?
9794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9795   (exit $ac_status); } &&
9796          { ac_try='test -s conftest.$ac_objext'
9797   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798   (eval $ac_try) 2>&5
9799   ac_status=$?
9800   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801   (exit $ac_status); }; }; then
9802   ac_cv_type_struct_sockaddr_un=yes
9803 else
9804   echo "$as_me: failed program was:" >&5
9805 cat conftest.$ac_ext >&5
9806 ac_cv_type_struct_sockaddr_un=no
9807 fi
9808 rm -f conftest.$ac_objext conftest.$ac_ext
9809 fi
9810 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
9811 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
9812 if test $ac_cv_type_struct_sockaddr_un = yes; then
9813
9814 cat >>confdefs.h <<_ACEOF
9815 #define HAVE_STRUCT_SOCKADDR_UN 1
9816 _ACEOF
9817
9818
9819 cat >>confdefs.h <<\_ACEOF
9820 #define HAVE_UNIX_SOCKETS 1
9821 _ACEOF
9822
9823 fi
9824
9825 echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5
9826 echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6
9827 if test "${ac_cv_type_struct_sockaddr_storage+set}" = set; then
9828   echo $ECHO_N "(cached) $ECHO_C" >&6
9829 else
9830   cat >conftest.$ac_ext <<_ACEOF
9831 #line $LINENO "configure"
9832 #include "confdefs.h"
9833 #include <sys/types.h>
9834 #ifdef HAVE_SYS_SOCKET_H
9835 #include <sys/socket.h>
9836 #endif
9837
9838
9839 #ifdef F77_DUMMY_MAIN
9840 #  ifdef __cplusplus
9841      extern "C"
9842 #  endif
9843    int F77_DUMMY_MAIN() { return 1; }
9844 #endif
9845 int
9846 main ()
9847 {
9848 if ((struct sockaddr_storage *) 0)
9849   return 0;
9850 if (sizeof (struct sockaddr_storage))
9851   return 0;
9852   ;
9853   return 0;
9854 }
9855 _ACEOF
9856 rm -f conftest.$ac_objext
9857 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9858   (eval $ac_compile) 2>&5
9859   ac_status=$?
9860   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9861   (exit $ac_status); } &&
9862          { ac_try='test -s conftest.$ac_objext'
9863   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9864   (eval $ac_try) 2>&5
9865   ac_status=$?
9866   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867   (exit $ac_status); }; }; then
9868   ac_cv_type_struct_sockaddr_storage=yes
9869 else
9870   echo "$as_me: failed program was:" >&5
9871 cat conftest.$ac_ext >&5
9872 ac_cv_type_struct_sockaddr_storage=no
9873 fi
9874 rm -f conftest.$ac_objext conftest.$ac_ext
9875 fi
9876 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_storage" >&5
9877 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_storage" >&6
9878 if test $ac_cv_type_struct_sockaddr_storage = yes; then
9879
9880 cat >>confdefs.h <<_ACEOF
9881 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
9882 _ACEOF
9883
9884
9885 fi
9886
9887 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_family" >&5
9888 echo $ECHO_N "checking for struct sockaddr_storage.ss_family... $ECHO_C" >&6
9889 if test "${ac_cv_member_struct_sockaddr_storage_ss_family+set}" = set; then
9890   echo $ECHO_N "(cached) $ECHO_C" >&6
9891 else
9892   cat >conftest.$ac_ext <<_ACEOF
9893 #line $LINENO "configure"
9894 #include "confdefs.h"
9895 #include <sys/types.h>
9896 #ifdef HAVE_SYS_SOCKET_H
9897 #include <sys/socket.h>
9898 #endif
9899
9900
9901 #ifdef F77_DUMMY_MAIN
9902 #  ifdef __cplusplus
9903      extern "C"
9904 #  endif
9905    int F77_DUMMY_MAIN() { return 1; }
9906 #endif
9907 int
9908 main ()
9909 {
9910 static struct sockaddr_storage ac_aggr;
9911 if (ac_aggr.ss_family)
9912 return 0;
9913   ;
9914   return 0;
9915 }
9916 _ACEOF
9917 rm -f conftest.$ac_objext
9918 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9919   (eval $ac_compile) 2>&5
9920   ac_status=$?
9921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922   (exit $ac_status); } &&
9923          { ac_try='test -s conftest.$ac_objext'
9924   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9925   (eval $ac_try) 2>&5
9926   ac_status=$?
9927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928   (exit $ac_status); }; }; then
9929   ac_cv_member_struct_sockaddr_storage_ss_family=yes
9930 else
9931   echo "$as_me: failed program was:" >&5
9932 cat conftest.$ac_ext >&5
9933 ac_cv_member_struct_sockaddr_storage_ss_family=no
9934 fi
9935 rm -f conftest.$ac_objext conftest.$ac_ext
9936 fi
9937 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_family" >&5
9938 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_family" >&6
9939 if test $ac_cv_member_struct_sockaddr_storage_ss_family = yes; then
9940
9941 cat >>confdefs.h <<_ACEOF
9942 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
9943 _ACEOF
9944
9945
9946 fi
9947 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_family" >&5
9948 echo $ECHO_N "checking for struct sockaddr_storage.__ss_family... $ECHO_C" >&6
9949 if test "${ac_cv_member_struct_sockaddr_storage___ss_family+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952   cat >conftest.$ac_ext <<_ACEOF
9953 #line $LINENO "configure"
9954 #include "confdefs.h"
9955 #include <sys/types.h>
9956 #ifdef HAVE_SYS_SOCKET_H
9957 #include <sys/socket.h>
9958 #endif
9959
9960
9961 #ifdef F77_DUMMY_MAIN
9962 #  ifdef __cplusplus
9963      extern "C"
9964 #  endif
9965    int F77_DUMMY_MAIN() { return 1; }
9966 #endif
9967 int
9968 main ()
9969 {
9970 static struct sockaddr_storage ac_aggr;
9971 if (ac_aggr.__ss_family)
9972 return 0;
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 rm -f conftest.$ac_objext
9978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9979   (eval $ac_compile) 2>&5
9980   ac_status=$?
9981   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9982   (exit $ac_status); } &&
9983          { ac_try='test -s conftest.$ac_objext'
9984   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   ac_cv_member_struct_sockaddr_storage___ss_family=yes
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat conftest.$ac_ext >&5
9993 ac_cv_member_struct_sockaddr_storage___ss_family=no
9994 fi
9995 rm -f conftest.$ac_objext conftest.$ac_ext
9996 fi
9997 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_family" >&5
9998 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_family" >&6
9999 if test $ac_cv_member_struct_sockaddr_storage___ss_family = yes; then
10000
10001 cat >>confdefs.h <<_ACEOF
10002 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
10003 _ACEOF
10004
10005
10006 fi
10007 echo "$as_me:$LINENO: checking for struct sockaddr_storage.ss_len" >&5
10008 echo $ECHO_N "checking for struct sockaddr_storage.ss_len... $ECHO_C" >&6
10009 if test "${ac_cv_member_struct_sockaddr_storage_ss_len+set}" = set; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012   cat >conftest.$ac_ext <<_ACEOF
10013 #line $LINENO "configure"
10014 #include "confdefs.h"
10015 #include <sys/types.h>
10016 #ifdef HAVE_SYS_SOCKET_H
10017 #include <sys/socket.h>
10018 #endif
10019
10020
10021 #ifdef F77_DUMMY_MAIN
10022 #  ifdef __cplusplus
10023      extern "C"
10024 #  endif
10025    int F77_DUMMY_MAIN() { return 1; }
10026 #endif
10027 int
10028 main ()
10029 {
10030 static struct sockaddr_storage ac_aggr;
10031 if (ac_aggr.ss_len)
10032 return 0;
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 rm -f conftest.$ac_objext
10038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10039   (eval $ac_compile) 2>&5
10040   ac_status=$?
10041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042   (exit $ac_status); } &&
10043          { ac_try='test -s conftest.$ac_objext'
10044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10045   (eval $ac_try) 2>&5
10046   ac_status=$?
10047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10048   (exit $ac_status); }; }; then
10049   ac_cv_member_struct_sockaddr_storage_ss_len=yes
10050 else
10051   echo "$as_me: failed program was:" >&5
10052 cat conftest.$ac_ext >&5
10053 ac_cv_member_struct_sockaddr_storage_ss_len=no
10054 fi
10055 rm -f conftest.$ac_objext conftest.$ac_ext
10056 fi
10057 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage_ss_len" >&5
10058 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage_ss_len" >&6
10059 if test $ac_cv_member_struct_sockaddr_storage_ss_len = yes; then
10060
10061 cat >>confdefs.h <<_ACEOF
10062 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
10063 _ACEOF
10064
10065
10066 fi
10067 echo "$as_me:$LINENO: checking for struct sockaddr_storage.__ss_len" >&5
10068 echo $ECHO_N "checking for struct sockaddr_storage.__ss_len... $ECHO_C" >&6
10069 if test "${ac_cv_member_struct_sockaddr_storage___ss_len+set}" = set; then
10070   echo $ECHO_N "(cached) $ECHO_C" >&6
10071 else
10072   cat >conftest.$ac_ext <<_ACEOF
10073 #line $LINENO "configure"
10074 #include "confdefs.h"
10075 #include <sys/types.h>
10076 #ifdef HAVE_SYS_SOCKET_H
10077 #include <sys/socket.h>
10078 #endif
10079
10080
10081 #ifdef F77_DUMMY_MAIN
10082 #  ifdef __cplusplus
10083      extern "C"
10084 #  endif
10085    int F77_DUMMY_MAIN() { return 1; }
10086 #endif
10087 int
10088 main ()
10089 {
10090 static struct sockaddr_storage ac_aggr;
10091 if (ac_aggr.__ss_len)
10092 return 0;
10093   ;
10094   return 0;
10095 }
10096 _ACEOF
10097 rm -f conftest.$ac_objext
10098 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10099   (eval $ac_compile) 2>&5
10100   ac_status=$?
10101   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10102   (exit $ac_status); } &&
10103          { ac_try='test -s conftest.$ac_objext'
10104   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10105   (eval $ac_try) 2>&5
10106   ac_status=$?
10107   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10108   (exit $ac_status); }; }; then
10109   ac_cv_member_struct_sockaddr_storage___ss_len=yes
10110 else
10111   echo "$as_me: failed program was:" >&5
10112 cat conftest.$ac_ext >&5
10113 ac_cv_member_struct_sockaddr_storage___ss_len=no
10114 fi
10115 rm -f conftest.$ac_objext conftest.$ac_ext
10116 fi
10117 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_storage___ss_len" >&5
10118 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_storage___ss_len" >&6
10119 if test $ac_cv_member_struct_sockaddr_storage___ss_len = yes; then
10120
10121 cat >>confdefs.h <<_ACEOF
10122 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
10123 _ACEOF
10124
10125
10126 fi
10127 echo "$as_me:$LINENO: checking for struct sockaddr.sa_len" >&5
10128 echo $ECHO_N "checking for struct sockaddr.sa_len... $ECHO_C" >&6
10129 if test "${ac_cv_member_struct_sockaddr_sa_len+set}" = set; then
10130   echo $ECHO_N "(cached) $ECHO_C" >&6
10131 else
10132   cat >conftest.$ac_ext <<_ACEOF
10133 #line $LINENO "configure"
10134 #include "confdefs.h"
10135 #include <sys/types.h>
10136 #ifdef HAVE_SYS_SOCKET_H
10137 #include <sys/socket.h>
10138 #endif
10139
10140
10141 #ifdef F77_DUMMY_MAIN
10142 #  ifdef __cplusplus
10143      extern "C"
10144 #  endif
10145    int F77_DUMMY_MAIN() { return 1; }
10146 #endif
10147 int
10148 main ()
10149 {
10150 static struct sockaddr ac_aggr;
10151 if (ac_aggr.sa_len)
10152 return 0;
10153   ;
10154   return 0;
10155 }
10156 _ACEOF
10157 rm -f conftest.$ac_objext
10158 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10159   (eval $ac_compile) 2>&5
10160   ac_status=$?
10161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10162   (exit $ac_status); } &&
10163          { ac_try='test -s conftest.$ac_objext'
10164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10165   (eval $ac_try) 2>&5
10166   ac_status=$?
10167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10168   (exit $ac_status); }; }; then
10169   ac_cv_member_struct_sockaddr_sa_len=yes
10170 else
10171   echo "$as_me: failed program was:" >&5
10172 cat conftest.$ac_ext >&5
10173 ac_cv_member_struct_sockaddr_sa_len=no
10174 fi
10175 rm -f conftest.$ac_objext conftest.$ac_ext
10176 fi
10177 echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_sa_len" >&5
10178 echo "${ECHO_T}$ac_cv_member_struct_sockaddr_sa_len" >&6
10179 if test $ac_cv_member_struct_sockaddr_sa_len = yes; then
10180
10181 cat >>confdefs.h <<_ACEOF
10182 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10183 _ACEOF
10184
10185
10186 fi
10187
10188 echo "$as_me:$LINENO: checking for struct addrinfo" >&5
10189 echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
10190 if test "${ac_cv_type_struct_addrinfo+set}" = set; then
10191   echo $ECHO_N "(cached) $ECHO_C" >&6
10192 else
10193   cat >conftest.$ac_ext <<_ACEOF
10194 #line $LINENO "configure"
10195 #include "confdefs.h"
10196 #include <sys/types.h>
10197 #include <sys/socket.h>
10198 #include <netdb.h>
10199
10200
10201 #ifdef F77_DUMMY_MAIN
10202 #  ifdef __cplusplus
10203      extern "C"
10204 #  endif
10205    int F77_DUMMY_MAIN() { return 1; }
10206 #endif
10207 int
10208 main ()
10209 {
10210 if ((struct addrinfo *) 0)
10211   return 0;
10212 if (sizeof (struct addrinfo))
10213   return 0;
10214   ;
10215   return 0;
10216 }
10217 _ACEOF
10218 rm -f conftest.$ac_objext
10219 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10220   (eval $ac_compile) 2>&5
10221   ac_status=$?
10222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10223   (exit $ac_status); } &&
10224          { ac_try='test -s conftest.$ac_objext'
10225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226   (eval $ac_try) 2>&5
10227   ac_status=$?
10228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229   (exit $ac_status); }; }; then
10230   ac_cv_type_struct_addrinfo=yes
10231 else
10232   echo "$as_me: failed program was:" >&5
10233 cat conftest.$ac_ext >&5
10234 ac_cv_type_struct_addrinfo=no
10235 fi
10236 rm -f conftest.$ac_objext conftest.$ac_ext
10237 fi
10238 echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
10239 echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
10240 if test $ac_cv_type_struct_addrinfo = yes; then
10241
10242 cat >>confdefs.h <<_ACEOF
10243 #define HAVE_STRUCT_ADDRINFO 1
10244 _ACEOF
10245
10246
10247 fi
10248
10249
10250 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
10251 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
10252 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
10253   echo $ECHO_N "(cached) $ECHO_C" >&6
10254 else
10255   cat >conftest.$ac_ext <<_ACEOF
10256 #line $LINENO "configure"
10257 #include "confdefs.h"
10258 #include <sys/param.h>
10259 #include <sys/types.h>
10260 #include <sys/socket.h>
10261 #include <sys/ucred.h>
10262
10263 #ifdef F77_DUMMY_MAIN
10264 #  ifdef __cplusplus
10265      extern "C"
10266 #  endif
10267    int F77_DUMMY_MAIN() { return 1; }
10268 #endif
10269 int
10270 main ()
10271 {
10272 if ((struct cmsgcred *) 0)
10273   return 0;
10274 if (sizeof (struct cmsgcred))
10275   return 0;
10276   ;
10277   return 0;
10278 }
10279 _ACEOF
10280 rm -f conftest.$ac_objext
10281 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10282   (eval $ac_compile) 2>&5
10283   ac_status=$?
10284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10285   (exit $ac_status); } &&
10286          { ac_try='test -s conftest.$ac_objext'
10287   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10288   (eval $ac_try) 2>&5
10289   ac_status=$?
10290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10291   (exit $ac_status); }; }; then
10292   ac_cv_type_struct_cmsgcred=yes
10293 else
10294   echo "$as_me: failed program was:" >&5
10295 cat conftest.$ac_ext >&5
10296 ac_cv_type_struct_cmsgcred=no
10297 fi
10298 rm -f conftest.$ac_objext conftest.$ac_ext
10299 fi
10300 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
10301 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
10302 if test $ac_cv_type_struct_cmsgcred = yes; then
10303
10304 cat >>confdefs.h <<_ACEOF
10305 #define HAVE_STRUCT_CMSGCRED 1
10306 _ACEOF
10307
10308
10309 fi
10310 echo "$as_me:$LINENO: checking for struct fcred" >&5
10311 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
10312 if test "${ac_cv_type_struct_fcred+set}" = set; then
10313   echo $ECHO_N "(cached) $ECHO_C" >&6
10314 else
10315   cat >conftest.$ac_ext <<_ACEOF
10316 #line $LINENO "configure"
10317 #include "confdefs.h"
10318 #include <sys/param.h>
10319 #include <sys/types.h>
10320 #include <sys/socket.h>
10321 #include <sys/ucred.h>
10322
10323 #ifdef F77_DUMMY_MAIN
10324 #  ifdef __cplusplus
10325      extern "C"
10326 #  endif
10327    int F77_DUMMY_MAIN() { return 1; }
10328 #endif
10329 int
10330 main ()
10331 {
10332 if ((struct fcred *) 0)
10333   return 0;
10334 if (sizeof (struct fcred))
10335   return 0;
10336   ;
10337   return 0;
10338 }
10339 _ACEOF
10340 rm -f conftest.$ac_objext
10341 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10342   (eval $ac_compile) 2>&5
10343   ac_status=$?
10344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10345   (exit $ac_status); } &&
10346          { ac_try='test -s conftest.$ac_objext'
10347   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10348   (eval $ac_try) 2>&5
10349   ac_status=$?
10350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10351   (exit $ac_status); }; }; then
10352   ac_cv_type_struct_fcred=yes
10353 else
10354   echo "$as_me: failed program was:" >&5
10355 cat conftest.$ac_ext >&5
10356 ac_cv_type_struct_fcred=no
10357 fi
10358 rm -f conftest.$ac_objext conftest.$ac_ext
10359 fi
10360 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
10361 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
10362 if test $ac_cv_type_struct_fcred = yes; then
10363
10364 cat >>confdefs.h <<_ACEOF
10365 #define HAVE_STRUCT_FCRED 1
10366 _ACEOF
10367
10368
10369 fi
10370 echo "$as_me:$LINENO: checking for struct sockcred" >&5
10371 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
10372 if test "${ac_cv_type_struct_sockcred+set}" = set; then
10373   echo $ECHO_N "(cached) $ECHO_C" >&6
10374 else
10375   cat >conftest.$ac_ext <<_ACEOF
10376 #line $LINENO "configure"
10377 #include "confdefs.h"
10378 #include <sys/param.h>
10379 #include <sys/types.h>
10380 #include <sys/socket.h>
10381 #include <sys/ucred.h>
10382
10383 #ifdef F77_DUMMY_MAIN
10384 #  ifdef __cplusplus
10385      extern "C"
10386 #  endif
10387    int F77_DUMMY_MAIN() { return 1; }
10388 #endif
10389 int
10390 main ()
10391 {
10392 if ((struct sockcred *) 0)
10393   return 0;
10394 if (sizeof (struct sockcred))
10395   return 0;
10396   ;
10397   return 0;
10398 }
10399 _ACEOF
10400 rm -f conftest.$ac_objext
10401 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10402   (eval $ac_compile) 2>&5
10403   ac_status=$?
10404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10405   (exit $ac_status); } &&
10406          { ac_try='test -s conftest.$ac_objext'
10407   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10408   (eval $ac_try) 2>&5
10409   ac_status=$?
10410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411   (exit $ac_status); }; }; then
10412   ac_cv_type_struct_sockcred=yes
10413 else
10414   echo "$as_me: failed program was:" >&5
10415 cat conftest.$ac_ext >&5
10416 ac_cv_type_struct_sockcred=no
10417 fi
10418 rm -f conftest.$ac_objext conftest.$ac_ext
10419 fi
10420 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
10421 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
10422 if test $ac_cv_type_struct_sockcred = yes; then
10423
10424 cat >>confdefs.h <<_ACEOF
10425 #define HAVE_STRUCT_SOCKCRED 1
10426 _ACEOF
10427
10428
10429 fi
10430
10431
10432 echo "$as_me:$LINENO: checking for struct option" >&5
10433 echo $ECHO_N "checking for struct option... $ECHO_C" >&6
10434 if test "${ac_cv_type_struct_option+set}" = set; then
10435   echo $ECHO_N "(cached) $ECHO_C" >&6
10436 else
10437   cat >conftest.$ac_ext <<_ACEOF
10438 #line $LINENO "configure"
10439 #include "confdefs.h"
10440 #ifdef HAVE_GETOPT_H
10441 #include <getopt.h>
10442 #endif
10443
10444 #ifdef F77_DUMMY_MAIN
10445 #  ifdef __cplusplus
10446      extern "C"
10447 #  endif
10448    int F77_DUMMY_MAIN() { return 1; }
10449 #endif
10450 int
10451 main ()
10452 {
10453 if ((struct option *) 0)
10454   return 0;
10455 if (sizeof (struct option))
10456   return 0;
10457   ;
10458   return 0;
10459 }
10460 _ACEOF
10461 rm -f conftest.$ac_objext
10462 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10463   (eval $ac_compile) 2>&5
10464   ac_status=$?
10465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10466   (exit $ac_status); } &&
10467          { ac_try='test -s conftest.$ac_objext'
10468   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10469   (eval $ac_try) 2>&5
10470   ac_status=$?
10471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472   (exit $ac_status); }; }; then
10473   ac_cv_type_struct_option=yes
10474 else
10475   echo "$as_me: failed program was:" >&5
10476 cat conftest.$ac_ext >&5
10477 ac_cv_type_struct_option=no
10478 fi
10479 rm -f conftest.$ac_objext conftest.$ac_ext
10480 fi
10481 echo "$as_me:$LINENO: result: $ac_cv_type_struct_option" >&5
10482 echo "${ECHO_T}$ac_cv_type_struct_option" >&6
10483 if test $ac_cv_type_struct_option = yes; then
10484
10485 cat >>confdefs.h <<_ACEOF
10486 #define HAVE_STRUCT_OPTION 1
10487 _ACEOF
10488
10489
10490 fi
10491
10492
10493 if test "$with_zlib" = yes; then
10494   # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
10495   # did not).  While we could work around the lack of z_streamp, it
10496   # seems unwise to encourage people to use such old zlib versions...
10497   echo "$as_me:$LINENO: checking for z_streamp" >&5
10498 echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
10499 if test "${ac_cv_type_z_streamp+set}" = set; then
10500   echo $ECHO_N "(cached) $ECHO_C" >&6
10501 else
10502   cat >conftest.$ac_ext <<_ACEOF
10503 #line $LINENO "configure"
10504 #include "confdefs.h"
10505 #include <zlib.h>
10506
10507 #ifdef F77_DUMMY_MAIN
10508 #  ifdef __cplusplus
10509      extern "C"
10510 #  endif
10511    int F77_DUMMY_MAIN() { return 1; }
10512 #endif
10513 int
10514 main ()
10515 {
10516 if ((z_streamp *) 0)
10517   return 0;
10518 if (sizeof (z_streamp))
10519   return 0;
10520   ;
10521   return 0;
10522 }
10523 _ACEOF
10524 rm -f conftest.$ac_objext
10525 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10526   (eval $ac_compile) 2>&5
10527   ac_status=$?
10528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10529   (exit $ac_status); } &&
10530          { ac_try='test -s conftest.$ac_objext'
10531   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10532   (eval $ac_try) 2>&5
10533   ac_status=$?
10534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10535   (exit $ac_status); }; }; then
10536   ac_cv_type_z_streamp=yes
10537 else
10538   echo "$as_me: failed program was:" >&5
10539 cat conftest.$ac_ext >&5
10540 ac_cv_type_z_streamp=no
10541 fi
10542 rm -f conftest.$ac_objext conftest.$ac_ext
10543 fi
10544 echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
10545 echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
10546 if test $ac_cv_type_z_streamp = yes; then
10547   :
10548 else
10549   { { echo "$as_me:$LINENO: error: zlib version is too old
10550 Use --without-zlib to disable zlib support." >&5
10551 echo "$as_me: error: zlib version is too old
10552 Use --without-zlib to disable zlib support." >&2;}
10553    { (exit 1); exit 1; }; }
10554 fi
10555
10556 fi
10557
10558 if test "$with_krb5" = yes; then
10559 # Check for differences between MIT and Heimdal (KTH) releases
10560   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
10561 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
10562 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
10563   echo $ECHO_N "(cached) $ECHO_C" >&6
10564 else
10565   cat >conftest.$ac_ext <<_ACEOF
10566 #line $LINENO "configure"
10567 #include "confdefs.h"
10568 #include <krb5.h>
10569
10570 #ifdef F77_DUMMY_MAIN
10571 #  ifdef __cplusplus
10572      extern "C"
10573 #  endif
10574    int F77_DUMMY_MAIN() { return 1; }
10575 #endif
10576 int
10577 main ()
10578 {
10579 static krb5_ticket ac_aggr;
10580 if (ac_aggr.enc_part2)
10581 return 0;
10582   ;
10583   return 0;
10584 }
10585 _ACEOF
10586 rm -f conftest.$ac_objext
10587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10588   (eval $ac_compile) 2>&5
10589   ac_status=$?
10590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10591   (exit $ac_status); } &&
10592          { ac_try='test -s conftest.$ac_objext'
10593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10594   (eval $ac_try) 2>&5
10595   ac_status=$?
10596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10597   (exit $ac_status); }; }; then
10598   ac_cv_member_krb5_ticket_enc_part2=yes
10599 else
10600   echo "$as_me: failed program was:" >&5
10601 cat conftest.$ac_ext >&5
10602 ac_cv_member_krb5_ticket_enc_part2=no
10603 fi
10604 rm -f conftest.$ac_objext conftest.$ac_ext
10605 fi
10606 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
10607 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
10608 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
10609
10610 cat >>confdefs.h <<_ACEOF
10611 #define HAVE_KRB5_TICKET_ENC_PART2 1
10612 _ACEOF
10613
10614
10615 else
10616   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
10617 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
10618 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
10619   echo $ECHO_N "(cached) $ECHO_C" >&6
10620 else
10621   cat >conftest.$ac_ext <<_ACEOF
10622 #line $LINENO "configure"
10623 #include "confdefs.h"
10624 #include <krb5.h>
10625
10626 #ifdef F77_DUMMY_MAIN
10627 #  ifdef __cplusplus
10628      extern "C"
10629 #  endif
10630    int F77_DUMMY_MAIN() { return 1; }
10631 #endif
10632 int
10633 main ()
10634 {
10635 static krb5_ticket ac_aggr;
10636 if (ac_aggr.client)
10637 return 0;
10638   ;
10639   return 0;
10640 }
10641 _ACEOF
10642 rm -f conftest.$ac_objext
10643 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10644   (eval $ac_compile) 2>&5
10645   ac_status=$?
10646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10647   (exit $ac_status); } &&
10648          { ac_try='test -s conftest.$ac_objext'
10649   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10650   (eval $ac_try) 2>&5
10651   ac_status=$?
10652   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10653   (exit $ac_status); }; }; then
10654   ac_cv_member_krb5_ticket_client=yes
10655 else
10656   echo "$as_me: failed program was:" >&5
10657 cat conftest.$ac_ext >&5
10658 ac_cv_member_krb5_ticket_client=no
10659 fi
10660 rm -f conftest.$ac_objext conftest.$ac_ext
10661 fi
10662 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
10663 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
10664 if test $ac_cv_member_krb5_ticket_client = yes; then
10665
10666 cat >>confdefs.h <<_ACEOF
10667 #define HAVE_KRB5_TICKET_CLIENT 1
10668 _ACEOF
10669
10670
10671 else
10672   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
10673 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
10674    { (exit 1); exit 1; }; }
10675 fi
10676
10677 fi
10678
10679   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
10680 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
10681 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
10682   echo $ECHO_N "(cached) $ECHO_C" >&6
10683 else
10684   cat >conftest.$ac_ext <<_ACEOF
10685 #line $LINENO "configure"
10686 #include "confdefs.h"
10687 #include <krb5.h>
10688
10689 #ifdef F77_DUMMY_MAIN
10690 #  ifdef __cplusplus
10691      extern "C"
10692 #  endif
10693    int F77_DUMMY_MAIN() { return 1; }
10694 #endif
10695 int
10696 main ()
10697 {
10698 static krb5_error ac_aggr;
10699 if (ac_aggr.text.data)
10700 return 0;
10701   ;
10702   return 0;
10703 }
10704 _ACEOF
10705 rm -f conftest.$ac_objext
10706 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10707   (eval $ac_compile) 2>&5
10708   ac_status=$?
10709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710   (exit $ac_status); } &&
10711          { ac_try='test -s conftest.$ac_objext'
10712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10713   (eval $ac_try) 2>&5
10714   ac_status=$?
10715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10716   (exit $ac_status); }; }; then
10717   ac_cv_member_krb5_error_text_data=yes
10718 else
10719   echo "$as_me: failed program was:" >&5
10720 cat conftest.$ac_ext >&5
10721 ac_cv_member_krb5_error_text_data=no
10722 fi
10723 rm -f conftest.$ac_objext conftest.$ac_ext
10724 fi
10725 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
10726 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
10727 if test $ac_cv_member_krb5_error_text_data = yes; then
10728
10729 cat >>confdefs.h <<_ACEOF
10730 #define HAVE_KRB5_ERROR_TEXT_DATA 1
10731 _ACEOF
10732
10733
10734 else
10735   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
10736 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
10737 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
10738   echo $ECHO_N "(cached) $ECHO_C" >&6
10739 else
10740   cat >conftest.$ac_ext <<_ACEOF
10741 #line $LINENO "configure"
10742 #include "confdefs.h"
10743 #include <krb5.h>
10744
10745 #ifdef F77_DUMMY_MAIN
10746 #  ifdef __cplusplus
10747      extern "C"
10748 #  endif
10749    int F77_DUMMY_MAIN() { return 1; }
10750 #endif
10751 int
10752 main ()
10753 {
10754 static krb5_error ac_aggr;
10755 if (ac_aggr.e_data)
10756 return 0;
10757   ;
10758   return 0;
10759 }
10760 _ACEOF
10761 rm -f conftest.$ac_objext
10762 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10763   (eval $ac_compile) 2>&5
10764   ac_status=$?
10765   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10766   (exit $ac_status); } &&
10767          { ac_try='test -s conftest.$ac_objext'
10768   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10769   (eval $ac_try) 2>&5
10770   ac_status=$?
10771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10772   (exit $ac_status); }; }; then
10773   ac_cv_member_krb5_error_e_data=yes
10774 else
10775   echo "$as_me: failed program was:" >&5
10776 cat conftest.$ac_ext >&5
10777 ac_cv_member_krb5_error_e_data=no
10778 fi
10779 rm -f conftest.$ac_objext conftest.$ac_ext
10780 fi
10781 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
10782 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
10783 if test $ac_cv_member_krb5_error_e_data = yes; then
10784
10785 cat >>confdefs.h <<_ACEOF
10786 #define HAVE_KRB5_ERROR_E_DATA 1
10787 _ACEOF
10788
10789
10790 else
10791   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
10792 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
10793    { (exit 1); exit 1; }; }
10794 fi
10795
10796 fi
10797
10798 fi
10799
10800
10801 ##
10802 ## Functions, global variables
10803 ##
10804
10805 echo "$as_me:$LINENO: checking for int timezone" >&5
10806 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
10807 if test "${pgac_cv_var_int_timezone+set}" = set; then
10808   echo $ECHO_N "(cached) $ECHO_C" >&6
10809 else
10810   cat >conftest.$ac_ext <<_ACEOF
10811 #line $LINENO "configure"
10812 #include "confdefs.h"
10813 #include <time.h>
10814 int res;
10815 #ifdef F77_DUMMY_MAIN
10816 #  ifdef __cplusplus
10817      extern "C"
10818 #  endif
10819    int F77_DUMMY_MAIN() { return 1; }
10820 #endif
10821 int
10822 main ()
10823 {
10824 res = timezone / 60;
10825   ;
10826   return 0;
10827 }
10828 _ACEOF
10829 rm -f conftest.$ac_objext conftest$ac_exeext
10830 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10831   (eval $ac_link) 2>&5
10832   ac_status=$?
10833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10834   (exit $ac_status); } &&
10835          { ac_try='test -s conftest$ac_exeext'
10836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10837   (eval $ac_try) 2>&5
10838   ac_status=$?
10839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10840   (exit $ac_status); }; }; then
10841   pgac_cv_var_int_timezone=yes
10842 else
10843   echo "$as_me: failed program was:" >&5
10844 cat conftest.$ac_ext >&5
10845 pgac_cv_var_int_timezone=no
10846 fi
10847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10848 fi
10849 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
10850 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
10851 if test x"$pgac_cv_var_int_timezone" = xyes ; then
10852
10853 cat >>confdefs.h <<\_ACEOF
10854 #define HAVE_INT_TIMEZONE
10855 _ACEOF
10856
10857 fi
10858 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
10859 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
10860  if test "${ac_cv_func_accept_return+set}" = set; then
10861   echo $ECHO_N "(cached) $ECHO_C" >&6
10862 else
10863    if test "${ac_cv_func_accept_arg1+set}" = set; then
10864   echo $ECHO_N "(cached) $ECHO_C" >&6
10865 else
10866     if test "${ac_cv_func_accept_arg2+set}" = set; then
10867   echo $ECHO_N "(cached) $ECHO_C" >&6
10868 else
10869      if test "${ac_cv_func_accept_arg3+set}" = set; then
10870   echo $ECHO_N "(cached) $ECHO_C" >&6
10871 else
10872       for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
10873       for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
10874        for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
10875         for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
10876          cat >conftest.$ac_ext <<_ACEOF
10877 #line $LINENO "configure"
10878 #include "confdefs.h"
10879 #ifdef HAVE_SYS_TYPES_H
10880 #include <sys/types.h>
10881 #endif
10882 #ifdef HAVE_SYS_SOCKET_H
10883 #include <sys/socket.h>
10884 #endif
10885 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
10886 #ifdef F77_DUMMY_MAIN
10887 #  ifdef __cplusplus
10888      extern "C"
10889 #  endif
10890    int F77_DUMMY_MAIN() { return 1; }
10891 #endif
10892 int
10893 main ()
10894 {
10895
10896   ;
10897   return 0;
10898 }
10899 _ACEOF
10900 rm -f conftest.$ac_objext
10901 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10902   (eval $ac_compile) 2>&5
10903   ac_status=$?
10904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10905   (exit $ac_status); } &&
10906          { ac_try='test -s conftest.$ac_objext'
10907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10908   (eval $ac_try) 2>&5
10909   ac_status=$?
10910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10911   (exit $ac_status); }; }; then
10912   ac_not_found=no; break 4
10913 else
10914   echo "$as_me: failed program was:" >&5
10915 cat conftest.$ac_ext >&5
10916 ac_not_found=yes
10917 fi
10918 rm -f conftest.$ac_objext conftest.$ac_ext
10919        done
10920       done
10921      done
10922     done
10923     if test "$ac_not_found" = yes; then
10924       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
10925 echo "$as_me: error: could not determine argument types" >&2;}
10926    { (exit 1); exit 1; }; }
10927     fi
10928     if test "$ac_cv_func_accept_arg3" = "void"; then
10929       ac_cv_func_accept_arg3=int
10930     fi
10931
10932 fi
10933
10934 fi
10935
10936 fi
10937
10938 fi
10939  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
10940 echo "${ECHO_T}$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
10941
10942 cat >>confdefs.h <<_ACEOF
10943 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
10944 _ACEOF
10945
10946
10947 cat >>confdefs.h <<_ACEOF
10948 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
10949 _ACEOF
10950
10951
10952 cat >>confdefs.h <<_ACEOF
10953 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
10954 _ACEOF
10955
10956
10957 cat >>confdefs.h <<_ACEOF
10958 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
10959 _ACEOF
10960
10961
10962 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
10963 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
10964 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
10965   echo $ECHO_N "(cached) $ECHO_C" >&6
10966 else
10967   cat >conftest.$ac_ext <<_ACEOF
10968 #line $LINENO "configure"
10969 #include "confdefs.h"
10970 #include <sys/time.h>
10971 #ifdef F77_DUMMY_MAIN
10972 #  ifdef __cplusplus
10973      extern "C"
10974 #  endif
10975    int F77_DUMMY_MAIN() { return 1; }
10976 #endif
10977 int
10978 main ()
10979 {
10980 struct timeval *tp;
10981 struct timezone *tzp;
10982 gettimeofday(tp,tzp);
10983   ;
10984   return 0;
10985 }
10986 _ACEOF
10987 rm -f conftest.$ac_objext
10988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10989   (eval $ac_compile) 2>&5
10990   ac_status=$?
10991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992   (exit $ac_status); } &&
10993          { ac_try='test -s conftest.$ac_objext'
10994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995   (eval $ac_try) 2>&5
10996   ac_status=$?
10997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998   (exit $ac_status); }; }; then
10999   pgac_cv_func_gettimeofday_1arg=no
11000 else
11001   echo "$as_me: failed program was:" >&5
11002 cat conftest.$ac_ext >&5
11003 pgac_cv_func_gettimeofday_1arg=yes
11004 fi
11005 rm -f conftest.$ac_objext conftest.$ac_ext
11006 fi
11007 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
11008 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
11009 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
11010
11011 cat >>confdefs.h <<\_ACEOF
11012 #define GETTIMEOFDAY_1ARG
11013 _ACEOF
11014
11015 fi
11016
11017
11018
11019 # SunOS doesn't handle negative byte comparisons properly with +/- return
11020 echo "$as_me:$LINENO: checking for working memcmp" >&5
11021 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
11022 if test "${ac_cv_func_memcmp_working+set}" = set; then
11023   echo $ECHO_N "(cached) $ECHO_C" >&6
11024 else
11025   if test "$cross_compiling" = yes; then
11026   ac_cv_func_memcmp_working=no
11027 else
11028   cat >conftest.$ac_ext <<_ACEOF
11029 #line $LINENO "configure"
11030 #include "confdefs.h"
11031
11032 #ifdef F77_DUMMY_MAIN
11033 #  ifdef __cplusplus
11034      extern "C"
11035 #  endif
11036    int F77_DUMMY_MAIN() { return 1; }
11037 #endif
11038 int
11039 main ()
11040 {
11041
11042   /* Some versions of memcmp are not 8-bit clean.  */
11043   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
11044   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
11045     exit (1);
11046
11047   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
11048      or more and with at least one buffer not starting on a 4-byte boundary.
11049      William Lewis provided this test program.   */
11050   {
11051     char foo[21];
11052     char bar[21];
11053     int i;
11054     for (i = 0; i < 4; i++)
11055       {
11056         char *a = foo + i;
11057         char *b = bar + i;
11058         strcpy (a, "--------01111111");
11059         strcpy (b, "--------10000000");
11060         if (memcmp (a, b, 16) >= 0)
11061           exit (1);
11062       }
11063     exit (0);
11064   }
11065
11066   ;
11067   return 0;
11068 }
11069 _ACEOF
11070 rm -f conftest$ac_exeext
11071 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11072   (eval $ac_link) 2>&5
11073   ac_status=$?
11074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11075   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11077   (eval $ac_try) 2>&5
11078   ac_status=$?
11079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11080   (exit $ac_status); }; }; then
11081   ac_cv_func_memcmp_working=yes
11082 else
11083   echo "$as_me: program exited with status $ac_status" >&5
11084 echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11086 ( exit $ac_status )
11087 ac_cv_func_memcmp_working=no
11088 fi
11089 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11090 fi
11091 fi
11092 echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
11093 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
11094 test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113 for ac_func in cbrt dlopen fcvt fdatasync getpeereid memmove poll pstat setproctitle setsid sigprocmask symlink sysconf utime utimes waitpid
11114 do
11115 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11116 echo "$as_me:$LINENO: checking for $ac_func" >&5
11117 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11118 if eval "test \"\${$as_ac_var+set}\" = set"; then
11119   echo $ECHO_N "(cached) $ECHO_C" >&6
11120 else
11121   cat >conftest.$ac_ext <<_ACEOF
11122 #line $LINENO "configure"
11123 #include "confdefs.h"
11124 /* System header to define __stub macros and hopefully few prototypes,
11125     which can conflict with char $ac_func (); below.  */
11126 #include <assert.h>
11127 /* Override any gcc2 internal prototype to avoid an error.  */
11128 #ifdef __cplusplus
11129 extern "C"
11130 #endif
11131 /* We use char because int might match the return type of a gcc2
11132    builtin and then its argument prototype would still apply.  */
11133 char $ac_func ();
11134 char (*f) ();
11135
11136 #ifdef F77_DUMMY_MAIN
11137 #  ifdef __cplusplus
11138      extern "C"
11139 #  endif
11140    int F77_DUMMY_MAIN() { return 1; }
11141 #endif
11142 int
11143 main ()
11144 {
11145 /* The GNU C library defines this for functions which it implements
11146     to always fail with ENOSYS.  Some functions are actually named
11147     something starting with __ and the normal name is an alias.  */
11148 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11149 choke me
11150 #else
11151 f = $ac_func;
11152 #endif
11153
11154   ;
11155   return 0;
11156 }
11157 _ACEOF
11158 rm -f conftest.$ac_objext conftest$ac_exeext
11159 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11160   (eval $ac_link) 2>&5
11161   ac_status=$?
11162   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11163   (exit $ac_status); } &&
11164          { ac_try='test -s conftest$ac_exeext'
11165   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11166   (eval $ac_try) 2>&5
11167   ac_status=$?
11168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11169   (exit $ac_status); }; }; then
11170   eval "$as_ac_var=yes"
11171 else
11172   echo "$as_me: failed program was:" >&5
11173 cat conftest.$ac_ext >&5
11174 eval "$as_ac_var=no"
11175 fi
11176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11177 fi
11178 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11179 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11180 if test `eval echo '${'$as_ac_var'}'` = yes; then
11181   cat >>confdefs.h <<_ACEOF
11182 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11183 _ACEOF
11184
11185 fi
11186 done
11187
11188
11189 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
11190 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
11191 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194   cat >conftest.$ac_ext <<_ACEOF
11195 #line $LINENO "configure"
11196 #include "confdefs.h"
11197 #include <unistd.h>
11198
11199 #ifdef F77_DUMMY_MAIN
11200 #  ifdef __cplusplus
11201      extern "C"
11202 #  endif
11203    int F77_DUMMY_MAIN() { return 1; }
11204 #endif
11205 int
11206 main ()
11207 {
11208 #ifndef fdatasync
11209   char *p = (char *) fdatasync;
11210 #endif
11211
11212   ;
11213   return 0;
11214 }
11215 _ACEOF
11216 rm -f conftest.$ac_objext
11217 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11218   (eval $ac_compile) 2>&5
11219   ac_status=$?
11220   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221   (exit $ac_status); } &&
11222          { ac_try='test -s conftest.$ac_objext'
11223   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11224   (eval $ac_try) 2>&5
11225   ac_status=$?
11226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11227   (exit $ac_status); }; }; then
11228   ac_cv_have_decl_fdatasync=yes
11229 else
11230   echo "$as_me: failed program was:" >&5
11231 cat conftest.$ac_ext >&5
11232 ac_cv_have_decl_fdatasync=no
11233 fi
11234 rm -f conftest.$ac_objext conftest.$ac_ext
11235 fi
11236 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
11237 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
11238 if test $ac_cv_have_decl_fdatasync = yes; then
11239
11240 cat >>confdefs.h <<_ACEOF
11241 #define HAVE_DECL_FDATASYNC 1
11242 _ACEOF
11243
11244
11245 else
11246   cat >>confdefs.h <<_ACEOF
11247 #define HAVE_DECL_FDATASYNC 0
11248 _ACEOF
11249
11250
11251 fi
11252
11253
11254
11255 HAVE_IPV6=no
11256 echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
11257 echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6
11258 if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
11259   echo $ECHO_N "(cached) $ECHO_C" >&6
11260 else
11261   cat >conftest.$ac_ext <<_ACEOF
11262 #line $LINENO "configure"
11263 #include "confdefs.h"
11264 $ac_includes_default
11265 #include <netinet/in.h>
11266
11267 #ifdef F77_DUMMY_MAIN
11268 #  ifdef __cplusplus
11269      extern "C"
11270 #  endif
11271    int F77_DUMMY_MAIN() { return 1; }
11272 #endif
11273 int
11274 main ()
11275 {
11276 if ((struct sockaddr_in6 *) 0)
11277   return 0;
11278 if (sizeof (struct sockaddr_in6))
11279   return 0;
11280   ;
11281   return 0;
11282 }
11283 _ACEOF
11284 rm -f conftest.$ac_objext
11285 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11286   (eval $ac_compile) 2>&5
11287   ac_status=$?
11288   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11289   (exit $ac_status); } &&
11290          { ac_try='test -s conftest.$ac_objext'
11291   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11292   (eval $ac_try) 2>&5
11293   ac_status=$?
11294   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11295   (exit $ac_status); }; }; then
11296   ac_cv_type_struct_sockaddr_in6=yes
11297 else
11298   echo "$as_me: failed program was:" >&5
11299 cat conftest.$ac_ext >&5
11300 ac_cv_type_struct_sockaddr_in6=no
11301 fi
11302 rm -f conftest.$ac_objext conftest.$ac_ext
11303 fi
11304 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
11305 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in6" >&6
11306 if test $ac_cv_type_struct_sockaddr_in6 = yes; then
11307   echo "$as_me:$LINENO: checking for inet_ntop" >&5
11308 echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6
11309 if test "${ac_cv_func_inet_ntop+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 /* System header to define __stub macros and hopefully few prototypes,
11316     which can conflict with char inet_ntop (); below.  */
11317 #include <assert.h>
11318 /* Override any gcc2 internal prototype to avoid an error.  */
11319 #ifdef __cplusplus
11320 extern "C"
11321 #endif
11322 /* We use char because int might match the return type of a gcc2
11323    builtin and then its argument prototype would still apply.  */
11324 char inet_ntop ();
11325 char (*f) ();
11326
11327 #ifdef F77_DUMMY_MAIN
11328 #  ifdef __cplusplus
11329      extern "C"
11330 #  endif
11331    int F77_DUMMY_MAIN() { return 1; }
11332 #endif
11333 int
11334 main ()
11335 {
11336 /* The GNU C library defines this for functions which it implements
11337     to always fail with ENOSYS.  Some functions are actually named
11338     something starting with __ and the normal name is an alias.  */
11339 #if defined (__stub_inet_ntop) || defined (__stub___inet_ntop)
11340 choke me
11341 #else
11342 f = inet_ntop;
11343 #endif
11344
11345   ;
11346   return 0;
11347 }
11348 _ACEOF
11349 rm -f conftest.$ac_objext conftest$ac_exeext
11350 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11351   (eval $ac_link) 2>&5
11352   ac_status=$?
11353   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11354   (exit $ac_status); } &&
11355          { ac_try='test -s conftest$ac_exeext'
11356   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11357   (eval $ac_try) 2>&5
11358   ac_status=$?
11359   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11360   (exit $ac_status); }; }; then
11361   ac_cv_func_inet_ntop=yes
11362 else
11363   echo "$as_me: failed program was:" >&5
11364 cat conftest.$ac_ext >&5
11365 ac_cv_func_inet_ntop=no
11366 fi
11367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11368 fi
11369 echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5
11370 echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6
11371 if test $ac_cv_func_inet_ntop = yes; then
11372
11373 cat >>confdefs.h <<\_ACEOF
11374 #define HAVE_IPV6 1
11375 _ACEOF
11376
11377                                                           HAVE_IPV6=yes
11378 fi
11379
11380 fi
11381
11382
11383
11384 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
11385 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
11386 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
11387   echo $ECHO_N "(cached) $ECHO_C" >&6
11388 else
11389   cat >conftest.$ac_ext <<_ACEOF
11390 #line $LINENO "configure"
11391 #include "confdefs.h"
11392 #include <machine/vmparam.h>
11393 #include <sys/exec.h>
11394
11395 #ifdef F77_DUMMY_MAIN
11396 #  ifdef __cplusplus
11397      extern "C"
11398 #  endif
11399    int F77_DUMMY_MAIN() { return 1; }
11400 #endif
11401 int
11402 main ()
11403 {
11404 PS_STRINGS->ps_nargvstr = 1;
11405 PS_STRINGS->ps_argvstr = "foo";
11406   ;
11407   return 0;
11408 }
11409 _ACEOF
11410 rm -f conftest.$ac_objext conftest$ac_exeext
11411 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11412   (eval $ac_link) 2>&5
11413   ac_status=$?
11414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11415   (exit $ac_status); } &&
11416          { ac_try='test -s conftest$ac_exeext'
11417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11418   (eval $ac_try) 2>&5
11419   ac_status=$?
11420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11421   (exit $ac_status); }; }; then
11422   pgac_cv_var_PS_STRINGS=yes
11423 else
11424   echo "$as_me: failed program was:" >&5
11425 cat conftest.$ac_ext >&5
11426 pgac_cv_var_PS_STRINGS=no
11427 fi
11428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11429 fi
11430 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
11431 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
11432 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
11433
11434 cat >>confdefs.h <<\_ACEOF
11435 #define HAVE_PS_STRINGS
11436 _ACEOF
11437
11438 fi
11439
11440
11441 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
11442 # is missing.  Yes, there are machines that have only one.  We may
11443 # also decide to use snprintf.c if snprintf() is present but does not
11444 # have working "long long int" support -- see below.
11445
11446 pgac_need_repl_snprintf=no
11447
11448 for ac_func in snprintf
11449 do
11450 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11451 echo "$as_me:$LINENO: checking for $ac_func" >&5
11452 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11453 if eval "test \"\${$as_ac_var+set}\" = set"; then
11454   echo $ECHO_N "(cached) $ECHO_C" >&6
11455 else
11456   cat >conftest.$ac_ext <<_ACEOF
11457 #line $LINENO "configure"
11458 #include "confdefs.h"
11459 /* System header to define __stub macros and hopefully few prototypes,
11460     which can conflict with char $ac_func (); below.  */
11461 #include <assert.h>
11462 /* Override any gcc2 internal prototype to avoid an error.  */
11463 #ifdef __cplusplus
11464 extern "C"
11465 #endif
11466 /* We use char because int might match the return type of a gcc2
11467    builtin and then its argument prototype would still apply.  */
11468 char $ac_func ();
11469 char (*f) ();
11470
11471 #ifdef F77_DUMMY_MAIN
11472 #  ifdef __cplusplus
11473      extern "C"
11474 #  endif
11475    int F77_DUMMY_MAIN() { return 1; }
11476 #endif
11477 int
11478 main ()
11479 {
11480 /* The GNU C library defines this for functions which it implements
11481     to always fail with ENOSYS.  Some functions are actually named
11482     something starting with __ and the normal name is an alias.  */
11483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11484 choke me
11485 #else
11486 f = $ac_func;
11487 #endif
11488
11489   ;
11490   return 0;
11491 }
11492 _ACEOF
11493 rm -f conftest.$ac_objext conftest$ac_exeext
11494 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11495   (eval $ac_link) 2>&5
11496   ac_status=$?
11497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498   (exit $ac_status); } &&
11499          { ac_try='test -s conftest$ac_exeext'
11500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11501   (eval $ac_try) 2>&5
11502   ac_status=$?
11503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11504   (exit $ac_status); }; }; then
11505   eval "$as_ac_var=yes"
11506 else
11507   echo "$as_me: failed program was:" >&5
11508 cat conftest.$ac_ext >&5
11509 eval "$as_ac_var=no"
11510 fi
11511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11512 fi
11513 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11514 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11515 if test `eval echo '${'$as_ac_var'}'` = yes; then
11516   cat >>confdefs.h <<_ACEOF
11517 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11518 _ACEOF
11519
11520 else
11521   pgac_need_repl_snprintf=yes
11522 fi
11523 done
11524
11525
11526 for ac_func in vsnprintf
11527 do
11528 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11529 echo "$as_me:$LINENO: checking for $ac_func" >&5
11530 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11531 if eval "test \"\${$as_ac_var+set}\" = set"; then
11532   echo $ECHO_N "(cached) $ECHO_C" >&6
11533 else
11534   cat >conftest.$ac_ext <<_ACEOF
11535 #line $LINENO "configure"
11536 #include "confdefs.h"
11537 /* System header to define __stub macros and hopefully few prototypes,
11538     which can conflict with char $ac_func (); below.  */
11539 #include <assert.h>
11540 /* Override any gcc2 internal prototype to avoid an error.  */
11541 #ifdef __cplusplus
11542 extern "C"
11543 #endif
11544 /* We use char because int might match the return type of a gcc2
11545    builtin and then its argument prototype would still apply.  */
11546 char $ac_func ();
11547 char (*f) ();
11548
11549 #ifdef F77_DUMMY_MAIN
11550 #  ifdef __cplusplus
11551      extern "C"
11552 #  endif
11553    int F77_DUMMY_MAIN() { return 1; }
11554 #endif
11555 int
11556 main ()
11557 {
11558 /* The GNU C library defines this for functions which it implements
11559     to always fail with ENOSYS.  Some functions are actually named
11560     something starting with __ and the normal name is an alias.  */
11561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11562 choke me
11563 #else
11564 f = $ac_func;
11565 #endif
11566
11567   ;
11568   return 0;
11569 }
11570 _ACEOF
11571 rm -f conftest.$ac_objext conftest$ac_exeext
11572 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11573   (eval $ac_link) 2>&5
11574   ac_status=$?
11575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11576   (exit $ac_status); } &&
11577          { ac_try='test -s conftest$ac_exeext'
11578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11579   (eval $ac_try) 2>&5
11580   ac_status=$?
11581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11582   (exit $ac_status); }; }; then
11583   eval "$as_ac_var=yes"
11584 else
11585   echo "$as_me: failed program was:" >&5
11586 cat conftest.$ac_ext >&5
11587 eval "$as_ac_var=no"
11588 fi
11589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11590 fi
11591 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11592 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11593 if test `eval echo '${'$as_ac_var'}'` = yes; then
11594   cat >>confdefs.h <<_ACEOF
11595 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11596 _ACEOF
11597
11598 else
11599   pgac_need_repl_snprintf=yes
11600 fi
11601 done
11602
11603
11604
11605 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
11606 # include/c.h will provide declarations.  Note this is a separate test
11607 # from whether the functions exist in the C library --- there are
11608 # systems that have the functions but don't bother to declare them :-(
11609
11610 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
11611 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
11612 if test "${ac_cv_have_decl_snprintf+set}" = set; then
11613   echo $ECHO_N "(cached) $ECHO_C" >&6
11614 else
11615   cat >conftest.$ac_ext <<_ACEOF
11616 #line $LINENO "configure"
11617 #include "confdefs.h"
11618 $ac_includes_default
11619 #ifdef F77_DUMMY_MAIN
11620 #  ifdef __cplusplus
11621      extern "C"
11622 #  endif
11623    int F77_DUMMY_MAIN() { return 1; }
11624 #endif
11625 int
11626 main ()
11627 {
11628 #ifndef snprintf
11629   char *p = (char *) snprintf;
11630 #endif
11631
11632   ;
11633   return 0;
11634 }
11635 _ACEOF
11636 rm -f conftest.$ac_objext
11637 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11638   (eval $ac_compile) 2>&5
11639   ac_status=$?
11640   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11641   (exit $ac_status); } &&
11642          { ac_try='test -s conftest.$ac_objext'
11643   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11644   (eval $ac_try) 2>&5
11645   ac_status=$?
11646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11647   (exit $ac_status); }; }; then
11648   ac_cv_have_decl_snprintf=yes
11649 else
11650   echo "$as_me: failed program was:" >&5
11651 cat conftest.$ac_ext >&5
11652 ac_cv_have_decl_snprintf=no
11653 fi
11654 rm -f conftest.$ac_objext conftest.$ac_ext
11655 fi
11656 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
11657 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
11658 if test $ac_cv_have_decl_snprintf = yes; then
11659
11660 cat >>confdefs.h <<_ACEOF
11661 #define HAVE_DECL_SNPRINTF 1
11662 _ACEOF
11663
11664
11665 else
11666   cat >>confdefs.h <<_ACEOF
11667 #define HAVE_DECL_SNPRINTF 0
11668 _ACEOF
11669
11670
11671 fi
11672 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
11673 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
11674 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
11675   echo $ECHO_N "(cached) $ECHO_C" >&6
11676 else
11677   cat >conftest.$ac_ext <<_ACEOF
11678 #line $LINENO "configure"
11679 #include "confdefs.h"
11680 $ac_includes_default
11681 #ifdef F77_DUMMY_MAIN
11682 #  ifdef __cplusplus
11683      extern "C"
11684 #  endif
11685    int F77_DUMMY_MAIN() { return 1; }
11686 #endif
11687 int
11688 main ()
11689 {
11690 #ifndef vsnprintf
11691   char *p = (char *) vsnprintf;
11692 #endif
11693
11694   ;
11695   return 0;
11696 }
11697 _ACEOF
11698 rm -f conftest.$ac_objext
11699 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11700   (eval $ac_compile) 2>&5
11701   ac_status=$?
11702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703   (exit $ac_status); } &&
11704          { ac_try='test -s conftest.$ac_objext'
11705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11706   (eval $ac_try) 2>&5
11707   ac_status=$?
11708   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11709   (exit $ac_status); }; }; then
11710   ac_cv_have_decl_vsnprintf=yes
11711 else
11712   echo "$as_me: failed program was:" >&5
11713 cat conftest.$ac_ext >&5
11714 ac_cv_have_decl_vsnprintf=no
11715 fi
11716 rm -f conftest.$ac_objext conftest.$ac_ext
11717 fi
11718 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
11719 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
11720 if test $ac_cv_have_decl_vsnprintf = yes; then
11721
11722 cat >>confdefs.h <<_ACEOF
11723 #define HAVE_DECL_VSNPRINTF 1
11724 _ACEOF
11725
11726
11727 else
11728   cat >>confdefs.h <<_ACEOF
11729 #define HAVE_DECL_VSNPRINTF 0
11730 _ACEOF
11731
11732
11733 fi
11734
11735
11736
11737
11738 # do this one the hard way in case isinf() is a macro
11739 echo "$as_me:$LINENO: checking for isinf" >&5
11740 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
11741 if test "${ac_cv_func_isinf+set}" = set; then
11742   echo $ECHO_N "(cached) $ECHO_C" >&6
11743 else
11744   cat >conftest.$ac_ext <<_ACEOF
11745 #line $LINENO "configure"
11746 #include "confdefs.h"
11747 #include <math.h>
11748
11749 #ifdef F77_DUMMY_MAIN
11750 #  ifdef __cplusplus
11751      extern "C"
11752 #  endif
11753    int F77_DUMMY_MAIN() { return 1; }
11754 #endif
11755 int
11756 main ()
11757 {
11758 double x = 0.0; int res = isinf(x);
11759   ;
11760   return 0;
11761 }
11762 _ACEOF
11763 rm -f conftest.$ac_objext conftest$ac_exeext
11764 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11765   (eval $ac_link) 2>&5
11766   ac_status=$?
11767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768   (exit $ac_status); } &&
11769          { ac_try='test -s conftest$ac_exeext'
11770   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11771   (eval $ac_try) 2>&5
11772   ac_status=$?
11773   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774   (exit $ac_status); }; }; then
11775   ac_cv_func_isinf=yes
11776 else
11777   echo "$as_me: failed program was:" >&5
11778 cat conftest.$ac_ext >&5
11779 ac_cv_func_isinf=no
11780 fi
11781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11782 fi
11783 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
11784 echo "${ECHO_T}$ac_cv_func_isinf" >&6
11785
11786 if test $ac_cv_func_isinf = yes ; then
11787
11788 cat >>confdefs.h <<\_ACEOF
11789 #define HAVE_ISINF 1
11790 _ACEOF
11791
11792 else
11793   LIBOBJS="$LIBOBJS isinf.$ac_objext"
11794   # Look for a way to implement a substitute for isinf()
11795
11796
11797
11798
11799 for ac_func in fpclass fp_class fp_class_d class
11800 do
11801 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11802 echo "$as_me:$LINENO: checking for $ac_func" >&5
11803 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11804 if eval "test \"\${$as_ac_var+set}\" = set"; then
11805   echo $ECHO_N "(cached) $ECHO_C" >&6
11806 else
11807   cat >conftest.$ac_ext <<_ACEOF
11808 #line $LINENO "configure"
11809 #include "confdefs.h"
11810 /* System header to define __stub macros and hopefully few prototypes,
11811     which can conflict with char $ac_func (); below.  */
11812 #include <assert.h>
11813 /* Override any gcc2 internal prototype to avoid an error.  */
11814 #ifdef __cplusplus
11815 extern "C"
11816 #endif
11817 /* We use char because int might match the return type of a gcc2
11818    builtin and then its argument prototype would still apply.  */
11819 char $ac_func ();
11820 char (*f) ();
11821
11822 #ifdef F77_DUMMY_MAIN
11823 #  ifdef __cplusplus
11824      extern "C"
11825 #  endif
11826    int F77_DUMMY_MAIN() { return 1; }
11827 #endif
11828 int
11829 main ()
11830 {
11831 /* The GNU C library defines this for functions which it implements
11832     to always fail with ENOSYS.  Some functions are actually named
11833     something starting with __ and the normal name is an alias.  */
11834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11835 choke me
11836 #else
11837 f = $ac_func;
11838 #endif
11839
11840   ;
11841   return 0;
11842 }
11843 _ACEOF
11844 rm -f conftest.$ac_objext conftest$ac_exeext
11845 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11846   (eval $ac_link) 2>&5
11847   ac_status=$?
11848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11849   (exit $ac_status); } &&
11850          { ac_try='test -s conftest$ac_exeext'
11851   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11852   (eval $ac_try) 2>&5
11853   ac_status=$?
11854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11855   (exit $ac_status); }; }; then
11856   eval "$as_ac_var=yes"
11857 else
11858   echo "$as_me: failed program was:" >&5
11859 cat conftest.$ac_ext >&5
11860 eval "$as_ac_var=no"
11861 fi
11862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11863 fi
11864 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11865 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11866 if test `eval echo '${'$as_ac_var'}'` = yes; then
11867   cat >>confdefs.h <<_ACEOF
11868 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11869 _ACEOF
11870  break
11871 fi
11872 done
11873
11874 fi
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889 for ac_func in crypt fseeko getopt getrusage inet_aton random rint srandom strcasecmp strdup strerror strtol strtoul
11890 do
11891 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11892 echo "$as_me:$LINENO: checking for $ac_func" >&5
11893 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11894 if eval "test \"\${$as_ac_var+set}\" = set"; then
11895   echo $ECHO_N "(cached) $ECHO_C" >&6
11896 else
11897   cat >conftest.$ac_ext <<_ACEOF
11898 #line $LINENO "configure"
11899 #include "confdefs.h"
11900 /* System header to define __stub macros and hopefully few prototypes,
11901     which can conflict with char $ac_func (); below.  */
11902 #include <assert.h>
11903 /* Override any gcc2 internal prototype to avoid an error.  */
11904 #ifdef __cplusplus
11905 extern "C"
11906 #endif
11907 /* We use char because int might match the return type of a gcc2
11908    builtin and then its argument prototype would still apply.  */
11909 char $ac_func ();
11910 char (*f) ();
11911
11912 #ifdef F77_DUMMY_MAIN
11913 #  ifdef __cplusplus
11914      extern "C"
11915 #  endif
11916    int F77_DUMMY_MAIN() { return 1; }
11917 #endif
11918 int
11919 main ()
11920 {
11921 /* The GNU C library defines this for functions which it implements
11922     to always fail with ENOSYS.  Some functions are actually named
11923     something starting with __ and the normal name is an alias.  */
11924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11925 choke me
11926 #else
11927 f = $ac_func;
11928 #endif
11929
11930   ;
11931   return 0;
11932 }
11933 _ACEOF
11934 rm -f conftest.$ac_objext conftest$ac_exeext
11935 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11936   (eval $ac_link) 2>&5
11937   ac_status=$?
11938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11939   (exit $ac_status); } &&
11940          { ac_try='test -s conftest$ac_exeext'
11941   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11942   (eval $ac_try) 2>&5
11943   ac_status=$?
11944   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945   (exit $ac_status); }; }; then
11946   eval "$as_ac_var=yes"
11947 else
11948   echo "$as_me: failed program was:" >&5
11949 cat conftest.$ac_ext >&5
11950 eval "$as_ac_var=no"
11951 fi
11952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11953 fi
11954 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11955 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11956 if test `eval echo '${'$as_ac_var'}'` = yes; then
11957   cat >>confdefs.h <<_ACEOF
11958 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11959 _ACEOF
11960
11961 else
11962   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
11963 fi
11964 done
11965
11966
11967
11968 # system's version of getaddrinfo(), if any, may be used only if we found
11969 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h
11970 if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
11971
11972 for ac_func in getaddrinfo
11973 do
11974 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11975 echo "$as_me:$LINENO: checking for $ac_func" >&5
11976 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11977 if eval "test \"\${$as_ac_var+set}\" = set"; then
11978   echo $ECHO_N "(cached) $ECHO_C" >&6
11979 else
11980   cat >conftest.$ac_ext <<_ACEOF
11981 #line $LINENO "configure"
11982 #include "confdefs.h"
11983 /* System header to define __stub macros and hopefully few prototypes,
11984     which can conflict with char $ac_func (); below.  */
11985 #include <assert.h>
11986 /* Override any gcc2 internal prototype to avoid an error.  */
11987 #ifdef __cplusplus
11988 extern "C"
11989 #endif
11990 /* We use char because int might match the return type of a gcc2
11991    builtin and then its argument prototype would still apply.  */
11992 char $ac_func ();
11993 char (*f) ();
11994
11995 #ifdef F77_DUMMY_MAIN
11996 #  ifdef __cplusplus
11997      extern "C"
11998 #  endif
11999    int F77_DUMMY_MAIN() { return 1; }
12000 #endif
12001 int
12002 main ()
12003 {
12004 /* The GNU C library defines this for functions which it implements
12005     to always fail with ENOSYS.  Some functions are actually named
12006     something starting with __ and the normal name is an alias.  */
12007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12008 choke me
12009 #else
12010 f = $ac_func;
12011 #endif
12012
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 rm -f conftest.$ac_objext conftest$ac_exeext
12018 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12019   (eval $ac_link) 2>&5
12020   ac_status=$?
12021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022   (exit $ac_status); } &&
12023          { ac_try='test -s conftest$ac_exeext'
12024   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12025   (eval $ac_try) 2>&5
12026   ac_status=$?
12027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12028   (exit $ac_status); }; }; then
12029   eval "$as_ac_var=yes"
12030 else
12031   echo "$as_me: failed program was:" >&5
12032 cat conftest.$ac_ext >&5
12033 eval "$as_ac_var=no"
12034 fi
12035 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12036 fi
12037 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12038 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12039 if test `eval echo '${'$as_ac_var'}'` = yes; then
12040   cat >>confdefs.h <<_ACEOF
12041 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12042 _ACEOF
12043
12044 else
12045   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
12046 fi
12047 done
12048
12049
12050 else
12051   LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
12052 fi
12053
12054 # similarly, use system's getopt_long() only if system provides struct option.
12055 if test x"$ac_cv_type_struct_option" = xyes ; then
12056
12057 for ac_func in getopt_long
12058 do
12059 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12060 echo "$as_me:$LINENO: checking for $ac_func" >&5
12061 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12062 if eval "test \"\${$as_ac_var+set}\" = set"; then
12063   echo $ECHO_N "(cached) $ECHO_C" >&6
12064 else
12065   cat >conftest.$ac_ext <<_ACEOF
12066 #line $LINENO "configure"
12067 #include "confdefs.h"
12068 /* System header to define __stub macros and hopefully few prototypes,
12069     which can conflict with char $ac_func (); below.  */
12070 #include <assert.h>
12071 /* Override any gcc2 internal prototype to avoid an error.  */
12072 #ifdef __cplusplus
12073 extern "C"
12074 #endif
12075 /* We use char because int might match the return type of a gcc2
12076    builtin and then its argument prototype would still apply.  */
12077 char $ac_func ();
12078 char (*f) ();
12079
12080 #ifdef F77_DUMMY_MAIN
12081 #  ifdef __cplusplus
12082      extern "C"
12083 #  endif
12084    int F77_DUMMY_MAIN() { return 1; }
12085 #endif
12086 int
12087 main ()
12088 {
12089 /* The GNU C library defines this for functions which it implements
12090     to always fail with ENOSYS.  Some functions are actually named
12091     something starting with __ and the normal name is an alias.  */
12092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12093 choke me
12094 #else
12095 f = $ac_func;
12096 #endif
12097
12098   ;
12099   return 0;
12100 }
12101 _ACEOF
12102 rm -f conftest.$ac_objext conftest$ac_exeext
12103 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12104   (eval $ac_link) 2>&5
12105   ac_status=$?
12106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12107   (exit $ac_status); } &&
12108          { ac_try='test -s conftest$ac_exeext'
12109   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12110   (eval $ac_try) 2>&5
12111   ac_status=$?
12112   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12113   (exit $ac_status); }; }; then
12114   eval "$as_ac_var=yes"
12115 else
12116   echo "$as_me: failed program was:" >&5
12117 cat conftest.$ac_ext >&5
12118 eval "$as_ac_var=no"
12119 fi
12120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12121 fi
12122 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12123 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12124 if test `eval echo '${'$as_ac_var'}'` = yes; then
12125   cat >>confdefs.h <<_ACEOF
12126 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12127 _ACEOF
12128
12129 else
12130   LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
12131 fi
12132 done
12133
12134
12135 else
12136   LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
12137 fi
12138
12139 # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
12140 # We override the previous test that said fseeko/ftello didn't exist
12141 # OS tests are also done in include/c.h and port/fseeko.c
12142 case $host_os in bsdi*|netbsd*)
12143 ac_cv_func_fseeko=yes
12144 esac
12145
12146 # Solaris has a very slow qsort in certain cases, so we replace it.
12147 case $host_os in solaris*)
12148 LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
12149 esac
12150
12151 # Win32 can't to rename or unlink on an open file
12152 case $host_os in mingw*)
12153 LIBOBJS="$LIBOBJS dirmod.$ac_objext"
12154 LIBOBJS="$LIBOBJS copydir.$ac_objext"
12155 LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
12156 esac
12157
12158 if test "$with_readline" = yes; then
12159   echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
12160 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
12161 cat >conftest.$ac_ext <<_ACEOF
12162 #line $LINENO "configure"
12163 #include "confdefs.h"
12164 #include <stdio.h>
12165 #ifdef HAVE_READLINE_READLINE_H
12166 # include <readline/readline.h>
12167 #elif defined(HAVE_READLINE_H)
12168 # include <readline.h>
12169 #endif
12170
12171 #ifdef F77_DUMMY_MAIN
12172 #  ifdef __cplusplus
12173      extern "C"
12174 #  endif
12175    int F77_DUMMY_MAIN() { return 1; }
12176 #endif
12177 int
12178 main ()
12179 {
12180 rl_completion_append_character = 'x';
12181   ;
12182   return 0;
12183 }
12184 _ACEOF
12185 rm -f conftest.$ac_objext conftest$ac_exeext
12186 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12187   (eval $ac_link) 2>&5
12188   ac_status=$?
12189   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12190   (exit $ac_status); } &&
12191          { ac_try='test -s conftest$ac_exeext'
12192   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12193   (eval $ac_try) 2>&5
12194   ac_status=$?
12195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12196   (exit $ac_status); }; }; then
12197   echo "$as_me:$LINENO: result: yes" >&5
12198 echo "${ECHO_T}yes" >&6
12199
12200 cat >>confdefs.h <<\_ACEOF
12201 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
12202 _ACEOF
12203
12204 else
12205   echo "$as_me: failed program was:" >&5
12206 cat conftest.$ac_ext >&5
12207 echo "$as_me:$LINENO: result: no" >&5
12208 echo "${ECHO_T}no" >&6
12209 fi
12210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12211
12212
12213 for ac_func in rl_completion_matches rl_filename_completion_function
12214 do
12215 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12216 echo "$as_me:$LINENO: checking for $ac_func" >&5
12217 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12218 if eval "test \"\${$as_ac_var+set}\" = set"; then
12219   echo $ECHO_N "(cached) $ECHO_C" >&6
12220 else
12221   cat >conftest.$ac_ext <<_ACEOF
12222 #line $LINENO "configure"
12223 #include "confdefs.h"
12224 /* System header to define __stub macros and hopefully few prototypes,
12225     which can conflict with char $ac_func (); below.  */
12226 #include <assert.h>
12227 /* Override any gcc2 internal prototype to avoid an error.  */
12228 #ifdef __cplusplus
12229 extern "C"
12230 #endif
12231 /* We use char because int might match the return type of a gcc2
12232    builtin and then its argument prototype would still apply.  */
12233 char $ac_func ();
12234 char (*f) ();
12235
12236 #ifdef F77_DUMMY_MAIN
12237 #  ifdef __cplusplus
12238      extern "C"
12239 #  endif
12240    int F77_DUMMY_MAIN() { return 1; }
12241 #endif
12242 int
12243 main ()
12244 {
12245 /* The GNU C library defines this for functions which it implements
12246     to always fail with ENOSYS.  Some functions are actually named
12247     something starting with __ and the normal name is an alias.  */
12248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12249 choke me
12250 #else
12251 f = $ac_func;
12252 #endif
12253
12254   ;
12255   return 0;
12256 }
12257 _ACEOF
12258 rm -f conftest.$ac_objext conftest$ac_exeext
12259 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12260   (eval $ac_link) 2>&5
12261   ac_status=$?
12262   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12263   (exit $ac_status); } &&
12264          { ac_try='test -s conftest$ac_exeext'
12265   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12266   (eval $ac_try) 2>&5
12267   ac_status=$?
12268   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269   (exit $ac_status); }; }; then
12270   eval "$as_ac_var=yes"
12271 else
12272   echo "$as_me: failed program was:" >&5
12273 cat conftest.$ac_ext >&5
12274 eval "$as_ac_var=no"
12275 fi
12276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12277 fi
12278 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12279 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12280 if test `eval echo '${'$as_ac_var'}'` = yes; then
12281   cat >>confdefs.h <<_ACEOF
12282 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12283 _ACEOF
12284
12285 fi
12286 done
12287
12288
12289 for ac_func in replace_history_entry
12290 do
12291 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12292 echo "$as_me:$LINENO: checking for $ac_func" >&5
12293 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12294 if eval "test \"\${$as_ac_var+set}\" = set"; then
12295   echo $ECHO_N "(cached) $ECHO_C" >&6
12296 else
12297   cat >conftest.$ac_ext <<_ACEOF
12298 #line $LINENO "configure"
12299 #include "confdefs.h"
12300 /* System header to define __stub macros and hopefully few prototypes,
12301     which can conflict with char $ac_func (); below.  */
12302 #include <assert.h>
12303 /* Override any gcc2 internal prototype to avoid an error.  */
12304 #ifdef __cplusplus
12305 extern "C"
12306 #endif
12307 /* We use char because int might match the return type of a gcc2
12308    builtin and then its argument prototype would still apply.  */
12309 char $ac_func ();
12310 char (*f) ();
12311
12312 #ifdef F77_DUMMY_MAIN
12313 #  ifdef __cplusplus
12314      extern "C"
12315 #  endif
12316    int F77_DUMMY_MAIN() { return 1; }
12317 #endif
12318 int
12319 main ()
12320 {
12321 /* The GNU C library defines this for functions which it implements
12322     to always fail with ENOSYS.  Some functions are actually named
12323     something starting with __ and the normal name is an alias.  */
12324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12325 choke me
12326 #else
12327 f = $ac_func;
12328 #endif
12329
12330   ;
12331   return 0;
12332 }
12333 _ACEOF
12334 rm -f conftest.$ac_objext conftest$ac_exeext
12335 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12336   (eval $ac_link) 2>&5
12337   ac_status=$?
12338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12339   (exit $ac_status); } &&
12340          { ac_try='test -s conftest$ac_exeext'
12341   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12342   (eval $ac_try) 2>&5
12343   ac_status=$?
12344   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12345   (exit $ac_status); }; }; then
12346   eval "$as_ac_var=yes"
12347 else
12348   echo "$as_me: failed program was:" >&5
12349 cat conftest.$ac_ext >&5
12350 eval "$as_ac_var=no"
12351 fi
12352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12353 fi
12354 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12355 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12356 if test `eval echo '${'$as_ac_var'}'` = yes; then
12357   cat >>confdefs.h <<_ACEOF
12358 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12359 _ACEOF
12360
12361 fi
12362 done
12363
12364 fi
12365
12366
12367 echo "$as_me:$LINENO: checking for finite" >&5
12368 echo $ECHO_N "checking for finite... $ECHO_C" >&6
12369 cat >conftest.$ac_ext <<_ACEOF
12370 #line $LINENO "configure"
12371 #include "confdefs.h"
12372 #include <math.h>
12373 #ifdef F77_DUMMY_MAIN
12374 #  ifdef __cplusplus
12375      extern "C"
12376 #  endif
12377    int F77_DUMMY_MAIN() { return 1; }
12378 #endif
12379 int
12380 main ()
12381 {
12382 int dummy=finite(1.0);
12383   ;
12384   return 0;
12385 }
12386 _ACEOF
12387 rm -f conftest.$ac_objext conftest$ac_exeext
12388 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12389   (eval $ac_link) 2>&5
12390   ac_status=$?
12391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12392   (exit $ac_status); } &&
12393          { ac_try='test -s conftest$ac_exeext'
12394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12395   (eval $ac_try) 2>&5
12396   ac_status=$?
12397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12398   (exit $ac_status); }; }; then
12399
12400 cat >>confdefs.h <<\_ACEOF
12401 #define HAVE_FINITE 1
12402 _ACEOF
12403
12404 echo "$as_me:$LINENO: result: yes" >&5
12405 echo "${ECHO_T}yes" >&6
12406 else
12407   echo "$as_me: failed program was:" >&5
12408 cat conftest.$ac_ext >&5
12409 echo "$as_me:$LINENO: result: no" >&5
12410 echo "${ECHO_T}no" >&6
12411 fi
12412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12413
12414 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
12415 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
12416 cat >conftest.$ac_ext <<_ACEOF
12417 #line $LINENO "configure"
12418 #include "confdefs.h"
12419 #include <setjmp.h>
12420 #ifdef F77_DUMMY_MAIN
12421 #  ifdef __cplusplus
12422      extern "C"
12423 #  endif
12424    int F77_DUMMY_MAIN() { return 1; }
12425 #endif
12426 int
12427 main ()
12428 {
12429 sigjmp_buf x; sigsetjmp(x, 1);
12430   ;
12431   return 0;
12432 }
12433 _ACEOF
12434 rm -f conftest.$ac_objext conftest$ac_exeext
12435 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12436   (eval $ac_link) 2>&5
12437   ac_status=$?
12438   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439   (exit $ac_status); } &&
12440          { ac_try='test -s conftest$ac_exeext'
12441   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12442   (eval $ac_try) 2>&5
12443   ac_status=$?
12444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12445   (exit $ac_status); }; }; then
12446
12447 cat >>confdefs.h <<\_ACEOF
12448 #define HAVE_SIGSETJMP 1
12449 _ACEOF
12450
12451 echo "$as_me:$LINENO: result: yes" >&5
12452 echo "${ECHO_T}yes" >&6
12453 else
12454   echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 echo "$as_me:$LINENO: result: no" >&5
12457 echo "${ECHO_T}no" >&6
12458 fi
12459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12460
12461 echo "$as_me:$LINENO: checking for syslog" >&5
12462 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
12463 if test "${ac_cv_func_syslog+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466   cat >conftest.$ac_ext <<_ACEOF
12467 #line $LINENO "configure"
12468 #include "confdefs.h"
12469 /* System header to define __stub macros and hopefully few prototypes,
12470     which can conflict with char syslog (); below.  */
12471 #include <assert.h>
12472 /* Override any gcc2 internal prototype to avoid an error.  */
12473 #ifdef __cplusplus
12474 extern "C"
12475 #endif
12476 /* We use char because int might match the return type of a gcc2
12477    builtin and then its argument prototype would still apply.  */
12478 char syslog ();
12479 char (*f) ();
12480
12481 #ifdef F77_DUMMY_MAIN
12482 #  ifdef __cplusplus
12483      extern "C"
12484 #  endif
12485    int F77_DUMMY_MAIN() { return 1; }
12486 #endif
12487 int
12488 main ()
12489 {
12490 /* The GNU C library defines this for functions which it implements
12491     to always fail with ENOSYS.  Some functions are actually named
12492     something starting with __ and the normal name is an alias.  */
12493 #if defined (__stub_syslog) || defined (__stub___syslog)
12494 choke me
12495 #else
12496 f = syslog;
12497 #endif
12498
12499   ;
12500   return 0;
12501 }
12502 _ACEOF
12503 rm -f conftest.$ac_objext conftest$ac_exeext
12504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12505   (eval $ac_link) 2>&5
12506   ac_status=$?
12507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12508   (exit $ac_status); } &&
12509          { ac_try='test -s conftest$ac_exeext'
12510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12511   (eval $ac_try) 2>&5
12512   ac_status=$?
12513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12514   (exit $ac_status); }; }; then
12515   ac_cv_func_syslog=yes
12516 else
12517   echo "$as_me: failed program was:" >&5
12518 cat conftest.$ac_ext >&5
12519 ac_cv_func_syslog=no
12520 fi
12521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12522 fi
12523 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
12524 echo "${ECHO_T}$ac_cv_func_syslog" >&6
12525 if test $ac_cv_func_syslog = yes; then
12526   if test "${ac_cv_header_syslog_h+set}" = set; then
12527   echo "$as_me:$LINENO: checking for syslog.h" >&5
12528 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
12529 if test "${ac_cv_header_syslog_h+set}" = set; then
12530   echo $ECHO_N "(cached) $ECHO_C" >&6
12531 fi
12532 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
12533 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
12534 else
12535   # Is the header compilable?
12536 echo "$as_me:$LINENO: checking syslog.h usability" >&5
12537 echo $ECHO_N "checking syslog.h usability... $ECHO_C" >&6
12538 cat >conftest.$ac_ext <<_ACEOF
12539 #line $LINENO "configure"
12540 #include "confdefs.h"
12541 $ac_includes_default
12542 #include <syslog.h>
12543 _ACEOF
12544 rm -f conftest.$ac_objext
12545 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12546   (eval $ac_compile) 2>&5
12547   ac_status=$?
12548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12549   (exit $ac_status); } &&
12550          { ac_try='test -s conftest.$ac_objext'
12551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12552   (eval $ac_try) 2>&5
12553   ac_status=$?
12554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12555   (exit $ac_status); }; }; then
12556   ac_header_compiler=yes
12557 else
12558   echo "$as_me: failed program was:" >&5
12559 cat conftest.$ac_ext >&5
12560 ac_header_compiler=no
12561 fi
12562 rm -f conftest.$ac_objext conftest.$ac_ext
12563 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12564 echo "${ECHO_T}$ac_header_compiler" >&6
12565
12566 # Is the header present?
12567 echo "$as_me:$LINENO: checking syslog.h presence" >&5
12568 echo $ECHO_N "checking syslog.h presence... $ECHO_C" >&6
12569 cat >conftest.$ac_ext <<_ACEOF
12570 #line $LINENO "configure"
12571 #include "confdefs.h"
12572 #include <syslog.h>
12573 _ACEOF
12574 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12576   ac_status=$?
12577   egrep -v '^ *\+' conftest.er1 >conftest.err
12578   rm -f conftest.er1
12579   cat conftest.err >&5
12580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581   (exit $ac_status); } >/dev/null; then
12582   if test -s conftest.err; then
12583     ac_cpp_err=$ac_c_preproc_warn_flag
12584   else
12585     ac_cpp_err=
12586   fi
12587 else
12588   ac_cpp_err=yes
12589 fi
12590 if test -z "$ac_cpp_err"; then
12591   ac_header_preproc=yes
12592 else
12593   echo "$as_me: failed program was:" >&5
12594   cat conftest.$ac_ext >&5
12595   ac_header_preproc=no
12596 fi
12597 rm -f conftest.err conftest.$ac_ext
12598 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12599 echo "${ECHO_T}$ac_header_preproc" >&6
12600
12601 # So?  What about this header?
12602 case $ac_header_compiler:$ac_header_preproc in
12603   yes:no )
12604     { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
12605 echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12606     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
12607 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
12608   no:yes )
12609     { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
12610 echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
12611     { echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
12612 echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
12613     { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
12614 echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
12615 esac
12616 echo "$as_me:$LINENO: checking for syslog.h" >&5
12617 echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
12618 if test "${ac_cv_header_syslog_h+set}" = set; then
12619   echo $ECHO_N "(cached) $ECHO_C" >&6
12620 else
12621   ac_cv_header_syslog_h=$ac_header_preproc
12622 fi
12623 echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
12624 echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
12625
12626 fi
12627 if test $ac_cv_header_syslog_h = yes; then
12628
12629 cat >>confdefs.h <<\_ACEOF
12630 #define HAVE_SYSLOG 1
12631 _ACEOF
12632
12633 fi
12634
12635
12636 fi
12637
12638
12639 echo "$as_me:$LINENO: checking for optreset" >&5
12640 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
12641 if test "${pgac_cv_var_int_optreset+set}" = set; then
12642   echo $ECHO_N "(cached) $ECHO_C" >&6
12643 else
12644   cat >conftest.$ac_ext <<_ACEOF
12645 #line $LINENO "configure"
12646 #include "confdefs.h"
12647 #include <unistd.h>
12648 #ifdef F77_DUMMY_MAIN
12649 #  ifdef __cplusplus
12650      extern "C"
12651 #  endif
12652    int F77_DUMMY_MAIN() { return 1; }
12653 #endif
12654 int
12655 main ()
12656 {
12657 extern int optreset; optreset = 1;
12658   ;
12659   return 0;
12660 }
12661 _ACEOF
12662 rm -f conftest.$ac_objext conftest$ac_exeext
12663 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12664   (eval $ac_link) 2>&5
12665   ac_status=$?
12666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667   (exit $ac_status); } &&
12668          { ac_try='test -s conftest$ac_exeext'
12669   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12670   (eval $ac_try) 2>&5
12671   ac_status=$?
12672   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12673   (exit $ac_status); }; }; then
12674   pgac_cv_var_int_optreset=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677 cat conftest.$ac_ext >&5
12678 pgac_cv_var_int_optreset=no
12679 fi
12680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12681 fi
12682 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
12683 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
12684 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
12685
12686 cat >>confdefs.h <<\_ACEOF
12687 #define HAVE_INT_OPTRESET 1
12688 _ACEOF
12689
12690 fi
12691
12692
12693
12694 for ac_func in strtoll strtoq
12695 do
12696 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12697 echo "$as_me:$LINENO: checking for $ac_func" >&5
12698 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12699 if eval "test \"\${$as_ac_var+set}\" = set"; then
12700   echo $ECHO_N "(cached) $ECHO_C" >&6
12701 else
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line $LINENO "configure"
12704 #include "confdefs.h"
12705 /* System header to define __stub macros and hopefully few prototypes,
12706     which can conflict with char $ac_func (); below.  */
12707 #include <assert.h>
12708 /* Override any gcc2 internal prototype to avoid an error.  */
12709 #ifdef __cplusplus
12710 extern "C"
12711 #endif
12712 /* We use char because int might match the return type of a gcc2
12713    builtin and then its argument prototype would still apply.  */
12714 char $ac_func ();
12715 char (*f) ();
12716
12717 #ifdef F77_DUMMY_MAIN
12718 #  ifdef __cplusplus
12719      extern "C"
12720 #  endif
12721    int F77_DUMMY_MAIN() { return 1; }
12722 #endif
12723 int
12724 main ()
12725 {
12726 /* The GNU C library defines this for functions which it implements
12727     to always fail with ENOSYS.  Some functions are actually named
12728     something starting with __ and the normal name is an alias.  */
12729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12730 choke me
12731 #else
12732 f = $ac_func;
12733 #endif
12734
12735   ;
12736   return 0;
12737 }
12738 _ACEOF
12739 rm -f conftest.$ac_objext conftest$ac_exeext
12740 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12741   (eval $ac_link) 2>&5
12742   ac_status=$?
12743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744   (exit $ac_status); } &&
12745          { ac_try='test -s conftest$ac_exeext'
12746   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12750   (exit $ac_status); }; }; then
12751   eval "$as_ac_var=yes"
12752 else
12753   echo "$as_me: failed program was:" >&5
12754 cat conftest.$ac_ext >&5
12755 eval "$as_ac_var=no"
12756 fi
12757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12758 fi
12759 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12760 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12761 if test `eval echo '${'$as_ac_var'}'` = yes; then
12762   cat >>confdefs.h <<_ACEOF
12763 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12764 _ACEOF
12765  break
12766 fi
12767 done
12768
12769
12770
12771 for ac_func in strtoull strtouq
12772 do
12773 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12774 echo "$as_me:$LINENO: checking for $ac_func" >&5
12775 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12776 if eval "test \"\${$as_ac_var+set}\" = set"; then
12777   echo $ECHO_N "(cached) $ECHO_C" >&6
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 #line $LINENO "configure"
12781 #include "confdefs.h"
12782 /* System header to define __stub macros and hopefully few prototypes,
12783     which can conflict with char $ac_func (); below.  */
12784 #include <assert.h>
12785 /* Override any gcc2 internal prototype to avoid an error.  */
12786 #ifdef __cplusplus
12787 extern "C"
12788 #endif
12789 /* We use char because int might match the return type of a gcc2
12790    builtin and then its argument prototype would still apply.  */
12791 char $ac_func ();
12792 char (*f) ();
12793
12794 #ifdef F77_DUMMY_MAIN
12795 #  ifdef __cplusplus
12796      extern "C"
12797 #  endif
12798    int F77_DUMMY_MAIN() { return 1; }
12799 #endif
12800 int
12801 main ()
12802 {
12803 /* The GNU C library defines this for functions which it implements
12804     to always fail with ENOSYS.  Some functions are actually named
12805     something starting with __ and the normal name is an alias.  */
12806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12807 choke me
12808 #else
12809 f = $ac_func;
12810 #endif
12811
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 rm -f conftest.$ac_objext conftest$ac_exeext
12817 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12818   (eval $ac_link) 2>&5
12819   ac_status=$?
12820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821   (exit $ac_status); } &&
12822          { ac_try='test -s conftest$ac_exeext'
12823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824   (eval $ac_try) 2>&5
12825   ac_status=$?
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); }; }; then
12828   eval "$as_ac_var=yes"
12829 else
12830   echo "$as_me: failed program was:" >&5
12831 cat conftest.$ac_ext >&5
12832 eval "$as_ac_var=no"
12833 fi
12834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12835 fi
12836 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12837 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12838 if test `eval echo '${'$as_ac_var'}'` = yes; then
12839   cat >>confdefs.h <<_ACEOF
12840 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12841 _ACEOF
12842  break
12843 fi
12844 done
12845
12846
12847 # Check for one of atexit() or on_exit()
12848
12849 for ac_func in atexit
12850 do
12851 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12852 echo "$as_me:$LINENO: checking for $ac_func" >&5
12853 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12854 if eval "test \"\${$as_ac_var+set}\" = set"; then
12855   echo $ECHO_N "(cached) $ECHO_C" >&6
12856 else
12857   cat >conftest.$ac_ext <<_ACEOF
12858 #line $LINENO "configure"
12859 #include "confdefs.h"
12860 /* System header to define __stub macros and hopefully few prototypes,
12861     which can conflict with char $ac_func (); below.  */
12862 #include <assert.h>
12863 /* Override any gcc2 internal prototype to avoid an error.  */
12864 #ifdef __cplusplus
12865 extern "C"
12866 #endif
12867 /* We use char because int might match the return type of a gcc2
12868    builtin and then its argument prototype would still apply.  */
12869 char $ac_func ();
12870 char (*f) ();
12871
12872 #ifdef F77_DUMMY_MAIN
12873 #  ifdef __cplusplus
12874      extern "C"
12875 #  endif
12876    int F77_DUMMY_MAIN() { return 1; }
12877 #endif
12878 int
12879 main ()
12880 {
12881 /* The GNU C library defines this for functions which it implements
12882     to always fail with ENOSYS.  Some functions are actually named
12883     something starting with __ and the normal name is an alias.  */
12884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12885 choke me
12886 #else
12887 f = $ac_func;
12888 #endif
12889
12890   ;
12891   return 0;
12892 }
12893 _ACEOF
12894 rm -f conftest.$ac_objext conftest$ac_exeext
12895 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12896   (eval $ac_link) 2>&5
12897   ac_status=$?
12898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12899   (exit $ac_status); } &&
12900          { ac_try='test -s conftest$ac_exeext'
12901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12905   (exit $ac_status); }; }; then
12906   eval "$as_ac_var=yes"
12907 else
12908   echo "$as_me: failed program was:" >&5
12909 cat conftest.$ac_ext >&5
12910 eval "$as_ac_var=no"
12911 fi
12912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12913 fi
12914 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12915 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12916 if test `eval echo '${'$as_ac_var'}'` = yes; then
12917   cat >>confdefs.h <<_ACEOF
12918 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12919 _ACEOF
12920
12921 else
12922
12923 for ac_func in on_exit
12924 do
12925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12926 echo "$as_me:$LINENO: checking for $ac_func" >&5
12927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12928 if eval "test \"\${$as_ac_var+set}\" = set"; then
12929   echo $ECHO_N "(cached) $ECHO_C" >&6
12930 else
12931   cat >conftest.$ac_ext <<_ACEOF
12932 #line $LINENO "configure"
12933 #include "confdefs.h"
12934 /* System header to define __stub macros and hopefully few prototypes,
12935     which can conflict with char $ac_func (); below.  */
12936 #include <assert.h>
12937 /* Override any gcc2 internal prototype to avoid an error.  */
12938 #ifdef __cplusplus
12939 extern "C"
12940 #endif
12941 /* We use char because int might match the return type of a gcc2
12942    builtin and then its argument prototype would still apply.  */
12943 char $ac_func ();
12944 char (*f) ();
12945
12946 #ifdef F77_DUMMY_MAIN
12947 #  ifdef __cplusplus
12948      extern "C"
12949 #  endif
12950    int F77_DUMMY_MAIN() { return 1; }
12951 #endif
12952 int
12953 main ()
12954 {
12955 /* The GNU C library defines this for functions which it implements
12956     to always fail with ENOSYS.  Some functions are actually named
12957     something starting with __ and the normal name is an alias.  */
12958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12959 choke me
12960 #else
12961 f = $ac_func;
12962 #endif
12963
12964   ;
12965   return 0;
12966 }
12967 _ACEOF
12968 rm -f conftest.$ac_objext conftest$ac_exeext
12969 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12970   (eval $ac_link) 2>&5
12971   ac_status=$?
12972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12973   (exit $ac_status); } &&
12974          { ac_try='test -s conftest$ac_exeext'
12975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12976   (eval $ac_try) 2>&5
12977   ac_status=$?
12978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12979   (exit $ac_status); }; }; then
12980   eval "$as_ac_var=yes"
12981 else
12982   echo "$as_me: failed program was:" >&5
12983 cat conftest.$ac_ext >&5
12984 eval "$as_ac_var=no"
12985 fi
12986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12987 fi
12988 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12989 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12990 if test `eval echo '${'$as_ac_var'}'` = yes; then
12991   cat >>confdefs.h <<_ACEOF
12992 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12993 _ACEOF
12994
12995 else
12996   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
12997 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
12998    { (exit 1); exit 1; }; }
12999 fi
13000 done
13001
13002 fi
13003 done
13004
13005
13006 echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13007 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13008 if test "${ac_cv_sys_largefile_source+set}" = set; then
13009   echo $ECHO_N "(cached) $ECHO_C" >&6
13010 else
13011   while :; do
13012   ac_cv_sys_largefile_source=no
13013   cat >conftest.$ac_ext <<_ACEOF
13014 #line $LINENO "configure"
13015 #include "confdefs.h"
13016 #include <stdio.h>
13017 #ifdef F77_DUMMY_MAIN
13018 #  ifdef __cplusplus
13019      extern "C"
13020 #  endif
13021    int F77_DUMMY_MAIN() { return 1; }
13022 #endif
13023 int
13024 main ()
13025 {
13026 return !fseeko;
13027   ;
13028   return 0;
13029 }
13030 _ACEOF
13031 rm -f conftest.$ac_objext
13032 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036   (exit $ac_status); } &&
13037          { ac_try='test -s conftest.$ac_objext'
13038   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13039   (eval $ac_try) 2>&5
13040   ac_status=$?
13041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13042   (exit $ac_status); }; }; then
13043   break
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 cat conftest.$ac_ext >&5
13047 fi
13048 rm -f conftest.$ac_objext conftest.$ac_ext
13049   cat >conftest.$ac_ext <<_ACEOF
13050 #line $LINENO "configure"
13051 #include "confdefs.h"
13052 #define _LARGEFILE_SOURCE 1
13053 #include <stdio.h>
13054 #ifdef F77_DUMMY_MAIN
13055 #  ifdef __cplusplus
13056      extern "C"
13057 #  endif
13058    int F77_DUMMY_MAIN() { return 1; }
13059 #endif
13060 int
13061 main ()
13062 {
13063 return !fseeko;
13064   ;
13065   return 0;
13066 }
13067 _ACEOF
13068 rm -f conftest.$ac_objext
13069 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13070   (eval $ac_compile) 2>&5
13071   ac_status=$?
13072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13073   (exit $ac_status); } &&
13074          { ac_try='test -s conftest.$ac_objext'
13075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13076   (eval $ac_try) 2>&5
13077   ac_status=$?
13078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079   (exit $ac_status); }; }; then
13080   ac_cv_sys_largefile_source=1; break
13081 else
13082   echo "$as_me: failed program was:" >&5
13083 cat conftest.$ac_ext >&5
13084 fi
13085 rm -f conftest.$ac_objext conftest.$ac_ext
13086   break
13087 done
13088 fi
13089 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
13090 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13091 if test "$ac_cv_sys_largefile_source" != no; then
13092
13093 cat >>confdefs.h <<_ACEOF
13094 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13095 _ACEOF
13096
13097 fi
13098 rm -f conftest*
13099
13100 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13101 # in glibc 2.1.3, but that breaks too many other things.
13102 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13103 echo "$as_me:$LINENO: checking for fseeko" >&5
13104 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13105 if test "${ac_cv_func_fseeko+set}" = set; then
13106   echo $ECHO_N "(cached) $ECHO_C" >&6
13107 else
13108   cat >conftest.$ac_ext <<_ACEOF
13109 #line $LINENO "configure"
13110 #include "confdefs.h"
13111 #include <stdio.h>
13112 #ifdef F77_DUMMY_MAIN
13113 #  ifdef __cplusplus
13114      extern "C"
13115 #  endif
13116    int F77_DUMMY_MAIN() { return 1; }
13117 #endif
13118 int
13119 main ()
13120 {
13121 return fseeko && fseeko (stdin, 0, 0);
13122   ;
13123   return 0;
13124 }
13125 _ACEOF
13126 rm -f conftest.$ac_objext conftest$ac_exeext
13127 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13128   (eval $ac_link) 2>&5
13129   ac_status=$?
13130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131   (exit $ac_status); } &&
13132          { ac_try='test -s conftest$ac_exeext'
13133   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134   (eval $ac_try) 2>&5
13135   ac_status=$?
13136   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137   (exit $ac_status); }; }; then
13138   ac_cv_func_fseeko=yes
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 cat conftest.$ac_ext >&5
13142 ac_cv_func_fseeko=no
13143 fi
13144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13145 fi
13146 echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
13147 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13148 if test $ac_cv_func_fseeko = yes; then
13149
13150 cat >>confdefs.h <<\_ACEOF
13151 #define HAVE_FSEEKO 1
13152 _ACEOF
13153
13154 fi
13155
13156
13157 #
13158 # Pthreads
13159 #
13160 # For each platform, we need to know about any special compile and link
13161 # libraries, and whether the normal C function names are thread-safe.
13162 # See the comment at the top of src/port/thread.c for more information.
13163 #
13164 if test "$enable_thread_safety" = yes; then
13165 if test "${ac_cv_header_pthread_h+set}" = set; then
13166   echo "$as_me:$LINENO: checking for pthread.h" >&5
13167 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13168 if test "${ac_cv_header_pthread_h+set}" = set; then
13169   echo $ECHO_N "(cached) $ECHO_C" >&6
13170 fi
13171 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
13172 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13173 else
13174   # Is the header compilable?
13175 echo "$as_me:$LINENO: checking pthread.h usability" >&5
13176 echo $ECHO_N "checking pthread.h usability... $ECHO_C" >&6
13177 cat >conftest.$ac_ext <<_ACEOF
13178 #line $LINENO "configure"
13179 #include "confdefs.h"
13180 $ac_includes_default
13181 #include <pthread.h>
13182 _ACEOF
13183 rm -f conftest.$ac_objext
13184 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13185   (eval $ac_compile) 2>&5
13186   ac_status=$?
13187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13188   (exit $ac_status); } &&
13189          { ac_try='test -s conftest.$ac_objext'
13190   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13191   (eval $ac_try) 2>&5
13192   ac_status=$?
13193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13194   (exit $ac_status); }; }; then
13195   ac_header_compiler=yes
13196 else
13197   echo "$as_me: failed program was:" >&5
13198 cat conftest.$ac_ext >&5
13199 ac_header_compiler=no
13200 fi
13201 rm -f conftest.$ac_objext conftest.$ac_ext
13202 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13203 echo "${ECHO_T}$ac_header_compiler" >&6
13204
13205 # Is the header present?
13206 echo "$as_me:$LINENO: checking pthread.h presence" >&5
13207 echo $ECHO_N "checking pthread.h presence... $ECHO_C" >&6
13208 cat >conftest.$ac_ext <<_ACEOF
13209 #line $LINENO "configure"
13210 #include "confdefs.h"
13211 #include <pthread.h>
13212 _ACEOF
13213 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13214   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13215   ac_status=$?
13216   egrep -v '^ *\+' conftest.er1 >conftest.err
13217   rm -f conftest.er1
13218   cat conftest.err >&5
13219   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13220   (exit $ac_status); } >/dev/null; then
13221   if test -s conftest.err; then
13222     ac_cpp_err=$ac_c_preproc_warn_flag
13223   else
13224     ac_cpp_err=
13225   fi
13226 else
13227   ac_cpp_err=yes
13228 fi
13229 if test -z "$ac_cpp_err"; then
13230   ac_header_preproc=yes
13231 else
13232   echo "$as_me: failed program was:" >&5
13233   cat conftest.$ac_ext >&5
13234   ac_header_preproc=no
13235 fi
13236 rm -f conftest.err conftest.$ac_ext
13237 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13238 echo "${ECHO_T}$ac_header_preproc" >&6
13239
13240 # So?  What about this header?
13241 case $ac_header_compiler:$ac_header_preproc in
13242   yes:no )
13243     { echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
13244 echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
13245     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
13246 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};;
13247   no:yes )
13248     { echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
13249 echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
13250     { echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
13251 echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
13252     { echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
13253 echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;};;
13254 esac
13255 echo "$as_me:$LINENO: checking for pthread.h" >&5
13256 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13257 if test "${ac_cv_header_pthread_h+set}" = set; then
13258   echo $ECHO_N "(cached) $ECHO_C" >&6
13259 else
13260   ac_cv_header_pthread_h=$ac_header_preproc
13261 fi
13262 echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
13263 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13264
13265 fi
13266 if test $ac_cv_header_pthread_h = yes; then
13267   :
13268 else
13269   { { echo "$as_me:$LINENO: error: pthread.h not found, required for --enable-thread-safetys" >&5
13270 echo "$as_me: error: pthread.h not found, required for --enable-thread-safetys" >&2;}
13271    { (exit 1); exit 1; }; }
13272 fi
13273
13274
13275
13276 if test "$SUPPORTS_THREADS" != yes; then
13277 { { echo "$as_me:$LINENO: error:
13278 Cannot enable threads on your platform.
13279 Please report your platform threading info to the PostgreSQL mailing lists
13280 so it can be added to the next release.  Report all compile flags, link flags,
13281 functions, or libraries required for threading support.
13282 See the comment at the top of src/port/thread.c for more information.
13283 " >&5
13284 echo "$as_me: error:
13285 Cannot enable threads on your platform.
13286 Please report your platform threading info to the PostgreSQL mailing lists
13287 so it can be added to the next release.  Report all compile flags, link flags,
13288 functions, or libraries required for threading support.
13289 See the comment at the top of src/port/thread.c for more information.
13290 " >&2;}
13291    { (exit 1); exit 1; }; }
13292 fi
13293 else
13294 # do not use values from template file
13295 THREAD_CFLAGS=
13296 THREAD_LIBS=
13297 fi
13298
13299
13300
13301
13302 #
13303 # Check for re-entrant versions of certain functions
13304 #
13305 # Include special flags if threads are enabled _and_ if required for
13306 # threading on this platform.  Some platforms have *_r functions but
13307 # their natively named funcs are threadsafe, and should be used instead.
13308 #
13309 # One trick here is that if we don't call AC_CHECK_FUNCS, the
13310 # functions are marked "not found", which is perfect.
13311 #
13312 if test "$enable_thread_safety" = yes -a "$NEED_REENTRANT_FUNCS" = yes ; then
13313 _CFLAGS="$CFLAGS"
13314 _LIBS="$LIBS"
13315 CFLAGS="$CFLAGS $THREAD_CFLAGS"
13316 LIBS="$LIBS $THREAD_LIBS"
13317
13318
13319
13320 for ac_func in strerror_r getpwuid_r gethostbyname_r
13321 do
13322 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13323 echo "$as_me:$LINENO: checking for $ac_func" >&5
13324 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13325 if eval "test \"\${$as_ac_var+set}\" = set"; then
13326   echo $ECHO_N "(cached) $ECHO_C" >&6
13327 else
13328   cat >conftest.$ac_ext <<_ACEOF
13329 #line $LINENO "configure"
13330 #include "confdefs.h"
13331 /* System header to define __stub macros and hopefully few prototypes,
13332     which can conflict with char $ac_func (); below.  */
13333 #include <assert.h>
13334 /* Override any gcc2 internal prototype to avoid an error.  */
13335 #ifdef __cplusplus
13336 extern "C"
13337 #endif
13338 /* We use char because int might match the return type of a gcc2
13339    builtin and then its argument prototype would still apply.  */
13340 char $ac_func ();
13341 char (*f) ();
13342
13343 #ifdef F77_DUMMY_MAIN
13344 #  ifdef __cplusplus
13345      extern "C"
13346 #  endif
13347    int F77_DUMMY_MAIN() { return 1; }
13348 #endif
13349 int
13350 main ()
13351 {
13352 /* The GNU C library defines this for functions which it implements
13353     to always fail with ENOSYS.  Some functions are actually named
13354     something starting with __ and the normal name is an alias.  */
13355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13356 choke me
13357 #else
13358 f = $ac_func;
13359 #endif
13360
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext conftest$ac_exeext
13366 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13367   (eval $ac_link) 2>&5
13368   ac_status=$?
13369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13370   (exit $ac_status); } &&
13371          { ac_try='test -s conftest$ac_exeext'
13372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   eval "$as_ac_var=yes"
13378 else
13379   echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 eval "$as_ac_var=no"
13382 fi
13383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13384 fi
13385 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13386 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13387 if test `eval echo '${'$as_ac_var'}'` = yes; then
13388   cat >>confdefs.h <<_ACEOF
13389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13390 _ACEOF
13391
13392 fi
13393 done
13394
13395 CFLAGS="$_CFLAGS"
13396 LIBS="$_LIBS"
13397 fi
13398
13399
13400 # This test makes sure that run tests work at all.  Sometimes a shared
13401 # library is found by the linker, but the runtime linker can't find it.
13402 # This check should come after all modifications of compiler or linker
13403 # variables, and before any other run tests.
13404 echo "$as_me:$LINENO: checking test program" >&5
13405 echo $ECHO_N "checking test program... $ECHO_C" >&6
13406 if test "$cross_compiling" = yes; then
13407   echo "$as_me:$LINENO: result: cross-compiling" >&5
13408 echo "${ECHO_T}cross-compiling" >&6
13409 else
13410   cat >conftest.$ac_ext <<_ACEOF
13411 #line $LINENO "configure"
13412 #include "confdefs.h"
13413 int main() { return 0; }
13414 _ACEOF
13415 rm -f conftest$ac_exeext
13416 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13417   (eval $ac_link) 2>&5
13418   ac_status=$?
13419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13420   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13421   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13422   (eval $ac_try) 2>&5
13423   ac_status=$?
13424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13425   (exit $ac_status); }; }; then
13426   echo "$as_me:$LINENO: result: ok" >&5
13427 echo "${ECHO_T}ok" >&6
13428 else
13429   echo "$as_me: program exited with status $ac_status" >&5
13430 echo "$as_me: failed program was:" >&5
13431 cat conftest.$ac_ext >&5
13432 ( exit $ac_status )
13433 echo "$as_me:$LINENO: result: failed" >&5
13434 echo "${ECHO_T}failed" >&6
13435 { { echo "$as_me:$LINENO: error:
13436 *** Could not execute a simple test program.  This may be a problem
13437 *** related to locating shared libraries.  Check the file 'config.log'
13438 *** for the exact reason." >&5
13439 echo "$as_me: error:
13440 *** Could not execute a simple test program.  This may be a problem
13441 *** related to locating shared libraries.  Check the file 'config.log'
13442 *** for the exact reason." >&2;}
13443    { (exit 1); exit 1; }; }
13444 fi
13445 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13446 fi
13447
13448
13449
13450 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
13451 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
13452 if test "${pgac_cv_type_long_int_64+set}" = set; then
13453   echo $ECHO_N "(cached) $ECHO_C" >&6
13454 else
13455   if test "$cross_compiling" = yes; then
13456   # If cross-compiling, check the size reported by the compiler and
13457 # trust that the arithmetic works.
13458 cat >conftest.$ac_ext <<_ACEOF
13459 #line $LINENO "configure"
13460 #include "confdefs.h"
13461
13462 #ifdef F77_DUMMY_MAIN
13463 #  ifdef __cplusplus
13464      extern "C"
13465 #  endif
13466    int F77_DUMMY_MAIN() { return 1; }
13467 #endif
13468 int
13469 main ()
13470 {
13471 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13472 test_array [0] = 0
13473
13474   ;
13475   return 0;
13476 }
13477 _ACEOF
13478 rm -f conftest.$ac_objext
13479 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13480   (eval $ac_compile) 2>&5
13481   ac_status=$?
13482   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13483   (exit $ac_status); } &&
13484          { ac_try='test -s conftest.$ac_objext'
13485   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13486   (eval $ac_try) 2>&5
13487   ac_status=$?
13488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13489   (exit $ac_status); }; }; then
13490   pgac_cv_type_long_int_64=yes
13491 else
13492   echo "$as_me: failed program was:" >&5
13493 cat conftest.$ac_ext >&5
13494 pgac_cv_type_long_int_64=no
13495 fi
13496 rm -f conftest.$ac_objext conftest.$ac_ext
13497 else
13498   cat >conftest.$ac_ext <<_ACEOF
13499 #line $LINENO "configure"
13500 #include "confdefs.h"
13501 typedef long int int64;
13502
13503 /*
13504  * These are globals to discourage the compiler from folding all the
13505  * arithmetic tests down to compile-time constants.
13506  */
13507 int64 a = 20000001;
13508 int64 b = 40000005;
13509
13510 int does_int64_work()
13511 {
13512   int64 c,d;
13513
13514   if (sizeof(int64) != 8)
13515     return 0;                   /* definitely not the right size */
13516
13517   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13518   c = a * b;
13519   d = (c + b) / b;
13520   if (d != a+1)
13521     return 0;
13522   return 1;
13523 }
13524 main() {
13525   exit(! does_int64_work());
13526 }
13527 _ACEOF
13528 rm -f conftest$ac_exeext
13529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13530   (eval $ac_link) 2>&5
13531   ac_status=$?
13532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13533   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13535   (eval $ac_try) 2>&5
13536   ac_status=$?
13537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538   (exit $ac_status); }; }; then
13539   pgac_cv_type_long_int_64=yes
13540 else
13541   echo "$as_me: program exited with status $ac_status" >&5
13542 echo "$as_me: failed program was:" >&5
13543 cat conftest.$ac_ext >&5
13544 ( exit $ac_status )
13545 pgac_cv_type_long_int_64=no
13546 fi
13547 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13548 fi
13549 fi
13550 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
13551 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
13552
13553 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13554 if test x"$pgac_cv_type_long_int_64" = xyes ; then
13555
13556 cat >>confdefs.h <<\_ACEOF
13557 #define HAVE_LONG_INT_64
13558 _ACEOF
13559
13560 fi
13561
13562
13563 if test x"$HAVE_LONG_INT_64" = x"no" ; then
13564   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
13565 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
13566 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
13567   echo $ECHO_N "(cached) $ECHO_C" >&6
13568 else
13569   if test "$cross_compiling" = yes; then
13570   # If cross-compiling, check the size reported by the compiler and
13571 # trust that the arithmetic works.
13572 cat >conftest.$ac_ext <<_ACEOF
13573 #line $LINENO "configure"
13574 #include "confdefs.h"
13575
13576 #ifdef F77_DUMMY_MAIN
13577 #  ifdef __cplusplus
13578      extern "C"
13579 #  endif
13580    int F77_DUMMY_MAIN() { return 1; }
13581 #endif
13582 int
13583 main ()
13584 {
13585 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13586 test_array [0] = 0
13587
13588   ;
13589   return 0;
13590 }
13591 _ACEOF
13592 rm -f conftest.$ac_objext
13593 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13594   (eval $ac_compile) 2>&5
13595   ac_status=$?
13596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13597   (exit $ac_status); } &&
13598          { ac_try='test -s conftest.$ac_objext'
13599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13600   (eval $ac_try) 2>&5
13601   ac_status=$?
13602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13603   (exit $ac_status); }; }; then
13604   pgac_cv_type_long_long_int_64=yes
13605 else
13606   echo "$as_me: failed program was:" >&5
13607 cat conftest.$ac_ext >&5
13608 pgac_cv_type_long_long_int_64=no
13609 fi
13610 rm -f conftest.$ac_objext conftest.$ac_ext
13611 else
13612   cat >conftest.$ac_ext <<_ACEOF
13613 #line $LINENO "configure"
13614 #include "confdefs.h"
13615 typedef long long int int64;
13616
13617 /*
13618  * These are globals to discourage the compiler from folding all the
13619  * arithmetic tests down to compile-time constants.
13620  */
13621 int64 a = 20000001;
13622 int64 b = 40000005;
13623
13624 int does_int64_work()
13625 {
13626   int64 c,d;
13627
13628   if (sizeof(int64) != 8)
13629     return 0;                   /* definitely not the right size */
13630
13631   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13632   c = a * b;
13633   d = (c + b) / b;
13634   if (d != a+1)
13635     return 0;
13636   return 1;
13637 }
13638 main() {
13639   exit(! does_int64_work());
13640 }
13641 _ACEOF
13642 rm -f conftest$ac_exeext
13643 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13644   (eval $ac_link) 2>&5
13645   ac_status=$?
13646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13648   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   pgac_cv_type_long_long_int_64=yes
13654 else
13655   echo "$as_me: program exited with status $ac_status" >&5
13656 echo "$as_me: failed program was:" >&5
13657 cat conftest.$ac_ext >&5
13658 ( exit $ac_status )
13659 pgac_cv_type_long_long_int_64=no
13660 fi
13661 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13662 fi
13663 fi
13664 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
13665 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
13666
13667 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13668 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13669
13670 cat >>confdefs.h <<\_ACEOF
13671 #define HAVE_LONG_LONG_INT_64
13672 _ACEOF
13673
13674 fi
13675
13676 fi
13677
13678
13679
13680 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
13681   cat >conftest.$ac_ext <<_ACEOF
13682 #line $LINENO "configure"
13683 #include "confdefs.h"
13684
13685 #define INT64CONST(x)  x##LL
13686 long long int foo = INT64CONST(0x1234567890123456);
13687
13688 #ifdef F77_DUMMY_MAIN
13689 #  ifdef __cplusplus
13690      extern "C"
13691 #  endif
13692    int F77_DUMMY_MAIN() { return 1; }
13693 #endif
13694 int
13695 main ()
13696 {
13697
13698   ;
13699   return 0;
13700 }
13701 _ACEOF
13702 rm -f conftest.$ac_objext
13703 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13704   (eval $ac_compile) 2>&5
13705   ac_status=$?
13706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13707   (exit $ac_status); } &&
13708          { ac_try='test -s conftest.$ac_objext'
13709   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13710   (eval $ac_try) 2>&5
13711   ac_status=$?
13712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713   (exit $ac_status); }; }; then
13714
13715 cat >>confdefs.h <<\_ACEOF
13716 #define HAVE_LL_CONSTANTS 1
13717 _ACEOF
13718
13719 else
13720   echo "$as_me: failed program was:" >&5
13721 cat conftest.$ac_ext >&5
13722 fi
13723 rm -f conftest.$ac_objext conftest.$ac_ext
13724 fi
13725
13726
13727 # If we found "long int" is 64 bits, assume snprintf handles it.  If
13728 # we found we need to use "long long int", better check.  We cope with
13729 # snprintfs that use either %lld, %qd, or %I64d as the format.  If
13730 # neither works, fall back to our own snprintf emulation (which we
13731 # know uses %lld).
13732
13733 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
13734   if test $pgac_need_repl_snprintf = no; then
13735     echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
13736 echo $ECHO_N "checking snprintf format for long long int... $ECHO_C" >&6
13737 if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
13738   echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740   for pgac_format in '%lld' '%qd' '%I64d'; do
13741 if test "$cross_compiling" = yes; then
13742   pgac_cv_snprintf_long_long_int_format=cross; break
13743 else
13744   cat >conftest.$ac_ext <<_ACEOF
13745 #line $LINENO "configure"
13746 #include "confdefs.h"
13747 #include <stdio.h>
13748 typedef long long int int64;
13749 #define INT64_FORMAT "$pgac_format"
13750
13751 int64 a = 20000001;
13752 int64 b = 40000005;
13753
13754 int does_int64_snprintf_work()
13755 {
13756   int64 c;
13757   char buf[100];
13758
13759   if (sizeof(int64) != 8)
13760     return 0;                   /* doesn't look like the right size */
13761
13762   c = a * b;
13763   snprintf(buf, 100, INT64_FORMAT, c);
13764   if (strcmp(buf, "800000140000005") != 0)
13765     return 0;                   /* either multiply or snprintf is busted */
13766   return 1;
13767 }
13768 main() {
13769   exit(! does_int64_snprintf_work());
13770 }
13771 _ACEOF
13772 rm -f conftest$ac_exeext
13773 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13774   (eval $ac_link) 2>&5
13775   ac_status=$?
13776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13777   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13778   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13779   (eval $ac_try) 2>&5
13780   ac_status=$?
13781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13782   (exit $ac_status); }; }; then
13783   pgac_cv_snprintf_long_long_int_format=$pgac_format; break
13784 else
13785   echo "$as_me: program exited with status $ac_status" >&5
13786 echo "$as_me: failed program was:" >&5
13787 cat conftest.$ac_ext >&5
13788 fi
13789 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13790 fi
13791 done
13792 fi
13793
13794 LONG_LONG_INT_FORMAT=''
13795
13796 case $pgac_cv_snprintf_long_long_int_format in
13797   cross) echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
13798 echo "${ECHO_T}cannot test (not on host machine)" >&6;;
13799   ?*)    echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
13800 echo "${ECHO_T}$pgac_cv_snprintf_long_long_int_format" >&6
13801          LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
13802   *)     echo "$as_me:$LINENO: result: none" >&5
13803 echo "${ECHO_T}none" >&6;;
13804 esac
13805     if test "$LONG_LONG_INT_FORMAT" = ""; then
13806       # Force usage of our own snprintf, since system snprintf is broken
13807       pgac_need_repl_snprintf=yes
13808       LONG_LONG_INT_FORMAT='%lld'
13809     fi
13810   else
13811     # Here if we previously decided we needed to use our own snprintf
13812     LONG_LONG_INT_FORMAT='%lld'
13813   fi
13814   INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
13815 else
13816   # Here if we are not using 'long long int' at all
13817   INT64_FORMAT='"%ld"'
13818 fi
13819
13820
13821 cat >>confdefs.h <<_ACEOF
13822 #define INT64_FORMAT $INT64_FORMAT
13823 _ACEOF
13824
13825
13826 if test $pgac_need_repl_snprintf = yes; then
13827   LIBOBJS="$LIBOBJS snprintf.$ac_objext"
13828 fi
13829
13830 # Need a #define for the size of Datum (unsigned long)
13831 echo "$as_me:$LINENO: checking for unsigned long" >&5
13832 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
13833 if test "${ac_cv_type_unsigned_long+set}" = set; then
13834   echo $ECHO_N "(cached) $ECHO_C" >&6
13835 else
13836   cat >conftest.$ac_ext <<_ACEOF
13837 #line $LINENO "configure"
13838 #include "confdefs.h"
13839 $ac_includes_default
13840 #ifdef F77_DUMMY_MAIN
13841 #  ifdef __cplusplus
13842      extern "C"
13843 #  endif
13844    int F77_DUMMY_MAIN() { return 1; }
13845 #endif
13846 int
13847 main ()
13848 {
13849 if ((unsigned long *) 0)
13850   return 0;
13851 if (sizeof (unsigned long))
13852   return 0;
13853   ;
13854   return 0;
13855 }
13856 _ACEOF
13857 rm -f conftest.$ac_objext
13858 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13859   (eval $ac_compile) 2>&5
13860   ac_status=$?
13861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13862   (exit $ac_status); } &&
13863          { ac_try='test -s conftest.$ac_objext'
13864   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13865   (eval $ac_try) 2>&5
13866   ac_status=$?
13867   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13868   (exit $ac_status); }; }; then
13869   ac_cv_type_unsigned_long=yes
13870 else
13871   echo "$as_me: failed program was:" >&5
13872 cat conftest.$ac_ext >&5
13873 ac_cv_type_unsigned_long=no
13874 fi
13875 rm -f conftest.$ac_objext conftest.$ac_ext
13876 fi
13877 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
13878 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
13879
13880 echo "$as_me:$LINENO: checking size of unsigned long" >&5
13881 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
13882 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
13883   echo $ECHO_N "(cached) $ECHO_C" >&6
13884 else
13885   if test "$ac_cv_type_unsigned_long" = yes; then
13886   # The cast to unsigned long works around a bug in the HP C Compiler
13887   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13888   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13889   # This bug is HP SR number 8606223364.
13890   if test "$cross_compiling" = yes; then
13891   # Depending upon the size, compute the lo and hi bounds.
13892 cat >conftest.$ac_ext <<_ACEOF
13893 #line $LINENO "configure"
13894 #include "confdefs.h"
13895 $ac_includes_default
13896 #ifdef F77_DUMMY_MAIN
13897 #  ifdef __cplusplus
13898      extern "C"
13899 #  endif
13900    int F77_DUMMY_MAIN() { return 1; }
13901 #endif
13902 int
13903 main ()
13904 {
13905 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
13906 test_array [0] = 0
13907
13908   ;
13909   return 0;
13910 }
13911 _ACEOF
13912 rm -f conftest.$ac_objext
13913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13914   (eval $ac_compile) 2>&5
13915   ac_status=$?
13916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13917   (exit $ac_status); } &&
13918          { ac_try='test -s conftest.$ac_objext'
13919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13920   (eval $ac_try) 2>&5
13921   ac_status=$?
13922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923   (exit $ac_status); }; }; then
13924   ac_lo=0 ac_mid=0
13925   while :; do
13926     cat >conftest.$ac_ext <<_ACEOF
13927 #line $LINENO "configure"
13928 #include "confdefs.h"
13929 $ac_includes_default
13930 #ifdef F77_DUMMY_MAIN
13931 #  ifdef __cplusplus
13932      extern "C"
13933 #  endif
13934    int F77_DUMMY_MAIN() { return 1; }
13935 #endif
13936 int
13937 main ()
13938 {
13939 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
13940 test_array [0] = 0
13941
13942   ;
13943   return 0;
13944 }
13945 _ACEOF
13946 rm -f conftest.$ac_objext
13947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13948   (eval $ac_compile) 2>&5
13949   ac_status=$?
13950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13951   (exit $ac_status); } &&
13952          { ac_try='test -s conftest.$ac_objext'
13953   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13954   (eval $ac_try) 2>&5
13955   ac_status=$?
13956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957   (exit $ac_status); }; }; then
13958   ac_hi=$ac_mid; break
13959 else
13960   echo "$as_me: failed program was:" >&5
13961 cat conftest.$ac_ext >&5
13962 ac_lo=`expr $ac_mid + 1`
13963                     if test $ac_lo -le $ac_mid; then
13964                       ac_lo= ac_hi=
13965                       break
13966                     fi
13967                     ac_mid=`expr 2 '*' $ac_mid + 1`
13968 fi
13969 rm -f conftest.$ac_objext conftest.$ac_ext
13970   done
13971 else
13972   echo "$as_me: failed program was:" >&5
13973 cat conftest.$ac_ext >&5
13974 cat >conftest.$ac_ext <<_ACEOF
13975 #line $LINENO "configure"
13976 #include "confdefs.h"
13977 $ac_includes_default
13978 #ifdef F77_DUMMY_MAIN
13979 #  ifdef __cplusplus
13980      extern "C"
13981 #  endif
13982    int F77_DUMMY_MAIN() { return 1; }
13983 #endif
13984 int
13985 main ()
13986 {
13987 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
13988 test_array [0] = 0
13989
13990   ;
13991   return 0;
13992 }
13993 _ACEOF
13994 rm -f conftest.$ac_objext
13995 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13996   (eval $ac_compile) 2>&5
13997   ac_status=$?
13998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13999   (exit $ac_status); } &&
14000          { ac_try='test -s conftest.$ac_objext'
14001   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14002   (eval $ac_try) 2>&5
14003   ac_status=$?
14004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14005   (exit $ac_status); }; }; then
14006   ac_hi=-1 ac_mid=-1
14007   while :; do
14008     cat >conftest.$ac_ext <<_ACEOF
14009 #line $LINENO "configure"
14010 #include "confdefs.h"
14011 $ac_includes_default
14012 #ifdef F77_DUMMY_MAIN
14013 #  ifdef __cplusplus
14014      extern "C"
14015 #  endif
14016    int F77_DUMMY_MAIN() { return 1; }
14017 #endif
14018 int
14019 main ()
14020 {
14021 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
14022 test_array [0] = 0
14023
14024   ;
14025   return 0;
14026 }
14027 _ACEOF
14028 rm -f conftest.$ac_objext
14029 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14030   (eval $ac_compile) 2>&5
14031   ac_status=$?
14032   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14033   (exit $ac_status); } &&
14034          { ac_try='test -s conftest.$ac_objext'
14035   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14036   (eval $ac_try) 2>&5
14037   ac_status=$?
14038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039   (exit $ac_status); }; }; then
14040   ac_lo=$ac_mid; break
14041 else
14042   echo "$as_me: failed program was:" >&5
14043 cat conftest.$ac_ext >&5
14044 ac_hi=`expr '(' $ac_mid ')' - 1`
14045                        if test $ac_mid -le $ac_hi; then
14046                          ac_lo= ac_hi=
14047                          break
14048                        fi
14049                        ac_mid=`expr 2 '*' $ac_mid`
14050 fi
14051 rm -f conftest.$ac_objext conftest.$ac_ext
14052   done
14053 else
14054   echo "$as_me: failed program was:" >&5
14055 cat conftest.$ac_ext >&5
14056 ac_lo= ac_hi=
14057 fi
14058 rm -f conftest.$ac_objext conftest.$ac_ext
14059 fi
14060 rm -f conftest.$ac_objext conftest.$ac_ext
14061 # Binary search between lo and hi bounds.
14062 while test "x$ac_lo" != "x$ac_hi"; do
14063   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14064   cat >conftest.$ac_ext <<_ACEOF
14065 #line $LINENO "configure"
14066 #include "confdefs.h"
14067 $ac_includes_default
14068 #ifdef F77_DUMMY_MAIN
14069 #  ifdef __cplusplus
14070      extern "C"
14071 #  endif
14072    int F77_DUMMY_MAIN() { return 1; }
14073 #endif
14074 int
14075 main ()
14076 {
14077 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
14078 test_array [0] = 0
14079
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 rm -f conftest.$ac_objext
14085 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14086   (eval $ac_compile) 2>&5
14087   ac_status=$?
14088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14089   (exit $ac_status); } &&
14090          { ac_try='test -s conftest.$ac_objext'
14091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14092   (eval $ac_try) 2>&5
14093   ac_status=$?
14094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095   (exit $ac_status); }; }; then
14096   ac_hi=$ac_mid
14097 else
14098   echo "$as_me: failed program was:" >&5
14099 cat conftest.$ac_ext >&5
14100 ac_lo=`expr '(' $ac_mid ')' + 1`
14101 fi
14102 rm -f conftest.$ac_objext conftest.$ac_ext
14103 done
14104 case $ac_lo in
14105 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
14106 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
14107 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
14108    { (exit 1); exit 1; }; } ;;
14109 esac
14110 else
14111   if test "$cross_compiling" = yes; then
14112   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14113 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14114    { (exit 1); exit 1; }; }
14115 else
14116   cat >conftest.$ac_ext <<_ACEOF
14117 #line $LINENO "configure"
14118 #include "confdefs.h"
14119 $ac_includes_default
14120 long longval () { return (long) (sizeof (unsigned long)); }
14121 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
14122 #include <stdio.h>
14123 #include <stdlib.h>
14124 #ifdef F77_DUMMY_MAIN
14125 #  ifdef __cplusplus
14126      extern "C"
14127 #  endif
14128    int F77_DUMMY_MAIN() { return 1; }
14129 #endif
14130 int
14131 main ()
14132 {
14133
14134   FILE *f = fopen ("conftest.val", "w");
14135   if (! f)
14136     exit (1);
14137   if (((long) (sizeof (unsigned long))) < 0)
14138     {
14139       long i = longval ();
14140       if (i != ((long) (sizeof (unsigned long))))
14141         exit (1);
14142       fprintf (f, "%ld\n", i);
14143     }
14144   else
14145     {
14146       unsigned long i = ulongval ();
14147       if (i != ((long) (sizeof (unsigned long))))
14148         exit (1);
14149       fprintf (f, "%lu\n", i);
14150     }
14151   exit (ferror (f) || fclose (f) != 0);
14152
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 rm -f conftest$ac_exeext
14158 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14159   (eval $ac_link) 2>&5
14160   ac_status=$?
14161   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14162   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14163   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14164   (eval $ac_try) 2>&5
14165   ac_status=$?
14166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14167   (exit $ac_status); }; }; then
14168   ac_cv_sizeof_unsigned_long=`cat conftest.val`
14169 else
14170   echo "$as_me: program exited with status $ac_status" >&5
14171 echo "$as_me: failed program was:" >&5
14172 cat conftest.$ac_ext >&5
14173 ( exit $ac_status )
14174 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
14175 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
14176    { (exit 1); exit 1; }; }
14177 fi
14178 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14179 fi
14180 fi
14181 rm -f conftest.val
14182 else
14183   ac_cv_sizeof_unsigned_long=0
14184 fi
14185 fi
14186 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
14187 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
14188 cat >>confdefs.h <<_ACEOF
14189 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
14190 _ACEOF
14191
14192
14193
14194 # Determine memory alignment requirements for the basic C data types.
14195
14196 echo "$as_me:$LINENO: checking for short" >&5
14197 echo $ECHO_N "checking for short... $ECHO_C" >&6
14198 if test "${ac_cv_type_short+set}" = set; then
14199   echo $ECHO_N "(cached) $ECHO_C" >&6
14200 else
14201   cat >conftest.$ac_ext <<_ACEOF
14202 #line $LINENO "configure"
14203 #include "confdefs.h"
14204 $ac_includes_default
14205 #ifdef F77_DUMMY_MAIN
14206 #  ifdef __cplusplus
14207      extern "C"
14208 #  endif
14209    int F77_DUMMY_MAIN() { return 1; }
14210 #endif
14211 int
14212 main ()
14213 {
14214 if ((short *) 0)
14215   return 0;
14216 if (sizeof (short))
14217   return 0;
14218   ;
14219   return 0;
14220 }
14221 _ACEOF
14222 rm -f conftest.$ac_objext
14223 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14224   (eval $ac_compile) 2>&5
14225   ac_status=$?
14226   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14227   (exit $ac_status); } &&
14228          { ac_try='test -s conftest.$ac_objext'
14229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230   (eval $ac_try) 2>&5
14231   ac_status=$?
14232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233   (exit $ac_status); }; }; then
14234   ac_cv_type_short=yes
14235 else
14236   echo "$as_me: failed program was:" >&5
14237 cat conftest.$ac_ext >&5
14238 ac_cv_type_short=no
14239 fi
14240 rm -f conftest.$ac_objext conftest.$ac_ext
14241 fi
14242 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
14243 echo "${ECHO_T}$ac_cv_type_short" >&6
14244
14245 echo "$as_me:$LINENO: checking alignment of short" >&5
14246 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
14247 if test "${pgac_cv_alignof_short+set}" = set; then
14248   echo $ECHO_N "(cached) $ECHO_C" >&6
14249 else
14250   if test "$ac_cv_type_short" = yes; then
14251   if test "$cross_compiling" = yes; then
14252   # Depending upon the size, compute the lo and hi bounds.
14253 cat >conftest.$ac_ext <<_ACEOF
14254 #line $LINENO "configure"
14255 #include "confdefs.h"
14256 $ac_includes_default
14257 struct { char filler; short field; } pgac_struct;
14258 #ifdef F77_DUMMY_MAIN
14259 #  ifdef __cplusplus
14260      extern "C"
14261 #  endif
14262    int F77_DUMMY_MAIN() { return 1; }
14263 #endif
14264 int
14265 main ()
14266 {
14267 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14268 test_array [0] = 0
14269
14270   ;
14271   return 0;
14272 }
14273 _ACEOF
14274 rm -f conftest.$ac_objext
14275 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14276   (eval $ac_compile) 2>&5
14277   ac_status=$?
14278   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279   (exit $ac_status); } &&
14280          { ac_try='test -s conftest.$ac_objext'
14281   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14285   (exit $ac_status); }; }; then
14286   ac_lo=0 ac_mid=0
14287   while :; do
14288     cat >conftest.$ac_ext <<_ACEOF
14289 #line $LINENO "configure"
14290 #include "confdefs.h"
14291 $ac_includes_default
14292 struct { char filler; short field; } pgac_struct;
14293 #ifdef F77_DUMMY_MAIN
14294 #  ifdef __cplusplus
14295      extern "C"
14296 #  endif
14297    int F77_DUMMY_MAIN() { return 1; }
14298 #endif
14299 int
14300 main ()
14301 {
14302 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14303 test_array [0] = 0
14304
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f conftest.$ac_objext
14310 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14311   (eval $ac_compile) 2>&5
14312   ac_status=$?
14313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14314   (exit $ac_status); } &&
14315          { ac_try='test -s conftest.$ac_objext'
14316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14317   (eval $ac_try) 2>&5
14318   ac_status=$?
14319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320   (exit $ac_status); }; }; then
14321   ac_hi=$ac_mid; break
14322 else
14323   echo "$as_me: failed program was:" >&5
14324 cat conftest.$ac_ext >&5
14325 ac_lo=`expr $ac_mid + 1`
14326                     if test $ac_lo -le $ac_mid; then
14327                       ac_lo= ac_hi=
14328                       break
14329                     fi
14330                     ac_mid=`expr 2 '*' $ac_mid + 1`
14331 fi
14332 rm -f conftest.$ac_objext conftest.$ac_ext
14333   done
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat conftest.$ac_ext >&5
14337 cat >conftest.$ac_ext <<_ACEOF
14338 #line $LINENO "configure"
14339 #include "confdefs.h"
14340 $ac_includes_default
14341 struct { char filler; short field; } pgac_struct;
14342 #ifdef F77_DUMMY_MAIN
14343 #  ifdef __cplusplus
14344      extern "C"
14345 #  endif
14346    int F77_DUMMY_MAIN() { return 1; }
14347 #endif
14348 int
14349 main ()
14350 {
14351 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
14352 test_array [0] = 0
14353
14354   ;
14355   return 0;
14356 }
14357 _ACEOF
14358 rm -f conftest.$ac_objext
14359 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14360   (eval $ac_compile) 2>&5
14361   ac_status=$?
14362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14363   (exit $ac_status); } &&
14364          { ac_try='test -s conftest.$ac_objext'
14365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14366   (eval $ac_try) 2>&5
14367   ac_status=$?
14368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14369   (exit $ac_status); }; }; then
14370   ac_hi=-1 ac_mid=-1
14371   while :; do
14372     cat >conftest.$ac_ext <<_ACEOF
14373 #line $LINENO "configure"
14374 #include "confdefs.h"
14375 $ac_includes_default
14376 struct { char filler; short field; } pgac_struct;
14377 #ifdef F77_DUMMY_MAIN
14378 #  ifdef __cplusplus
14379      extern "C"
14380 #  endif
14381    int F77_DUMMY_MAIN() { return 1; }
14382 #endif
14383 int
14384 main ()
14385 {
14386 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
14387 test_array [0] = 0
14388
14389   ;
14390   return 0;
14391 }
14392 _ACEOF
14393 rm -f conftest.$ac_objext
14394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14395   (eval $ac_compile) 2>&5
14396   ac_status=$?
14397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398   (exit $ac_status); } &&
14399          { ac_try='test -s conftest.$ac_objext'
14400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14401   (eval $ac_try) 2>&5
14402   ac_status=$?
14403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14404   (exit $ac_status); }; }; then
14405   ac_lo=$ac_mid; break
14406 else
14407   echo "$as_me: failed program was:" >&5
14408 cat conftest.$ac_ext >&5
14409 ac_hi=`expr '(' $ac_mid ')' - 1`
14410                        if test $ac_mid -le $ac_hi; then
14411                          ac_lo= ac_hi=
14412                          break
14413                        fi
14414                        ac_mid=`expr 2 '*' $ac_mid`
14415 fi
14416 rm -f conftest.$ac_objext conftest.$ac_ext
14417   done
14418 else
14419   echo "$as_me: failed program was:" >&5
14420 cat conftest.$ac_ext >&5
14421 ac_lo= ac_hi=
14422 fi
14423 rm -f conftest.$ac_objext conftest.$ac_ext
14424 fi
14425 rm -f conftest.$ac_objext conftest.$ac_ext
14426 # Binary search between lo and hi bounds.
14427 while test "x$ac_lo" != "x$ac_hi"; do
14428   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14429   cat >conftest.$ac_ext <<_ACEOF
14430 #line $LINENO "configure"
14431 #include "confdefs.h"
14432 $ac_includes_default
14433 struct { char filler; short field; } pgac_struct;
14434 #ifdef F77_DUMMY_MAIN
14435 #  ifdef __cplusplus
14436      extern "C"
14437 #  endif
14438    int F77_DUMMY_MAIN() { return 1; }
14439 #endif
14440 int
14441 main ()
14442 {
14443 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14444 test_array [0] = 0
14445
14446   ;
14447   return 0;
14448 }
14449 _ACEOF
14450 rm -f conftest.$ac_objext
14451 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14452   (eval $ac_compile) 2>&5
14453   ac_status=$?
14454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14455   (exit $ac_status); } &&
14456          { ac_try='test -s conftest.$ac_objext'
14457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14458   (eval $ac_try) 2>&5
14459   ac_status=$?
14460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14461   (exit $ac_status); }; }; then
14462   ac_hi=$ac_mid
14463 else
14464   echo "$as_me: failed program was:" >&5
14465 cat conftest.$ac_ext >&5
14466 ac_lo=`expr '(' $ac_mid ')' + 1`
14467 fi
14468 rm -f conftest.$ac_objext conftest.$ac_ext
14469 done
14470 case $ac_lo in
14471 ?*) pgac_cv_alignof_short=$ac_lo;;
14472 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
14473 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
14474    { (exit 1); exit 1; }; } ;;
14475 esac
14476 else
14477   if test "$cross_compiling" = yes; then
14478   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14479 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14480    { (exit 1); exit 1; }; }
14481 else
14482   cat >conftest.$ac_ext <<_ACEOF
14483 #line $LINENO "configure"
14484 #include "confdefs.h"
14485 $ac_includes_default
14486 struct { char filler; short field; } pgac_struct;
14487 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14488 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14489 #include <stdio.h>
14490 #include <stdlib.h>
14491 #ifdef F77_DUMMY_MAIN
14492 #  ifdef __cplusplus
14493      extern "C"
14494 #  endif
14495    int F77_DUMMY_MAIN() { return 1; }
14496 #endif
14497 int
14498 main ()
14499 {
14500
14501   FILE *f = fopen ("conftest.val", "w");
14502   if (! f)
14503     exit (1);
14504   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
14505     {
14506       long i = longval ();
14507       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14508         exit (1);
14509       fprintf (f, "%ld\n", i);
14510     }
14511   else
14512     {
14513       unsigned long i = ulongval ();
14514       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14515         exit (1);
14516       fprintf (f, "%lu\n", i);
14517     }
14518   exit (ferror (f) || fclose (f) != 0);
14519
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest$ac_exeext
14525 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>&5
14527   ac_status=$?
14528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14529   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14531   (eval $ac_try) 2>&5
14532   ac_status=$?
14533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14534   (exit $ac_status); }; }; then
14535   pgac_cv_alignof_short=`cat conftest.val`
14536 else
14537   echo "$as_me: program exited with status $ac_status" >&5
14538 echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540 ( exit $ac_status )
14541 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
14542 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
14543    { (exit 1); exit 1; }; }
14544 fi
14545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14546 fi
14547 fi
14548 rm -f conftest.val
14549 else
14550   pgac_cv_alignof_short=0
14551 fi
14552 fi
14553 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
14554 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
14555 cat >>confdefs.h <<_ACEOF
14556 #define ALIGNOF_SHORT $pgac_cv_alignof_short
14557 _ACEOF
14558
14559
14560 echo "$as_me:$LINENO: checking for int" >&5
14561 echo $ECHO_N "checking for int... $ECHO_C" >&6
14562 if test "${ac_cv_type_int+set}" = set; then
14563   echo $ECHO_N "(cached) $ECHO_C" >&6
14564 else
14565   cat >conftest.$ac_ext <<_ACEOF
14566 #line $LINENO "configure"
14567 #include "confdefs.h"
14568 $ac_includes_default
14569 #ifdef F77_DUMMY_MAIN
14570 #  ifdef __cplusplus
14571      extern "C"
14572 #  endif
14573    int F77_DUMMY_MAIN() { return 1; }
14574 #endif
14575 int
14576 main ()
14577 {
14578 if ((int *) 0)
14579   return 0;
14580 if (sizeof (int))
14581   return 0;
14582   ;
14583   return 0;
14584 }
14585 _ACEOF
14586 rm -f conftest.$ac_objext
14587 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14588   (eval $ac_compile) 2>&5
14589   ac_status=$?
14590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14591   (exit $ac_status); } &&
14592          { ac_try='test -s conftest.$ac_objext'
14593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14594   (eval $ac_try) 2>&5
14595   ac_status=$?
14596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597   (exit $ac_status); }; }; then
14598   ac_cv_type_int=yes
14599 else
14600   echo "$as_me: failed program was:" >&5
14601 cat conftest.$ac_ext >&5
14602 ac_cv_type_int=no
14603 fi
14604 rm -f conftest.$ac_objext conftest.$ac_ext
14605 fi
14606 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
14607 echo "${ECHO_T}$ac_cv_type_int" >&6
14608
14609 echo "$as_me:$LINENO: checking alignment of int" >&5
14610 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
14611 if test "${pgac_cv_alignof_int+set}" = set; then
14612   echo $ECHO_N "(cached) $ECHO_C" >&6
14613 else
14614   if test "$ac_cv_type_int" = yes; then
14615   if test "$cross_compiling" = yes; then
14616   # Depending upon the size, compute the lo and hi bounds.
14617 cat >conftest.$ac_ext <<_ACEOF
14618 #line $LINENO "configure"
14619 #include "confdefs.h"
14620 $ac_includes_default
14621 struct { char filler; int field; } pgac_struct;
14622 #ifdef F77_DUMMY_MAIN
14623 #  ifdef __cplusplus
14624      extern "C"
14625 #  endif
14626    int F77_DUMMY_MAIN() { return 1; }
14627 #endif
14628 int
14629 main ()
14630 {
14631 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14632 test_array [0] = 0
14633
14634   ;
14635   return 0;
14636 }
14637 _ACEOF
14638 rm -f conftest.$ac_objext
14639 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14640   (eval $ac_compile) 2>&5
14641   ac_status=$?
14642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14643   (exit $ac_status); } &&
14644          { ac_try='test -s conftest.$ac_objext'
14645   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14646   (eval $ac_try) 2>&5
14647   ac_status=$?
14648   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649   (exit $ac_status); }; }; then
14650   ac_lo=0 ac_mid=0
14651   while :; do
14652     cat >conftest.$ac_ext <<_ACEOF
14653 #line $LINENO "configure"
14654 #include "confdefs.h"
14655 $ac_includes_default
14656 struct { char filler; int field; } pgac_struct;
14657 #ifdef F77_DUMMY_MAIN
14658 #  ifdef __cplusplus
14659      extern "C"
14660 #  endif
14661    int F77_DUMMY_MAIN() { return 1; }
14662 #endif
14663 int
14664 main ()
14665 {
14666 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14667 test_array [0] = 0
14668
14669   ;
14670   return 0;
14671 }
14672 _ACEOF
14673 rm -f conftest.$ac_objext
14674 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14675   (eval $ac_compile) 2>&5
14676   ac_status=$?
14677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678   (exit $ac_status); } &&
14679          { ac_try='test -s conftest.$ac_objext'
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_hi=$ac_mid; break
14686 else
14687   echo "$as_me: failed program was:" >&5
14688 cat conftest.$ac_ext >&5
14689 ac_lo=`expr $ac_mid + 1`
14690                     if test $ac_lo -le $ac_mid; then
14691                       ac_lo= ac_hi=
14692                       break
14693                     fi
14694                     ac_mid=`expr 2 '*' $ac_mid + 1`
14695 fi
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14697   done
14698 else
14699   echo "$as_me: failed program was:" >&5
14700 cat conftest.$ac_ext >&5
14701 cat >conftest.$ac_ext <<_ACEOF
14702 #line $LINENO "configure"
14703 #include "confdefs.h"
14704 $ac_includes_default
14705 struct { char filler; int field; } pgac_struct;
14706 #ifdef F77_DUMMY_MAIN
14707 #  ifdef __cplusplus
14708      extern "C"
14709 #  endif
14710    int F77_DUMMY_MAIN() { return 1; }
14711 #endif
14712 int
14713 main ()
14714 {
14715 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
14716 test_array [0] = 0
14717
14718   ;
14719   return 0;
14720 }
14721 _ACEOF
14722 rm -f conftest.$ac_objext
14723 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14724   (eval $ac_compile) 2>&5
14725   ac_status=$?
14726   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727   (exit $ac_status); } &&
14728          { ac_try='test -s conftest.$ac_objext'
14729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14730   (eval $ac_try) 2>&5
14731   ac_status=$?
14732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733   (exit $ac_status); }; }; then
14734   ac_hi=-1 ac_mid=-1
14735   while :; do
14736     cat >conftest.$ac_ext <<_ACEOF
14737 #line $LINENO "configure"
14738 #include "confdefs.h"
14739 $ac_includes_default
14740 struct { char filler; int field; } pgac_struct;
14741 #ifdef F77_DUMMY_MAIN
14742 #  ifdef __cplusplus
14743      extern "C"
14744 #  endif
14745    int F77_DUMMY_MAIN() { return 1; }
14746 #endif
14747 int
14748 main ()
14749 {
14750 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
14751 test_array [0] = 0
14752
14753   ;
14754   return 0;
14755 }
14756 _ACEOF
14757 rm -f conftest.$ac_objext
14758 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14759   (eval $ac_compile) 2>&5
14760   ac_status=$?
14761   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14762   (exit $ac_status); } &&
14763          { ac_try='test -s conftest.$ac_objext'
14764   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14765   (eval $ac_try) 2>&5
14766   ac_status=$?
14767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14768   (exit $ac_status); }; }; then
14769   ac_lo=$ac_mid; break
14770 else
14771   echo "$as_me: failed program was:" >&5
14772 cat conftest.$ac_ext >&5
14773 ac_hi=`expr '(' $ac_mid ')' - 1`
14774                        if test $ac_mid -le $ac_hi; then
14775                          ac_lo= ac_hi=
14776                          break
14777                        fi
14778                        ac_mid=`expr 2 '*' $ac_mid`
14779 fi
14780 rm -f conftest.$ac_objext conftest.$ac_ext
14781   done
14782 else
14783   echo "$as_me: failed program was:" >&5
14784 cat conftest.$ac_ext >&5
14785 ac_lo= ac_hi=
14786 fi
14787 rm -f conftest.$ac_objext conftest.$ac_ext
14788 fi
14789 rm -f conftest.$ac_objext conftest.$ac_ext
14790 # Binary search between lo and hi bounds.
14791 while test "x$ac_lo" != "x$ac_hi"; do
14792   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14793   cat >conftest.$ac_ext <<_ACEOF
14794 #line $LINENO "configure"
14795 #include "confdefs.h"
14796 $ac_includes_default
14797 struct { char filler; int field; } pgac_struct;
14798 #ifdef F77_DUMMY_MAIN
14799 #  ifdef __cplusplus
14800      extern "C"
14801 #  endif
14802    int F77_DUMMY_MAIN() { return 1; }
14803 #endif
14804 int
14805 main ()
14806 {
14807 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14808 test_array [0] = 0
14809
14810   ;
14811   return 0;
14812 }
14813 _ACEOF
14814 rm -f conftest.$ac_objext
14815 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14816   (eval $ac_compile) 2>&5
14817   ac_status=$?
14818   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14819   (exit $ac_status); } &&
14820          { ac_try='test -s conftest.$ac_objext'
14821   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14822   (eval $ac_try) 2>&5
14823   ac_status=$?
14824   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14825   (exit $ac_status); }; }; then
14826   ac_hi=$ac_mid
14827 else
14828   echo "$as_me: failed program was:" >&5
14829 cat conftest.$ac_ext >&5
14830 ac_lo=`expr '(' $ac_mid ')' + 1`
14831 fi
14832 rm -f conftest.$ac_objext conftest.$ac_ext
14833 done
14834 case $ac_lo in
14835 ?*) pgac_cv_alignof_int=$ac_lo;;
14836 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
14837 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
14838    { (exit 1); exit 1; }; } ;;
14839 esac
14840 else
14841   if test "$cross_compiling" = yes; then
14842   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14843 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14844    { (exit 1); exit 1; }; }
14845 else
14846   cat >conftest.$ac_ext <<_ACEOF
14847 #line $LINENO "configure"
14848 #include "confdefs.h"
14849 $ac_includes_default
14850 struct { char filler; int field; } pgac_struct;
14851 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14852 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14853 #include <stdio.h>
14854 #include <stdlib.h>
14855 #ifdef F77_DUMMY_MAIN
14856 #  ifdef __cplusplus
14857      extern "C"
14858 #  endif
14859    int F77_DUMMY_MAIN() { return 1; }
14860 #endif
14861 int
14862 main ()
14863 {
14864
14865   FILE *f = fopen ("conftest.val", "w");
14866   if (! f)
14867     exit (1);
14868   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
14869     {
14870       long i = longval ();
14871       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14872         exit (1);
14873       fprintf (f, "%ld\n", i);
14874     }
14875   else
14876     {
14877       unsigned long i = ulongval ();
14878       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14879         exit (1);
14880       fprintf (f, "%lu\n", i);
14881     }
14882   exit (ferror (f) || fclose (f) != 0);
14883
14884   ;
14885   return 0;
14886 }
14887 _ACEOF
14888 rm -f conftest$ac_exeext
14889 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14890   (eval $ac_link) 2>&5
14891   ac_status=$?
14892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14893   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14894   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }; then
14899   pgac_cv_alignof_int=`cat conftest.val`
14900 else
14901   echo "$as_me: program exited with status $ac_status" >&5
14902 echo "$as_me: failed program was:" >&5
14903 cat conftest.$ac_ext >&5
14904 ( exit $ac_status )
14905 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
14906 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
14907    { (exit 1); exit 1; }; }
14908 fi
14909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14910 fi
14911 fi
14912 rm -f conftest.val
14913 else
14914   pgac_cv_alignof_int=0
14915 fi
14916 fi
14917 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
14918 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
14919 cat >>confdefs.h <<_ACEOF
14920 #define ALIGNOF_INT $pgac_cv_alignof_int
14921 _ACEOF
14922
14923
14924 echo "$as_me:$LINENO: checking for long" >&5
14925 echo $ECHO_N "checking for long... $ECHO_C" >&6
14926 if test "${ac_cv_type_long+set}" = set; then
14927   echo $ECHO_N "(cached) $ECHO_C" >&6
14928 else
14929   cat >conftest.$ac_ext <<_ACEOF
14930 #line $LINENO "configure"
14931 #include "confdefs.h"
14932 $ac_includes_default
14933 #ifdef F77_DUMMY_MAIN
14934 #  ifdef __cplusplus
14935      extern "C"
14936 #  endif
14937    int F77_DUMMY_MAIN() { return 1; }
14938 #endif
14939 int
14940 main ()
14941 {
14942 if ((long *) 0)
14943   return 0;
14944 if (sizeof (long))
14945   return 0;
14946   ;
14947   return 0;
14948 }
14949 _ACEOF
14950 rm -f conftest.$ac_objext
14951 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14952   (eval $ac_compile) 2>&5
14953   ac_status=$?
14954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14955   (exit $ac_status); } &&
14956          { ac_try='test -s conftest.$ac_objext'
14957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14958   (eval $ac_try) 2>&5
14959   ac_status=$?
14960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961   (exit $ac_status); }; }; then
14962   ac_cv_type_long=yes
14963 else
14964   echo "$as_me: failed program was:" >&5
14965 cat conftest.$ac_ext >&5
14966 ac_cv_type_long=no
14967 fi
14968 rm -f conftest.$ac_objext conftest.$ac_ext
14969 fi
14970 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
14971 echo "${ECHO_T}$ac_cv_type_long" >&6
14972
14973 echo "$as_me:$LINENO: checking alignment of long" >&5
14974 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
14975 if test "${pgac_cv_alignof_long+set}" = set; then
14976   echo $ECHO_N "(cached) $ECHO_C" >&6
14977 else
14978   if test "$ac_cv_type_long" = yes; then
14979   if test "$cross_compiling" = yes; then
14980   # Depending upon the size, compute the lo and hi bounds.
14981 cat >conftest.$ac_ext <<_ACEOF
14982 #line $LINENO "configure"
14983 #include "confdefs.h"
14984 $ac_includes_default
14985 struct { char filler; long field; } pgac_struct;
14986 #ifdef F77_DUMMY_MAIN
14987 #  ifdef __cplusplus
14988      extern "C"
14989 #  endif
14990    int F77_DUMMY_MAIN() { return 1; }
14991 #endif
14992 int
14993 main ()
14994 {
14995 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14996 test_array [0] = 0
14997
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext
15003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15004   (eval $ac_compile) 2>&5
15005   ac_status=$?
15006   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest.$ac_objext'
15009   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014   ac_lo=0 ac_mid=0
15015   while :; do
15016     cat >conftest.$ac_ext <<_ACEOF
15017 #line $LINENO "configure"
15018 #include "confdefs.h"
15019 $ac_includes_default
15020 struct { char filler; long field; } pgac_struct;
15021 #ifdef F77_DUMMY_MAIN
15022 #  ifdef __cplusplus
15023      extern "C"
15024 #  endif
15025    int F77_DUMMY_MAIN() { return 1; }
15026 #endif
15027 int
15028 main ()
15029 {
15030 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15031 test_array [0] = 0
15032
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext
15038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15039   (eval $ac_compile) 2>&5
15040   ac_status=$?
15041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15042   (exit $ac_status); } &&
15043          { ac_try='test -s conftest.$ac_objext'
15044   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   ac_hi=$ac_mid; break
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 cat conftest.$ac_ext >&5
15053 ac_lo=`expr $ac_mid + 1`
15054                     if test $ac_lo -le $ac_mid; then
15055                       ac_lo= ac_hi=
15056                       break
15057                     fi
15058                     ac_mid=`expr 2 '*' $ac_mid + 1`
15059 fi
15060 rm -f conftest.$ac_objext conftest.$ac_ext
15061   done
15062 else
15063   echo "$as_me: failed program was:" >&5
15064 cat conftest.$ac_ext >&5
15065 cat >conftest.$ac_ext <<_ACEOF
15066 #line $LINENO "configure"
15067 #include "confdefs.h"
15068 $ac_includes_default
15069 struct { char filler; long field; } pgac_struct;
15070 #ifdef F77_DUMMY_MAIN
15071 #  ifdef __cplusplus
15072      extern "C"
15073 #  endif
15074    int F77_DUMMY_MAIN() { return 1; }
15075 #endif
15076 int
15077 main ()
15078 {
15079 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15080 test_array [0] = 0
15081
15082   ;
15083   return 0;
15084 }
15085 _ACEOF
15086 rm -f conftest.$ac_objext
15087 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15088   (eval $ac_compile) 2>&5
15089   ac_status=$?
15090   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091   (exit $ac_status); } &&
15092          { ac_try='test -s conftest.$ac_objext'
15093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15094   (eval $ac_try) 2>&5
15095   ac_status=$?
15096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15097   (exit $ac_status); }; }; then
15098   ac_hi=-1 ac_mid=-1
15099   while :; do
15100     cat >conftest.$ac_ext <<_ACEOF
15101 #line $LINENO "configure"
15102 #include "confdefs.h"
15103 $ac_includes_default
15104 struct { char filler; long field; } pgac_struct;
15105 #ifdef F77_DUMMY_MAIN
15106 #  ifdef __cplusplus
15107      extern "C"
15108 #  endif
15109    int F77_DUMMY_MAIN() { return 1; }
15110 #endif
15111 int
15112 main ()
15113 {
15114 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15115 test_array [0] = 0
15116
15117   ;
15118   return 0;
15119 }
15120 _ACEOF
15121 rm -f conftest.$ac_objext
15122 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15123   (eval $ac_compile) 2>&5
15124   ac_status=$?
15125   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15126   (exit $ac_status); } &&
15127          { ac_try='test -s conftest.$ac_objext'
15128   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15129   (eval $ac_try) 2>&5
15130   ac_status=$?
15131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15132   (exit $ac_status); }; }; then
15133   ac_lo=$ac_mid; break
15134 else
15135   echo "$as_me: failed program was:" >&5
15136 cat conftest.$ac_ext >&5
15137 ac_hi=`expr '(' $ac_mid ')' - 1`
15138                        if test $ac_mid -le $ac_hi; then
15139                          ac_lo= ac_hi=
15140                          break
15141                        fi
15142                        ac_mid=`expr 2 '*' $ac_mid`
15143 fi
15144 rm -f conftest.$ac_objext conftest.$ac_ext
15145   done
15146 else
15147   echo "$as_me: failed program was:" >&5
15148 cat conftest.$ac_ext >&5
15149 ac_lo= ac_hi=
15150 fi
15151 rm -f conftest.$ac_objext conftest.$ac_ext
15152 fi
15153 rm -f conftest.$ac_objext conftest.$ac_ext
15154 # Binary search between lo and hi bounds.
15155 while test "x$ac_lo" != "x$ac_hi"; do
15156   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15157   cat >conftest.$ac_ext <<_ACEOF
15158 #line $LINENO "configure"
15159 #include "confdefs.h"
15160 $ac_includes_default
15161 struct { char filler; long field; } pgac_struct;
15162 #ifdef F77_DUMMY_MAIN
15163 #  ifdef __cplusplus
15164      extern "C"
15165 #  endif
15166    int F77_DUMMY_MAIN() { return 1; }
15167 #endif
15168 int
15169 main ()
15170 {
15171 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15172 test_array [0] = 0
15173
15174   ;
15175   return 0;
15176 }
15177 _ACEOF
15178 rm -f conftest.$ac_objext
15179 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15180   (eval $ac_compile) 2>&5
15181   ac_status=$?
15182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15183   (exit $ac_status); } &&
15184          { ac_try='test -s conftest.$ac_objext'
15185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186   (eval $ac_try) 2>&5
15187   ac_status=$?
15188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189   (exit $ac_status); }; }; then
15190   ac_hi=$ac_mid
15191 else
15192   echo "$as_me: failed program was:" >&5
15193 cat conftest.$ac_ext >&5
15194 ac_lo=`expr '(' $ac_mid ')' + 1`
15195 fi
15196 rm -f conftest.$ac_objext conftest.$ac_ext
15197 done
15198 case $ac_lo in
15199 ?*) pgac_cv_alignof_long=$ac_lo;;
15200 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
15201 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
15202    { (exit 1); exit 1; }; } ;;
15203 esac
15204 else
15205   if test "$cross_compiling" = yes; then
15206   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15207 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15208    { (exit 1); exit 1; }; }
15209 else
15210   cat >conftest.$ac_ext <<_ACEOF
15211 #line $LINENO "configure"
15212 #include "confdefs.h"
15213 $ac_includes_default
15214 struct { char filler; long field; } pgac_struct;
15215 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15216 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15217 #include <stdio.h>
15218 #include <stdlib.h>
15219 #ifdef F77_DUMMY_MAIN
15220 #  ifdef __cplusplus
15221      extern "C"
15222 #  endif
15223    int F77_DUMMY_MAIN() { return 1; }
15224 #endif
15225 int
15226 main ()
15227 {
15228
15229   FILE *f = fopen ("conftest.val", "w");
15230   if (! f)
15231     exit (1);
15232   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15233     {
15234       long i = longval ();
15235       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15236         exit (1);
15237       fprintf (f, "%ld\n", i);
15238     }
15239   else
15240     {
15241       unsigned long i = ulongval ();
15242       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15243         exit (1);
15244       fprintf (f, "%lu\n", i);
15245     }
15246   exit (ferror (f) || fclose (f) != 0);
15247
15248   ;
15249   return 0;
15250 }
15251 _ACEOF
15252 rm -f conftest$ac_exeext
15253 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15254   (eval $ac_link) 2>&5
15255   ac_status=$?
15256   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15258   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15259   (eval $ac_try) 2>&5
15260   ac_status=$?
15261   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15262   (exit $ac_status); }; }; then
15263   pgac_cv_alignof_long=`cat conftest.val`
15264 else
15265   echo "$as_me: program exited with status $ac_status" >&5
15266 echo "$as_me: failed program was:" >&5
15267 cat conftest.$ac_ext >&5
15268 ( exit $ac_status )
15269 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
15270 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
15271    { (exit 1); exit 1; }; }
15272 fi
15273 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15274 fi
15275 fi
15276 rm -f conftest.val
15277 else
15278   pgac_cv_alignof_long=0
15279 fi
15280 fi
15281 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
15282 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
15283 cat >>confdefs.h <<_ACEOF
15284 #define ALIGNOF_LONG $pgac_cv_alignof_long
15285 _ACEOF
15286
15287
15288 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
15289   echo "$as_me:$LINENO: checking for long long int" >&5
15290 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
15291 if test "${ac_cv_type_long_long_int+set}" = set; then
15292   echo $ECHO_N "(cached) $ECHO_C" >&6
15293 else
15294   cat >conftest.$ac_ext <<_ACEOF
15295 #line $LINENO "configure"
15296 #include "confdefs.h"
15297 $ac_includes_default
15298 #ifdef F77_DUMMY_MAIN
15299 #  ifdef __cplusplus
15300      extern "C"
15301 #  endif
15302    int F77_DUMMY_MAIN() { return 1; }
15303 #endif
15304 int
15305 main ()
15306 {
15307 if ((long long int *) 0)
15308   return 0;
15309 if (sizeof (long long int))
15310   return 0;
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 rm -f conftest.$ac_objext
15316 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15317   (eval $ac_compile) 2>&5
15318   ac_status=$?
15319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15320   (exit $ac_status); } &&
15321          { ac_try='test -s conftest.$ac_objext'
15322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15323   (eval $ac_try) 2>&5
15324   ac_status=$?
15325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15326   (exit $ac_status); }; }; then
15327   ac_cv_type_long_long_int=yes
15328 else
15329   echo "$as_me: failed program was:" >&5
15330 cat conftest.$ac_ext >&5
15331 ac_cv_type_long_long_int=no
15332 fi
15333 rm -f conftest.$ac_objext conftest.$ac_ext
15334 fi
15335 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
15336 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
15337
15338 echo "$as_me:$LINENO: checking alignment of long long int" >&5
15339 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
15340 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
15341   echo $ECHO_N "(cached) $ECHO_C" >&6
15342 else
15343   if test "$ac_cv_type_long_long_int" = yes; then
15344   if test "$cross_compiling" = yes; then
15345   # Depending upon the size, compute the lo and hi bounds.
15346 cat >conftest.$ac_ext <<_ACEOF
15347 #line $LINENO "configure"
15348 #include "confdefs.h"
15349 $ac_includes_default
15350 struct { char filler; long long int field; } pgac_struct;
15351 #ifdef F77_DUMMY_MAIN
15352 #  ifdef __cplusplus
15353      extern "C"
15354 #  endif
15355    int F77_DUMMY_MAIN() { return 1; }
15356 #endif
15357 int
15358 main ()
15359 {
15360 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
15361 test_array [0] = 0
15362
15363   ;
15364   return 0;
15365 }
15366 _ACEOF
15367 rm -f conftest.$ac_objext
15368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15369   (eval $ac_compile) 2>&5
15370   ac_status=$?
15371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15372   (exit $ac_status); } &&
15373          { ac_try='test -s conftest.$ac_objext'
15374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15375   (eval $ac_try) 2>&5
15376   ac_status=$?
15377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15378   (exit $ac_status); }; }; then
15379   ac_lo=0 ac_mid=0
15380   while :; do
15381     cat >conftest.$ac_ext <<_ACEOF
15382 #line $LINENO "configure"
15383 #include "confdefs.h"
15384 $ac_includes_default
15385 struct { char filler; long long int field; } pgac_struct;
15386 #ifdef F77_DUMMY_MAIN
15387 #  ifdef __cplusplus
15388      extern "C"
15389 #  endif
15390    int F77_DUMMY_MAIN() { return 1; }
15391 #endif
15392 int
15393 main ()
15394 {
15395 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15396 test_array [0] = 0
15397
15398   ;
15399   return 0;
15400 }
15401 _ACEOF
15402 rm -f conftest.$ac_objext
15403 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15404   (eval $ac_compile) 2>&5
15405   ac_status=$?
15406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -s conftest.$ac_objext'
15409   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414   ac_hi=$ac_mid; break
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 cat conftest.$ac_ext >&5
15418 ac_lo=`expr $ac_mid + 1`
15419                     if test $ac_lo -le $ac_mid; then
15420                       ac_lo= ac_hi=
15421                       break
15422                     fi
15423                     ac_mid=`expr 2 '*' $ac_mid + 1`
15424 fi
15425 rm -f conftest.$ac_objext conftest.$ac_ext
15426   done
15427 else
15428   echo "$as_me: failed program was:" >&5
15429 cat conftest.$ac_ext >&5
15430 cat >conftest.$ac_ext <<_ACEOF
15431 #line $LINENO "configure"
15432 #include "confdefs.h"
15433 $ac_includes_default
15434 struct { char filler; long long int field; } pgac_struct;
15435 #ifdef F77_DUMMY_MAIN
15436 #  ifdef __cplusplus
15437      extern "C"
15438 #  endif
15439    int F77_DUMMY_MAIN() { return 1; }
15440 #endif
15441 int
15442 main ()
15443 {
15444 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15445 test_array [0] = 0
15446
15447   ;
15448   return 0;
15449 }
15450 _ACEOF
15451 rm -f conftest.$ac_objext
15452 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15453   (eval $ac_compile) 2>&5
15454   ac_status=$?
15455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456   (exit $ac_status); } &&
15457          { ac_try='test -s conftest.$ac_objext'
15458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459   (eval $ac_try) 2>&5
15460   ac_status=$?
15461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462   (exit $ac_status); }; }; then
15463   ac_hi=-1 ac_mid=-1
15464   while :; do
15465     cat >conftest.$ac_ext <<_ACEOF
15466 #line $LINENO "configure"
15467 #include "confdefs.h"
15468 $ac_includes_default
15469 struct { char filler; long long int field; } pgac_struct;
15470 #ifdef F77_DUMMY_MAIN
15471 #  ifdef __cplusplus
15472      extern "C"
15473 #  endif
15474    int F77_DUMMY_MAIN() { return 1; }
15475 #endif
15476 int
15477 main ()
15478 {
15479 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15480 test_array [0] = 0
15481
15482   ;
15483   return 0;
15484 }
15485 _ACEOF
15486 rm -f conftest.$ac_objext
15487 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15488   (eval $ac_compile) 2>&5
15489   ac_status=$?
15490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15491   (exit $ac_status); } &&
15492          { ac_try='test -s conftest.$ac_objext'
15493   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15494   (eval $ac_try) 2>&5
15495   ac_status=$?
15496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15497   (exit $ac_status); }; }; then
15498   ac_lo=$ac_mid; break
15499 else
15500   echo "$as_me: failed program was:" >&5
15501 cat conftest.$ac_ext >&5
15502 ac_hi=`expr '(' $ac_mid ')' - 1`
15503                        if test $ac_mid -le $ac_hi; then
15504                          ac_lo= ac_hi=
15505                          break
15506                        fi
15507                        ac_mid=`expr 2 '*' $ac_mid`
15508 fi
15509 rm -f conftest.$ac_objext conftest.$ac_ext
15510   done
15511 else
15512   echo "$as_me: failed program was:" >&5
15513 cat conftest.$ac_ext >&5
15514 ac_lo= ac_hi=
15515 fi
15516 rm -f conftest.$ac_objext conftest.$ac_ext
15517 fi
15518 rm -f conftest.$ac_objext conftest.$ac_ext
15519 # Binary search between lo and hi bounds.
15520 while test "x$ac_lo" != "x$ac_hi"; do
15521   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15522   cat >conftest.$ac_ext <<_ACEOF
15523 #line $LINENO "configure"
15524 #include "confdefs.h"
15525 $ac_includes_default
15526 struct { char filler; long long int field; } pgac_struct;
15527 #ifdef F77_DUMMY_MAIN
15528 #  ifdef __cplusplus
15529      extern "C"
15530 #  endif
15531    int F77_DUMMY_MAIN() { return 1; }
15532 #endif
15533 int
15534 main ()
15535 {
15536 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15537 test_array [0] = 0
15538
15539   ;
15540   return 0;
15541 }
15542 _ACEOF
15543 rm -f conftest.$ac_objext
15544 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15545   (eval $ac_compile) 2>&5
15546   ac_status=$?
15547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15548   (exit $ac_status); } &&
15549          { ac_try='test -s conftest.$ac_objext'
15550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15551   (eval $ac_try) 2>&5
15552   ac_status=$?
15553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15554   (exit $ac_status); }; }; then
15555   ac_hi=$ac_mid
15556 else
15557   echo "$as_me: failed program was:" >&5
15558 cat conftest.$ac_ext >&5
15559 ac_lo=`expr '(' $ac_mid ')' + 1`
15560 fi
15561 rm -f conftest.$ac_objext conftest.$ac_ext
15562 done
15563 case $ac_lo in
15564 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
15565 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
15566 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
15567    { (exit 1); exit 1; }; } ;;
15568 esac
15569 else
15570   if test "$cross_compiling" = yes; then
15571   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15572 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15573    { (exit 1); exit 1; }; }
15574 else
15575   cat >conftest.$ac_ext <<_ACEOF
15576 #line $LINENO "configure"
15577 #include "confdefs.h"
15578 $ac_includes_default
15579 struct { char filler; long long int field; } pgac_struct;
15580 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15581 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15582 #include <stdio.h>
15583 #include <stdlib.h>
15584 #ifdef F77_DUMMY_MAIN
15585 #  ifdef __cplusplus
15586      extern "C"
15587 #  endif
15588    int F77_DUMMY_MAIN() { return 1; }
15589 #endif
15590 int
15591 main ()
15592 {
15593
15594   FILE *f = fopen ("conftest.val", "w");
15595   if (! f)
15596     exit (1);
15597   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15598     {
15599       long i = longval ();
15600       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15601         exit (1);
15602       fprintf (f, "%ld\n", i);
15603     }
15604   else
15605     {
15606       unsigned long i = ulongval ();
15607       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15608         exit (1);
15609       fprintf (f, "%lu\n", i);
15610     }
15611   exit (ferror (f) || fclose (f) != 0);
15612
15613   ;
15614   return 0;
15615 }
15616 _ACEOF
15617 rm -f conftest$ac_exeext
15618 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15619   (eval $ac_link) 2>&5
15620   ac_status=$?
15621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15622   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624   (eval $ac_try) 2>&5
15625   ac_status=$?
15626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627   (exit $ac_status); }; }; then
15628   pgac_cv_alignof_long_long_int=`cat conftest.val`
15629 else
15630   echo "$as_me: program exited with status $ac_status" >&5
15631 echo "$as_me: failed program was:" >&5
15632 cat conftest.$ac_ext >&5
15633 ( exit $ac_status )
15634 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
15635 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
15636    { (exit 1); exit 1; }; }
15637 fi
15638 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15639 fi
15640 fi
15641 rm -f conftest.val
15642 else
15643   pgac_cv_alignof_long_long_int=0
15644 fi
15645 fi
15646 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
15647 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
15648 cat >>confdefs.h <<_ACEOF
15649 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
15650 _ACEOF
15651
15652
15653 fi
15654 echo "$as_me:$LINENO: checking for double" >&5
15655 echo $ECHO_N "checking for double... $ECHO_C" >&6
15656 if test "${ac_cv_type_double+set}" = set; then
15657   echo $ECHO_N "(cached) $ECHO_C" >&6
15658 else
15659   cat >conftest.$ac_ext <<_ACEOF
15660 #line $LINENO "configure"
15661 #include "confdefs.h"
15662 $ac_includes_default
15663 #ifdef F77_DUMMY_MAIN
15664 #  ifdef __cplusplus
15665      extern "C"
15666 #  endif
15667    int F77_DUMMY_MAIN() { return 1; }
15668 #endif
15669 int
15670 main ()
15671 {
15672 if ((double *) 0)
15673   return 0;
15674 if (sizeof (double))
15675   return 0;
15676   ;
15677   return 0;
15678 }
15679 _ACEOF
15680 rm -f conftest.$ac_objext
15681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15682   (eval $ac_compile) 2>&5
15683   ac_status=$?
15684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685   (exit $ac_status); } &&
15686          { ac_try='test -s conftest.$ac_objext'
15687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15688   (eval $ac_try) 2>&5
15689   ac_status=$?
15690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15691   (exit $ac_status); }; }; then
15692   ac_cv_type_double=yes
15693 else
15694   echo "$as_me: failed program was:" >&5
15695 cat conftest.$ac_ext >&5
15696 ac_cv_type_double=no
15697 fi
15698 rm -f conftest.$ac_objext conftest.$ac_ext
15699 fi
15700 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
15701 echo "${ECHO_T}$ac_cv_type_double" >&6
15702
15703 echo "$as_me:$LINENO: checking alignment of double" >&5
15704 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
15705 if test "${pgac_cv_alignof_double+set}" = set; then
15706   echo $ECHO_N "(cached) $ECHO_C" >&6
15707 else
15708   if test "$ac_cv_type_double" = yes; then
15709   if test "$cross_compiling" = yes; then
15710   # Depending upon the size, compute the lo and hi bounds.
15711 cat >conftest.$ac_ext <<_ACEOF
15712 #line $LINENO "configure"
15713 #include "confdefs.h"
15714 $ac_includes_default
15715 struct { char filler; double field; } pgac_struct;
15716 #ifdef F77_DUMMY_MAIN
15717 #  ifdef __cplusplus
15718      extern "C"
15719 #  endif
15720    int F77_DUMMY_MAIN() { return 1; }
15721 #endif
15722 int
15723 main ()
15724 {
15725 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
15726 test_array [0] = 0
15727
15728   ;
15729   return 0;
15730 }
15731 _ACEOF
15732 rm -f conftest.$ac_objext
15733 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15734   (eval $ac_compile) 2>&5
15735   ac_status=$?
15736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15737   (exit $ac_status); } &&
15738          { ac_try='test -s conftest.$ac_objext'
15739   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15740   (eval $ac_try) 2>&5
15741   ac_status=$?
15742   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15743   (exit $ac_status); }; }; then
15744   ac_lo=0 ac_mid=0
15745   while :; do
15746     cat >conftest.$ac_ext <<_ACEOF
15747 #line $LINENO "configure"
15748 #include "confdefs.h"
15749 $ac_includes_default
15750 struct { char filler; double field; } pgac_struct;
15751 #ifdef F77_DUMMY_MAIN
15752 #  ifdef __cplusplus
15753      extern "C"
15754 #  endif
15755    int F77_DUMMY_MAIN() { return 1; }
15756 #endif
15757 int
15758 main ()
15759 {
15760 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15761 test_array [0] = 0
15762
15763   ;
15764   return 0;
15765 }
15766 _ACEOF
15767 rm -f conftest.$ac_objext
15768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15769   (eval $ac_compile) 2>&5
15770   ac_status=$?
15771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772   (exit $ac_status); } &&
15773          { ac_try='test -s conftest.$ac_objext'
15774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15775   (eval $ac_try) 2>&5
15776   ac_status=$?
15777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15778   (exit $ac_status); }; }; then
15779   ac_hi=$ac_mid; break
15780 else
15781   echo "$as_me: failed program was:" >&5
15782 cat conftest.$ac_ext >&5
15783 ac_lo=`expr $ac_mid + 1`
15784                     if test $ac_lo -le $ac_mid; then
15785                       ac_lo= ac_hi=
15786                       break
15787                     fi
15788                     ac_mid=`expr 2 '*' $ac_mid + 1`
15789 fi
15790 rm -f conftest.$ac_objext conftest.$ac_ext
15791   done
15792 else
15793   echo "$as_me: failed program was:" >&5
15794 cat conftest.$ac_ext >&5
15795 cat >conftest.$ac_ext <<_ACEOF
15796 #line $LINENO "configure"
15797 #include "confdefs.h"
15798 $ac_includes_default
15799 struct { char filler; double field; } pgac_struct;
15800 #ifdef F77_DUMMY_MAIN
15801 #  ifdef __cplusplus
15802      extern "C"
15803 #  endif
15804    int F77_DUMMY_MAIN() { return 1; }
15805 #endif
15806 int
15807 main ()
15808 {
15809 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
15810 test_array [0] = 0
15811
15812   ;
15813   return 0;
15814 }
15815 _ACEOF
15816 rm -f conftest.$ac_objext
15817 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15818   (eval $ac_compile) 2>&5
15819   ac_status=$?
15820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15821   (exit $ac_status); } &&
15822          { ac_try='test -s conftest.$ac_objext'
15823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15824   (eval $ac_try) 2>&5
15825   ac_status=$?
15826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15827   (exit $ac_status); }; }; then
15828   ac_hi=-1 ac_mid=-1
15829   while :; do
15830     cat >conftest.$ac_ext <<_ACEOF
15831 #line $LINENO "configure"
15832 #include "confdefs.h"
15833 $ac_includes_default
15834 struct { char filler; double field; } pgac_struct;
15835 #ifdef F77_DUMMY_MAIN
15836 #  ifdef __cplusplus
15837      extern "C"
15838 #  endif
15839    int F77_DUMMY_MAIN() { return 1; }
15840 #endif
15841 int
15842 main ()
15843 {
15844 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
15845 test_array [0] = 0
15846
15847   ;
15848   return 0;
15849 }
15850 _ACEOF
15851 rm -f conftest.$ac_objext
15852 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15853   (eval $ac_compile) 2>&5
15854   ac_status=$?
15855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15856   (exit $ac_status); } &&
15857          { ac_try='test -s conftest.$ac_objext'
15858   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15859   (eval $ac_try) 2>&5
15860   ac_status=$?
15861   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862   (exit $ac_status); }; }; then
15863   ac_lo=$ac_mid; break
15864 else
15865   echo "$as_me: failed program was:" >&5
15866 cat conftest.$ac_ext >&5
15867 ac_hi=`expr '(' $ac_mid ')' - 1`
15868                        if test $ac_mid -le $ac_hi; then
15869                          ac_lo= ac_hi=
15870                          break
15871                        fi
15872                        ac_mid=`expr 2 '*' $ac_mid`
15873 fi
15874 rm -f conftest.$ac_objext conftest.$ac_ext
15875   done
15876 else
15877   echo "$as_me: failed program was:" >&5
15878 cat conftest.$ac_ext >&5
15879 ac_lo= ac_hi=
15880 fi
15881 rm -f conftest.$ac_objext conftest.$ac_ext
15882 fi
15883 rm -f conftest.$ac_objext conftest.$ac_ext
15884 # Binary search between lo and hi bounds.
15885 while test "x$ac_lo" != "x$ac_hi"; do
15886   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15887   cat >conftest.$ac_ext <<_ACEOF
15888 #line $LINENO "configure"
15889 #include "confdefs.h"
15890 $ac_includes_default
15891 struct { char filler; double field; } pgac_struct;
15892 #ifdef F77_DUMMY_MAIN
15893 #  ifdef __cplusplus
15894      extern "C"
15895 #  endif
15896    int F77_DUMMY_MAIN() { return 1; }
15897 #endif
15898 int
15899 main ()
15900 {
15901 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
15902 test_array [0] = 0
15903
15904   ;
15905   return 0;
15906 }
15907 _ACEOF
15908 rm -f conftest.$ac_objext
15909 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15910   (eval $ac_compile) 2>&5
15911   ac_status=$?
15912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15913   (exit $ac_status); } &&
15914          { ac_try='test -s conftest.$ac_objext'
15915   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15916   (eval $ac_try) 2>&5
15917   ac_status=$?
15918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15919   (exit $ac_status); }; }; then
15920   ac_hi=$ac_mid
15921 else
15922   echo "$as_me: failed program was:" >&5
15923 cat conftest.$ac_ext >&5
15924 ac_lo=`expr '(' $ac_mid ')' + 1`
15925 fi
15926 rm -f conftest.$ac_objext conftest.$ac_ext
15927 done
15928 case $ac_lo in
15929 ?*) pgac_cv_alignof_double=$ac_lo;;
15930 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
15931 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
15932    { (exit 1); exit 1; }; } ;;
15933 esac
15934 else
15935   if test "$cross_compiling" = yes; then
15936   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
15937 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15938    { (exit 1); exit 1; }; }
15939 else
15940   cat >conftest.$ac_ext <<_ACEOF
15941 #line $LINENO "configure"
15942 #include "confdefs.h"
15943 $ac_includes_default
15944 struct { char filler; double field; } pgac_struct;
15945 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15946 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
15947 #include <stdio.h>
15948 #include <stdlib.h>
15949 #ifdef F77_DUMMY_MAIN
15950 #  ifdef __cplusplus
15951      extern "C"
15952 #  endif
15953    int F77_DUMMY_MAIN() { return 1; }
15954 #endif
15955 int
15956 main ()
15957 {
15958
15959   FILE *f = fopen ("conftest.val", "w");
15960   if (! f)
15961     exit (1);
15962   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
15963     {
15964       long i = longval ();
15965       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15966         exit (1);
15967       fprintf (f, "%ld\n", i);
15968     }
15969   else
15970     {
15971       unsigned long i = ulongval ();
15972       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
15973         exit (1);
15974       fprintf (f, "%lu\n", i);
15975     }
15976   exit (ferror (f) || fclose (f) != 0);
15977
15978   ;
15979   return 0;
15980 }
15981 _ACEOF
15982 rm -f conftest$ac_exeext
15983 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15984   (eval $ac_link) 2>&5
15985   ac_status=$?
15986   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15987   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15989   (eval $ac_try) 2>&5
15990   ac_status=$?
15991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15992   (exit $ac_status); }; }; then
15993   pgac_cv_alignof_double=`cat conftest.val`
15994 else
15995   echo "$as_me: program exited with status $ac_status" >&5
15996 echo "$as_me: failed program was:" >&5
15997 cat conftest.$ac_ext >&5
15998 ( exit $ac_status )
15999 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
16000 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
16001    { (exit 1); exit 1; }; }
16002 fi
16003 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16004 fi
16005 fi
16006 rm -f conftest.val
16007 else
16008   pgac_cv_alignof_double=0
16009 fi
16010 fi
16011 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
16012 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
16013 cat >>confdefs.h <<_ACEOF
16014 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
16015 _ACEOF
16016
16017
16018
16019 # Compute maximum alignment of any basic type.
16020 # We assume long's alignment is at least as strong as char, short, or int;
16021 # but we must check long long (if it exists) and double.
16022
16023 MAX_ALIGNOF=$pgac_cv_alignof_long
16024 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
16025   MAX_ALIGNOF=$pgac_cv_alignof_double
16026 fi
16027 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
16028   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
16029 fi
16030
16031 cat >>confdefs.h <<_ACEOF
16032 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16033 _ACEOF
16034
16035
16036
16037 # Some platforms predefine the types int8, int16, etc.  Only check
16038 # a (hopefully) representative subset.
16039 echo "$as_me:$LINENO: checking for int8" >&5
16040 echo $ECHO_N "checking for int8... $ECHO_C" >&6
16041 if test "${ac_cv_type_int8+set}" = set; then
16042   echo $ECHO_N "(cached) $ECHO_C" >&6
16043 else
16044   cat >conftest.$ac_ext <<_ACEOF
16045 #line $LINENO "configure"
16046 #include "confdefs.h"
16047 #include <stdio.h>
16048 #ifdef HAVE_SUPPORTDEFS_H
16049 #include <SupportDefs.h>
16050 #endif
16051
16052 #ifdef F77_DUMMY_MAIN
16053 #  ifdef __cplusplus
16054      extern "C"
16055 #  endif
16056    int F77_DUMMY_MAIN() { return 1; }
16057 #endif
16058 int
16059 main ()
16060 {
16061 if ((int8 *) 0)
16062   return 0;
16063 if (sizeof (int8))
16064   return 0;
16065   ;
16066   return 0;
16067 }
16068 _ACEOF
16069 rm -f conftest.$ac_objext
16070 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16071   (eval $ac_compile) 2>&5
16072   ac_status=$?
16073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16074   (exit $ac_status); } &&
16075          { ac_try='test -s conftest.$ac_objext'
16076   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16077   (eval $ac_try) 2>&5
16078   ac_status=$?
16079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080   (exit $ac_status); }; }; then
16081   ac_cv_type_int8=yes
16082 else
16083   echo "$as_me: failed program was:" >&5
16084 cat conftest.$ac_ext >&5
16085 ac_cv_type_int8=no
16086 fi
16087 rm -f conftest.$ac_objext conftest.$ac_ext
16088 fi
16089 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
16090 echo "${ECHO_T}$ac_cv_type_int8" >&6
16091 if test $ac_cv_type_int8 = yes; then
16092
16093 cat >>confdefs.h <<_ACEOF
16094 #define HAVE_INT8 1
16095 _ACEOF
16096
16097
16098 fi
16099 echo "$as_me:$LINENO: checking for uint8" >&5
16100 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
16101 if test "${ac_cv_type_uint8+set}" = set; then
16102   echo $ECHO_N "(cached) $ECHO_C" >&6
16103 else
16104   cat >conftest.$ac_ext <<_ACEOF
16105 #line $LINENO "configure"
16106 #include "confdefs.h"
16107 #include <stdio.h>
16108 #ifdef HAVE_SUPPORTDEFS_H
16109 #include <SupportDefs.h>
16110 #endif
16111
16112 #ifdef F77_DUMMY_MAIN
16113 #  ifdef __cplusplus
16114      extern "C"
16115 #  endif
16116    int F77_DUMMY_MAIN() { return 1; }
16117 #endif
16118 int
16119 main ()
16120 {
16121 if ((uint8 *) 0)
16122   return 0;
16123 if (sizeof (uint8))
16124   return 0;
16125   ;
16126   return 0;
16127 }
16128 _ACEOF
16129 rm -f conftest.$ac_objext
16130 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16131   (eval $ac_compile) 2>&5
16132   ac_status=$?
16133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16134   (exit $ac_status); } &&
16135          { ac_try='test -s conftest.$ac_objext'
16136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   ac_cv_type_uint8=yes
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 cat conftest.$ac_ext >&5
16145 ac_cv_type_uint8=no
16146 fi
16147 rm -f conftest.$ac_objext conftest.$ac_ext
16148 fi
16149 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
16150 echo "${ECHO_T}$ac_cv_type_uint8" >&6
16151 if test $ac_cv_type_uint8 = yes; then
16152
16153 cat >>confdefs.h <<_ACEOF
16154 #define HAVE_UINT8 1
16155 _ACEOF
16156
16157
16158 fi
16159 echo "$as_me:$LINENO: checking for int64" >&5
16160 echo $ECHO_N "checking for int64... $ECHO_C" >&6
16161 if test "${ac_cv_type_int64+set}" = set; then
16162   echo $ECHO_N "(cached) $ECHO_C" >&6
16163 else
16164   cat >conftest.$ac_ext <<_ACEOF
16165 #line $LINENO "configure"
16166 #include "confdefs.h"
16167 #include <stdio.h>
16168 #ifdef HAVE_SUPPORTDEFS_H
16169 #include <SupportDefs.h>
16170 #endif
16171
16172 #ifdef F77_DUMMY_MAIN
16173 #  ifdef __cplusplus
16174      extern "C"
16175 #  endif
16176    int F77_DUMMY_MAIN() { return 1; }
16177 #endif
16178 int
16179 main ()
16180 {
16181 if ((int64 *) 0)
16182   return 0;
16183 if (sizeof (int64))
16184   return 0;
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext
16190 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16191   (eval $ac_compile) 2>&5
16192   ac_status=$?
16193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest.$ac_objext'
16196   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201   ac_cv_type_int64=yes
16202 else
16203   echo "$as_me: failed program was:" >&5
16204 cat conftest.$ac_ext >&5
16205 ac_cv_type_int64=no
16206 fi
16207 rm -f conftest.$ac_objext conftest.$ac_ext
16208 fi
16209 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
16210 echo "${ECHO_T}$ac_cv_type_int64" >&6
16211 if test $ac_cv_type_int64 = yes; then
16212
16213 cat >>confdefs.h <<_ACEOF
16214 #define HAVE_INT64 1
16215 _ACEOF
16216
16217
16218 fi
16219 echo "$as_me:$LINENO: checking for uint64" >&5
16220 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
16221 if test "${ac_cv_type_uint64+set}" = set; then
16222   echo $ECHO_N "(cached) $ECHO_C" >&6
16223 else
16224   cat >conftest.$ac_ext <<_ACEOF
16225 #line $LINENO "configure"
16226 #include "confdefs.h"
16227 #include <stdio.h>
16228 #ifdef HAVE_SUPPORTDEFS_H
16229 #include <SupportDefs.h>
16230 #endif
16231
16232 #ifdef F77_DUMMY_MAIN
16233 #  ifdef __cplusplus
16234      extern "C"
16235 #  endif
16236    int F77_DUMMY_MAIN() { return 1; }
16237 #endif
16238 int
16239 main ()
16240 {
16241 if ((uint64 *) 0)
16242   return 0;
16243 if (sizeof (uint64))
16244   return 0;
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_cv_type_uint64=yes
16262 else
16263   echo "$as_me: failed program was:" >&5
16264 cat conftest.$ac_ext >&5
16265 ac_cv_type_uint64=no
16266 fi
16267 rm -f conftest.$ac_objext conftest.$ac_ext
16268 fi
16269 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
16270 echo "${ECHO_T}$ac_cv_type_uint64" >&6
16271 if test $ac_cv_type_uint64 = yes; then
16272
16273 cat >>confdefs.h <<_ACEOF
16274 #define HAVE_UINT64 1
16275 _ACEOF
16276
16277
16278 fi
16279
16280
16281 # We also check for sig_atomic_t, which *should* be defined per ANSI
16282 # C, but is missing on some old platforms.
16283 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
16284 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
16285 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
16286   echo $ECHO_N "(cached) $ECHO_C" >&6
16287 else
16288   cat >conftest.$ac_ext <<_ACEOF
16289 #line $LINENO "configure"
16290 #include "confdefs.h"
16291 #include <signal.h>
16292
16293 #ifdef F77_DUMMY_MAIN
16294 #  ifdef __cplusplus
16295      extern "C"
16296 #  endif
16297    int F77_DUMMY_MAIN() { return 1; }
16298 #endif
16299 int
16300 main ()
16301 {
16302 if ((sig_atomic_t *) 0)
16303   return 0;
16304 if (sizeof (sig_atomic_t))
16305   return 0;
16306   ;
16307   return 0;
16308 }
16309 _ACEOF
16310 rm -f conftest.$ac_objext
16311 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16312   (eval $ac_compile) 2>&5
16313   ac_status=$?
16314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16315   (exit $ac_status); } &&
16316          { ac_try='test -s conftest.$ac_objext'
16317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16318   (eval $ac_try) 2>&5
16319   ac_status=$?
16320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16321   (exit $ac_status); }; }; then
16322   ac_cv_type_sig_atomic_t=yes
16323 else
16324   echo "$as_me: failed program was:" >&5
16325 cat conftest.$ac_ext >&5
16326 ac_cv_type_sig_atomic_t=no
16327 fi
16328 rm -f conftest.$ac_objext conftest.$ac_ext
16329 fi
16330 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
16331 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
16332 if test $ac_cv_type_sig_atomic_t = yes; then
16333
16334 cat >>confdefs.h <<_ACEOF
16335 #define HAVE_SIG_ATOMIC_T 1
16336 _ACEOF
16337
16338
16339 fi
16340
16341
16342
16343 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
16344 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
16345 if test "${pgac_cv_func_posix_signals+set}" = set; then
16346   echo $ECHO_N "(cached) $ECHO_C" >&6
16347 else
16348   cat >conftest.$ac_ext <<_ACEOF
16349 #line $LINENO "configure"
16350 #include "confdefs.h"
16351 #include <signal.h>
16352
16353 #ifdef F77_DUMMY_MAIN
16354 #  ifdef __cplusplus
16355      extern "C"
16356 #  endif
16357    int F77_DUMMY_MAIN() { return 1; }
16358 #endif
16359 int
16360 main ()
16361 {
16362 struct sigaction act, oact;
16363 sigemptyset(&act.sa_mask);
16364 act.sa_flags = SA_RESTART;
16365 sigaction(0, &act, &oact);
16366   ;
16367   return 0;
16368 }
16369 _ACEOF
16370 rm -f conftest.$ac_objext conftest$ac_exeext
16371 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16372   (eval $ac_link) 2>&5
16373   ac_status=$?
16374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16375   (exit $ac_status); } &&
16376          { ac_try='test -s conftest$ac_exeext'
16377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16378   (eval $ac_try) 2>&5
16379   ac_status=$?
16380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16381   (exit $ac_status); }; }; then
16382   pgac_cv_func_posix_signals=yes
16383 else
16384   echo "$as_me: failed program was:" >&5
16385 cat conftest.$ac_ext >&5
16386 pgac_cv_func_posix_signals=no
16387 fi
16388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16389 fi
16390 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
16391 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
16392 if test x"$pgac_cv_func_posix_signals" = xyes ; then
16393
16394 cat >>confdefs.h <<\_ACEOF
16395 #define HAVE_POSIX_SIGNALS
16396 _ACEOF
16397
16398 fi
16399 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
16400
16401 if test $ac_cv_func_fseeko = yes; then
16402 # Check whether --enable-largefile or --disable-largefile was given.
16403 if test "${enable_largefile+set}" = set; then
16404   enableval="$enable_largefile"
16405
16406 fi;
16407 if test "$enable_largefile" != no; then
16408
16409   echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
16410 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
16411 if test "${ac_cv_sys_largefile_CC+set}" = set; then
16412   echo $ECHO_N "(cached) $ECHO_C" >&6
16413 else
16414   ac_cv_sys_largefile_CC=no
16415      if test "$GCC" != yes; then
16416        ac_save_CC=$CC
16417        while :; do
16418          # IRIX 6.2 and later do not support large files by default,
16419          # so use the C compiler's -n32 option if that helps.
16420          cat >conftest.$ac_ext <<_ACEOF
16421 #line $LINENO "configure"
16422 #include "confdefs.h"
16423 #include <sys/types.h>
16424  /* Check that off_t can represent 2**63 - 1 correctly.
16425     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16426     since some C++ compilers masquerading as C compilers
16427     incorrectly reject 9223372036854775807.  */
16428 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16429   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16430                        && LARGE_OFF_T % 2147483647 == 1)
16431                       ? 1 : -1];
16432 #ifdef F77_DUMMY_MAIN
16433 #  ifdef __cplusplus
16434      extern "C"
16435 #  endif
16436    int F77_DUMMY_MAIN() { return 1; }
16437 #endif
16438 int
16439 main ()
16440 {
16441
16442   ;
16443   return 0;
16444 }
16445 _ACEOF
16446          rm -f conftest.$ac_objext
16447 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16448   (eval $ac_compile) 2>&5
16449   ac_status=$?
16450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16451   (exit $ac_status); } &&
16452          { ac_try='test -s conftest.$ac_objext'
16453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16454   (eval $ac_try) 2>&5
16455   ac_status=$?
16456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16457   (exit $ac_status); }; }; then
16458   break
16459 else
16460   echo "$as_me: failed program was:" >&5
16461 cat conftest.$ac_ext >&5
16462 fi
16463 rm -f conftest.$ac_objext
16464          CC="$CC -n32"
16465          rm -f conftest.$ac_objext
16466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16467   (eval $ac_compile) 2>&5
16468   ac_status=$?
16469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16470   (exit $ac_status); } &&
16471          { ac_try='test -s conftest.$ac_objext'
16472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16473   (eval $ac_try) 2>&5
16474   ac_status=$?
16475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16476   (exit $ac_status); }; }; then
16477   ac_cv_sys_largefile_CC=' -n32'; break
16478 else
16479   echo "$as_me: failed program was:" >&5
16480 cat conftest.$ac_ext >&5
16481 fi
16482 rm -f conftest.$ac_objext
16483          break
16484        done
16485        CC=$ac_save_CC
16486        rm -f conftest.$ac_ext
16487     fi
16488 fi
16489 echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
16490 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
16491   if test "$ac_cv_sys_largefile_CC" != no; then
16492     CC=$CC$ac_cv_sys_largefile_CC
16493   fi
16494
16495   echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
16496 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
16497 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
16498   echo $ECHO_N "(cached) $ECHO_C" >&6
16499 else
16500   while :; do
16501   ac_cv_sys_file_offset_bits=no
16502   cat >conftest.$ac_ext <<_ACEOF
16503 #line $LINENO "configure"
16504 #include "confdefs.h"
16505 #include <sys/types.h>
16506  /* Check that off_t can represent 2**63 - 1 correctly.
16507     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16508     since some C++ compilers masquerading as C compilers
16509     incorrectly reject 9223372036854775807.  */
16510 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16511   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16512                        && LARGE_OFF_T % 2147483647 == 1)
16513                       ? 1 : -1];
16514 #ifdef F77_DUMMY_MAIN
16515 #  ifdef __cplusplus
16516      extern "C"
16517 #  endif
16518    int F77_DUMMY_MAIN() { return 1; }
16519 #endif
16520 int
16521 main ()
16522 {
16523
16524   ;
16525   return 0;
16526 }
16527 _ACEOF
16528 rm -f conftest.$ac_objext
16529 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16530   (eval $ac_compile) 2>&5
16531   ac_status=$?
16532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533   (exit $ac_status); } &&
16534          { ac_try='test -s conftest.$ac_objext'
16535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16536   (eval $ac_try) 2>&5
16537   ac_status=$?
16538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16539   (exit $ac_status); }; }; then
16540   break
16541 else
16542   echo "$as_me: failed program was:" >&5
16543 cat conftest.$ac_ext >&5
16544 fi
16545 rm -f conftest.$ac_objext conftest.$ac_ext
16546   cat >conftest.$ac_ext <<_ACEOF
16547 #line $LINENO "configure"
16548 #include "confdefs.h"
16549 #define _FILE_OFFSET_BITS 64
16550 #include <sys/types.h>
16551  /* Check that off_t can represent 2**63 - 1 correctly.
16552     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16553     since some C++ compilers masquerading as C compilers
16554     incorrectly reject 9223372036854775807.  */
16555 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16556   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16557                        && LARGE_OFF_T % 2147483647 == 1)
16558                       ? 1 : -1];
16559 #ifdef F77_DUMMY_MAIN
16560 #  ifdef __cplusplus
16561      extern "C"
16562 #  endif
16563    int F77_DUMMY_MAIN() { return 1; }
16564 #endif
16565 int
16566 main ()
16567 {
16568
16569   ;
16570   return 0;
16571 }
16572 _ACEOF
16573 rm -f conftest.$ac_objext
16574 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16575   (eval $ac_compile) 2>&5
16576   ac_status=$?
16577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16578   (exit $ac_status); } &&
16579          { ac_try='test -s conftest.$ac_objext'
16580   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16581   (eval $ac_try) 2>&5
16582   ac_status=$?
16583   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16584   (exit $ac_status); }; }; then
16585   ac_cv_sys_file_offset_bits=64; break
16586 else
16587   echo "$as_me: failed program was:" >&5
16588 cat conftest.$ac_ext >&5
16589 fi
16590 rm -f conftest.$ac_objext conftest.$ac_ext
16591   break
16592 done
16593 fi
16594 echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
16595 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
16596 if test "$ac_cv_sys_file_offset_bits" != no; then
16597
16598 cat >>confdefs.h <<_ACEOF
16599 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
16600 _ACEOF
16601
16602 fi
16603 rm -f conftest*
16604   echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
16605 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
16606 if test "${ac_cv_sys_large_files+set}" = set; then
16607   echo $ECHO_N "(cached) $ECHO_C" >&6
16608 else
16609   while :; do
16610   ac_cv_sys_large_files=no
16611   cat >conftest.$ac_ext <<_ACEOF
16612 #line $LINENO "configure"
16613 #include "confdefs.h"
16614 #include <sys/types.h>
16615  /* Check that off_t can represent 2**63 - 1 correctly.
16616     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16617     since some C++ compilers masquerading as C compilers
16618     incorrectly reject 9223372036854775807.  */
16619 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16620   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16621                        && LARGE_OFF_T % 2147483647 == 1)
16622                       ? 1 : -1];
16623 #ifdef F77_DUMMY_MAIN
16624 #  ifdef __cplusplus
16625      extern "C"
16626 #  endif
16627    int F77_DUMMY_MAIN() { return 1; }
16628 #endif
16629 int
16630 main ()
16631 {
16632
16633   ;
16634   return 0;
16635 }
16636 _ACEOF
16637 rm -f conftest.$ac_objext
16638 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16639   (eval $ac_compile) 2>&5
16640   ac_status=$?
16641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16642   (exit $ac_status); } &&
16643          { ac_try='test -s conftest.$ac_objext'
16644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16645   (eval $ac_try) 2>&5
16646   ac_status=$?
16647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16648   (exit $ac_status); }; }; then
16649   break
16650 else
16651   echo "$as_me: failed program was:" >&5
16652 cat conftest.$ac_ext >&5
16653 fi
16654 rm -f conftest.$ac_objext conftest.$ac_ext
16655   cat >conftest.$ac_ext <<_ACEOF
16656 #line $LINENO "configure"
16657 #include "confdefs.h"
16658 #define _LARGE_FILES 1
16659 #include <sys/types.h>
16660  /* Check that off_t can represent 2**63 - 1 correctly.
16661     We can't simply define LARGE_OFF_T to be 9223372036854775807,
16662     since some C++ compilers masquerading as C compilers
16663     incorrectly reject 9223372036854775807.  */
16664 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16665   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16666                        && LARGE_OFF_T % 2147483647 == 1)
16667                       ? 1 : -1];
16668 #ifdef F77_DUMMY_MAIN
16669 #  ifdef __cplusplus
16670      extern "C"
16671 #  endif
16672    int F77_DUMMY_MAIN() { return 1; }
16673 #endif
16674 int
16675 main ()
16676 {
16677
16678   ;
16679   return 0;
16680 }
16681 _ACEOF
16682 rm -f conftest.$ac_objext
16683 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16684   (eval $ac_compile) 2>&5
16685   ac_status=$?
16686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16687   (exit $ac_status); } &&
16688          { ac_try='test -s conftest.$ac_objext'
16689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16690   (eval $ac_try) 2>&5
16691   ac_status=$?
16692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16693   (exit $ac_status); }; }; then
16694   ac_cv_sys_large_files=1; break
16695 else
16696   echo "$as_me: failed program was:" >&5
16697 cat conftest.$ac_ext >&5
16698 fi
16699 rm -f conftest.$ac_objext conftest.$ac_ext
16700   break
16701 done
16702 fi
16703 echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
16704 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
16705 if test "$ac_cv_sys_large_files" != no; then
16706
16707 cat >>confdefs.h <<_ACEOF
16708 #define _LARGE_FILES $ac_cv_sys_large_files
16709 _ACEOF
16710
16711 fi
16712 rm -f conftest*
16713 fi
16714
16715 fi
16716
16717
16718 # Select semaphore implementation type.
16719 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
16720
16721 cat >>confdefs.h <<\_ACEOF
16722 #define USE_NAMED_POSIX_SEMAPHORES 1
16723 _ACEOF
16724
16725   SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
16726 else
16727   if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
16728
16729 cat >>confdefs.h <<\_ACEOF
16730 #define USE_UNNAMED_POSIX_SEMAPHORES 1
16731 _ACEOF
16732
16733     SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
16734   else
16735
16736 cat >>confdefs.h <<\_ACEOF
16737 #define USE_SYSV_SEMAPHORES 1
16738 _ACEOF
16739
16740     SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
16741   fi
16742 fi
16743
16744
16745 # Select shared-memory implementation type.
16746
16747 cat >>confdefs.h <<\_ACEOF
16748 #define USE_SYSV_SHARED_MEMORY 1
16749 _ACEOF
16750
16751 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
16752
16753
16754 if test "$enable_nls" = yes ; then
16755
16756   echo "$as_me:$LINENO: checking for library containing gettext" >&5
16757 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
16758 if test "${ac_cv_search_gettext+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761   ac_func_search_save_LIBS=$LIBS
16762 ac_cv_search_gettext=no
16763 cat >conftest.$ac_ext <<_ACEOF
16764 #line $LINENO "configure"
16765 #include "confdefs.h"
16766
16767 /* Override any gcc2 internal prototype to avoid an error.  */
16768 #ifdef __cplusplus
16769 extern "C"
16770 #endif
16771 /* We use char because int might match the return type of a gcc2
16772    builtin and then its argument prototype would still apply.  */
16773 char gettext ();
16774 #ifdef F77_DUMMY_MAIN
16775 #  ifdef __cplusplus
16776      extern "C"
16777 #  endif
16778    int F77_DUMMY_MAIN() { return 1; }
16779 #endif
16780 int
16781 main ()
16782 {
16783 gettext ();
16784   ;
16785   return 0;
16786 }
16787 _ACEOF
16788 rm -f conftest.$ac_objext conftest$ac_exeext
16789 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16790   (eval $ac_link) 2>&5
16791   ac_status=$?
16792   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16793   (exit $ac_status); } &&
16794          { ac_try='test -s conftest$ac_exeext'
16795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16796   (eval $ac_try) 2>&5
16797   ac_status=$?
16798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16799   (exit $ac_status); }; }; then
16800   ac_cv_search_gettext="none required"
16801 else
16802   echo "$as_me: failed program was:" >&5
16803 cat conftest.$ac_ext >&5
16804 fi
16805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16806 if test "$ac_cv_search_gettext" = no; then
16807   for ac_lib in intl; do
16808     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16809     cat >conftest.$ac_ext <<_ACEOF
16810 #line $LINENO "configure"
16811 #include "confdefs.h"
16812
16813 /* Override any gcc2 internal prototype to avoid an error.  */
16814 #ifdef __cplusplus
16815 extern "C"
16816 #endif
16817 /* We use char because int might match the return type of a gcc2
16818    builtin and then its argument prototype would still apply.  */
16819 char gettext ();
16820 #ifdef F77_DUMMY_MAIN
16821 #  ifdef __cplusplus
16822      extern "C"
16823 #  endif
16824    int F77_DUMMY_MAIN() { return 1; }
16825 #endif
16826 int
16827 main ()
16828 {
16829 gettext ();
16830   ;
16831   return 0;
16832 }
16833 _ACEOF
16834 rm -f conftest.$ac_objext conftest$ac_exeext
16835 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16836   (eval $ac_link) 2>&5
16837   ac_status=$?
16838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839   (exit $ac_status); } &&
16840          { ac_try='test -s conftest$ac_exeext'
16841   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16842   (eval $ac_try) 2>&5
16843   ac_status=$?
16844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16845   (exit $ac_status); }; }; then
16846   ac_cv_search_gettext="-l$ac_lib"
16847 break
16848 else
16849   echo "$as_me: failed program was:" >&5
16850 cat conftest.$ac_ext >&5
16851 fi
16852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16853   done
16854 fi
16855 LIBS=$ac_func_search_save_LIBS
16856 fi
16857 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
16858 echo "${ECHO_T}$ac_cv_search_gettext" >&6
16859 if test "$ac_cv_search_gettext" != no; then
16860   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
16861
16862 else
16863   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
16864 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
16865    { (exit 1); exit 1; }; }
16866 fi
16867
16868   if test "${ac_cv_header_libintl_h+set}" = set; then
16869   echo "$as_me:$LINENO: checking for libintl.h" >&5
16870 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
16871 if test "${ac_cv_header_libintl_h+set}" = set; then
16872   echo $ECHO_N "(cached) $ECHO_C" >&6
16873 fi
16874 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
16875 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
16876 else
16877   # Is the header compilable?
16878 echo "$as_me:$LINENO: checking libintl.h usability" >&5
16879 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
16880 cat >conftest.$ac_ext <<_ACEOF
16881 #line $LINENO "configure"
16882 #include "confdefs.h"
16883 $ac_includes_default
16884 #include <libintl.h>
16885 _ACEOF
16886 rm -f conftest.$ac_objext
16887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16888   (eval $ac_compile) 2>&5
16889   ac_status=$?
16890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16891   (exit $ac_status); } &&
16892          { ac_try='test -s conftest.$ac_objext'
16893   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16894   (eval $ac_try) 2>&5
16895   ac_status=$?
16896   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16897   (exit $ac_status); }; }; then
16898   ac_header_compiler=yes
16899 else
16900   echo "$as_me: failed program was:" >&5
16901 cat conftest.$ac_ext >&5
16902 ac_header_compiler=no
16903 fi
16904 rm -f conftest.$ac_objext conftest.$ac_ext
16905 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16906 echo "${ECHO_T}$ac_header_compiler" >&6
16907
16908 # Is the header present?
16909 echo "$as_me:$LINENO: checking libintl.h presence" >&5
16910 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
16911 cat >conftest.$ac_ext <<_ACEOF
16912 #line $LINENO "configure"
16913 #include "confdefs.h"
16914 #include <libintl.h>
16915 _ACEOF
16916 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16917   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16918   ac_status=$?
16919   egrep -v '^ *\+' conftest.er1 >conftest.err
16920   rm -f conftest.er1
16921   cat conftest.err >&5
16922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923   (exit $ac_status); } >/dev/null; then
16924   if test -s conftest.err; then
16925     ac_cpp_err=$ac_c_preproc_warn_flag
16926   else
16927     ac_cpp_err=
16928   fi
16929 else
16930   ac_cpp_err=yes
16931 fi
16932 if test -z "$ac_cpp_err"; then
16933   ac_header_preproc=yes
16934 else
16935   echo "$as_me: failed program was:" >&5
16936   cat conftest.$ac_ext >&5
16937   ac_header_preproc=no
16938 fi
16939 rm -f conftest.err conftest.$ac_ext
16940 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16941 echo "${ECHO_T}$ac_header_preproc" >&6
16942
16943 # So?  What about this header?
16944 case $ac_header_compiler:$ac_header_preproc in
16945   yes:no )
16946     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
16947 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16948     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
16949 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
16950   no:yes )
16951     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
16952 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
16953     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
16954 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
16955     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
16956 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
16957 esac
16958 echo "$as_me:$LINENO: checking for libintl.h" >&5
16959 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
16960 if test "${ac_cv_header_libintl_h+set}" = set; then
16961   echo $ECHO_N "(cached) $ECHO_C" >&6
16962 else
16963   ac_cv_header_libintl_h=$ac_header_preproc
16964 fi
16965 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
16966 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
16967
16968 fi
16969 if test $ac_cv_header_libintl_h = yes; then
16970   :
16971 else
16972   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
16973 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
16974    { (exit 1); exit 1; }; }
16975 fi
16976
16977
16978   for ac_prog in msgfmt
16979 do
16980   # Extract the first word of "$ac_prog", so it can be a program name with args.
16981 set dummy $ac_prog; ac_word=$2
16982 echo "$as_me:$LINENO: checking for $ac_word" >&5
16983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16984 if test "${ac_cv_prog_MSGFMT+set}" = set; then
16985   echo $ECHO_N "(cached) $ECHO_C" >&6
16986 else
16987   if test -n "$MSGFMT"; then
16988   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
16989 else
16990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16991 for as_dir in $PATH
16992 do
16993   IFS=$as_save_IFS
16994   test -z "$as_dir" && as_dir=.
16995   for ac_exec_ext in '' $ac_executable_extensions; do
16996   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16997     ac_cv_prog_MSGFMT="$ac_prog"
16998     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16999     break 2
17000   fi
17001 done
17002 done
17003
17004 fi
17005 fi
17006 MSGFMT=$ac_cv_prog_MSGFMT
17007 if test -n "$MSGFMT"; then
17008   echo "$as_me:$LINENO: result: $MSGFMT" >&5
17009 echo "${ECHO_T}$MSGFMT" >&6
17010 else
17011   echo "$as_me:$LINENO: result: no" >&5
17012 echo "${ECHO_T}no" >&6
17013 fi
17014
17015   test -n "$MSGFMT" && break
17016 done
17017
17018   if test -z "$MSGFMT"; then
17019     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
17020 echo "$as_me: error: msgfmt is required for NLS" >&2;}
17021    { (exit 1); exit 1; }; }
17022   fi
17023   for ac_prog in msgmerge
17024 do
17025   # Extract the first word of "$ac_prog", so it can be a program name with args.
17026 set dummy $ac_prog; ac_word=$2
17027 echo "$as_me:$LINENO: checking for $ac_word" >&5
17028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17029 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
17030   echo $ECHO_N "(cached) $ECHO_C" >&6
17031 else
17032   if test -n "$MSGMERGE"; then
17033   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
17034 else
17035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17036 for as_dir in $PATH
17037 do
17038   IFS=$as_save_IFS
17039   test -z "$as_dir" && as_dir=.
17040   for ac_exec_ext in '' $ac_executable_extensions; do
17041   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17042     ac_cv_prog_MSGMERGE="$ac_prog"
17043     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17044     break 2
17045   fi
17046 done
17047 done
17048
17049 fi
17050 fi
17051 MSGMERGE=$ac_cv_prog_MSGMERGE
17052 if test -n "$MSGMERGE"; then
17053   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
17054 echo "${ECHO_T}$MSGMERGE" >&6
17055 else
17056   echo "$as_me:$LINENO: result: no" >&5
17057 echo "${ECHO_T}no" >&6
17058 fi
17059
17060   test -n "$MSGMERGE" && break
17061 done
17062
17063   for ac_prog in xgettext
17064 do
17065   # Extract the first word of "$ac_prog", so it can be a program name with args.
17066 set dummy $ac_prog; ac_word=$2
17067 echo "$as_me:$LINENO: checking for $ac_word" >&5
17068 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17069 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
17070   echo $ECHO_N "(cached) $ECHO_C" >&6
17071 else
17072   if test -n "$XGETTEXT"; then
17073   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
17074 else
17075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17076 for as_dir in $PATH
17077 do
17078   IFS=$as_save_IFS
17079   test -z "$as_dir" && as_dir=.
17080   for ac_exec_ext in '' $ac_executable_extensions; do
17081   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17082     ac_cv_prog_XGETTEXT="$ac_prog"
17083     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17084     break 2
17085   fi
17086 done
17087 done
17088
17089 fi
17090 fi
17091 XGETTEXT=$ac_cv_prog_XGETTEXT
17092 if test -n "$XGETTEXT"; then
17093   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
17094 echo "${ECHO_T}$XGETTEXT" >&6
17095 else
17096   echo "$as_me:$LINENO: result: no" >&5
17097 echo "${ECHO_T}no" >&6
17098 fi
17099
17100   test -n "$XGETTEXT" && break
17101 done
17102
17103
17104   # Note: share/locale is always the default, independent of $datadir
17105   localedir='${prefix}/share/locale'
17106   if test x"$prefix" = x"NONE"; then
17107     exp_localedir="$ac_default_prefix/share/locale"
17108   else
17109     exp_localedir="$prefix/share/locale"
17110   fi
17111
17112
17113
17114 cat >>confdefs.h <<_ACEOF
17115 #define LOCALEDIR "$exp_localedir"
17116 _ACEOF
17117
17118
17119 fi
17120
17121 # Check for Tcl configuration script tclConfig.sh
17122 if test "$with_tcl" = yes; then
17123     for ac_prog in tclsh tcl
17124 do
17125   # Extract the first word of "$ac_prog", so it can be a program name with args.
17126 set dummy $ac_prog; ac_word=$2
17127 echo "$as_me:$LINENO: checking for $ac_word" >&5
17128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17129 if test "${ac_cv_path_TCLSH+set}" = set; then
17130   echo $ECHO_N "(cached) $ECHO_C" >&6
17131 else
17132   case $TCLSH in
17133   [\\/]* | ?:[\\/]*)
17134   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
17135   ;;
17136   *)
17137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17138 for as_dir in $PATH
17139 do
17140   IFS=$as_save_IFS
17141   test -z "$as_dir" && as_dir=.
17142   for ac_exec_ext in '' $ac_executable_extensions; do
17143   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17144     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
17145     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17146     break 2
17147   fi
17148 done
17149 done
17150
17151   ;;
17152 esac
17153 fi
17154 TCLSH=$ac_cv_path_TCLSH
17155
17156 if test -n "$TCLSH"; then
17157   echo "$as_me:$LINENO: result: $TCLSH" >&5
17158 echo "${ECHO_T}$TCLSH" >&6
17159 else
17160   echo "$as_me:$LINENO: result: no" >&5
17161 echo "${ECHO_T}no" >&6
17162 fi
17163
17164   test -n "$TCLSH" && break
17165 done
17166
17167 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
17168 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
17169 # Let user override test
17170 if test -z "$TCL_CONFIG_SH"; then
17171     pgac_test_dirs="$with_tclconfig"
17172
17173     set X $pgac_test_dirs; shift
17174     if test $# -eq 0; then
17175         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
17176 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
17177    { (exit 1); exit 1; }; }
17178         set X `echo 'puts $auto_path' | $TCLSH`; shift
17179     fi
17180
17181     for pgac_dir do
17182         if test -r "$pgac_dir/tclConfig.sh"; then
17183             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
17184             break
17185         fi
17186     done
17187 fi
17188
17189 if test -z "$TCL_CONFIG_SH"; then
17190     echo "$as_me:$LINENO: result: no" >&5
17191 echo "${ECHO_T}no" >&6
17192     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
17193 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
17194    { (exit 1); exit 1; }; }
17195 else
17196     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
17197 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
17198 fi
17199
17200
17201
17202     . "$TCL_CONFIG_SH"
17203 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
17204 eval TCL_LIB_FILE=\"$TCL_LIB_FILE\"
17205 eval TCL_LIBS=\"$TCL_LIBS\"
17206 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
17207 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
17208
17209     fi
17210
17211 # Check for Tk configuration script tkConfig.sh
17212 if test "$with_tk" = yes; then
17213     echo "$as_me:$LINENO: checking for tkConfig.sh" >&5
17214 echo $ECHO_N "checking for tkConfig.sh... $ECHO_C" >&6
17215 # Let user override test
17216 if test -z "$TK_CONFIG_SH"; then
17217     pgac_test_dirs="$with_tkconfig $with_tclconfig"
17218
17219     set X $pgac_test_dirs; shift
17220     if test $# -eq 0; then
17221         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tkConfig.sh because no Tcl shell was found" >&5
17222 echo "$as_me: error: unable to locate tkConfig.sh because no Tcl shell was found" >&2;}
17223    { (exit 1); exit 1; }; }
17224         set X `echo 'puts $auto_path' | $TCLSH`; shift
17225     fi
17226
17227     for pgac_dir do
17228         if test -r "$pgac_dir/tkConfig.sh"; then
17229             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
17230             break
17231         fi
17232     done
17233 fi
17234
17235 if test -z "$TK_CONFIG_SH"; then
17236     echo "$as_me:$LINENO: result: no" >&5
17237 echo "${ECHO_T}no" >&6
17238     { { echo "$as_me:$LINENO: error: file 'tkConfig.sh' is required for Tk" >&5
17239 echo "$as_me: error: file 'tkConfig.sh' is required for Tk" >&2;}
17240    { (exit 1); exit 1; }; }
17241 else
17242     echo "$as_me:$LINENO: result: $TK_CONFIG_SH" >&5
17243 echo "${ECHO_T}$TK_CONFIG_SH" >&6
17244 fi
17245
17246
17247
17248     . "$TK_CONFIG_SH"
17249 eval TK_LIBS=\"$TK_LIBS\"
17250 eval TK_LIB_SPEC=\"$TK_LIB_SPEC\"
17251 eval TK_XINCLUDES=\"$TK_XINCLUDES\"
17252
17253 fi
17254
17255
17256 #
17257 # Check for DocBook and tools
17258 #
17259 for ac_prog in onsgmls nsgmls
17260 do
17261   # Extract the first word of "$ac_prog", so it can be a program name with args.
17262 set dummy $ac_prog; ac_word=$2
17263 echo "$as_me:$LINENO: checking for $ac_word" >&5
17264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17265 if test "${ac_cv_prog_NSGMLS+set}" = set; then
17266   echo $ECHO_N "(cached) $ECHO_C" >&6
17267 else
17268   if test -n "$NSGMLS"; then
17269   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
17270 else
17271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17272 for as_dir in $PATH
17273 do
17274   IFS=$as_save_IFS
17275   test -z "$as_dir" && as_dir=.
17276   for ac_exec_ext in '' $ac_executable_extensions; do
17277   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17278     ac_cv_prog_NSGMLS="$ac_prog"
17279     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17280     break 2
17281   fi
17282 done
17283 done
17284
17285 fi
17286 fi
17287 NSGMLS=$ac_cv_prog_NSGMLS
17288 if test -n "$NSGMLS"; then
17289   echo "$as_me:$LINENO: result: $NSGMLS" >&5
17290 echo "${ECHO_T}$NSGMLS" >&6
17291 else
17292   echo "$as_me:$LINENO: result: no" >&5
17293 echo "${ECHO_T}no" >&6
17294 fi
17295
17296   test -n "$NSGMLS" && break
17297 done
17298
17299 for ac_prog in openjade jade
17300 do
17301   # Extract the first word of "$ac_prog", so it can be a program name with args.
17302 set dummy $ac_prog; ac_word=$2
17303 echo "$as_me:$LINENO: checking for $ac_word" >&5
17304 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17305 if test "${ac_cv_prog_JADE+set}" = set; then
17306   echo $ECHO_N "(cached) $ECHO_C" >&6
17307 else
17308   if test -n "$JADE"; then
17309   ac_cv_prog_JADE="$JADE" # Let the user override the test.
17310 else
17311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17312 for as_dir in $PATH
17313 do
17314   IFS=$as_save_IFS
17315   test -z "$as_dir" && as_dir=.
17316   for ac_exec_ext in '' $ac_executable_extensions; do
17317   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17318     ac_cv_prog_JADE="$ac_prog"
17319     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17320     break 2
17321   fi
17322 done
17323 done
17324
17325 fi
17326 fi
17327 JADE=$ac_cv_prog_JADE
17328 if test -n "$JADE"; then
17329   echo "$as_me:$LINENO: result: $JADE" >&5
17330 echo "${ECHO_T}$JADE" >&6
17331 else
17332   echo "$as_me:$LINENO: result: no" >&5
17333 echo "${ECHO_T}no" >&6
17334 fi
17335
17336   test -n "$JADE" && break
17337 done
17338
17339
17340 echo "$as_me:$LINENO: checking for DocBook V3.1" >&5
17341 echo $ECHO_N "checking for DocBook V3.1... $ECHO_C" >&6
17342 if test "${pgac_cv_check_docbook+set}" = set; then
17343   echo $ECHO_N "(cached) $ECHO_C" >&6
17344 else
17345   cat >conftest.sgml <<EOF
17346 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
17347 <book>
17348  <title>test</title>
17349  <chapter>
17350   <title>random</title>
17351    <sect1>
17352     <title>testsect</title>
17353     <para>text</para>
17354   </sect1>
17355  </chapter>
17356 </book>
17357 EOF
17358
17359 ${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
17360 if test $? -eq 0; then
17361   pgac_cv_check_docbook=yes
17362 else
17363   pgac_cv_check_docbook=no
17364 fi
17365 rm -f conftest.sgml
17366 fi
17367 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
17368 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
17369
17370 have_docbook=$pgac_cv_check_docbook
17371
17372
17373 echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
17374 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
17375 if test "${pgac_cv_path_stylesheets+set}" = set; then
17376   echo $ECHO_N "(cached) $ECHO_C" >&6
17377 else
17378   if test -n "$DOCBOOKSTYLE"; then
17379   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
17380 else
17381   for pgac_prefix in /usr /usr/local /opt; do
17382     for pgac_infix in share lib; do
17383       for pgac_postfix in \
17384         sgml/stylesheets/nwalsh-modular \
17385         sgml/stylesheets/docbook \
17386         sgml/docbook/dsssl/modular \
17387         sgml/docbook/stylesheet/dsssl/modular \
17388         sgml/docbook/dsssl-stylesheets
17389       do
17390         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
17391         if test -r "$pgac_candidate/html/docbook.dsl" \
17392            && test -r "$pgac_candidate/print/docbook.dsl"
17393         then
17394           pgac_cv_path_stylesheets=$pgac_candidate
17395           break 3
17396         fi
17397       done
17398     done
17399   done
17400 fi
17401 fi
17402
17403 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
17404
17405 if test -n "$DOCBOOKSTYLE"; then
17406   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
17407 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
17408 else
17409   echo "$as_me:$LINENO: result: no" >&5
17410 echo "${ECHO_T}no" >&6
17411 fi
17412 if test -n "$DOCBOOKSTYLE"; then
17413   for ac_prog in collateindex.pl
17414 do
17415   # Extract the first word of "$ac_prog", so it can be a program name with args.
17416 set dummy $ac_prog; ac_word=$2
17417 echo "$as_me:$LINENO: checking for $ac_word" >&5
17418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17419 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
17420   echo $ECHO_N "(cached) $ECHO_C" >&6
17421 else
17422   case $COLLATEINDEX in
17423   [\\/]* | ?:[\\/]*)
17424   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
17425   ;;
17426   *)
17427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17428 for as_dir in $DOCBOOKSTYLE/bin $PATH
17429 do
17430   IFS=$as_save_IFS
17431   test -z "$as_dir" && as_dir=.
17432   for ac_exec_ext in '' $ac_executable_extensions; do
17433   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17434     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
17435     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17436     break 2
17437   fi
17438 done
17439 done
17440
17441   ;;
17442 esac
17443 fi
17444 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
17445
17446 if test -n "$COLLATEINDEX"; then
17447   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
17448 echo "${ECHO_T}$COLLATEINDEX" >&6
17449 else
17450   echo "$as_me:$LINENO: result: no" >&5
17451 echo "${ECHO_T}no" >&6
17452 fi
17453
17454   test -n "$COLLATEINDEX" && break
17455 done
17456
17457 else
17458   for ac_prog in collateindex.pl
17459 do
17460   # Extract the first word of "$ac_prog", so it can be a program name with args.
17461 set dummy $ac_prog; ac_word=$2
17462 echo "$as_me:$LINENO: checking for $ac_word" >&5
17463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17464 if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
17465   echo $ECHO_N "(cached) $ECHO_C" >&6
17466 else
17467   case $COLLATEINDEX in
17468   [\\/]* | ?:[\\/]*)
17469   ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
17470   ;;
17471   *)
17472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17473 for as_dir in $PATH
17474 do
17475   IFS=$as_save_IFS
17476   test -z "$as_dir" && as_dir=.
17477   for ac_exec_ext in '' $ac_executable_extensions; do
17478   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17479     ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
17480     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17481     break 2
17482   fi
17483 done
17484 done
17485
17486   ;;
17487 esac
17488 fi
17489 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
17490
17491 if test -n "$COLLATEINDEX"; then
17492   echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
17493 echo "${ECHO_T}$COLLATEINDEX" >&6
17494 else
17495   echo "$as_me:$LINENO: result: no" >&5
17496 echo "${ECHO_T}no" >&6
17497 fi
17498
17499   test -n "$COLLATEINDEX" && break
17500 done
17501
17502 fi
17503 for ac_prog in sgmlspl
17504 do
17505   # Extract the first word of "$ac_prog", so it can be a program name with args.
17506 set dummy $ac_prog; ac_word=$2
17507 echo "$as_me:$LINENO: checking for $ac_word" >&5
17508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17509 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
17510   echo $ECHO_N "(cached) $ECHO_C" >&6
17511 else
17512   if test -n "$SGMLSPL"; then
17513   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
17514 else
17515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17516 for as_dir in $PATH
17517 do
17518   IFS=$as_save_IFS
17519   test -z "$as_dir" && as_dir=.
17520   for ac_exec_ext in '' $ac_executable_extensions; do
17521   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17522     ac_cv_prog_SGMLSPL="$ac_prog"
17523     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17524     break 2
17525   fi
17526 done
17527 done
17528
17529 fi
17530 fi
17531 SGMLSPL=$ac_cv_prog_SGMLSPL
17532 if test -n "$SGMLSPL"; then
17533   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
17534 echo "${ECHO_T}$SGMLSPL" >&6
17535 else
17536   echo "$as_me:$LINENO: result: no" >&5
17537 echo "${ECHO_T}no" >&6
17538 fi
17539
17540   test -n "$SGMLSPL" && break
17541 done
17542
17543
17544
17545 # prepare build tree if outside source tree
17546 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
17547 # Note 2: /bin/pwd might be better than shell's built-in at getting
17548 #         a symlink-free name.
17549 if test "$no_create" != yes; then
17550   if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
17551     :
17552   else
17553     vpath_build=yes
17554
17555     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
17556     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
17557     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
17558       || { { echo "$as_me:$LINENO: error: failed" >&5
17559 echo "$as_me: error: failed" >&2;}
17560    { (exit 1); exit 1; }; }
17561     echo "$as_me:$LINENO: result: done" >&5
17562 echo "${ECHO_T}done" >&6
17563   fi
17564 fi
17565
17566
17567 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
17568
17569
17570 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}"
17571
17572
17573 ac_config_headers="$ac_config_headers src/include/pg_config.h"
17574
17575
17576 cat >confcache <<\_ACEOF
17577 # This file is a shell script that caches the results of configure
17578 # tests run on this system so they can be shared between configure
17579 # scripts and configure runs, see configure's option --config-cache.
17580 # It is not useful on other systems.  If it contains results you don't
17581 # want to keep, you may remove or edit it.
17582 #
17583 # config.status only pays attention to the cache file if you give it
17584 # the --recheck option to rerun configure.
17585 #
17586 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17587 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17588 # following values.
17589
17590 _ACEOF
17591
17592 # The following way of writing the cache mishandles newlines in values,
17593 # but we know of no workaround that is simple, portable, and efficient.
17594 # So, don't put newlines in cache variables' values.
17595 # Ultrix sh set writes to stderr and can't be redirected directly,
17596 # and sets the high bit in the cache file unless we assign to the vars.
17597 {
17598   (set) 2>&1 |
17599     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17600     *ac_space=\ *)
17601       # `set' does not quote correctly, so add quotes (double-quote
17602       # substitution turns \\\\ into \\, and sed turns \\ into \).
17603       sed -n \
17604         "s/'/'\\\\''/g;
17605           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17606       ;;
17607     *)
17608       # `set' quotes correctly as required by POSIX, so do not add quotes.
17609       sed -n \
17610         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17611       ;;
17612     esac;
17613 } |
17614   sed '
17615      t clear
17616      : clear
17617      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17618      t end
17619      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17620      : end' >>confcache
17621 if cmp -s $cache_file confcache; then :; else
17622   if test -w $cache_file; then
17623     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17624     cat confcache >$cache_file
17625   else
17626     echo "not updating unwritable cache $cache_file"
17627   fi
17628 fi
17629 rm -f confcache
17630
17631 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17632 # Let make expand exec_prefix.
17633 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17634
17635 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17636 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17637 # trailing colons and then remove the whole line if VPATH becomes empty
17638 # (actually we leave an empty line to preserve line numbers).
17639 if test "x$srcdir" = x.; then
17640   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17641 s/:*\$(srcdir):*/:/;
17642 s/:*\${srcdir}:*/:/;
17643 s/:*@srcdir@:*/:/;
17644 s/^\([^=]*=[    ]*\):*/\1/;
17645 s/:*$//;
17646 s/^[^=]*=[      ]*$//;
17647 }'
17648 fi
17649
17650 DEFS=-DHAVE_CONFIG_H
17651
17652
17653 : ${CONFIG_STATUS=./config.status}
17654 ac_clean_files_save=$ac_clean_files
17655 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17656 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
17657 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17658 cat >$CONFIG_STATUS <<_ACEOF
17659 #! $SHELL
17660 # Generated by $as_me.
17661 # Run this file to recreate the current configuration.
17662 # Compiler output produced by configure, useful for debugging
17663 # configure, is in config.log if it exists.
17664
17665 debug=false
17666 SHELL=\${CONFIG_SHELL-$SHELL}
17667 _ACEOF
17668
17669 cat >>$CONFIG_STATUS <<\_ACEOF
17670
17671 ## --------------------- ##
17672 ## M4sh Initialization.  ##
17673 ## --------------------- ##
17674
17675 # Be Bourne compatible
17676 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17677   emulate sh
17678   NULLCMD=:
17679 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17680   set -o posix
17681 fi
17682
17683 # NLS nuisances.
17684 # Support unset when possible.
17685 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17686   as_unset=unset
17687 else
17688   as_unset=false
17689 fi
17690
17691 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
17692     { $as_unset LANG || test "${LANG+set}" != set; } ||
17693       { LANG=C; export LANG; }
17694 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
17695     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
17696       { LC_ALL=C; export LC_ALL; }
17697 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
17698     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
17699       { LC_TIME=C; export LC_TIME; }
17700 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
17701     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
17702       { LC_CTYPE=C; export LC_CTYPE; }
17703 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
17704     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
17705       { LANGUAGE=C; export LANGUAGE; }
17706 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
17707     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
17708       { LC_COLLATE=C; export LC_COLLATE; }
17709 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
17710     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
17711       { LC_NUMERIC=C; export LC_NUMERIC; }
17712 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
17713     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
17714       { LC_MESSAGES=C; export LC_MESSAGES; }
17715
17716
17717 # Name of the executable.
17718 as_me=`(basename "$0") 2>/dev/null ||
17719 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17720          X"$0" : 'X\(//\)$' \| \
17721          X"$0" : 'X\(/\)$' \| \
17722          .     : '\(.\)' 2>/dev/null ||
17723 echo X/"$0" |
17724     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
17725           /^X\/\(\/\/\)$/{ s//\1/; q; }
17726           /^X\/\(\/\).*/{ s//\1/; q; }
17727           s/.*/./; q'`
17728
17729 # PATH needs CR, and LINENO needs CR and PATH.
17730 # Avoid depending upon Character Ranges.
17731 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17732 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17733 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17734 as_cr_digits='0123456789'
17735 as_cr_alnum=$as_cr_Letters$as_cr_digits
17736
17737 # The user is always right.
17738 if test "${PATH_SEPARATOR+set}" != set; then
17739   echo "#! /bin/sh" >conftest.sh
17740   echo  "exit 0"   >>conftest.sh
17741   chmod +x conftest.sh
17742   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
17743     PATH_SEPARATOR=';'
17744   else
17745     PATH_SEPARATOR=:
17746   fi
17747   rm -f conftest.sh
17748 fi
17749
17750
17751   as_lineno_1=$LINENO
17752   as_lineno_2=$LINENO
17753   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17754   test "x$as_lineno_1" != "x$as_lineno_2" &&
17755   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
17756   # Find who we are.  Look in the path if we contain no path at all
17757   # relative or not.
17758   case $0 in
17759     *[\\/]* ) as_myself=$0 ;;
17760     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17761 for as_dir in $PATH
17762 do
17763   IFS=$as_save_IFS
17764   test -z "$as_dir" && as_dir=.
17765   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17766 done
17767
17768        ;;
17769   esac
17770   # We did not find ourselves, most probably we were run as `sh COMMAND'
17771   # in which case we are not to be found in the path.
17772   if test "x$as_myself" = x; then
17773     as_myself=$0
17774   fi
17775   if test ! -f "$as_myself"; then
17776     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
17777 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
17778    { (exit 1); exit 1; }; }
17779   fi
17780   case $CONFIG_SHELL in
17781   '')
17782     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17783 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
17784 do
17785   IFS=$as_save_IFS
17786   test -z "$as_dir" && as_dir=.
17787   for as_base in sh bash ksh sh5; do
17788          case $as_dir in
17789          /*)
17790            if ("$as_dir/$as_base" -c '
17791   as_lineno_1=$LINENO
17792   as_lineno_2=$LINENO
17793   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
17794   test "x$as_lineno_1" != "x$as_lineno_2" &&
17795   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
17796              CONFIG_SHELL=$as_dir/$as_base
17797              export CONFIG_SHELL
17798              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
17799            fi;;
17800          esac
17801        done
17802 done
17803 ;;
17804   esac
17805
17806   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
17807   # uniformly replaced by the line number.  The first 'sed' inserts a
17808   # line-number line before each line; the second 'sed' does the real
17809   # work.  The second script uses 'N' to pair each line-number line
17810   # with the numbered line, and appends trailing '-' during
17811   # substitution so that $LINENO is not a special case at line end.
17812   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
17813   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
17814   sed '=' <$as_myself |
17815     sed '
17816       N
17817       s,$,-,
17818       : loop
17819       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
17820       t loop
17821       s,-$,,
17822       s,^['$as_cr_digits']*\n,,
17823     ' >$as_me.lineno &&
17824   chmod +x $as_me.lineno ||
17825     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
17826 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
17827    { (exit 1); exit 1; }; }
17828
17829   # Don't try to exec as it changes $[0], causing all sort of problems
17830   # (the dirname of $[0] is not the place where we might find the
17831   # original and so on.  Autoconf is especially sensible to this).
17832   . ./$as_me.lineno
17833   # Exit status is that of the last command.
17834   exit
17835 }
17836
17837
17838 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
17839   *c*,-n*) ECHO_N= ECHO_C='
17840 ' ECHO_T='      ' ;;
17841   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
17842   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
17843 esac
17844
17845 if expr a : '\(a\)' >/dev/null 2>&1; then
17846   as_expr=expr
17847 else
17848   as_expr=false
17849 fi
17850
17851 rm -f conf$$ conf$$.exe conf$$.file
17852 echo >conf$$.file
17853 if ln -s conf$$.file conf$$ 2>/dev/null; then
17854   # We could just check for DJGPP; but this test a) works b) is more generic
17855   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17856   if test -f conf$$.exe; then
17857     # Don't use ln at all; we don't have any links
17858     as_ln_s='cp -p'
17859   else
17860     as_ln_s='ln -s'
17861   fi
17862 elif ln conf$$.file conf$$ 2>/dev/null; then
17863   as_ln_s=ln
17864 else
17865   as_ln_s='cp -p'
17866 fi
17867 rm -f conf$$ conf$$.exe conf$$.file
17868
17869 as_executable_p="test -f"
17870
17871 # Sed expression to map a string onto a valid CPP name.
17872 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17873
17874 # Sed expression to map a string onto a valid variable name.
17875 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17876
17877
17878 # IFS
17879 # We need space, tab and new line, in precisely that order.
17880 as_nl='
17881 '
17882 IFS="   $as_nl"
17883
17884 # CDPATH.
17885 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
17886
17887 exec 6>&1
17888
17889 # Open the log real soon, to keep \$[0] and so on meaningful, and to
17890 # report actual input values of CONFIG_FILES etc. instead of their
17891 # values after options handling.  Logging --version etc. is OK.
17892 exec 5>>config.log
17893 {
17894   echo
17895   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17896 ## Running $as_me. ##
17897 _ASBOX
17898 } >&5
17899 cat >&5 <<_CSEOF
17900
17901 This file was extended by PostgreSQL $as_me 7.4beta3, which was
17902 generated by GNU Autoconf 2.53.  Invocation command line was
17903
17904   CONFIG_FILES    = $CONFIG_FILES
17905   CONFIG_HEADERS  = $CONFIG_HEADERS
17906   CONFIG_LINKS    = $CONFIG_LINKS
17907   CONFIG_COMMANDS = $CONFIG_COMMANDS
17908   $ $0 $@
17909
17910 _CSEOF
17911 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
17912 echo >&5
17913 _ACEOF
17914
17915 # Files that config.status was made for.
17916 if test -n "$ac_config_files"; then
17917   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17918 fi
17919
17920 if test -n "$ac_config_headers"; then
17921   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17922 fi
17923
17924 if test -n "$ac_config_links"; then
17925   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17926 fi
17927
17928 if test -n "$ac_config_commands"; then
17929   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17930 fi
17931
17932 cat >>$CONFIG_STATUS <<\_ACEOF
17933
17934 ac_cs_usage="\
17935 \`$as_me' instantiates files from templates according to the
17936 current configuration.
17937
17938 Usage: $0 [OPTIONS] [FILE]...
17939
17940   -h, --help       print this help, then exit
17941   -V, --version    print version number, then exit
17942   -d, --debug      don't remove temporary files
17943       --recheck    update $as_me by reconfiguring in the same conditions
17944   --file=FILE[:TEMPLATE]
17945                    instantiate the configuration file FILE
17946   --header=FILE[:TEMPLATE]
17947                    instantiate the configuration header FILE
17948
17949 Configuration files:
17950 $config_files
17951
17952 Configuration headers:
17953 $config_headers
17954
17955 Configuration links:
17956 $config_links
17957
17958 Report bugs to <bug-autoconf@gnu.org>."
17959 _ACEOF
17960
17961 cat >>$CONFIG_STATUS <<_ACEOF
17962 ac_cs_version="\\
17963 PostgreSQL config.status 7.4beta3
17964 configured by $0, generated by GNU Autoconf 2.53,
17965   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17966
17967 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17968 Free Software Foundation, Inc.
17969 This config.status script is free software; the Free Software Foundation
17970 gives unlimited permission to copy, distribute and modify it."
17971 srcdir=$srcdir
17972 _ACEOF
17973
17974 cat >>$CONFIG_STATUS <<\_ACEOF
17975 # If no file are specified by the user, then we need to provide default
17976 # value.  By we need to know if files were specified by the user.
17977 ac_need_defaults=:
17978 while test $# != 0
17979 do
17980   case $1 in
17981   --*=*)
17982     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17983     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17984     shift
17985     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17986     shift
17987     ;;
17988   -*);;
17989   *) # This is not an option, so the user has probably given explicit
17990      # arguments.
17991      ac_need_defaults=false;;
17992   esac
17993
17994   case $1 in
17995   # Handling of the options.
17996 _ACEOF
17997 cat >>$CONFIG_STATUS <<_ACEOF
17998   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17999     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18000     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18001 _ACEOF
18002 cat >>$CONFIG_STATUS <<\_ACEOF
18003   --version | --vers* | -V )
18004     echo "$ac_cs_version"; exit 0 ;;
18005   --he | --h)
18006     # Conflict between --help and --header
18007     { { echo "$as_me:$LINENO: error: ambiguous option: $1
18008 Try \`$0 --help' for more information." >&5
18009 echo "$as_me: error: ambiguous option: $1
18010 Try \`$0 --help' for more information." >&2;}
18011    { (exit 1); exit 1; }; };;
18012   --help | --hel | -h )
18013     echo "$ac_cs_usage"; exit 0 ;;
18014   --debug | --d* | -d )
18015     debug=: ;;
18016   --file | --fil | --fi | --f )
18017     shift
18018     CONFIG_FILES="$CONFIG_FILES $1"
18019     ac_need_defaults=false;;
18020   --header | --heade | --head | --hea )
18021     shift
18022     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18023     ac_need_defaults=false;;
18024
18025   # This is an error.
18026   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18027 Try \`$0 --help' for more information." >&5
18028 echo "$as_me: error: unrecognized option: $1
18029 Try \`$0 --help' for more information." >&2;}
18030    { (exit 1); exit 1; }; } ;;
18031
18032   *) ac_config_targets="$ac_config_targets $1" ;;
18033
18034   esac
18035   shift
18036 done
18037
18038 _ACEOF
18039
18040
18041
18042
18043
18044 cat >>$CONFIG_STATUS <<\_ACEOF
18045 for ac_config_target in $ac_config_targets
18046 do
18047   case "$ac_config_target" in
18048   # Handling of arguments.
18049   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
18050   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
18051   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
18052   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
18053   "src/backend/port/pg_sema.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
18054   "src/backend/port/pg_shmem.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
18055   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
18056   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
18057   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
18058   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
18059   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18060 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18061    { (exit 1); exit 1; }; };;
18062   esac
18063 done
18064
18065 # If the user did not use the arguments to specify the items to instantiate,
18066 # then the envvar interface is used.  Set only those that are not.
18067 # We use the long form for the default assignment because of an extremely
18068 # bizarre bug on SunOS 4.1.3.
18069 if $ac_need_defaults; then
18070   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18071   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18072   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
18073 fi
18074
18075 # Create a temporary directory, and hook for its removal unless debugging.
18076 $debug ||
18077 {
18078   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18079   trap '{ (exit 1); exit 1; }' 1 2 13 15
18080 }
18081
18082 # Create a (secure) tmp directory for tmp files.
18083 : ${TMPDIR=/tmp}
18084 {
18085   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18086   test -n "$tmp" && test -d "$tmp"
18087 }  ||
18088 {
18089   tmp=$TMPDIR/cs$$-$RANDOM
18090   (umask 077 && mkdir $tmp)
18091 } ||
18092 {
18093    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18094    { (exit 1); exit 1; }
18095 }
18096
18097 _ACEOF
18098
18099 cat >>$CONFIG_STATUS <<_ACEOF
18100
18101 #
18102 # CONFIG_FILES section.
18103 #
18104
18105 # No need to generate the scripts if there are no CONFIG_FILES.
18106 # This happens for instance when ./config.status config.h
18107 if test -n "\$CONFIG_FILES"; then
18108   # Protect against being on the right side of a sed subst in config.status.
18109   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18110    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18111 s,@SHELL@,$SHELL,;t t
18112 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18113 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18114 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18115 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18116 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18117 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18118 s,@exec_prefix@,$exec_prefix,;t t
18119 s,@prefix@,$prefix,;t t
18120 s,@program_transform_name@,$program_transform_name,;t t
18121 s,@bindir@,$bindir,;t t
18122 s,@sbindir@,$sbindir,;t t
18123 s,@libexecdir@,$libexecdir,;t t
18124 s,@datadir@,$datadir,;t t
18125 s,@sysconfdir@,$sysconfdir,;t t
18126 s,@sharedstatedir@,$sharedstatedir,;t t
18127 s,@localstatedir@,$localstatedir,;t t
18128 s,@libdir@,$libdir,;t t
18129 s,@includedir@,$includedir,;t t
18130 s,@oldincludedir@,$oldincludedir,;t t
18131 s,@infodir@,$infodir,;t t
18132 s,@mandir@,$mandir,;t t
18133 s,@build_alias@,$build_alias,;t t
18134 s,@host_alias@,$host_alias,;t t
18135 s,@target_alias@,$target_alias,;t t
18136 s,@DEFS@,$DEFS,;t t
18137 s,@ECHO_C@,$ECHO_C,;t t
18138 s,@ECHO_N@,$ECHO_N,;t t
18139 s,@ECHO_T@,$ECHO_T,;t t
18140 s,@LIBS@,$LIBS,;t t
18141 s,@docdir@,$docdir,;t t
18142 s,@configure_args@,$configure_args,;t t
18143 s,@build@,$build,;t t
18144 s,@build_cpu@,$build_cpu,;t t
18145 s,@build_vendor@,$build_vendor,;t t
18146 s,@build_os@,$build_os,;t t
18147 s,@host@,$host,;t t
18148 s,@host_cpu@,$host_cpu,;t t
18149 s,@host_vendor@,$host_vendor,;t t
18150 s,@host_os@,$host_os,;t t
18151 s,@PORTNAME@,$PORTNAME,;t t
18152 s,@TAS@,$TAS,;t t
18153 s,@enable_nls@,$enable_nls,;t t
18154 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
18155 s,@default_port@,$default_port,;t t
18156 s,@enable_shared@,$enable_shared,;t t
18157 s,@enable_rpath@,$enable_rpath,;t t
18158 s,@enable_debug@,$enable_debug,;t t
18159 s,@CC@,$CC,;t t
18160 s,@CFLAGS@,$CFLAGS,;t t
18161 s,@LDFLAGS@,$LDFLAGS,;t t
18162 s,@CPPFLAGS@,$CPPFLAGS,;t t
18163 s,@ac_ct_CC@,$ac_ct_CC,;t t
18164 s,@EXEEXT@,$EXEEXT,;t t
18165 s,@OBJEXT@,$OBJEXT,;t t
18166 s,@CPP@,$CPP,;t t
18167 s,@GCC@,$GCC,;t t
18168 s,@autodepend@,$autodepend,;t t
18169 s,@INCLUDES@,$INCLUDES,;t t
18170 s,@enable_thread_safety@,$enable_thread_safety,;t t
18171 s,@with_tcl@,$with_tcl,;t t
18172 s,@with_tk@,$with_tk,;t t
18173 s,@with_perl@,$with_perl,;t t
18174 s,@with_python@,$with_python,;t t
18175 s,@ANT@,$ANT,;t t
18176 s,@with_java@,$with_java,;t t
18177 s,@with_krb4@,$with_krb4,;t t
18178 s,@with_krb5@,$with_krb5,;t t
18179 s,@krb_srvtab@,$krb_srvtab,;t t
18180 s,@with_pam@,$with_pam,;t t
18181 s,@with_rendezvous@,$with_rendezvous,;t t
18182 s,@with_openssl@,$with_openssl,;t t
18183 s,@ELF_SYS@,$ELF_SYS,;t t
18184 s,@AWK@,$AWK,;t t
18185 s,@FLEX@,$FLEX,;t t
18186 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
18187 s,@LN_S@,$LN_S,;t t
18188 s,@LD@,$LD,;t t
18189 s,@with_gnu_ld@,$with_gnu_ld,;t t
18190 s,@ld_R_works@,$ld_R_works,;t t
18191 s,@RANLIB@,$RANLIB,;t t
18192 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18193 s,@LORDER@,$LORDER,;t t
18194 s,@TAR@,$TAR,;t t
18195 s,@STRIP@,$STRIP,;t t
18196 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
18197 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
18198 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
18199 s,@YACC@,$YACC,;t t
18200 s,@YFLAGS@,$YFLAGS,;t t
18201 s,@PERL@,$PERL,;t t
18202 s,@perl_archlibexp@,$perl_archlibexp,;t t
18203 s,@perl_privlibexp@,$perl_privlibexp,;t t
18204 s,@perl_useshrplib@,$perl_useshrplib,;t t
18205 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
18206 s,@PYTHON@,$PYTHON,;t t
18207 s,@python_prefix@,$python_prefix,;t t
18208 s,@python_execprefix@,$python_execprefix,;t t
18209 s,@python_configdir@,$python_configdir,;t t
18210 s,@python_includespec@,$python_includespec,;t t
18211 s,@python_libspec@,$python_libspec,;t t
18212 s,@LIBOBJS@,$LIBOBJS,;t t
18213 s,@HAVE_IPV6@,$HAVE_IPV6,;t t
18214 s,@THREAD_CFLAGS@,$THREAD_CFLAGS,;t t
18215 s,@THREAD_LIBS@,$THREAD_LIBS,;t t
18216 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
18217 s,@MSGFMT@,$MSGFMT,;t t
18218 s,@MSGMERGE@,$MSGMERGE,;t t
18219 s,@XGETTEXT@,$XGETTEXT,;t t
18220 s,@localedir@,$localedir,;t t
18221 s,@TCLSH@,$TCLSH,;t t
18222 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
18223 s,@TCL_INCLUDE_SPEC@,$TCL_INCLUDE_SPEC,;t t
18224 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
18225 s,@TCL_LIBS@,$TCL_LIBS,;t t
18226 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
18227 s,@TCL_SHARED_BUILD@,$TCL_SHARED_BUILD,;t t
18228 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
18229 s,@TK_CONFIG_SH@,$TK_CONFIG_SH,;t t
18230 s,@TK_LIBS@,$TK_LIBS,;t t
18231 s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
18232 s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t
18233 s,@NSGMLS@,$NSGMLS,;t t
18234 s,@JADE@,$JADE,;t t
18235 s,@have_docbook@,$have_docbook,;t t
18236 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
18237 s,@COLLATEINDEX@,$COLLATEINDEX,;t t
18238 s,@SGMLSPL@,$SGMLSPL,;t t
18239 s,@vpath_build@,$vpath_build,;t t
18240 CEOF
18241
18242 _ACEOF
18243
18244   cat >>$CONFIG_STATUS <<\_ACEOF
18245   # Split the substitutions into bite-sized pieces for seds with
18246   # small command number limits, like on Digital OSF/1 and HP-UX.
18247   ac_max_sed_lines=48
18248   ac_sed_frag=1 # Number of current file.
18249   ac_beg=1 # First line for current file.
18250   ac_end=$ac_max_sed_lines # Line after last line for current file.
18251   ac_more_lines=:
18252   ac_sed_cmds=
18253   while $ac_more_lines; do
18254     if test $ac_beg -gt 1; then
18255       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18256     else
18257       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18258     fi
18259     if test ! -s $tmp/subs.frag; then
18260       ac_more_lines=false
18261     else
18262       # The purpose of the label and of the branching condition is to
18263       # speed up the sed processing (if there are no `@' at all, there
18264       # is no need to browse any of the substitutions).
18265       # These are the two extra sed commands mentioned above.
18266       (echo ':t
18267   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18268       if test -z "$ac_sed_cmds"; then
18269         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18270       else
18271         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18272       fi
18273       ac_sed_frag=`expr $ac_sed_frag + 1`
18274       ac_beg=$ac_end
18275       ac_end=`expr $ac_end + $ac_max_sed_lines`
18276     fi
18277   done
18278   if test -z "$ac_sed_cmds"; then
18279     ac_sed_cmds=cat
18280   fi
18281 fi # test -n "$CONFIG_FILES"
18282
18283 _ACEOF
18284 cat >>$CONFIG_STATUS <<\_ACEOF
18285 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18286   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18287   case $ac_file in
18288   - | *:- | *:-:* ) # input from stdin
18289         cat >$tmp/stdin
18290         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18291         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18292   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18293         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18294   * )   ac_file_in=$ac_file.in ;;
18295   esac
18296
18297   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18298   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18299 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18300          X"$ac_file" : 'X\(//\)[^/]' \| \
18301          X"$ac_file" : 'X\(//\)$' \| \
18302          X"$ac_file" : 'X\(/\)' \| \
18303          .     : '\(.\)' 2>/dev/null ||
18304 echo X"$ac_file" |
18305     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18306           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18307           /^X\(\/\/\)$/{ s//\1/; q; }
18308           /^X\(\/\).*/{ s//\1/; q; }
18309           s/.*/./; q'`
18310   { case "$ac_dir" in
18311   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18312   *)                      as_incr_dir=.;;
18313 esac
18314 as_dummy="$ac_dir"
18315 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18316   case $as_mkdir_dir in
18317     # Skip DOS drivespec
18318     ?:) as_incr_dir=$as_mkdir_dir ;;
18319     *)
18320       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18321       test -d "$as_incr_dir" ||
18322         mkdir "$as_incr_dir" ||
18323         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18324 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18325    { (exit 1); exit 1; }; }
18326     ;;
18327   esac
18328 done; }
18329
18330   ac_builddir=.
18331
18332 if test "$ac_dir" != .; then
18333   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
18334   # A "../" for each directory in $ac_dir_suffix.
18335   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18336 else
18337   ac_dir_suffix= ac_top_builddir=
18338 fi
18339
18340 case $srcdir in
18341   .)  # No --srcdir option.  We are building in place.
18342     ac_srcdir=.
18343     if test -z "$ac_top_builddir"; then
18344        ac_top_srcdir=.
18345     else
18346        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18347     fi ;;
18348   [\\/]* | ?:[\\/]* )  # Absolute path.
18349     ac_srcdir=$srcdir$ac_dir_suffix;
18350     ac_top_srcdir=$srcdir ;;
18351   *) # Relative path.
18352     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18353     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18354 esac
18355 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
18356 # absolute.
18357 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
18358 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
18359 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
18360 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
18361
18362
18363
18364   if test x"$ac_file" != x-; then
18365     { echo "$as_me:$LINENO: creating $ac_file" >&5
18366 echo "$as_me: creating $ac_file" >&6;}
18367     rm -f "$ac_file"
18368   fi
18369   # Let's still pretend it is `configure' which instantiates (i.e., don't
18370   # use $as_me), people would be surprised to read:
18371   #    /* config.h.  Generated by config.status.  */
18372   if test x"$ac_file" = x-; then
18373     configure_input=
18374   else
18375     configure_input="$ac_file.  "
18376   fi
18377   configure_input=$configure_input"Generated from `echo $ac_file_in |
18378                                      sed 's,.*/,,'` by configure."
18379
18380   # First look for the input files in the build tree, otherwise in the
18381   # src tree.
18382   ac_file_inputs=`IFS=:
18383     for f in $ac_file_in; do
18384       case $f in
18385       -) echo $tmp/stdin ;;
18386       [\\/$]*)
18387          # Absolute (can't be DOS-style, as IFS=:)
18388          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18389 echo "$as_me: error: cannot find input file: $f" >&2;}
18390    { (exit 1); exit 1; }; }
18391          echo $f;;
18392       *) # Relative
18393          if test -f "$f"; then
18394            # Build tree
18395            echo $f
18396          elif test -f "$srcdir/$f"; then
18397            # Source tree
18398            echo $srcdir/$f
18399          else
18400            # /dev/null tree
18401            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18402 echo "$as_me: error: cannot find input file: $f" >&2;}
18403    { (exit 1); exit 1; }; }
18404          fi;;
18405       esac
18406     done` || { (exit 1); exit 1; }
18407 _ACEOF
18408 cat >>$CONFIG_STATUS <<_ACEOF
18409   sed "$ac_vpsub
18410 $extrasub
18411 _ACEOF
18412 cat >>$CONFIG_STATUS <<\_ACEOF
18413 :t
18414 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18415 s,@configure_input@,$configure_input,;t t
18416 s,@srcdir@,$ac_srcdir,;t t
18417 s,@abs_srcdir@,$ac_abs_srcdir,;t t
18418 s,@top_srcdir@,$ac_top_srcdir,;t t
18419 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
18420 s,@builddir@,$ac_builddir,;t t
18421 s,@abs_builddir@,$ac_abs_builddir,;t t
18422 s,@top_builddir@,$ac_top_builddir,;t t
18423 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
18424 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18425   rm -f $tmp/stdin
18426   if test x"$ac_file" != x-; then
18427     mv $tmp/out $ac_file
18428   else
18429     cat $tmp/out
18430     rm -f $tmp/out
18431   fi
18432
18433 done
18434 _ACEOF
18435 cat >>$CONFIG_STATUS <<\_ACEOF
18436
18437 #
18438 # CONFIG_HEADER section.
18439 #
18440
18441 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18442 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18443 #
18444 # ac_d sets the value in "#define NAME VALUE" lines.
18445 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18446 ac_dB='[        ].*$,\1#\2'
18447 ac_dC=' '
18448 ac_dD=',;t'
18449 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18450 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18451 ac_uB='$,\1#\2define\3'
18452 ac_uC=' '
18453 ac_uD=',;t'
18454
18455 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18456   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18457   case $ac_file in
18458   - | *:- | *:-:* ) # input from stdin
18459         cat >$tmp/stdin
18460         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18461         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18462   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18463         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18464   * )   ac_file_in=$ac_file.in ;;
18465   esac
18466
18467   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
18468 echo "$as_me: creating $ac_file" >&6;}
18469
18470   # First look for the input files in the build tree, otherwise in the
18471   # src tree.
18472   ac_file_inputs=`IFS=:
18473     for f in $ac_file_in; do
18474       case $f in
18475       -) echo $tmp/stdin ;;
18476       [\\/$]*)
18477          # Absolute (can't be DOS-style, as IFS=:)
18478          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18479 echo "$as_me: error: cannot find input file: $f" >&2;}
18480    { (exit 1); exit 1; }; }
18481          echo $f;;
18482       *) # Relative
18483          if test -f "$f"; then
18484            # Build tree
18485            echo $f
18486          elif test -f "$srcdir/$f"; then
18487            # Source tree
18488            echo $srcdir/$f
18489          else
18490            # /dev/null tree
18491            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
18492 echo "$as_me: error: cannot find input file: $f" >&2;}
18493    { (exit 1); exit 1; }; }
18494          fi;;
18495       esac
18496     done` || { (exit 1); exit 1; }
18497   # Remove the trailing spaces.
18498   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18499
18500 _ACEOF
18501
18502 # Transform confdefs.h into two sed scripts, `conftest.defines' and
18503 # `conftest.undefs', that substitutes the proper values into
18504 # config.h.in to produce config.h.  The first handles `#define'
18505 # templates, and the second `#undef' templates.
18506 # And first: Protect against being on the right side of a sed subst in
18507 # config.status.  Protect against being in an unquoted here document
18508 # in config.status.
18509 rm -f conftest.defines conftest.undefs
18510 # Using a here document instead of a string reduces the quoting nightmare.
18511 # Putting comments in sed scripts is not portable.
18512 #
18513 # `end' is used to avoid that the second main sed command (meant for
18514 # 0-ary CPP macros) applies to n-ary macro definitions.
18515 # See the Autoconf documentation for `clear'.
18516 cat >confdef2sed.sed <<\_ACEOF
18517 s/[\\&,]/\\&/g
18518 s,[\\$`],\\&,g
18519 t clear
18520 : clear
18521 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
18522 t end
18523 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
18524 : end
18525 _ACEOF
18526 # If some macros were called several times there might be several times
18527 # the same #defines, which is useless.  Nevertheless, we may not want to
18528 # sort them, since we want the *last* AC-DEFINE to be honored.
18529 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
18530 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
18531 rm -f confdef2sed.sed
18532
18533 # This sed command replaces #undef with comments.  This is necessary, for
18534 # example, in the case of _POSIX_SOURCE, which is predefined and required
18535 # on some systems where configure will not decide to define it.
18536 cat >>conftest.undefs <<\_ACEOF
18537 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
18538 _ACEOF
18539
18540 # Break up conftest.defines because some shells have a limit on the size
18541 # of here documents, and old seds have small limits too (100 cmds).
18542 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
18543 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
18544 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
18545 echo '  :' >>$CONFIG_STATUS
18546 rm -f conftest.tail
18547 while grep . conftest.defines >/dev/null
18548 do
18549   # Write a limited-size here document to $tmp/defines.sed.
18550   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
18551   # Speed up: don't consider the non `#define' lines.
18552   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
18553   # Work around the forget-to-reset-the-flag bug.
18554   echo 't clr' >>$CONFIG_STATUS
18555   echo ': clr' >>$CONFIG_STATUS
18556   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
18557   echo 'CEOF
18558   sed -f $tmp/defines.sed $tmp/in >$tmp/out
18559   rm -f $tmp/in
18560   mv $tmp/out $tmp/in
18561 ' >>$CONFIG_STATUS
18562   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
18563   rm -f conftest.defines
18564   mv conftest.tail conftest.defines
18565 done
18566 rm -f conftest.defines
18567 echo '  fi # egrep' >>$CONFIG_STATUS
18568 echo >>$CONFIG_STATUS
18569
18570 # Break up conftest.undefs because some shells have a limit on the size
18571 # of here documents, and old seds have small limits too (100 cmds).
18572 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
18573 rm -f conftest.tail
18574 while grep . conftest.undefs >/dev/null
18575 do
18576   # Write a limited-size here document to $tmp/undefs.sed.
18577   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
18578   # Speed up: don't consider the non `#undef'
18579   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
18580   # Work around the forget-to-reset-the-flag bug.
18581   echo 't clr' >>$CONFIG_STATUS
18582   echo ': clr' >>$CONFIG_STATUS
18583   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
18584   echo 'CEOF
18585   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
18586   rm -f $tmp/in
18587   mv $tmp/out $tmp/in
18588 ' >>$CONFIG_STATUS
18589   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
18590   rm -f conftest.undefs
18591   mv conftest.tail conftest.undefs
18592 done
18593 rm -f conftest.undefs
18594
18595 cat >>$CONFIG_STATUS <<\_ACEOF
18596   # Let's still pretend it is `configure' which instantiates (i.e., don't
18597   # use $as_me), people would be surprised to read:
18598   #    /* config.h.  Generated by config.status.  */
18599   if test x"$ac_file" = x-; then
18600     echo "/* Generated by configure.  */" >$tmp/config.h
18601   else
18602     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
18603   fi
18604   cat $tmp/in >>$tmp/config.h
18605   rm -f $tmp/in
18606   if test x"$ac_file" != x-; then
18607     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18608       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
18609 echo "$as_me: $ac_file is unchanged" >&6;}
18610     else
18611       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
18612 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18613          X"$ac_file" : 'X\(//\)[^/]' \| \
18614          X"$ac_file" : 'X\(//\)$' \| \
18615          X"$ac_file" : 'X\(/\)' \| \
18616          .     : '\(.\)' 2>/dev/null ||
18617 echo X"$ac_file" |
18618     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18619           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18620           /^X\(\/\/\)$/{ s//\1/; q; }
18621           /^X\(\/\).*/{ s//\1/; q; }
18622           s/.*/./; q'`
18623       { case "$ac_dir" in
18624   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18625   *)                      as_incr_dir=.;;
18626 esac
18627 as_dummy="$ac_dir"
18628 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18629   case $as_mkdir_dir in
18630     # Skip DOS drivespec
18631     ?:) as_incr_dir=$as_mkdir_dir ;;
18632     *)
18633       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18634       test -d "$as_incr_dir" ||
18635         mkdir "$as_incr_dir" ||
18636         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
18637 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
18638    { (exit 1); exit 1; }; }
18639     ;;
18640   esac
18641 done; }
18642
18643       rm -f $ac_file
18644       mv $tmp/config.h $ac_file
18645     fi
18646   else
18647     cat $tmp/config.h
18648     rm -f $tmp/config.h
18649   fi
18650   # Run the commands associated with the file.
18651   case $ac_file in
18652     src/include/pg_config.h )
18653 # Update timestamp for pg_config.h (see Makefile.global)
18654 echo >src/include/stamp-h
18655  ;;
18656   esac
18657 done
18658 _ACEOF
18659 cat >>$CONFIG_STATUS <<\_ACEOF
18660
18661 #
18662 # CONFIG_LINKS section.
18663 #
18664
18665 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
18666   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18667   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18668
18669   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
18670 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
18671
18672   if test ! -r $srcdir/$ac_source; then
18673     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
18674 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
18675    { (exit 1); exit 1; }; }
18676   fi
18677   rm -f $ac_dest
18678
18679   # Make relative symlinks.
18680   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
18681 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18682          X"$ac_dest" : 'X\(//\)[^/]' \| \
18683          X"$ac_dest" : 'X\(//\)$' \| \
18684          X"$ac_dest" : 'X\(/\)' \| \
18685          .     : '\(.\)' 2>/dev/null ||
18686 echo X"$ac_dest" |
18687     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18688           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18689           /^X\(\/\/\)$/{ s//\1/; q; }
18690           /^X\(\/\).*/{ s//\1/; q; }
18691           s/.*/./; q'`
18692   { case "$ac_dest_dir" in
18693   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18694   *)                      as_incr_dir=.;;
18695 esac
18696 as_dummy="$ac_dest_dir"
18697 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18698   case $as_mkdir_dir in
18699     # Skip DOS drivespec
18700     ?:) as_incr_dir=$as_mkdir_dir ;;
18701     *)
18702       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18703       test -d "$as_incr_dir" ||
18704         mkdir "$as_incr_dir" ||
18705         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dest_dir\"" >&5
18706 echo "$as_me: error: cannot create \"$ac_dest_dir\"" >&2;}
18707    { (exit 1); exit 1; }; }
18708     ;;
18709   esac
18710 done; }
18711
18712   ac_builddir=.
18713
18714 if test "$ac_dest_dir" != .; then
18715   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
18716   # A "../" for each directory in $ac_dir_suffix.
18717   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
18718 else
18719   ac_dir_suffix= ac_top_builddir=
18720 fi
18721
18722 case $srcdir in
18723   .)  # No --srcdir option.  We are building in place.
18724     ac_srcdir=.
18725     if test -z "$ac_top_builddir"; then
18726        ac_top_srcdir=.
18727     else
18728        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
18729     fi ;;
18730   [\\/]* | ?:[\\/]* )  # Absolute path.
18731     ac_srcdir=$srcdir$ac_dir_suffix;
18732     ac_top_srcdir=$srcdir ;;
18733   *) # Relative path.
18734     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
18735     ac_top_srcdir=$ac_top_builddir$srcdir ;;
18736 esac
18737 # Don't blindly perform a `cd "$ac_dest_dir"/$ac_foo && pwd` since $ac_foo can be
18738 # absolute.
18739 ac_abs_builddir=`cd "$ac_dest_dir" && cd $ac_builddir && pwd`
18740 ac_abs_top_builddir=`cd "$ac_dest_dir" && cd $ac_top_builddir && pwd`
18741 ac_abs_srcdir=`cd "$ac_dest_dir" && cd $ac_srcdir && pwd`
18742 ac_abs_top_srcdir=`cd "$ac_dest_dir" && cd $ac_top_srcdir && pwd`
18743
18744
18745   case $srcdir in
18746   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
18747       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
18748   esac
18749
18750   # Make a symlink if possible; otherwise try a hard link.
18751   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
18752     ln $srcdir/$ac_source $ac_dest ||
18753     { { echo "$as_me:$LINENO: error: cannot link $ac_dest to $srcdir/$ac_source" >&5
18754 echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
18755    { (exit 1); exit 1; }; }
18756 done
18757 _ACEOF
18758
18759 cat >>$CONFIG_STATUS <<\_ACEOF
18760
18761 { (exit 0); exit 0; }
18762 _ACEOF
18763 chmod +x $CONFIG_STATUS
18764 ac_clean_files=$ac_clean_files_save
18765
18766
18767 # configure is writing to config.log, and then calls config.status.
18768 # config.status does its own redirection, appending to config.log.
18769 # Unfortunately, on DOS this fails, as config.log is still kept open
18770 # by configure, so config.status won't be able to write to it; its
18771 # output is simply discarded.  So we exec the FD to /dev/null,
18772 # effectively closing config.log, so it can be properly (re)opened and
18773 # appended to by config.status.  When coming back to configure, we
18774 # need to make the FD available again.
18775 if test "$no_create" != yes; then
18776   ac_cs_success=:
18777   exec 5>/dev/null
18778   $SHELL $CONFIG_STATUS || ac_cs_success=false
18779   exec 5>>config.log
18780   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18781   # would make configure fail if this is the last instruction.
18782   $ac_cs_success || { (exit 1); exit 1; }
18783 fi
18784