]> granicus.if.org Git - postgresql/blob - configure
Add make install-strip target.
[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.3devel.
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 2002 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.3devel'
262 PACKAGE_STRING='PostgreSQL 7.3devel'
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_CXX_set=${CXX+set}
761 ac_env_CXX_value=$CXX
762 ac_cv_env_CXX_set=${CXX+set}
763 ac_cv_env_CXX_value=$CXX
764 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
765 ac_env_CXXFLAGS_value=$CXXFLAGS
766 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
767 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
768 ac_env_CXXCPP_set=${CXXCPP+set}
769 ac_env_CXXCPP_value=$CXXCPP
770 ac_cv_env_CXXCPP_set=${CXXCPP+set}
771 ac_cv_env_CXXCPP_value=$CXXCPP
772
773 #
774 # Report the --help message.
775 #
776 if test "$ac_init_help" = "long"; then
777   # Omit some internal or obsolete options to make the list less imposing.
778   # This message is too long to be a string in the A/UX 3.1 sh.
779   cat <<_ACEOF
780 \`configure' configures PostgreSQL 7.3devel to adapt to many kinds of systems.
781
782 Usage: $0 [OPTION]... [VAR=VALUE]...
783
784 To assign environment variables (e.g., CC, CFLAGS...), specify them as
785 VAR=VALUE.  See below for descriptions of some of the useful variables.
786
787 Defaults for the options are specified in brackets.
788
789 Configuration:
790   -h, --help              display this help and exit
791       --help=short        display options specific to this package
792       --help=recursive    display the short help of all the included packages
793   -V, --version           display version information and exit
794   -q, --quiet, --silent   do not print \`checking...' messages
795       --cache-file=FILE   cache test results in FILE [disabled]
796   -C, --config-cache      alias for \`--cache-file=config.cache'
797   -n, --no-create         do not create output files
798       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
799
800 _ACEOF
801
802   cat <<_ACEOF
803 Installation directories:
804   --prefix=PREFIX         install architecture-independent files in PREFIX
805                           [$ac_default_prefix]
806   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
807                           [PREFIX]
808
809 By default, \`make install' will install all the files in
810 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
811 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
812 for instance \`--prefix=\$HOME'.
813
814 For better control, use the options below.
815
816 Fine tuning of the installation directories:
817   --bindir=DIR           user executables [EPREFIX/bin]
818   --sbindir=DIR          system admin executables [EPREFIX/sbin]
819   --libexecdir=DIR       program executables [EPREFIX/libexec]
820   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
821   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
822   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
823   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
824   --libdir=DIR           object code libraries [EPREFIX/lib]
825   --includedir=DIR       C header files [PREFIX/include]
826   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
827   --infodir=DIR          info documentation [PREFIX/info]
828   --mandir=DIR           man documentation [PREFIX/man]
829 _ACEOF
830
831   cat <<\_ACEOF
832
833 System types:
834   --build=BUILD     configure for building on BUILD [guessed]
835   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
836 _ACEOF
837 fi
838
839 if test -n "$ac_init_help"; then
840   case $ac_init_help in
841      short | recursive ) echo "Configuration of PostgreSQL 7.3devel:";;
842    esac
843   cat <<\_ACEOF
844
845 Optional Features:
846   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
847   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
848   --enable-recode         enable character set recode support
849   --enable-multibyte      enable multibyte character support
850   --enable-nls[=LANGUAGES]  enable Native Language Support
851   --disable-shared        do not build shared libraries
852   --disable-rpath         do not embed shared library search path in executables
853   --enable-debug          build with debugging symbols (-g)
854   --enable-depend         turn on automatic dependency tracking
855   --enable-cassert        enable assertion checks (for debugging)
856   --enable-odbc           build the ODBC driver package
857   --enable-syslog         enable logging to syslog
858
859 Optional Packages:
860   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
861   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
862
863   --with-includes=DIRS    look for additional header files in DIRS
864   --with-libraries=DIRS   look for additional libraries in DIRS
865   --with-libs=DIRS        alternative spelling of --with-libraries
866   --with-pgport=PORTNUM   change default port number 5432
867   --with-maxbackends=N    set default maximum number of connections 32
868   --with-tcl              build Tcl and Tk interfaces
869   --without-tk            do not build Tk interfaces if Tcl is enabled
870   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR
871   --with-tkconfig=DIR     tkConfig.sh is in DIR
872   --with-perl             build Perl interface and PL/Perl
873   --with-python           build Python interface module
874   --with-java             build JDBC interface and Java tools
875   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]
876   --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]
877   --with-krb-srvnam=NAME  name of the service principal in Kerberos postgres
878   --with-pam              build with PAM support
879   --with-openssl[=DIR]    build with OpenSSL support [/usr/local/ssl]
880   --with-unixodbc         build ODBC driver for unixODBC
881   --with-iodbc            build ODBC driver for iODBC
882   --with-odbcinst=DIR     default directory for odbcinst.ini sysconfdir
883   --with-CXX              build C++ modules (libpq++)
884   --with-gnu-ld           assume the C compiler uses GNU ld default=no
885
886 Some influential environment variables:
887   CC          C compiler command
888   CFLAGS      C compiler flags
889   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
890               nonstandard directory <lib dir>
891   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
892               headers in a nonstandard directory <include dir>
893   CPP         C preprocessor
894   CXX         C++ compiler command
895   CXXFLAGS    C++ compiler flags
896   CXXCPP      C++ preprocessor
897
898 Use these variables to override the choices made by `configure' or to help
899 it to find libraries and programs with nonstandard names/locations.
900
901 Report bugs to <pgsql-bugs@postgresql.org>.
902 _ACEOF
903 fi
904
905 if test "$ac_init_help" = "recursive"; then
906   # If there are subdirs, report their specific --help.
907   ac_popdir=`pwd`
908   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
909     test -d $ac_dir || continue
910     ac_builddir=.
911
912 if test "$ac_dir" != .; then
913   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
914   # A "../" for each directory in $ac_dir_suffix.
915   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
916 else
917   ac_dir_suffix= ac_top_builddir=
918 fi
919
920 case $srcdir in
921   .)  # No --srcdir option.  We are building in place.
922     ac_srcdir=.
923     if test -z "$ac_top_builddir"; then
924        ac_top_srcdir=.
925     else
926        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
927     fi ;;
928   [\\/]* | ?:[\\/]* )  # Absolute path.
929     ac_srcdir=$srcdir$ac_dir_suffix;
930     ac_top_srcdir=$srcdir ;;
931   *) # Relative path.
932     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
933     ac_top_srcdir=$ac_top_builddir$srcdir ;;
934 esac
935 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
936 # absolute.
937 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
938 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
939 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
940 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
941
942     cd $ac_dir
943     # Check for guested configure; otherwise get Cygnus style configure.
944     if test -f $ac_srcdir/configure.gnu; then
945       echo
946       $SHELL $ac_srcdir/configure.gnu  --help=recursive
947     elif test -f $ac_srcdir/configure; then
948       echo
949       $SHELL $ac_srcdir/configure  --help=recursive
950     elif test -f $ac_srcdir/configure.ac ||
951            test -f $ac_srcdir/configure.in; then
952       echo
953       $ac_configure --help
954     else
955       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
956     fi
957     cd $ac_popdir
958   done
959 fi
960
961 test -n "$ac_init_help" && exit 0
962 if $ac_init_version; then
963   cat <<\_ACEOF
964 PostgreSQL configure 7.3devel
965 generated by GNU Autoconf 2.53
966
967 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
968 Free Software Foundation, Inc.
969 This configure script is free software; the Free Software Foundation
970 gives unlimited permission to copy, distribute and modify it.
971
972 Copyright 2002 PostgreSQL Global Development Group
973 _ACEOF
974   exit 0
975 fi
976 exec 5>config.log
977 cat >&5 <<_ACEOF
978 This file contains any messages produced by compilers while
979 running configure, to aid debugging if configure makes a mistake.
980
981 It was created by PostgreSQL $as_me 7.3devel, which was
982 generated by GNU Autoconf 2.53.  Invocation command line was
983
984   $ $0 $@
985
986 _ACEOF
987 {
988 cat <<_ASUNAME
989 ## --------- ##
990 ## Platform. ##
991 ## --------- ##
992
993 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
994 uname -m = `(uname -m) 2>/dev/null || echo unknown`
995 uname -r = `(uname -r) 2>/dev/null || echo unknown`
996 uname -s = `(uname -s) 2>/dev/null || echo unknown`
997 uname -v = `(uname -v) 2>/dev/null || echo unknown`
998
999 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1000 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1001
1002 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1003 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1004 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1005 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1006 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1007 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1008 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1009
1010 _ASUNAME
1011
1012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1013 for as_dir in $PATH
1014 do
1015   IFS=$as_save_IFS
1016   test -z "$as_dir" && as_dir=.
1017   echo "PATH: $as_dir"
1018 done
1019
1020 } >&5
1021
1022 cat >&5 <<_ACEOF
1023
1024
1025 ## ----------- ##
1026 ## Core tests. ##
1027 ## ----------- ##
1028
1029 _ACEOF
1030
1031
1032 # Keep a trace of the command line.
1033 # Strip out --no-create and --no-recursion so they do not pile up.
1034 # Also quote any args containing shell meta-characters.
1035 ac_configure_args=
1036 ac_sep=
1037 for ac_arg
1038 do
1039   case $ac_arg in
1040   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1041   | --no-cr | --no-c | -n ) continue ;;
1042   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1043   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1044     continue ;;
1045   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1046     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1047   esac
1048   case " $ac_configure_args " in
1049     *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1050     *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1051        ac_sep=" " ;;
1052   esac
1053   # Get rid of the leading space.
1054 done
1055
1056 # When interrupted or exit'd, cleanup temporary files, and complete
1057 # config.log.  We remove comments because anyway the quotes in there
1058 # would cause problems or look ugly.
1059 # WARNING: Be sure not to use single quotes in there, as some shells,
1060 # such as our DU 5.0 friend, will then `close' the trap.
1061 trap 'exit_status=$?
1062   # Save into config.log some information that might help in debugging.
1063   {
1064     echo
1065     cat <<\_ASBOX
1066 ## ---------------- ##
1067 ## Cache variables. ##
1068 ## ---------------- ##
1069 _ASBOX
1070     echo
1071     # The following way of writing the cache mishandles newlines in values,
1072 {
1073   (set) 2>&1 |
1074     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1075     *ac_space=\ *)
1076       sed -n \
1077         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1078           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1079       ;;
1080     *)
1081       sed -n \
1082         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1083       ;;
1084     esac;
1085 }
1086     echo
1087     if test -s confdefs.h; then
1088       cat <<\_ASBOX
1089 ## ----------- ##
1090 ## confdefs.h. ##
1091 ## ----------- ##
1092 _ASBOX
1093       echo
1094       sed "/^$/d" confdefs.h
1095       echo
1096     fi
1097     test "$ac_signal" != 0 &&
1098       echo "$as_me: caught signal $ac_signal"
1099     echo "$as_me: exit $exit_status"
1100   } >&5
1101   rm -f core core.* *.core &&
1102   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1103     exit $exit_status
1104      ' 0
1105 for ac_signal in 1 2 13 15; do
1106   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1107 done
1108 ac_signal=0
1109
1110 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1111 rm -rf conftest* confdefs.h
1112 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1113 echo >confdefs.h
1114
1115 # Predefined preprocessor variables.
1116
1117 cat >>confdefs.h <<_ACEOF
1118 #define PACKAGE_NAME "$PACKAGE_NAME"
1119 _ACEOF
1120
1121
1122 cat >>confdefs.h <<_ACEOF
1123 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1124 _ACEOF
1125
1126
1127 cat >>confdefs.h <<_ACEOF
1128 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1129 _ACEOF
1130
1131
1132 cat >>confdefs.h <<_ACEOF
1133 #define PACKAGE_STRING "$PACKAGE_STRING"
1134 _ACEOF
1135
1136
1137 cat >>confdefs.h <<_ACEOF
1138 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1139 _ACEOF
1140
1141
1142 # Let the site file select an alternate cache file if it wants to.
1143 # Prefer explicitly selected file to automatically selected ones.
1144 if test -z "$CONFIG_SITE"; then
1145   if test "x$prefix" != xNONE; then
1146     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1147   else
1148     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1149   fi
1150 fi
1151 for ac_site_file in $CONFIG_SITE; do
1152   if test -r "$ac_site_file"; then
1153     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1154 echo "$as_me: loading site script $ac_site_file" >&6;}
1155     sed 's/^/| /' "$ac_site_file" >&5
1156     . "$ac_site_file"
1157   fi
1158 done
1159
1160 if test -r "$cache_file"; then
1161   # Some versions of bash will fail to source /dev/null (special
1162   # files actually), so we avoid doing that.
1163   if test -f "$cache_file"; then
1164     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1165 echo "$as_me: loading cache $cache_file" >&6;}
1166     case $cache_file in
1167       [\\/]* | ?:[\\/]* ) . $cache_file;;
1168       *)                      . ./$cache_file;;
1169     esac
1170   fi
1171 else
1172   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1173 echo "$as_me: creating cache $cache_file" >&6;}
1174   >$cache_file
1175 fi
1176
1177 # Check that the precious variables saved in the cache have kept the same
1178 # value.
1179 ac_cache_corrupted=false
1180 for ac_var in `(set) 2>&1 |
1181                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1182   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1183   eval ac_new_set=\$ac_env_${ac_var}_set
1184   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1185   eval ac_new_val="\$ac_env_${ac_var}_value"
1186   case $ac_old_set,$ac_new_set in
1187     set,)
1188       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1189 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1190       ac_cache_corrupted=: ;;
1191     ,set)
1192       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1193 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1194       ac_cache_corrupted=: ;;
1195     ,);;
1196     *)
1197       if test "x$ac_old_val" != "x$ac_new_val"; then
1198         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1199 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1200         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1201 echo "$as_me:   former value:  $ac_old_val" >&2;}
1202         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1203 echo "$as_me:   current value: $ac_new_val" >&2;}
1204         ac_cache_corrupted=:
1205       fi;;
1206   esac
1207   # Pass precious variables to config.status.
1208   if test "$ac_new_set" = set; then
1209     case $ac_new_val in
1210     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1211       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1212     *) ac_arg=$ac_var=$ac_new_val ;;
1213     esac
1214     case " $ac_configure_args " in
1215       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1216       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1217     esac
1218   fi
1219 done
1220 if $ac_cache_corrupted; then
1221   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1222 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1223   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1224 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227
1228 ac_ext=c
1229 ac_cpp='$CPP $CPPFLAGS'
1230 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1231 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1232 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266 ac_aux_dir=
1267 for ac_dir in config $srcdir/config; do
1268   if test -f $ac_dir/install-sh; then
1269     ac_aux_dir=$ac_dir
1270     ac_install_sh="$ac_aux_dir/install-sh -c"
1271     break
1272   elif test -f $ac_dir/install.sh; then
1273     ac_aux_dir=$ac_dir
1274     ac_install_sh="$ac_aux_dir/install.sh -c"
1275     break
1276   elif test -f $ac_dir/shtool; then
1277     ac_aux_dir=$ac_dir
1278     ac_install_sh="$ac_aux_dir/shtool install -c"
1279     break
1280   fi
1281 done
1282 if test -z "$ac_aux_dir"; then
1283   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
1284 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
1285    { (exit 1); exit 1; }; }
1286 fi
1287 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1288 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1289 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1290
1291
1292 configure_args=$ac_configure_args
1293
1294
1295
1296 cat >>confdefs.h <<_ACEOF
1297 #define PG_VERSION "$PACKAGE_VERSION"
1298 _ACEOF
1299
1300
1301 # Make sure we can run config.sub.
1302 $ac_config_sub sun4 >/dev/null 2>&1 ||
1303   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
1304 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1305    { (exit 1); exit 1; }; }
1306
1307 echo "$as_me:$LINENO: checking build system type" >&5
1308 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1309 if test "${ac_cv_build+set}" = set; then
1310   echo $ECHO_N "(cached) $ECHO_C" >&6
1311 else
1312   ac_cv_build_alias=$build_alias
1313 test -z "$ac_cv_build_alias" &&
1314   ac_cv_build_alias=`$ac_config_guess`
1315 test -z "$ac_cv_build_alias" &&
1316   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1317 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1318    { (exit 1); exit 1; }; }
1319 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1320   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1326 echo "${ECHO_T}$ac_cv_build" >&6
1327 build=$ac_cv_build
1328 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332
1333 echo "$as_me:$LINENO: checking host system type" >&5
1334 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1335 if test "${ac_cv_host+set}" = set; then
1336   echo $ECHO_N "(cached) $ECHO_C" >&6
1337 else
1338   ac_cv_host_alias=$host_alias
1339 test -z "$ac_cv_host_alias" &&
1340   ac_cv_host_alias=$ac_cv_build_alias
1341 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1342   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1343 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1344    { (exit 1); exit 1; }; }
1345
1346 fi
1347 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1348 echo "${ECHO_T}$ac_cv_host" >&6
1349 host=$ac_cv_host
1350 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1351 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1352 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1353
1354
1355
1356 template=
1357 echo "$as_me:$LINENO: checking which template to use" >&5
1358 echo $ECHO_N "checking which template to use... $ECHO_C" >&6
1359
1360
1361
1362
1363 # Check whether --with-template or --without-template was given.
1364 if test "${with_template+set}" = set; then
1365   withval="$with_template"
1366
1367   case $withval in
1368     yes)
1369       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1370 echo "$as_me: error: argument required for --with-template option" >&2;}
1371    { (exit 1); exit 1; }; }
1372       ;;
1373     no)
1374       { { echo "$as_me:$LINENO: error: argument required for --with-template option" >&5
1375 echo "$as_me: error: argument required for --with-template option" >&2;}
1376    { (exit 1); exit 1; }; }
1377       ;;
1378     *)
1379
1380   case $withval in
1381     list)   echo; ls "$srcdir/src/template"; exit;;
1382     *)      if test -f "$srcdir/src/template/$with_template" ; then
1383               template=$withval
1384             else
1385               { { echo "$as_me:$LINENO: error: '$withval' is not a valid template name. Use 'list' for a list." >&5
1386 echo "$as_me: error: '$withval' is not a valid template name. Use 'list' for a list." >&2;}
1387    { (exit 1); exit 1; }; }
1388             fi;;
1389   esac
1390
1391       ;;
1392   esac
1393
1394 else
1395
1396   # --with-template not given
1397
1398 case $host_os in
1399      aix*) template=aix ;;
1400     beos*) template=beos ;;
1401     bsdi*) template=bsdi ;;
1402   cygwin*) template=win ;;
1403   darwin*) template=darwin ;;
1404     dgux*) template=dgux ;;
1405  freebsd*) template=freebsd ;;
1406     hpux*) template=hpux ;;
1407     irix*) template=irix5 ;;
1408    linux*) template=linux ;;
1409   netbsd*) template=netbsd ;;
1410 nextstep*) template=nextstep ;;
1411  openbsd*) template=openbsd ;;
1412      osf*) template=osf ;;
1413      qnx*) template=qnx4 ;;
1414      sco*) template=sco ;;
1415  solaris*) template=solaris ;;
1416    sunos*) template=sunos4 ;;
1417  sysv4.2*)
1418         case $host_vendor in
1419           univel) template=univel ;;
1420         esac ;;
1421    sysv4*) template=svr4 ;;
1422    sysv5*) template=unixware ;;
1423   ultrix*) template=ultrix4 ;;
1424 esac
1425
1426   if test x"$template" = x"" ; then
1427     { { echo "$as_me:$LINENO: error:
1428 *******************************************************************
1429 PostgreSQL has apparently not been ported to your platform yet.
1430 To try a manual configuration, look into the src/template directory
1431 for a similar platform and use the '--with-template=' option.
1432
1433 Please also contact <pgsql-ports@postgresql.org> to see about
1434 rectifying this.  Include the above 'checking host system type...'
1435 line.
1436 *******************************************************************
1437 " >&5
1438 echo "$as_me: error:
1439 *******************************************************************
1440 PostgreSQL has apparently not been ported to your platform yet.
1441 To try a manual configuration, look into the src/template directory
1442 for a similar platform and use the '--with-template=' option.
1443
1444 Please also contact <pgsql-ports@postgresql.org> to see about
1445 rectifying this.  Include the above 'checking host system type...'
1446 line.
1447 *******************************************************************
1448 " >&2;}
1449    { (exit 1); exit 1; }; }
1450   fi
1451
1452
1453 fi;
1454
1455
1456 echo "$as_me:$LINENO: result: $template" >&5
1457 echo "${ECHO_T}$template" >&6
1458
1459 PORTNAME=$template
1460
1461
1462 # Pick right test-and-set (TAS) code.  Most platforms have inline
1463 # assembler code in src/include/storage/s_lock.h, so we just use
1464 # a dummy file here.
1465 case $host in
1466   *-*-hpux*)        need_tas=yes; tas_file=hpux.s ;;
1467   sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
1468   i?86-*-solaris*)   need_tas=yes; tas_file=solaris_i386.s ;;
1469   *)                need_tas=no;  tas_file=dummy.s ;;
1470 esac
1471 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
1472
1473
1474 if test "$need_tas" = yes ; then
1475   TAS=tas.o
1476 fi
1477
1478
1479
1480
1481 ##
1482 ## Command line options
1483 ##
1484
1485
1486 #
1487 # Add non-standard directories to the include path
1488 #
1489
1490
1491
1492 # Check whether --with-includes or --without-includes was given.
1493 if test "${with_includes+set}" = set; then
1494   withval="$with_includes"
1495
1496   case $withval in
1497     yes)
1498       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1499 echo "$as_me: error: argument required for --with-includes option" >&2;}
1500    { (exit 1); exit 1; }; }
1501       ;;
1502     no)
1503       { { echo "$as_me:$LINENO: error: argument required for --with-includes option" >&5
1504 echo "$as_me: error: argument required for --with-includes option" >&2;}
1505    { (exit 1); exit 1; }; }
1506       ;;
1507     *)
1508
1509       ;;
1510   esac
1511
1512 fi;
1513
1514
1515
1516 #
1517 # Add non-standard directories to the library search path
1518 #
1519
1520
1521
1522 # Check whether --with-libraries or --without-libraries was given.
1523 if test "${with_libraries+set}" = set; then
1524   withval="$with_libraries"
1525
1526   case $withval in
1527     yes)
1528       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1529 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1530    { (exit 1); exit 1; }; }
1531       ;;
1532     no)
1533       { { echo "$as_me:$LINENO: error: argument required for --with-libraries option" >&5
1534 echo "$as_me: error: argument required for --with-libraries option" >&2;}
1535    { (exit 1); exit 1; }; }
1536       ;;
1537     *)
1538       LIBRARY_DIRS=$withval
1539       ;;
1540   esac
1541
1542 fi;
1543
1544
1545
1546
1547
1548 # Check whether --with-libs or --without-libs was given.
1549 if test "${with_libs+set}" = set; then
1550   withval="$with_libs"
1551
1552   case $withval in
1553     yes)
1554       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1555 echo "$as_me: error: argument required for --with-libs option" >&2;}
1556    { (exit 1); exit 1; }; }
1557       ;;
1558     no)
1559       { { echo "$as_me:$LINENO: error: argument required for --with-libs option" >&5
1560 echo "$as_me: error: argument required for --with-libs option" >&2;}
1561    { (exit 1); exit 1; }; }
1562       ;;
1563     *)
1564       LIBRARY_DIRS=$withval
1565       ;;
1566   esac
1567
1568 fi;
1569
1570
1571
1572 #
1573 # Character set recode (--enable-recode)
1574 #
1575 echo "$as_me:$LINENO: checking whether to build with recode support" >&5
1576 echo $ECHO_N "checking whether to build with recode support... $ECHO_C" >&6
1577
1578
1579 # Check whether --enable-recode or --disable-recode was given.
1580 if test "${enable_recode+set}" = set; then
1581   enableval="$enable_recode"
1582
1583   case $enableval in
1584     yes)
1585
1586 cat >>confdefs.h <<\_ACEOF
1587 #define CYR_RECODE 1
1588 _ACEOF
1589
1590       ;;
1591     no)
1592       :
1593       ;;
1594     *)
1595       { { echo "$as_me:$LINENO: error: no argument expected for --enable-recode option" >&5
1596 echo "$as_me: error: no argument expected for --enable-recode option" >&2;}
1597    { (exit 1); exit 1; }; }
1598       ;;
1599   esac
1600
1601 else
1602   enable_recode=no
1603
1604 fi;
1605
1606 echo "$as_me:$LINENO: result: $enable_recode" >&5
1607 echo "${ECHO_T}$enable_recode" >&6
1608
1609
1610 #
1611 # Multibyte support
1612 #
1613 MULTIBYTE=
1614 echo "$as_me:$LINENO: checking whether to build with multibyte character support" >&5
1615 echo $ECHO_N "checking whether to build with multibyte character support... $ECHO_C" >&6
1616
1617
1618
1619 # Check whether --enable-multibyte or --disable-multibyte was given.
1620 if test "${enable_multibyte+set}" = set; then
1621   enableval="$enable_multibyte"
1622
1623   case $enableval in
1624     yes)
1625       MULTIBYTE=SQL_ASCII
1626       ;;
1627     no)
1628       :
1629       ;;
1630     *)
1631       enable_multibyte=yes
1632
1633   case $enableval in
1634     SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|JOHAB|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|LATIN6|LATIN7|LATIN8|LATIN9|LATIN10|WIN1256|TCVN|WIN874|KOI8|WIN|ALT|ISO_8859_5|ISO_8859_6|ISO_8859_7|ISO_8859_8)
1635       MULTIBYTE=$enableval;;
1636     *)
1637       { { echo "$as_me:$LINENO: error: argument to --enable-multibyte must be one of:
1638   SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
1639   UNICODE, MULE_INTERNAL,
1640   LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
1641   LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
1642   WIN1256, TCVN, WIN874, KOI8, WIN, ALT,
1643   ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
1644 Or do not specify an argument to the option to use the default." >&5
1645 echo "$as_me: error: argument to --enable-multibyte must be one of:
1646   SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
1647   UNICODE, MULE_INTERNAL,
1648   LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
1649   LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
1650   WIN1256, TCVN, WIN874, KOI8, WIN, ALT,
1651   ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
1652 Or do not specify an argument to the option to use the default." >&2;}
1653    { (exit 1); exit 1; }; };;
1654   esac
1655
1656       ;;
1657   esac
1658
1659 else
1660   enable_multibyte=no
1661 fi;
1662
1663
1664 if test "$enable_multibyte" = yes; then
1665
1666
1667 cat >>confdefs.h <<\_ACEOF
1668 #define MULTIBYTE 1
1669 _ACEOF
1670
1671   echo "$as_me:$LINENO: result: yes, default $MULTIBYTE" >&5
1672 echo "${ECHO_T}yes, default $MULTIBYTE" >&6
1673
1674 else
1675   echo "$as_me:$LINENO: result: no" >&5
1676 echo "${ECHO_T}no" >&6
1677 fi
1678
1679
1680
1681
1682 #
1683 # NLS
1684 #
1685 echo "$as_me:$LINENO: checking whether NLS is wanted" >&5
1686 echo $ECHO_N "checking whether NLS is wanted... $ECHO_C" >&6
1687
1688
1689 # Check whether --enable-nls or --disable-nls was given.
1690 if test "${enable_nls+set}" = set; then
1691   enableval="$enable_nls"
1692
1693   case $enableval in
1694     yes)
1695       :
1696       ;;
1697     no)
1698       :
1699       ;;
1700     *)
1701       enable_nls=yes
1702 WANTED_LANGUAGES=$enableval
1703       ;;
1704   esac
1705
1706 else
1707   enable_nls=no
1708 fi;
1709
1710
1711 if test "$enable_nls" = yes; then
1712
1713 cat >>confdefs.h <<\_ACEOF
1714 #define ENABLE_NLS 1
1715 _ACEOF
1716
1717 fi
1718
1719 echo "$as_me:$LINENO: result: $enable_nls" >&5
1720 echo "${ECHO_T}$enable_nls" >&6
1721
1722
1723
1724 #
1725 # Default port number (--with-pgport), default 5432
1726 #
1727 echo "$as_me:$LINENO: checking for default port number" >&5
1728 echo $ECHO_N "checking for default port number... $ECHO_C" >&6
1729
1730
1731
1732 # Check whether --with-pgport or --without-pgport was given.
1733 if test "${with_pgport+set}" = set; then
1734   withval="$with_pgport"
1735
1736   case $withval in
1737     yes)
1738       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1739 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1740    { (exit 1); exit 1; }; }
1741       ;;
1742     no)
1743       { { echo "$as_me:$LINENO: error: argument required for --with-pgport option" >&5
1744 echo "$as_me: error: argument required for --with-pgport option" >&2;}
1745    { (exit 1); exit 1; }; }
1746       ;;
1747     *)
1748       default_port=$withval
1749       ;;
1750   esac
1751
1752 else
1753   default_port=5432
1754 fi;
1755
1756 echo "$as_me:$LINENO: result: $default_port" >&5
1757 echo "${ECHO_T}$default_port" >&6
1758 # Need both of these because some places want an integer and some a string
1759
1760 cat >>confdefs.h <<_ACEOF
1761 #define DEF_PGPORT ${default_port}
1762 _ACEOF
1763
1764
1765 cat >>confdefs.h <<_ACEOF
1766 #define DEF_PGPORT_STR "${default_port}"
1767 _ACEOF
1768
1769
1770
1771 #
1772 # Maximum number of allowed connections (--with-maxbackends), default 32
1773 #
1774 echo "$as_me:$LINENO: checking for default soft limit on number of connections" >&5
1775 echo $ECHO_N "checking for default soft limit on number of connections... $ECHO_C" >&6
1776
1777
1778
1779 # Check whether --with-maxbackends or --without-maxbackends was given.
1780 if test "${with_maxbackends+set}" = set; then
1781   withval="$with_maxbackends"
1782
1783   case $withval in
1784     yes)
1785       { { echo "$as_me:$LINENO: error: argument required for --with-maxbackends option" >&5
1786 echo "$as_me: error: argument required for --with-maxbackends option" >&2;}
1787    { (exit 1); exit 1; }; }
1788       ;;
1789     no)
1790       { { echo "$as_me:$LINENO: error: argument required for --with-maxbackends option" >&5
1791 echo "$as_me: error: argument required for --with-maxbackends option" >&2;}
1792    { (exit 1); exit 1; }; }
1793       ;;
1794     *)
1795
1796       ;;
1797   esac
1798
1799 else
1800   with_maxbackends=32
1801 fi;
1802
1803 echo "$as_me:$LINENO: result: $with_maxbackends" >&5
1804 echo "${ECHO_T}$with_maxbackends" >&6
1805
1806 cat >>confdefs.h <<_ACEOF
1807 #define DEF_MAXBACKENDS $with_maxbackends
1808 _ACEOF
1809
1810
1811
1812 #
1813 # Option to disable shared libraries
1814 #
1815
1816
1817 # Check whether --enable-shared or --disable-shared was given.
1818 if test "${enable_shared+set}" = set; then
1819   enableval="$enable_shared"
1820
1821   case $enableval in
1822     yes)
1823       :
1824       ;;
1825     no)
1826       :
1827       ;;
1828     *)
1829       { { echo "$as_me:$LINENO: error: no argument expected for --enable-shared option" >&5
1830 echo "$as_me: error: no argument expected for --enable-shared option" >&2;}
1831    { (exit 1); exit 1; }; }
1832       ;;
1833   esac
1834
1835 else
1836   enable_shared=yes
1837
1838 fi;
1839
1840
1841
1842 #
1843 # '-rpath'-like feature can be disabled
1844 #
1845
1846
1847 # Check whether --enable-rpath or --disable-rpath was given.
1848 if test "${enable_rpath+set}" = set; then
1849   enableval="$enable_rpath"
1850
1851   case $enableval in
1852     yes)
1853       :
1854       ;;
1855     no)
1856       :
1857       ;;
1858     *)
1859       { { echo "$as_me:$LINENO: error: no argument expected for --enable-rpath option" >&5
1860 echo "$as_me: error: no argument expected for --enable-rpath option" >&2;}
1861    { (exit 1); exit 1; }; }
1862       ;;
1863   esac
1864
1865 else
1866   enable_rpath=yes
1867
1868 fi;
1869
1870
1871
1872
1873 #
1874 # --enable-debug adds -g to compiler flags
1875 #
1876
1877
1878 # Check whether --enable-debug or --disable-debug was given.
1879 if test "${enable_debug+set}" = set; then
1880   enableval="$enable_debug"
1881
1882   case $enableval in
1883     yes)
1884       :
1885       ;;
1886     no)
1887       :
1888       ;;
1889     *)
1890       { { echo "$as_me:$LINENO: error: no argument expected for --enable-debug option" >&5
1891 echo "$as_me: error: no argument expected for --enable-debug option" >&2;}
1892    { (exit 1); exit 1; }; }
1893       ;;
1894   esac
1895
1896 else
1897   enable_debug=no
1898
1899 fi;
1900
1901
1902
1903 #
1904 # C compiler
1905 #
1906
1907 # For historical reasons you can also use --with-CC to specify the C compiler
1908 # to use, although the standard way to do this is to set the CC environment
1909 # variable.
1910
1911
1912
1913 # Check whether --with-CC or --without-CC was given.
1914 if test "${with_CC+set}" = set; then
1915   withval="$with_CC"
1916
1917   case $withval in
1918     yes)
1919       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1920 echo "$as_me: error: argument required for --with-CC option" >&2;}
1921    { (exit 1); exit 1; }; }
1922       ;;
1923     no)
1924       { { echo "$as_me:$LINENO: error: argument required for --with-CC option" >&5
1925 echo "$as_me: error: argument required for --with-CC option" >&2;}
1926    { (exit 1); exit 1; }; }
1927       ;;
1928     *)
1929       CC=$with_CC
1930       ;;
1931   esac
1932
1933 fi;
1934
1935
1936 case $template in
1937   aix) pgac_cc_list="gcc xlc";;
1938  irix) pgac_cc_list="cc";; # no gcc
1939     *) pgac_cc_list="gcc cc";;
1940 esac
1941
1942 ac_ext=c
1943 ac_cpp='$CPP $CPPFLAGS'
1944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1947 if test -n "$ac_tool_prefix"; then
1948   for ac_prog in $pgac_cc_list
1949   do
1950     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1951 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1952 echo "$as_me:$LINENO: checking for $ac_word" >&5
1953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1954 if test "${ac_cv_prog_CC+set}" = set; then
1955   echo $ECHO_N "(cached) $ECHO_C" >&6
1956 else
1957   if test -n "$CC"; then
1958   ac_cv_prog_CC="$CC" # Let the user override the test.
1959 else
1960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1961 for as_dir in $PATH
1962 do
1963   IFS=$as_save_IFS
1964   test -z "$as_dir" && as_dir=.
1965   for ac_exec_ext in '' $ac_executable_extensions; do
1966   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1967     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1968     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969     break 2
1970   fi
1971 done
1972 done
1973
1974 fi
1975 fi
1976 CC=$ac_cv_prog_CC
1977 if test -n "$CC"; then
1978   echo "$as_me:$LINENO: result: $CC" >&5
1979 echo "${ECHO_T}$CC" >&6
1980 else
1981   echo "$as_me:$LINENO: result: no" >&5
1982 echo "${ECHO_T}no" >&6
1983 fi
1984
1985     test -n "$CC" && break
1986   done
1987 fi
1988 if test -z "$CC"; then
1989   ac_ct_CC=$CC
1990   for ac_prog in $pgac_cc_list
1991 do
1992   # Extract the first word of "$ac_prog", so it can be a program name with args.
1993 set dummy $ac_prog; ac_word=$2
1994 echo "$as_me:$LINENO: checking for $ac_word" >&5
1995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1996 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1997   echo $ECHO_N "(cached) $ECHO_C" >&6
1998 else
1999   if test -n "$ac_ct_CC"; then
2000   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2001 else
2002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2003 for as_dir in $PATH
2004 do
2005   IFS=$as_save_IFS
2006   test -z "$as_dir" && as_dir=.
2007   for ac_exec_ext in '' $ac_executable_extensions; do
2008   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2009     ac_cv_prog_ac_ct_CC="$ac_prog"
2010     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2011     break 2
2012   fi
2013 done
2014 done
2015
2016 fi
2017 fi
2018 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2019 if test -n "$ac_ct_CC"; then
2020   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2021 echo "${ECHO_T}$ac_ct_CC" >&6
2022 else
2023   echo "$as_me:$LINENO: result: no" >&5
2024 echo "${ECHO_T}no" >&6
2025 fi
2026
2027   test -n "$ac_ct_CC" && break
2028 done
2029
2030   CC=$ac_ct_CC
2031 fi
2032
2033
2034 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
2035 echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
2036    { (exit 1); exit 1; }; }
2037
2038 # Provide some information about the compiler.
2039 echo "$as_me:$LINENO:" \
2040      "checking for C compiler version" >&5
2041 ac_compiler=`set X $ac_compile; echo $2`
2042 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2043   (eval $ac_compiler --version </dev/null >&5) 2>&5
2044   ac_status=$?
2045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2046   (exit $ac_status); }
2047 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2048   (eval $ac_compiler -v </dev/null >&5) 2>&5
2049   ac_status=$?
2050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2051   (exit $ac_status); }
2052 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2053   (eval $ac_compiler -V </dev/null >&5) 2>&5
2054   ac_status=$?
2055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2056   (exit $ac_status); }
2057
2058 cat >conftest.$ac_ext <<_ACEOF
2059 #line $LINENO "configure"
2060 #include "confdefs.h"
2061
2062 #ifdef F77_DUMMY_MAIN
2063 #  ifdef __cplusplus
2064      extern "C"
2065 #  endif
2066    int F77_DUMMY_MAIN() { return 1; }
2067 #endif
2068 int
2069 main ()
2070 {
2071
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 ac_clean_files_save=$ac_clean_files
2077 ac_clean_files="$ac_clean_files a.out a.exe"
2078 # Try to create an executable without -o first, disregard a.out.
2079 # It will help us diagnose broken compilers, and finding out an intuition
2080 # of exeext.
2081 echo "$as_me:$LINENO: checking for C compiler default output" >&5
2082 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2083 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2084 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2085   (eval $ac_link_default) 2>&5
2086   ac_status=$?
2087   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2088   (exit $ac_status); }; then
2089   # Find the output, starting from the most likely.  This scheme is
2090 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2091 # resort.
2092
2093 # Be careful to initialize this variable, since it used to be cached.
2094 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2095 ac_cv_exeext=
2096 for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
2097                 ls a.out conftest 2>/dev/null;
2098                 ls a.* conftest.* 2>/dev/null`; do
2099   case $ac_file in
2100     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
2101     a.out ) # We found the default executable, but exeext='' is most
2102             # certainly right.
2103             break;;
2104     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2105           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2106           export ac_cv_exeext
2107           break;;
2108     * ) break;;
2109   esac
2110 done
2111 else
2112   echo "$as_me: failed program was:" >&5
2113 cat conftest.$ac_ext >&5
2114 { { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
2115 echo "$as_me: error: C compiler cannot create executables" >&2;}
2116    { (exit 77); exit 77; }; }
2117 fi
2118
2119 ac_exeext=$ac_cv_exeext
2120 echo "$as_me:$LINENO: result: $ac_file" >&5
2121 echo "${ECHO_T}$ac_file" >&6
2122
2123 # Check the compiler produces executables we can run.  If not, either
2124 # the compiler is broken, or we cross compile.
2125 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2126 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2127 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2128 # If not cross compiling, check that we can run a simple program.
2129 if test "$cross_compiling" != yes; then
2130   if { ac_try='./$ac_file'
2131   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2132   (eval $ac_try) 2>&5
2133   ac_status=$?
2134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2135   (exit $ac_status); }; }; then
2136     cross_compiling=no
2137   else
2138     if test "$cross_compiling" = maybe; then
2139         cross_compiling=yes
2140     else
2141         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2142 If you meant to cross compile, use \`--host'." >&5
2143 echo "$as_me: error: cannot run C compiled programs.
2144 If you meant to cross compile, use \`--host'." >&2;}
2145    { (exit 1); exit 1; }; }
2146     fi
2147   fi
2148 fi
2149 echo "$as_me:$LINENO: result: yes" >&5
2150 echo "${ECHO_T}yes" >&6
2151
2152 rm -f a.out a.exe conftest$ac_cv_exeext
2153 ac_clean_files=$ac_clean_files_save
2154 # Check the compiler produces executables we can run.  If not, either
2155 # the compiler is broken, or we cross compile.
2156 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2157 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2158 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2159 echo "${ECHO_T}$cross_compiling" >&6
2160
2161 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2162 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2163 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2164   (eval $ac_link) 2>&5
2165   ac_status=$?
2166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2167   (exit $ac_status); }; then
2168   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2169 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2170 # work properly (i.e., refer to `conftest.exe'), while it won't with
2171 # `rm'.
2172 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2173   case $ac_file in
2174     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
2175     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2176           export ac_cv_exeext
2177           break;;
2178     * ) break;;
2179   esac
2180 done
2181 else
2182   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
2183 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
2184    { (exit 1); exit 1; }; }
2185 fi
2186
2187 rm -f conftest$ac_cv_exeext
2188 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2189 echo "${ECHO_T}$ac_cv_exeext" >&6
2190
2191 rm -f conftest.$ac_ext
2192 EXEEXT=$ac_cv_exeext
2193 ac_exeext=$EXEEXT
2194 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2195 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2196 if test "${ac_cv_objext+set}" = set; then
2197   echo $ECHO_N "(cached) $ECHO_C" >&6
2198 else
2199   cat >conftest.$ac_ext <<_ACEOF
2200 #line $LINENO "configure"
2201 #include "confdefs.h"
2202
2203 #ifdef F77_DUMMY_MAIN
2204 #  ifdef __cplusplus
2205      extern "C"
2206 #  endif
2207    int F77_DUMMY_MAIN() { return 1; }
2208 #endif
2209 int
2210 main ()
2211 {
2212
2213   ;
2214   return 0;
2215 }
2216 _ACEOF
2217 rm -f conftest.o conftest.obj
2218 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2219   (eval $ac_compile) 2>&5
2220   ac_status=$?
2221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2222   (exit $ac_status); }; then
2223   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2224   case $ac_file in
2225     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
2226     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2227        break;;
2228   esac
2229 done
2230 else
2231   echo "$as_me: failed program was:" >&5
2232 cat conftest.$ac_ext >&5
2233 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
2234 echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
2235    { (exit 1); exit 1; }; }
2236 fi
2237
2238 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2239 fi
2240 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2241 echo "${ECHO_T}$ac_cv_objext" >&6
2242 OBJEXT=$ac_cv_objext
2243 ac_objext=$OBJEXT
2244 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2245 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2246 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2247   echo $ECHO_N "(cached) $ECHO_C" >&6
2248 else
2249   cat >conftest.$ac_ext <<_ACEOF
2250 #line $LINENO "configure"
2251 #include "confdefs.h"
2252
2253 #ifdef F77_DUMMY_MAIN
2254 #  ifdef __cplusplus
2255      extern "C"
2256 #  endif
2257    int F77_DUMMY_MAIN() { return 1; }
2258 #endif
2259 int
2260 main ()
2261 {
2262 #ifndef __GNUC__
2263        choke me
2264 #endif
2265
2266   ;
2267   return 0;
2268 }
2269 _ACEOF
2270 rm -f conftest.$ac_objext
2271 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2272   (eval $ac_compile) 2>&5
2273   ac_status=$?
2274   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2275   (exit $ac_status); } &&
2276          { ac_try='test -s conftest.$ac_objext'
2277   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2278   (eval $ac_try) 2>&5
2279   ac_status=$?
2280   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2281   (exit $ac_status); }; }; then
2282   ac_compiler_gnu=yes
2283 else
2284   echo "$as_me: failed program was:" >&5
2285 cat conftest.$ac_ext >&5
2286 ac_compiler_gnu=no
2287 fi
2288 rm -f conftest.$ac_objext conftest.$ac_ext
2289 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2290
2291 fi
2292 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2293 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2294 GCC=`test $ac_compiler_gnu = yes && echo yes`
2295 ac_test_CFLAGS=${CFLAGS+set}
2296 ac_save_CFLAGS=$CFLAGS
2297 CFLAGS="-g"
2298 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2299 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2300 if test "${ac_cv_prog_cc_g+set}" = set; then
2301   echo $ECHO_N "(cached) $ECHO_C" >&6
2302 else
2303   cat >conftest.$ac_ext <<_ACEOF
2304 #line $LINENO "configure"
2305 #include "confdefs.h"
2306
2307 #ifdef F77_DUMMY_MAIN
2308 #  ifdef __cplusplus
2309      extern "C"
2310 #  endif
2311    int F77_DUMMY_MAIN() { return 1; }
2312 #endif
2313 int
2314 main ()
2315 {
2316
2317   ;
2318   return 0;
2319 }
2320 _ACEOF
2321 rm -f conftest.$ac_objext
2322 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2323   (eval $ac_compile) 2>&5
2324   ac_status=$?
2325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2326   (exit $ac_status); } &&
2327          { ac_try='test -s conftest.$ac_objext'
2328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2329   (eval $ac_try) 2>&5
2330   ac_status=$?
2331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2332   (exit $ac_status); }; }; then
2333   ac_cv_prog_cc_g=yes
2334 else
2335   echo "$as_me: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 ac_cv_prog_cc_g=no
2338 fi
2339 rm -f conftest.$ac_objext conftest.$ac_ext
2340 fi
2341 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2342 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2343 if test "$ac_test_CFLAGS" = set; then
2344   CFLAGS=$ac_save_CFLAGS
2345 elif test $ac_cv_prog_cc_g = yes; then
2346   if test "$GCC" = yes; then
2347     CFLAGS="-g -O2"
2348   else
2349     CFLAGS="-g"
2350   fi
2351 else
2352   if test "$GCC" = yes; then
2353     CFLAGS="-O2"
2354   else
2355     CFLAGS=
2356   fi
2357 fi
2358 # Some people use a C++ compiler to compile C.  Since we use `exit',
2359 # in C++ we need to declare it.  In case someone uses the same compiler
2360 # for both compiling C and C++ we need to have the C++ compiler decide
2361 # the declaration of exit, since it's the most demanding environment.
2362 cat >conftest.$ac_ext <<_ACEOF
2363 #ifndef __cplusplus
2364   choke me
2365 #endif
2366 _ACEOF
2367 rm -f conftest.$ac_objext
2368 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2369   (eval $ac_compile) 2>&5
2370   ac_status=$?
2371   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2372   (exit $ac_status); } &&
2373          { ac_try='test -s conftest.$ac_objext'
2374   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2378   (exit $ac_status); }; }; then
2379   for ac_declaration in \
2380    ''\
2381    '#include <stdlib.h>' \
2382    'extern "C" void std::exit (int) throw (); using std::exit;' \
2383    'extern "C" void std::exit (int); using std::exit;' \
2384    'extern "C" void exit (int) throw ();' \
2385    'extern "C" void exit (int);' \
2386    'void exit (int);'
2387 do
2388   cat >conftest.$ac_ext <<_ACEOF
2389 #line $LINENO "configure"
2390 #include "confdefs.h"
2391 #include <stdlib.h>
2392 $ac_declaration
2393 #ifdef F77_DUMMY_MAIN
2394 #  ifdef __cplusplus
2395      extern "C"
2396 #  endif
2397    int F77_DUMMY_MAIN() { return 1; }
2398 #endif
2399 int
2400 main ()
2401 {
2402 exit (42);
2403   ;
2404   return 0;
2405 }
2406 _ACEOF
2407 rm -f conftest.$ac_objext
2408 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2409   (eval $ac_compile) 2>&5
2410   ac_status=$?
2411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2412   (exit $ac_status); } &&
2413          { ac_try='test -s conftest.$ac_objext'
2414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2415   (eval $ac_try) 2>&5
2416   ac_status=$?
2417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418   (exit $ac_status); }; }; then
2419   :
2420 else
2421   echo "$as_me: failed program was:" >&5
2422 cat conftest.$ac_ext >&5
2423 continue
2424 fi
2425 rm -f conftest.$ac_objext conftest.$ac_ext
2426   cat >conftest.$ac_ext <<_ACEOF
2427 #line $LINENO "configure"
2428 #include "confdefs.h"
2429 $ac_declaration
2430 #ifdef F77_DUMMY_MAIN
2431 #  ifdef __cplusplus
2432      extern "C"
2433 #  endif
2434    int F77_DUMMY_MAIN() { return 1; }
2435 #endif
2436 int
2437 main ()
2438 {
2439 exit (42);
2440   ;
2441   return 0;
2442 }
2443 _ACEOF
2444 rm -f conftest.$ac_objext
2445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2446   (eval $ac_compile) 2>&5
2447   ac_status=$?
2448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2449   (exit $ac_status); } &&
2450          { ac_try='test -s conftest.$ac_objext'
2451   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2452   (eval $ac_try) 2>&5
2453   ac_status=$?
2454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2455   (exit $ac_status); }; }; then
2456   break
2457 else
2458   echo "$as_me: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 fi
2461 rm -f conftest.$ac_objext conftest.$ac_ext
2462 done
2463 rm -f conftest*
2464 if test -n "$ac_declaration"; then
2465   echo '#ifdef __cplusplus' >>confdefs.h
2466   echo $ac_declaration      >>confdefs.h
2467   echo '#endif'             >>confdefs.h
2468 fi
2469
2470 else
2471   echo "$as_me: failed program was:" >&5
2472 cat conftest.$ac_ext >&5
2473 fi
2474 rm -f conftest.$ac_objext conftest.$ac_ext
2475 ac_ext=c
2476 ac_cpp='$CPP $CPPFLAGS'
2477 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2478 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2479 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2480
2481 # Read the template
2482 . "$srcdir/src/template/$template" || exit
2483
2484 if test "$ac_env_CFLAGS_set" = set; then
2485   CFLAGS=$ac_env_CFLAGS_value
2486 fi
2487 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
2488   CFLAGS="$CFLAGS -g"
2489 fi
2490 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
2491 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
2492 # Check if the compiler still works with the template settings
2493 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
2494 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
2495
2496 cat >conftest.$ac_ext <<_ACEOF
2497 #line $LINENO "configure"
2498 #include "confdefs.h"
2499
2500 #ifdef F77_DUMMY_MAIN
2501 #  ifdef __cplusplus
2502      extern "C"
2503 #  endif
2504    int F77_DUMMY_MAIN() { return 1; }
2505 #endif
2506 int
2507 main ()
2508 {
2509 return 0;
2510   ;
2511   return 0;
2512 }
2513 _ACEOF
2514 rm -f conftest.$ac_objext conftest$ac_exeext
2515 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2516   (eval $ac_link) 2>&5
2517   ac_status=$?
2518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2519   (exit $ac_status); } &&
2520          { ac_try='test -s conftest$ac_exeext'
2521   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2522   (eval $ac_try) 2>&5
2523   ac_status=$?
2524   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2525   (exit $ac_status); }; }; then
2526   echo "$as_me:$LINENO: result: yes" >&5
2527 echo "${ECHO_T}yes" >&6
2528 else
2529   echo "$as_me: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531 echo "$as_me:$LINENO: result: no" >&5
2532 echo "${ECHO_T}no" >&6
2533    { { echo "$as_me:$LINENO: error: cannot proceed" >&5
2534 echo "$as_me: error: cannot proceed" >&2;}
2535    { (exit 1); exit 1; }; }
2536 fi
2537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2538 ac_ext=c
2539 ac_cpp='$CPP $CPPFLAGS'
2540 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2541 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2542 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2543 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2544 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2545 # On Suns, sometimes $CPP names a directory.
2546 if test -n "$CPP" && test -d "$CPP"; then
2547   CPP=
2548 fi
2549 if test -z "$CPP"; then
2550   if test "${ac_cv_prog_CPP+set}" = set; then
2551   echo $ECHO_N "(cached) $ECHO_C" >&6
2552 else
2553       # Double quotes because CPP needs to be expanded
2554     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2555     do
2556       ac_preproc_ok=false
2557 for ac_c_preproc_warn_flag in '' yes
2558 do
2559   # Use a header file that comes with gcc, so configuring glibc
2560   # with a fresh cross-compiler works.
2561   # On the NeXT, cc -E runs the code through the compiler's parser,
2562   # not just through cpp. "Syntax error" is here to catch this case.
2563   cat >conftest.$ac_ext <<_ACEOF
2564 #line $LINENO "configure"
2565 #include "confdefs.h"
2566 #include <assert.h>
2567                      Syntax error
2568 _ACEOF
2569 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2571   ac_status=$?
2572   egrep -v '^ *\+' conftest.er1 >conftest.err
2573   rm -f conftest.er1
2574   cat conftest.err >&5
2575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2576   (exit $ac_status); } >/dev/null; then
2577   if test -s conftest.err; then
2578     ac_cpp_err=$ac_c_preproc_warn_flag
2579   else
2580     ac_cpp_err=
2581   fi
2582 else
2583   ac_cpp_err=yes
2584 fi
2585 if test -z "$ac_cpp_err"; then
2586   :
2587 else
2588   echo "$as_me: failed program was:" >&5
2589   cat conftest.$ac_ext >&5
2590   # Broken: fails on valid input.
2591 continue
2592 fi
2593 rm -f conftest.err conftest.$ac_ext
2594
2595   # OK, works on sane cases.  Now check whether non-existent headers
2596   # can be detected and how.
2597   cat >conftest.$ac_ext <<_ACEOF
2598 #line $LINENO "configure"
2599 #include "confdefs.h"
2600 #include <ac_nonexistent.h>
2601 _ACEOF
2602 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2603   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2604   ac_status=$?
2605   egrep -v '^ *\+' conftest.er1 >conftest.err
2606   rm -f conftest.er1
2607   cat conftest.err >&5
2608   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2609   (exit $ac_status); } >/dev/null; then
2610   if test -s conftest.err; then
2611     ac_cpp_err=$ac_c_preproc_warn_flag
2612   else
2613     ac_cpp_err=
2614   fi
2615 else
2616   ac_cpp_err=yes
2617 fi
2618 if test -z "$ac_cpp_err"; then
2619   # Broken: success on invalid input.
2620 continue
2621 else
2622   echo "$as_me: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624   # Passes both tests.
2625 ac_preproc_ok=:
2626 break
2627 fi
2628 rm -f conftest.err conftest.$ac_ext
2629
2630 done
2631 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2632 rm -f conftest.err conftest.$ac_ext
2633 if $ac_preproc_ok; then
2634   break
2635 fi
2636
2637     done
2638     ac_cv_prog_CPP=$CPP
2639
2640 fi
2641   CPP=$ac_cv_prog_CPP
2642 else
2643   ac_cv_prog_CPP=$CPP
2644 fi
2645 echo "$as_me:$LINENO: result: $CPP" >&5
2646 echo "${ECHO_T}$CPP" >&6
2647 ac_preproc_ok=false
2648 for ac_c_preproc_warn_flag in '' yes
2649 do
2650   # Use a header file that comes with gcc, so configuring glibc
2651   # with a fresh cross-compiler works.
2652   # On the NeXT, cc -E runs the code through the compiler's parser,
2653   # not just through cpp. "Syntax error" is here to catch this case.
2654   cat >conftest.$ac_ext <<_ACEOF
2655 #line $LINENO "configure"
2656 #include "confdefs.h"
2657 #include <assert.h>
2658                      Syntax error
2659 _ACEOF
2660 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2662   ac_status=$?
2663   egrep -v '^ *\+' conftest.er1 >conftest.err
2664   rm -f conftest.er1
2665   cat conftest.err >&5
2666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2667   (exit $ac_status); } >/dev/null; then
2668   if test -s conftest.err; then
2669     ac_cpp_err=$ac_c_preproc_warn_flag
2670   else
2671     ac_cpp_err=
2672   fi
2673 else
2674   ac_cpp_err=yes
2675 fi
2676 if test -z "$ac_cpp_err"; then
2677   :
2678 else
2679   echo "$as_me: failed program was:" >&5
2680   cat conftest.$ac_ext >&5
2681   # Broken: fails on valid input.
2682 continue
2683 fi
2684 rm -f conftest.err conftest.$ac_ext
2685
2686   # OK, works on sane cases.  Now check whether non-existent headers
2687   # can be detected and how.
2688   cat >conftest.$ac_ext <<_ACEOF
2689 #line $LINENO "configure"
2690 #include "confdefs.h"
2691 #include <ac_nonexistent.h>
2692 _ACEOF
2693 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2695   ac_status=$?
2696   egrep -v '^ *\+' conftest.er1 >conftest.err
2697   rm -f conftest.er1
2698   cat conftest.err >&5
2699   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2700   (exit $ac_status); } >/dev/null; then
2701   if test -s conftest.err; then
2702     ac_cpp_err=$ac_c_preproc_warn_flag
2703   else
2704     ac_cpp_err=
2705   fi
2706 else
2707   ac_cpp_err=yes
2708 fi
2709 if test -z "$ac_cpp_err"; then
2710   # Broken: success on invalid input.
2711 continue
2712 else
2713   echo "$as_me: failed program was:" >&5
2714   cat conftest.$ac_ext >&5
2715   # Passes both tests.
2716 ac_preproc_ok=:
2717 break
2718 fi
2719 rm -f conftest.err conftest.$ac_ext
2720
2721 done
2722 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2723 rm -f conftest.err conftest.$ac_ext
2724 if $ac_preproc_ok; then
2725   :
2726 else
2727   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
2728 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2729    { (exit 1); exit 1; }; }
2730 fi
2731
2732 ac_ext=c
2733 ac_cpp='$CPP $CPPFLAGS'
2734 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2737
2738
2739
2740 # Create compiler version string
2741 if test x"$GCC" = x"yes" ; then
2742   cc_string="GCC `${CC} --version | sed q`"
2743 else
2744   cc_string=$CC
2745 fi
2746
2747 cat >>confdefs.h <<_ACEOF
2748 #define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string"
2749 _ACEOF
2750
2751
2752
2753 #
2754 # Automatic dependency tracking
2755 #
2756
2757
2758 # Check whether --enable-depend or --disable-depend was given.
2759 if test "${enable_depend+set}" = set; then
2760   enableval="$enable_depend"
2761
2762   case $enableval in
2763     yes)
2764       autodepend=yes
2765       ;;
2766     no)
2767       :
2768       ;;
2769     *)
2770       { { echo "$as_me:$LINENO: error: no argument expected for --enable-depend option" >&5
2771 echo "$as_me: error: no argument expected for --enable-depend option" >&2;}
2772    { (exit 1); exit 1; }; }
2773       ;;
2774   esac
2775
2776 else
2777   enable_depend=no
2778
2779 fi;
2780
2781
2782
2783
2784 #
2785 # Enable assert checks
2786 #
2787
2788
2789 # Check whether --enable-cassert or --disable-cassert was given.
2790 if test "${enable_cassert+set}" = set; then
2791   enableval="$enable_cassert"
2792
2793   case $enableval in
2794     yes)
2795
2796 cat >>confdefs.h <<\_ACEOF
2797 #define USE_ASSERT_CHECKING 1
2798 _ACEOF
2799
2800       ;;
2801     no)
2802       :
2803       ;;
2804     *)
2805       { { echo "$as_me:$LINENO: error: no argument expected for --enable-cassert option" >&5
2806 echo "$as_me: error: no argument expected for --enable-cassert option" >&2;}
2807    { (exit 1); exit 1; }; }
2808       ;;
2809   esac
2810
2811 else
2812   enable_cassert=no
2813
2814 fi;
2815
2816
2817
2818 #
2819 # Include directories
2820 #
2821 ac_save_IFS=$IFS
2822 IFS="${IFS}:"
2823 # SRCH_INC comes from the template file
2824 for dir in $with_includes $SRCH_INC; do
2825   if test -d "$dir"; then
2826     INCLUDES="$INCLUDES -I$dir"
2827   else
2828     { echo "$as_me:$LINENO: WARNING: *** Include directory $dir does not exist." >&5
2829 echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
2830   fi
2831 done
2832 IFS=$ac_save_IFS
2833
2834
2835
2836 #
2837 # Library directories
2838 #
2839 ac_save_IFS=$IFS
2840 IFS="${IFS}:"
2841 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
2842 for dir in $LIBRARY_DIRS $SRCH_LIB; do
2843   if test -d "$dir"; then
2844     LIBDIRS="$LIBDIRS -L$dir"
2845   else
2846     { echo "$as_me:$LINENO: WARNING: *** Library directory $dir does not exist." >&5
2847 echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
2848   fi
2849 done
2850 IFS=$ac_save_IFS
2851
2852
2853 #
2854 # Tcl/Tk
2855 #
2856 echo "$as_me:$LINENO: checking whether to build with Tcl" >&5
2857 echo $ECHO_N "checking whether to build with Tcl... $ECHO_C" >&6
2858
2859
2860
2861 # Check whether --with-tcl or --without-tcl was given.
2862 if test "${with_tcl+set}" = set; then
2863   withval="$with_tcl"
2864
2865   case $withval in
2866     yes)
2867       :
2868       ;;
2869     no)
2870       :
2871       ;;
2872     *)
2873       { { echo "$as_me:$LINENO: error: no argument expected for --with-tcl option" >&5
2874 echo "$as_me: error: no argument expected for --with-tcl option" >&2;}
2875    { (exit 1); exit 1; }; }
2876       ;;
2877   esac
2878
2879 else
2880   with_tcl=no
2881
2882 fi;
2883
2884 echo "$as_me:$LINENO: result: $with_tcl" >&5
2885 echo "${ECHO_T}$with_tcl" >&6
2886
2887
2888 # If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
2889 echo "$as_me:$LINENO: checking whether to build with Tk" >&5
2890 echo $ECHO_N "checking whether to build with Tk... $ECHO_C" >&6
2891 if test "$with_tcl" = yes; then
2892
2893
2894
2895 # Check whether --with-tk or --without-tk was given.
2896 if test "${with_tk+set}" = set; then
2897   withval="$with_tk"
2898
2899   case $withval in
2900     yes)
2901       :
2902       ;;
2903     no)
2904       :
2905       ;;
2906     *)
2907       { { echo "$as_me:$LINENO: error: no argument expected for --with-tk option" >&5
2908 echo "$as_me: error: no argument expected for --with-tk option" >&2;}
2909    { (exit 1); exit 1; }; }
2910       ;;
2911   esac
2912
2913 else
2914   with_tk=yes
2915
2916 fi;
2917
2918 else
2919   with_tk=no
2920 fi
2921 echo "$as_me:$LINENO: result: $with_tk" >&5
2922 echo "${ECHO_T}$with_tk" >&6
2923
2924
2925
2926 # We see if the path to the Tcl/Tk configuration scripts is specified.
2927 # This will override the use of tclsh to find the paths to search.
2928
2929
2930
2931
2932 # Check whether --with-tclconfig or --without-tclconfig was given.
2933 if test "${with_tclconfig+set}" = set; then
2934   withval="$with_tclconfig"
2935
2936   case $withval in
2937     yes)
2938       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
2939 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
2940    { (exit 1); exit 1; }; }
2941       ;;
2942     no)
2943       { { echo "$as_me:$LINENO: error: argument required for --with-tclconfig option" >&5
2944 echo "$as_me: error: argument required for --with-tclconfig option" >&2;}
2945    { (exit 1); exit 1; }; }
2946       ;;
2947     *)
2948
2949       ;;
2950   esac
2951
2952 fi;
2953
2954
2955 # We see if the path to the Tk configuration scripts is specified.
2956 # This will override the use of tclsh to find the paths to search.
2957
2958
2959
2960
2961 # Check whether --with-tkconfig or --without-tkconfig was given.
2962 if test "${with_tkconfig+set}" = set; then
2963   withval="$with_tkconfig"
2964
2965   case $withval in
2966     yes)
2967       { { echo "$as_me:$LINENO: error: argument required for --with-tkconfig option" >&5
2968 echo "$as_me: error: argument required for --with-tkconfig option" >&2;}
2969    { (exit 1); exit 1; }; }
2970       ;;
2971     no)
2972       { { echo "$as_me:$LINENO: error: argument required for --with-tkconfig option" >&5
2973 echo "$as_me: error: argument required for --with-tkconfig option" >&2;}
2974    { (exit 1); exit 1; }; }
2975       ;;
2976     *)
2977
2978       ;;
2979   esac
2980
2981 fi;
2982
2983
2984 #
2985 # Optionally build Perl modules (Pg.pm and PL/Perl)
2986 #
2987 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
2988 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
2989
2990
2991
2992 # Check whether --with-perl or --without-perl was given.
2993 if test "${with_perl+set}" = set; then
2994   withval="$with_perl"
2995
2996   case $withval in
2997     yes)
2998       :
2999       ;;
3000     no)
3001       :
3002       ;;
3003     *)
3004       { { echo "$as_me:$LINENO: error: no argument expected for --with-perl option" >&5
3005 echo "$as_me: error: no argument expected for --with-perl option" >&2;}
3006    { (exit 1); exit 1; }; }
3007       ;;
3008   esac
3009
3010 else
3011   with_perl=no
3012
3013 fi;
3014
3015 echo "$as_me:$LINENO: result: $with_perl" >&5
3016 echo "${ECHO_T}$with_perl" >&6
3017
3018
3019 #
3020 # Optionally build Python interface module
3021 #
3022 echo "$as_me:$LINENO: checking whether to build Python modules" >&5
3023 echo $ECHO_N "checking whether to build Python modules... $ECHO_C" >&6
3024
3025
3026
3027 # Check whether --with-python or --without-python was given.
3028 if test "${with_python+set}" = set; then
3029   withval="$with_python"
3030
3031   case $withval in
3032     yes)
3033       :
3034       ;;
3035     no)
3036       :
3037       ;;
3038     *)
3039       { { echo "$as_me:$LINENO: error: no argument expected for --with-python option" >&5
3040 echo "$as_me: error: no argument expected for --with-python option" >&2;}
3041    { (exit 1); exit 1; }; }
3042       ;;
3043   esac
3044
3045 else
3046   with_python=no
3047
3048 fi;
3049
3050 echo "$as_me:$LINENO: result: $with_python" >&5
3051 echo "${ECHO_T}$with_python" >&6
3052
3053
3054 #
3055 # Optionally build the Java/JDBC tools
3056 #
3057 echo "$as_me:$LINENO: checking whether to build Java/JDBC tools" >&5
3058 echo $ECHO_N "checking whether to build Java/JDBC tools... $ECHO_C" >&6
3059
3060
3061
3062 # Check whether --with-java or --without-java was given.
3063 if test "${with_java+set}" = set; then
3064   withval="$with_java"
3065
3066   case $withval in
3067     yes)
3068       echo "$as_me:$LINENO: result: yes" >&5
3069 echo "${ECHO_T}yes" >&6
3070
3071   for ac_prog in jakarta-ant ant ant.sh ant.bat
3072 do
3073   # Extract the first word of "$ac_prog", so it can be a program name with args.
3074 set dummy $ac_prog; ac_word=$2
3075 echo "$as_me:$LINENO: checking for $ac_word" >&5
3076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3077 if test "${ac_cv_path_ANT+set}" = set; then
3078   echo $ECHO_N "(cached) $ECHO_C" >&6
3079 else
3080   case $ANT in
3081   [\\/]* | ?:[\\/]*)
3082   ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
3083   ;;
3084   *)
3085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3086 for as_dir in $PATH
3087 do
3088   IFS=$as_save_IFS
3089   test -z "$as_dir" && as_dir=.
3090   for ac_exec_ext in '' $ac_executable_extensions; do
3091   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3092     ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
3093     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3094     break 2
3095   fi
3096 done
3097 done
3098
3099   ;;
3100 esac
3101 fi
3102 ANT=$ac_cv_path_ANT
3103
3104 if test -n "$ANT"; then
3105   echo "$as_me:$LINENO: result: $ANT" >&5
3106 echo "${ECHO_T}$ANT" >&6
3107 else
3108   echo "$as_me:$LINENO: result: no" >&5
3109 echo "${ECHO_T}no" >&6
3110 fi
3111
3112   test -n "$ANT" && break
3113 done
3114
3115
3116   echo "$as_me:$LINENO: checking whether $ANT works" >&5
3117 echo $ECHO_N "checking whether $ANT works... $ECHO_C" >&6
3118 if test "${pgac_cv_prog_ant_works+set}" = set; then
3119   echo $ECHO_N "(cached) $ECHO_C" >&6
3120 else
3121
3122     cat > conftest.java << EOF
3123 public class conftest {
3124     int testmethod(int a, int b) {
3125         return a + b;
3126     }
3127 }
3128 EOF
3129
3130     cat > conftest.xml << EOF
3131 <project name="conftest" default="conftest">
3132  <target name="conftest">
3133   <javac srcdir="." includes="conftest.java">
3134   </javac>
3135  </target>
3136 </project>
3137 EOF
3138
3139     pgac_cmd='$ANT -buildfile conftest.xml 1>&2'
3140     { (eval echo "$as_me:$LINENO: \"$pgac_cmd\"") >&5
3141   (eval $pgac_cmd) 2>&5
3142   ac_status=$?
3143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3144   (exit $ac_status); }
3145     pgac_save_status=$?
3146     if test $? = 0 && test -f ./conftest.class ; then
3147       pgac_cv_prog_ant_works=yes
3148     else
3149       echo "configure: failed java program was:" >&5
3150       cat conftest.java >&5
3151       echo "configure: failed build file was:" >&5
3152       cat conftest.xml >&5
3153       pgac_cv_prog_ant_works=no
3154     fi
3155
3156     rm -f conftest* core core.* *.core
3157
3158 fi
3159 echo "$as_me:$LINENO: result: $pgac_cv_prog_ant_works" >&5
3160 echo "${ECHO_T}$pgac_cv_prog_ant_works" >&6
3161
3162   if test "$pgac_cv_prog_ant_works" != yes; then
3163     { { echo "$as_me:$LINENO: error: ant does not work" >&5
3164 echo "$as_me: error: ant does not work" >&2;}
3165    { (exit 1); exit 1; }; }
3166   fi
3167
3168
3169 if test -z "$ANT"; then
3170   { { echo "$as_me:$LINENO: error: Ant is required to build Java components" >&5
3171 echo "$as_me: error: Ant is required to build Java components" >&2;}
3172    { (exit 1); exit 1; }; }
3173 fi
3174       ;;
3175     no)
3176       echo "$as_me:$LINENO: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3178       ;;
3179     *)
3180       { { echo "$as_me:$LINENO: error: no argument expected for --with-java option" >&5
3181 echo "$as_me: error: no argument expected for --with-java option" >&2;}
3182    { (exit 1); exit 1; }; }
3183       ;;
3184   esac
3185
3186 else
3187   with_java=no
3188 echo "$as_me:$LINENO: result: no" >&5
3189 echo "${ECHO_T}no" >&6
3190 fi;
3191
3192
3193
3194
3195 #
3196 # Kerberos 4
3197 #
3198 echo "$as_me:$LINENO: checking whether to build with Kerberos 4 support" >&5
3199 echo $ECHO_N "checking whether to build with Kerberos 4 support... $ECHO_C" >&6
3200
3201
3202
3203 # Check whether --with-krb4 or --without-krb4 was given.
3204 if test "${with_krb4+set}" = set; then
3205   withval="$with_krb4"
3206
3207   case $withval in
3208     yes)
3209       krb4_prefix=/usr/athena
3210       ;;
3211     no)
3212       :
3213       ;;
3214     *)
3215       with_krb4=yes
3216 krb4_prefix=$withval
3217       ;;
3218   esac
3219
3220 else
3221   with_krb4=no
3222 fi;
3223
3224
3225 if test "$with_krb4" = yes; then
3226
3227   echo "$as_me:$LINENO: result: yes" >&5
3228 echo "${ECHO_T}yes" >&6
3229
3230 cat >>confdefs.h <<\_ACEOF
3231 #define KRB4 1
3232 _ACEOF
3233
3234
3235   if test -d "$krb4_prefix/include"; then
3236     INCLUDES="$INCLUDES -I$krb4_prefix/include"
3237   fi
3238   if test -d "$krb4_prefix/lib"; then
3239     LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
3240   fi
3241
3242   krb_srvtab="/etc/srvtab"
3243
3244 else
3245   echo "$as_me:$LINENO: result: no" >&5
3246 echo "${ECHO_T}no" >&6
3247 fi
3248
3249
3250
3251
3252
3253 #
3254 # Kerberos 5
3255 #
3256 echo "$as_me:$LINENO: checking whether to build with Kerberos 5 support" >&5
3257 echo $ECHO_N "checking whether to build with Kerberos 5 support... $ECHO_C" >&6
3258
3259
3260
3261 # Check whether --with-krb5 or --without-krb5 was given.
3262 if test "${with_krb5+set}" = set; then
3263   withval="$with_krb5"
3264
3265   case $withval in
3266     yes)
3267       krb5_prefix=/usr/athena
3268       ;;
3269     no)
3270       :
3271       ;;
3272     *)
3273       with_krb5=yes
3274 krb5_prefix=$withval
3275       ;;
3276   esac
3277
3278 else
3279   with_krb5=no
3280 fi;
3281
3282
3283 if test "$with_krb5" = yes; then
3284
3285   echo "$as_me:$LINENO: result: yes" >&5
3286 echo "${ECHO_T}yes" >&6
3287
3288 cat >>confdefs.h <<\_ACEOF
3289 #define KRB5 1
3290 _ACEOF
3291
3292
3293   if test -d "$krb5_prefix/include"; then
3294     INCLUDES="$INCLUDES -I$krb5_prefix/include"
3295   fi
3296   if test -d "$krb5_prefix/lib"; then
3297     LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
3298   fi
3299
3300   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
3301
3302 else
3303   echo "$as_me:$LINENO: result: no" >&5
3304 echo "${ECHO_T}no" >&6
3305 fi
3306
3307
3308
3309
3310
3311 # Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
3312 if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
3313   { { echo "$as_me:$LINENO: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&5
3314 echo "$as_me: error: Kerberos 4 and Kerberos 5 support cannot be combined" >&2;}
3315    { (exit 1); exit 1; }; }
3316 fi
3317
3318
3319
3320
3321 #
3322 # Kerberos configuration parameters
3323 #
3324
3325
3326
3327 # Check whether --with-krb-srvnam or --without-krb-srvnam was given.
3328 if test "${with_krb_srvnam+set}" = set; then
3329   withval="$with_krb_srvnam"
3330
3331   case $withval in
3332     yes)
3333       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3334 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3335    { (exit 1); exit 1; }; }
3336       ;;
3337     no)
3338       { { echo "$as_me:$LINENO: error: argument required for --with-krb-srvnam option" >&5
3339 echo "$as_me: error: argument required for --with-krb-srvnam option" >&2;}
3340    { (exit 1); exit 1; }; }
3341       ;;
3342     *)
3343
3344       ;;
3345   esac
3346
3347 else
3348   with_krb_srvnam="postgres"
3349 fi;
3350
3351
3352 cat >>confdefs.h <<_ACEOF
3353 #define PG_KRB_SRVNAM "$with_krb_srvnam"
3354 _ACEOF
3355
3356
3357
3358 #
3359 # PAM
3360 #
3361 echo "$as_me:$LINENO: checking whether to build with PAM support" >&5
3362 echo $ECHO_N "checking whether to build with PAM support... $ECHO_C" >&6
3363
3364
3365
3366 # Check whether --with-pam or --without-pam was given.
3367 if test "${with_pam+set}" = set; then
3368   withval="$with_pam"
3369
3370   case $withval in
3371     yes)
3372
3373 cat >>confdefs.h <<\_ACEOF
3374 #define USE_PAM 1
3375 _ACEOF
3376
3377       ;;
3378     no)
3379       :
3380       ;;
3381     *)
3382       { { echo "$as_me:$LINENO: error: no argument expected for --with-pam option" >&5
3383 echo "$as_me: error: no argument expected for --with-pam option" >&2;}
3384    { (exit 1); exit 1; }; }
3385       ;;
3386   esac
3387
3388 else
3389   with_pam=no
3390
3391 fi;
3392
3393 echo "$as_me:$LINENO: result: $with_pam" >&5
3394 echo "${ECHO_T}$with_pam" >&6
3395
3396
3397
3398 #
3399 # OpenSSL
3400 #
3401
3402
3403
3404 # Check whether --with-openssl or --without-openssl was given.
3405 if test "${with_openssl+set}" = set; then
3406   withval="$with_openssl"
3407
3408   case $withval in
3409     yes)
3410       openssl_prefix=/usr/local/ssl
3411       ;;
3412     no)
3413       :
3414       ;;
3415     *)
3416       with_openssl=yes
3417 openssl_prefix=$withval
3418       ;;
3419   esac
3420
3421 else
3422   with_openssl=no
3423 fi;
3424
3425
3426 if test "$with_openssl" = yes; then
3427
3428   echo "$as_me:$LINENO: result: building with OpenSSL support" >&5
3429 echo "${ECHO_T}building with OpenSSL support" >&6
3430
3431 cat >>confdefs.h <<\_ACEOF
3432 #define USE_SSL 1
3433 _ACEOF
3434
3435
3436   if test -d "${openssl_prefix}/include" ; then
3437     INCLUDES="$INCLUDES -I${openssl_prefix}/include"
3438   fi
3439   if test -d "${openssl_prefix}/lib" ; then
3440     LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
3441   fi
3442
3443 fi
3444
3445
3446
3447
3448
3449
3450 #
3451 # Optionally enable the building of the ODBC driver
3452 #
3453
3454 # Old option name
3455 if test "${with_odbc+set}" = set && test "${enable_odbc+set}" != set; then
3456   enable_odbc=$with_odbc
3457 fi
3458
3459 echo "$as_me:$LINENO: checking whether to build the ODBC driver" >&5
3460 echo $ECHO_N "checking whether to build the ODBC driver... $ECHO_C" >&6
3461
3462
3463 # Check whether --enable-odbc or --disable-odbc was given.
3464 if test "${enable_odbc+set}" = set; then
3465   enableval="$enable_odbc"
3466
3467   case $enableval in
3468     yes)
3469       :
3470       ;;
3471     no)
3472       :
3473       ;;
3474     *)
3475       { { echo "$as_me:$LINENO: error: no argument expected for --enable-odbc option" >&5
3476 echo "$as_me: error: no argument expected for --enable-odbc option" >&2;}
3477    { (exit 1); exit 1; }; }
3478       ;;
3479   esac
3480
3481 else
3482   enable_odbc=no
3483
3484 fi;
3485
3486
3487
3488
3489 # Check whether --with-unixodbc or --without-unixodbc was given.
3490 if test "${with_unixodbc+set}" = set; then
3491   withval="$with_unixodbc"
3492
3493   case $withval in
3494     yes)
3495       :
3496       ;;
3497     no)
3498       :
3499       ;;
3500     *)
3501       { { echo "$as_me:$LINENO: error: no argument expected for --with-unixodbc option" >&5
3502 echo "$as_me: error: no argument expected for --with-unixodbc option" >&2;}
3503    { (exit 1); exit 1; }; }
3504       ;;
3505   esac
3506
3507 else
3508   with_unixodbc=no
3509
3510 fi;
3511
3512
3513
3514
3515 # Check whether --with-iodbc or --without-iodbc was given.
3516 if test "${with_iodbc+set}" = set; then
3517   withval="$with_iodbc"
3518
3519   case $withval in
3520     yes)
3521       :
3522       ;;
3523     no)
3524       :
3525       ;;
3526     *)
3527       { { echo "$as_me:$LINENO: error: no argument expected for --with-iodbc option" >&5
3528 echo "$as_me: error: no argument expected for --with-iodbc option" >&2;}
3529    { (exit 1); exit 1; }; }
3530       ;;
3531   esac
3532
3533 else
3534   with_iodbc=no
3535
3536 fi;
3537
3538 if test "$with_unixodbc" = yes && test "$with_iodbc" = yes; then
3539   { { echo "$as_me:$LINENO: error: ODBC driver cannot be built for both unixODBC and iODBC" >&5
3540 echo "$as_me: error: ODBC driver cannot be built for both unixODBC and iODBC" >&2;}
3541    { (exit 1); exit 1; }; }
3542 fi
3543 if test "$with_unixodbc" = yes || test "$with_iodbc" = yes; then
3544   enable_odbc=yes
3545 fi
3546 case $enable_odbc:$with_unixodbc:$with_iodbc in
3547   yes:no:no)    echo "$as_me:$LINENO: result: yes (stand-alone)" >&5
3548 echo "${ECHO_T}yes (stand-alone)" >&6;;
3549   yes:yes:no)   echo "$as_me:$LINENO: result: yes (unixODBC)" >&5
3550 echo "${ECHO_T}yes (unixODBC)" >&6
3551
3552 cat >>confdefs.h <<\_ACEOF
3553 #define WITH_UNIXODBC 1
3554 _ACEOF
3555
3556                 ;;
3557   yes:no:yes)   echo "$as_me:$LINENO: result: yes (iODBC)" >&5
3558 echo "${ECHO_T}yes (iODBC)" >&6
3559
3560 cat >>confdefs.h <<\_ACEOF
3561 #define WITH_IODBC 1
3562 _ACEOF
3563
3564                 ;;
3565   no:*)         echo "$as_me:$LINENO: result: no" >&5
3566 echo "${ECHO_T}no" >&6;;
3567 esac
3568
3569
3570
3571
3572
3573 # Allow for overriding the default location of the odbcinst.ini
3574 # file which is normally ${sysconfdir} (i.e., ${prefix}/etc).
3575
3576
3577
3578 # Check whether --with-odbcinst or --without-odbcinst was given.
3579 if test "${with_odbcinst+set}" = set; then
3580   withval="$with_odbcinst"
3581
3582   case $withval in
3583     yes)
3584       { { echo "$as_me:$LINENO: error: argument required for --with-odbcinst option" >&5
3585 echo "$as_me: error: argument required for --with-odbcinst option" >&2;}
3586    { (exit 1); exit 1; }; }
3587       ;;
3588     no)
3589       { { echo "$as_me:$LINENO: error: argument required for --with-odbcinst option" >&5
3590 echo "$as_me: error: argument required for --with-odbcinst option" >&2;}
3591    { (exit 1); exit 1; }; }
3592       ;;
3593     *)
3594       odbcinst_ini_dir=$withval
3595       ;;
3596   esac
3597
3598 else
3599   odbcinst_ini_dir="\${sysconfdir}"
3600 fi;
3601
3602
3603
3604
3605
3606 # Assume system is ELF if it predefines __ELF__ as 1,
3607 # otherwise believe host_os based default.
3608 case $host_os in
3609     freebsd1*|freebsd2*) elf=no;;
3610     freebsd3*|freebsd4*) elf=yes;;
3611 esac
3612
3613
3614 cat >conftest.$ac_ext <<_ACEOF
3615 #line $LINENO "configure"
3616 #include "confdefs.h"
3617 #if __ELF__
3618   yes
3619 #endif
3620
3621 _ACEOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "yes" >/dev/null 2>&1; then
3624   ELF_SYS=true
3625 else
3626   if test "X$elf" = "Xyes" ; then
3627   ELF_SYS=true
3628 else
3629   ELF_SYS=
3630 fi
3631 fi
3632 rm -f conftest*
3633
3634
3635
3636
3637
3638 #
3639 # Optionally build C++ code (i.e., libpq++)
3640 #
3641 echo "$as_me:$LINENO: checking whether to build C++ modules" >&5
3642 echo $ECHO_N "checking whether to build C++ modules... $ECHO_C" >&6
3643
3644
3645
3646 # Check whether --with-CXX or --without-CXX was given.
3647 if test "${with_CXX+set}" = set; then
3648   withval="$with_CXX"
3649
3650   case $withval in
3651     yes)
3652       :
3653       ;;
3654     no)
3655       :
3656       ;;
3657     *)
3658       with_CXX=yes
3659 CXX=$withval
3660       ;;
3661   esac
3662
3663 else
3664   with_CXX=no
3665 fi;
3666
3667
3668 if test "$with_CXX" = yes; then
3669
3670   echo "$as_me:$LINENO: result: yes" >&5
3671 echo "${ECHO_T}yes" >&6
3672
3673   # If the user has specified CXXFLAGS in the environment, leave it
3674   # alone, else use a default.
3675
3676   ac_ext=cc
3677 ac_cpp='$CXXCPP $CPPFLAGS'
3678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3681 if test -n "$ac_tool_prefix"; then
3682   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3683   do
3684     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3686 echo "$as_me:$LINENO: checking for $ac_word" >&5
3687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3688 if test "${ac_cv_prog_CXX+set}" = set; then
3689   echo $ECHO_N "(cached) $ECHO_C" >&6
3690 else
3691   if test -n "$CXX"; then
3692   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3693 else
3694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695 for as_dir in $PATH
3696 do
3697   IFS=$as_save_IFS
3698   test -z "$as_dir" && as_dir=.
3699   for ac_exec_ext in '' $ac_executable_extensions; do
3700   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3701     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3702     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3703     break 2
3704   fi
3705 done
3706 done
3707
3708 fi
3709 fi
3710 CXX=$ac_cv_prog_CXX
3711 if test -n "$CXX"; then
3712   echo "$as_me:$LINENO: result: $CXX" >&5
3713 echo "${ECHO_T}$CXX" >&6
3714 else
3715   echo "$as_me:$LINENO: result: no" >&5
3716 echo "${ECHO_T}no" >&6
3717 fi
3718
3719     test -n "$CXX" && break
3720   done
3721 fi
3722 if test -z "$CXX"; then
3723   ac_ct_CXX=$CXX
3724   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3725 do
3726   # Extract the first word of "$ac_prog", so it can be a program name with args.
3727 set dummy $ac_prog; ac_word=$2
3728 echo "$as_me:$LINENO: checking for $ac_word" >&5
3729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3730 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3731   echo $ECHO_N "(cached) $ECHO_C" >&6
3732 else
3733   if test -n "$ac_ct_CXX"; then
3734   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3735 else
3736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737 for as_dir in $PATH
3738 do
3739   IFS=$as_save_IFS
3740   test -z "$as_dir" && as_dir=.
3741   for ac_exec_ext in '' $ac_executable_extensions; do
3742   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3743     ac_cv_prog_ac_ct_CXX="$ac_prog"
3744     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3745     break 2
3746   fi
3747 done
3748 done
3749
3750 fi
3751 fi
3752 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3753 if test -n "$ac_ct_CXX"; then
3754   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
3755 echo "${ECHO_T}$ac_ct_CXX" >&6
3756 else
3757   echo "$as_me:$LINENO: result: no" >&5
3758 echo "${ECHO_T}no" >&6
3759 fi
3760
3761   test -n "$ac_ct_CXX" && break
3762 done
3763 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3764
3765   CXX=$ac_ct_CXX
3766 fi
3767
3768
3769 # Provide some information about the compiler.
3770 echo "$as_me:$LINENO:" \
3771      "checking for C++ compiler version" >&5
3772 ac_compiler=`set X $ac_compile; echo $2`
3773 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
3774   (eval $ac_compiler --version </dev/null >&5) 2>&5
3775   ac_status=$?
3776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3777   (exit $ac_status); }
3778 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
3779   (eval $ac_compiler -v </dev/null >&5) 2>&5
3780   ac_status=$?
3781   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3782   (exit $ac_status); }
3783 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
3784   (eval $ac_compiler -V </dev/null >&5) 2>&5
3785   ac_status=$?
3786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3787   (exit $ac_status); }
3788
3789 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
3790 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3791 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3792   echo $ECHO_N "(cached) $ECHO_C" >&6
3793 else
3794   cat >conftest.$ac_ext <<_ACEOF
3795 #line $LINENO "configure"
3796 #include "confdefs.h"
3797
3798 #ifdef F77_DUMMY_MAIN
3799 #  ifdef __cplusplus
3800      extern "C"
3801 #  endif
3802    int F77_DUMMY_MAIN() { return 1; }
3803 #endif
3804 int
3805 main ()
3806 {
3807 #ifndef __GNUC__
3808        choke me
3809 #endif
3810
3811   ;
3812   return 0;
3813 }
3814 _ACEOF
3815 rm -f conftest.$ac_objext
3816 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3817   (eval $ac_compile) 2>&5
3818   ac_status=$?
3819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820   (exit $ac_status); } &&
3821          { ac_try='test -s conftest.$ac_objext'
3822   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3823   (eval $ac_try) 2>&5
3824   ac_status=$?
3825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3826   (exit $ac_status); }; }; then
3827   ac_compiler_gnu=yes
3828 else
3829   echo "$as_me: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 ac_compiler_gnu=no
3832 fi
3833 rm -f conftest.$ac_objext conftest.$ac_ext
3834 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3835
3836 fi
3837 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
3838 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3839 GXX=`test $ac_compiler_gnu = yes && echo yes`
3840 ac_test_CXXFLAGS=${CXXFLAGS+set}
3841 ac_save_CXXFLAGS=$CXXFLAGS
3842 CXXFLAGS="-g"
3843 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
3844 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3845 if test "${ac_cv_prog_cxx_g+set}" = set; then
3846   echo $ECHO_N "(cached) $ECHO_C" >&6
3847 else
3848   cat >conftest.$ac_ext <<_ACEOF
3849 #line $LINENO "configure"
3850 #include "confdefs.h"
3851
3852 #ifdef F77_DUMMY_MAIN
3853 #  ifdef __cplusplus
3854      extern "C"
3855 #  endif
3856    int F77_DUMMY_MAIN() { return 1; }
3857 #endif
3858 int
3859 main ()
3860 {
3861
3862   ;
3863   return 0;
3864 }
3865 _ACEOF
3866 rm -f conftest.$ac_objext
3867 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3868   (eval $ac_compile) 2>&5
3869   ac_status=$?
3870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871   (exit $ac_status); } &&
3872          { ac_try='test -s conftest.$ac_objext'
3873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3874   (eval $ac_try) 2>&5
3875   ac_status=$?
3876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3877   (exit $ac_status); }; }; then
3878   ac_cv_prog_cxx_g=yes
3879 else
3880   echo "$as_me: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 ac_cv_prog_cxx_g=no
3883 fi
3884 rm -f conftest.$ac_objext conftest.$ac_ext
3885 fi
3886 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
3887 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3888 if test "$ac_test_CXXFLAGS" = set; then
3889   CXXFLAGS=$ac_save_CXXFLAGS
3890 elif test $ac_cv_prog_cxx_g = yes; then
3891   if test "$GXX" = yes; then
3892     CXXFLAGS="-g -O2"
3893   else
3894     CXXFLAGS="-g"
3895   fi
3896 else
3897   if test "$GXX" = yes; then
3898     CXXFLAGS="-O2"
3899   else
3900     CXXFLAGS=
3901   fi
3902 fi
3903 for ac_declaration in \
3904    ''\
3905    '#include <stdlib.h>' \
3906    'extern "C" void std::exit (int) throw (); using std::exit;' \
3907    'extern "C" void std::exit (int); using std::exit;' \
3908    'extern "C" void exit (int) throw ();' \
3909    'extern "C" void exit (int);' \
3910    'void exit (int);'
3911 do
3912   cat >conftest.$ac_ext <<_ACEOF
3913 #line $LINENO "configure"
3914 #include "confdefs.h"
3915 #include <stdlib.h>
3916 $ac_declaration
3917 #ifdef F77_DUMMY_MAIN
3918 #  ifdef __cplusplus
3919      extern "C"
3920 #  endif
3921    int F77_DUMMY_MAIN() { return 1; }
3922 #endif
3923 int
3924 main ()
3925 {
3926 exit (42);
3927   ;
3928   return 0;
3929 }
3930 _ACEOF
3931 rm -f conftest.$ac_objext
3932 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3933   (eval $ac_compile) 2>&5
3934   ac_status=$?
3935   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3936   (exit $ac_status); } &&
3937          { ac_try='test -s conftest.$ac_objext'
3938   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3939   (eval $ac_try) 2>&5
3940   ac_status=$?
3941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3942   (exit $ac_status); }; }; then
3943   :
3944 else
3945   echo "$as_me: failed program was:" >&5
3946 cat conftest.$ac_ext >&5
3947 continue
3948 fi
3949 rm -f conftest.$ac_objext conftest.$ac_ext
3950   cat >conftest.$ac_ext <<_ACEOF
3951 #line $LINENO "configure"
3952 #include "confdefs.h"
3953 $ac_declaration
3954 #ifdef F77_DUMMY_MAIN
3955 #  ifdef __cplusplus
3956      extern "C"
3957 #  endif
3958    int F77_DUMMY_MAIN() { return 1; }
3959 #endif
3960 int
3961 main ()
3962 {
3963 exit (42);
3964   ;
3965   return 0;
3966 }
3967 _ACEOF
3968 rm -f conftest.$ac_objext
3969 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3970   (eval $ac_compile) 2>&5
3971   ac_status=$?
3972   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3973   (exit $ac_status); } &&
3974          { ac_try='test -s conftest.$ac_objext'
3975   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3976   (eval $ac_try) 2>&5
3977   ac_status=$?
3978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3979   (exit $ac_status); }; }; then
3980   break
3981 else
3982   echo "$as_me: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3984 fi
3985 rm -f conftest.$ac_objext conftest.$ac_ext
3986 done
3987 rm -f conftest*
3988 if test -n "$ac_declaration"; then
3989   echo '#ifdef __cplusplus' >>confdefs.h
3990   echo $ac_declaration      >>confdefs.h
3991   echo '#endif'             >>confdefs.h
3992 fi
3993
3994 ac_ext=c
3995 ac_cpp='$CPP $CPPFLAGS'
3996 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3997 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3998 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3999
4000   if test "$ac_env_CXXFLAGS" != set; then
4001     if test "$GXX" = yes; then
4002       CXXFLAGS=-O2
4003     else
4004       case $template in
4005         osf)            CXXFLAGS='-O4 -Olimit 2000' ;;
4006         unixware)       CXXFLAGS='-O' ;;
4007         *)              CXXFLAGS= ;;
4008       esac
4009     fi
4010   fi
4011   if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
4012     CXXFLAGS="$CXXFLAGS -g"
4013   fi
4014   { echo "$as_me:$LINENO: using CXXFLAGS=$CXXFLAGS" >&5
4015 echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
4016
4017   ac_ext=cc
4018 ac_cpp='$CXXCPP $CPPFLAGS'
4019 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4020 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4021 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4022 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
4023 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
4024 if test -z "$CXXCPP"; then
4025   if test "${ac_cv_prog_CXXCPP+set}" = set; then
4026   echo $ECHO_N "(cached) $ECHO_C" >&6
4027 else
4028       # Double quotes because CXXCPP needs to be expanded
4029     for CXXCPP in "$CXX -E" "/lib/cpp"
4030     do
4031       ac_preproc_ok=false
4032 for ac_cxx_preproc_warn_flag in '' yes
4033 do
4034   # Use a header file that comes with gcc, so configuring glibc
4035   # with a fresh cross-compiler works.
4036   # On the NeXT, cc -E runs the code through the compiler's parser,
4037   # not just through cpp. "Syntax error" is here to catch this case.
4038   cat >conftest.$ac_ext <<_ACEOF
4039 #line $LINENO "configure"
4040 #include "confdefs.h"
4041 #include <assert.h>
4042                      Syntax error
4043 _ACEOF
4044 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4046   ac_status=$?
4047   egrep -v '^ *\+' conftest.er1 >conftest.err
4048   rm -f conftest.er1
4049   cat conftest.err >&5
4050   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4051   (exit $ac_status); } >/dev/null; then
4052   if test -s conftest.err; then
4053     ac_cpp_err=$ac_cxx_preproc_warn_flag
4054   else
4055     ac_cpp_err=
4056   fi
4057 else
4058   ac_cpp_err=yes
4059 fi
4060 if test -z "$ac_cpp_err"; then
4061   :
4062 else
4063   echo "$as_me: failed program was:" >&5
4064   cat conftest.$ac_ext >&5
4065   # Broken: fails on valid input.
4066 continue
4067 fi
4068 rm -f conftest.err conftest.$ac_ext
4069
4070   # OK, works on sane cases.  Now check whether non-existent headers
4071   # can be detected and how.
4072   cat >conftest.$ac_ext <<_ACEOF
4073 #line $LINENO "configure"
4074 #include "confdefs.h"
4075 #include <ac_nonexistent.h>
4076 _ACEOF
4077 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4078   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4079   ac_status=$?
4080   egrep -v '^ *\+' conftest.er1 >conftest.err
4081   rm -f conftest.er1
4082   cat conftest.err >&5
4083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084   (exit $ac_status); } >/dev/null; then
4085   if test -s conftest.err; then
4086     ac_cpp_err=$ac_cxx_preproc_warn_flag
4087   else
4088     ac_cpp_err=
4089   fi
4090 else
4091   ac_cpp_err=yes
4092 fi
4093 if test -z "$ac_cpp_err"; then
4094   # Broken: success on invalid input.
4095 continue
4096 else
4097   echo "$as_me: failed program was:" >&5
4098   cat conftest.$ac_ext >&5
4099   # Passes both tests.
4100 ac_preproc_ok=:
4101 break
4102 fi
4103 rm -f conftest.err conftest.$ac_ext
4104
4105 done
4106 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4107 rm -f conftest.err conftest.$ac_ext
4108 if $ac_preproc_ok; then
4109   break
4110 fi
4111
4112     done
4113     ac_cv_prog_CXXCPP=$CXXCPP
4114
4115 fi
4116   CXXCPP=$ac_cv_prog_CXXCPP
4117 else
4118   ac_cv_prog_CXXCPP=$CXXCPP
4119 fi
4120 echo "$as_me:$LINENO: result: $CXXCPP" >&5
4121 echo "${ECHO_T}$CXXCPP" >&6
4122 ac_preproc_ok=false
4123 for ac_cxx_preproc_warn_flag in '' yes
4124 do
4125   # Use a header file that comes with gcc, so configuring glibc
4126   # with a fresh cross-compiler works.
4127   # On the NeXT, cc -E runs the code through the compiler's parser,
4128   # not just through cpp. "Syntax error" is here to catch this case.
4129   cat >conftest.$ac_ext <<_ACEOF
4130 #line $LINENO "configure"
4131 #include "confdefs.h"
4132 #include <assert.h>
4133                      Syntax error
4134 _ACEOF
4135 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4136   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4137   ac_status=$?
4138   egrep -v '^ *\+' conftest.er1 >conftest.err
4139   rm -f conftest.er1
4140   cat conftest.err >&5
4141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142   (exit $ac_status); } >/dev/null; then
4143   if test -s conftest.err; then
4144     ac_cpp_err=$ac_cxx_preproc_warn_flag
4145   else
4146     ac_cpp_err=
4147   fi
4148 else
4149   ac_cpp_err=yes
4150 fi
4151 if test -z "$ac_cpp_err"; then
4152   :
4153 else
4154   echo "$as_me: failed program was:" >&5
4155   cat conftest.$ac_ext >&5
4156   # Broken: fails on valid input.
4157 continue
4158 fi
4159 rm -f conftest.err conftest.$ac_ext
4160
4161   # OK, works on sane cases.  Now check whether non-existent headers
4162   # can be detected and how.
4163   cat >conftest.$ac_ext <<_ACEOF
4164 #line $LINENO "configure"
4165 #include "confdefs.h"
4166 #include <ac_nonexistent.h>
4167 _ACEOF
4168 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4169   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4170   ac_status=$?
4171   egrep -v '^ *\+' conftest.er1 >conftest.err
4172   rm -f conftest.er1
4173   cat conftest.err >&5
4174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4175   (exit $ac_status); } >/dev/null; then
4176   if test -s conftest.err; then
4177     ac_cpp_err=$ac_cxx_preproc_warn_flag
4178   else
4179     ac_cpp_err=
4180   fi
4181 else
4182   ac_cpp_err=yes
4183 fi
4184 if test -z "$ac_cpp_err"; then
4185   # Broken: success on invalid input.
4186 continue
4187 else
4188   echo "$as_me: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   # Passes both tests.
4191 ac_preproc_ok=:
4192 break
4193 fi
4194 rm -f conftest.err conftest.$ac_ext
4195
4196 done
4197 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4198 rm -f conftest.err conftest.$ac_ext
4199 if $ac_preproc_ok; then
4200   :
4201 else
4202   { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
4203 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
4204    { (exit 1); exit 1; }; }
4205 fi
4206
4207 ac_ext=c
4208 ac_cpp='$CPP $CPPFLAGS'
4209 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4212
4213
4214 else
4215   echo "$as_me:$LINENO: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4217 fi
4218
4219
4220
4221
4222 CPPFLAGS="$CPPFLAGS $INCLUDES"
4223 LDFLAGS="$LDFLAGS $LIBDIRS"
4224
4225 { echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
4226 echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
4227 { echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
4228 echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
4229
4230
4231 for ac_prog in gawk mawk nawk awk
4232 do
4233   # Extract the first word of "$ac_prog", so it can be a program name with args.
4234 set dummy $ac_prog; ac_word=$2
4235 echo "$as_me:$LINENO: checking for $ac_word" >&5
4236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4237 if test "${ac_cv_prog_AWK+set}" = set; then
4238   echo $ECHO_N "(cached) $ECHO_C" >&6
4239 else
4240   if test -n "$AWK"; then
4241   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4242 else
4243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244 for as_dir in $PATH
4245 do
4246   IFS=$as_save_IFS
4247   test -z "$as_dir" && as_dir=.
4248   for ac_exec_ext in '' $ac_executable_extensions; do
4249   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4250     ac_cv_prog_AWK="$ac_prog"
4251     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4252     break 2
4253   fi
4254 done
4255 done
4256
4257 fi
4258 fi
4259 AWK=$ac_cv_prog_AWK
4260 if test -n "$AWK"; then
4261   echo "$as_me:$LINENO: result: $AWK" >&5
4262 echo "${ECHO_T}$AWK" >&6
4263 else
4264   echo "$as_me:$LINENO: result: no" >&5
4265 echo "${ECHO_T}no" >&6
4266 fi
4267
4268   test -n "$AWK" && break
4269 done
4270
4271 echo "$as_me:$LINENO: checking for flex" >&5
4272 echo $ECHO_N "checking for flex... $ECHO_C" >&6
4273 if test "${pgac_cv_path_flex+set}" = set; then
4274   echo $ECHO_N "(cached) $ECHO_C" >&6
4275 else
4276   # Let the user override the test
4277 if test -n "$FLEX"; then
4278   pgac_cv_path_flex=$FLEX
4279 else
4280   pgac_save_IFS=$IFS
4281   IFS=:
4282   for pgac_dir in $PATH; do
4283     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
4284       pgac_dir=`pwd`
4285     fi
4286     for pgac_prog in flex lex; do
4287       pgac_candidate="$pgac_dir/$pgac_prog"
4288       if test -f "$pgac_candidate" \
4289         && $pgac_candidate --version </dev/null >/dev/null 2>&1
4290       then
4291         echo '%%'  > conftest.l
4292         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
4293           if $pgac_candidate --version | grep '2\.5\.3' >/dev/null 2>&1; then
4294             pgac_broken_flex=$pgac_candidate
4295             continue
4296           fi
4297
4298           pgac_cv_path_flex=$pgac_candidate
4299           break 2
4300         fi
4301       fi
4302     done
4303   done
4304   IFS=$pgac_save_IFS
4305   rm -f conftest.l
4306   : ${pgac_cv_path_flex=no}
4307 fi
4308
4309 fi
4310 echo "$as_me:$LINENO: result: $pgac_cv_path_flex" >&5
4311 echo "${ECHO_T}$pgac_cv_path_flex" >&6
4312 if test x"$pgac_cv_path_flex" = x"no"; then
4313   if test -n "$pgac_broken_flex"; then
4314     { echo "$as_me:$LINENO: WARNING:
4315 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4316 *** should get version 2.5.4 or later." >&5
4317 echo "$as_me: WARNING:
4318 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
4319 *** should get version 2.5.4 or later." >&2;}
4320   fi
4321
4322   { echo "$as_me:$LINENO: WARNING:
4323 *** Without Flex you will not be able to build PostgreSQL from CVS or
4324 *** change any of the scanner definition files.  You can obtain Flex from
4325 *** a GNU mirror site.  (If you are using the official distribution of
4326 *** PostgreSQL then you do not need to worry about this because the Flex
4327 *** output is pre-generated.)" >&5
4328 echo "$as_me: WARNING:
4329 *** Without Flex you will not be able to build PostgreSQL from CVS or
4330 *** change any of the scanner definition files.  You can obtain Flex from
4331 *** a GNU mirror site.  (If you are using the official distribution of
4332 *** PostgreSQL then you do not need to worry about this because the Flex
4333 *** output is pre-generated.)" >&2;}
4334 fi
4335
4336 if test x"$pgac_cv_path_flex" = x"no"; then
4337   FLEX=
4338 else
4339   FLEX=$pgac_cv_path_flex
4340 fi
4341
4342
4343
4344
4345 echo "$as_me:$LINENO: checking whether ln -s works" >&5
4346 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4347 LN_S=$as_ln_s
4348 if test "$LN_S" = "ln -s"; then
4349   echo "$as_me:$LINENO: result: yes" >&5
4350 echo "${ECHO_T}yes" >&6
4351 else
4352   echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4353 echo "${ECHO_T}no, using $LN_S" >&6
4354 fi
4355
4356
4357 # Check whether --with-gnu-ld or --without-gnu-ld was given.
4358 if test "${with_gnu_ld+set}" = set; then
4359   withval="$with_gnu_ld"
4360   test "$withval" = no || with_gnu_ld=yes
4361 else
4362   with_gnu_ld=no
4363 fi;
4364 ac_prog=ld
4365 if test "$GCC" = yes; then
4366   # Check if gcc -print-prog-name=ld gives a path.
4367   echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4368 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
4369   case $host in
4370   *-*-mingw*)
4371     # gcc leaves a trailing carriage return which upsets mingw
4372     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4373   *)
4374     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4375   esac
4376   case "$ac_prog" in
4377     # Accept absolute paths.
4378     [\\/]* | [A-Za-z]:[\\/]*)
4379       re_direlt='/[^/][^/]*/\.\./'
4380       # Canonicalize the path of ld
4381       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4382       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4383         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4384       done
4385       test -z "$LD" && LD="$ac_prog"
4386       ;;
4387   "")
4388     # If it fails, then pretend we aren't using GCC.
4389     ac_prog=ld
4390     ;;
4391   *)
4392     # If it is relative, then search for the first ld in PATH.
4393     with_gnu_ld=unknown
4394     ;;
4395   esac
4396 elif test "$with_gnu_ld" = yes; then
4397   echo "$as_me:$LINENO: checking for GNU ld" >&5
4398 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
4399 else
4400   echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4401 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
4402 fi
4403 if test "${ac_cv_path_LD+set}" = set; then
4404   echo $ECHO_N "(cached) $ECHO_C" >&6
4405 else
4406   if test -z "$LD"; then
4407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4408   for ac_dir in $PATH; do
4409     test -z "$ac_dir" && ac_dir=.
4410     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4411       ac_cv_path_LD="$ac_dir/$ac_prog"
4412       # Check to see if the program is GNU ld.  I'd rather use --version,
4413       # but apparently some GNU ld's only accept -v.
4414       # Break only if it was the GNU/non-GNU ld that we prefer.
4415       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4416         test "$with_gnu_ld" != no && break
4417       else
4418         test "$with_gnu_ld" != yes && break
4419       fi
4420     fi
4421   done
4422   IFS="$ac_save_ifs"
4423 else
4424   ac_cv_path_LD="$LD" # Let the user override the test with a path.
4425 fi
4426 fi
4427
4428 LD="$ac_cv_path_LD"
4429 if test -n "$LD"; then
4430   echo "$as_me:$LINENO: result: $LD" >&5
4431 echo "${ECHO_T}$LD" >&6
4432 else
4433   echo "$as_me:$LINENO: result: no" >&5
4434 echo "${ECHO_T}no" >&6
4435 fi
4436 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4437 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4438    { (exit 1); exit 1; }; }
4439 echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4440 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
4441 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4442   echo $ECHO_N "(cached) $ECHO_C" >&6
4443 else
4444   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4445 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4446   ac_cv_prog_gnu_ld=yes
4447 else
4448   ac_cv_prog_gnu_ld=no
4449 fi
4450 fi
4451 echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4452 echo "${ECHO_T}$ac_cv_prog_gnu_ld" >&6
4453 with_gnu_ld=$ac_cv_prog_gnu_ld
4454
4455
4456
4457
4458 case $host_os in sysv5*)
4459   echo "$as_me:$LINENO: checking whether ld -R works" >&5
4460 echo $ECHO_N "checking whether ld -R works... $ECHO_C" >&6
4461 if test "${pgac_cv_prog_ld_R+set}" = set; then
4462   echo $ECHO_N "(cached) $ECHO_C" >&6
4463 else
4464
4465     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
4466     cat >conftest.$ac_ext <<_ACEOF
4467 #line $LINENO "configure"
4468 #include "confdefs.h"
4469
4470 #ifdef F77_DUMMY_MAIN
4471 #  ifdef __cplusplus
4472      extern "C"
4473 #  endif
4474    int F77_DUMMY_MAIN() { return 1; }
4475 #endif
4476 int
4477 main ()
4478 {
4479
4480   ;
4481   return 0;
4482 }
4483 _ACEOF
4484 rm -f conftest.$ac_objext conftest$ac_exeext
4485 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4486   (eval $ac_link) 2>&5
4487   ac_status=$?
4488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4489   (exit $ac_status); } &&
4490          { ac_try='test -s conftest$ac_exeext'
4491   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4492   (eval $ac_try) 2>&5
4493   ac_status=$?
4494   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495   (exit $ac_status); }; }; then
4496   pgac_cv_prog_ld_R=yes
4497 else
4498   echo "$as_me: failed program was:" >&5
4499 cat conftest.$ac_ext >&5
4500 pgac_cv_prog_ld_R=no
4501 fi
4502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4503     LDFLAGS=$pgac_save_LDFLAGS
4504
4505 fi
4506 echo "$as_me:$LINENO: result: $pgac_cv_prog_ld_R" >&5
4507 echo "${ECHO_T}$pgac_cv_prog_ld_R" >&6
4508   ld_R_works=$pgac_cv_prog_ld_R
4509
4510 esac
4511 if test -n "$ac_tool_prefix"; then
4512   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4513 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4514 echo "$as_me:$LINENO: checking for $ac_word" >&5
4515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4516 if test "${ac_cv_prog_RANLIB+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   if test -n "$RANLIB"; then
4520   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4521 else
4522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523 for as_dir in $PATH
4524 do
4525   IFS=$as_save_IFS
4526   test -z "$as_dir" && as_dir=.
4527   for ac_exec_ext in '' $ac_executable_extensions; do
4528   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4529     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4530     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4531     break 2
4532   fi
4533 done
4534 done
4535
4536 fi
4537 fi
4538 RANLIB=$ac_cv_prog_RANLIB
4539 if test -n "$RANLIB"; then
4540   echo "$as_me:$LINENO: result: $RANLIB" >&5
4541 echo "${ECHO_T}$RANLIB" >&6
4542 else
4543   echo "$as_me:$LINENO: result: no" >&5
4544 echo "${ECHO_T}no" >&6
4545 fi
4546
4547 fi
4548 if test -z "$ac_cv_prog_RANLIB"; then
4549   ac_ct_RANLIB=$RANLIB
4550   # Extract the first word of "ranlib", so it can be a program name with args.
4551 set dummy ranlib; ac_word=$2
4552 echo "$as_me:$LINENO: checking for $ac_word" >&5
4553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4554 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4555   echo $ECHO_N "(cached) $ECHO_C" >&6
4556 else
4557   if test -n "$ac_ct_RANLIB"; then
4558   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4559 else
4560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 for as_dir in $PATH
4562 do
4563   IFS=$as_save_IFS
4564   test -z "$as_dir" && as_dir=.
4565   for ac_exec_ext in '' $ac_executable_extensions; do
4566   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4567     ac_cv_prog_ac_ct_RANLIB="ranlib"
4568     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4569     break 2
4570   fi
4571 done
4572 done
4573
4574   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4575 fi
4576 fi
4577 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4578 if test -n "$ac_ct_RANLIB"; then
4579   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4580 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4581 else
4582   echo "$as_me:$LINENO: result: no" >&5
4583 echo "${ECHO_T}no" >&6
4584 fi
4585
4586   RANLIB=$ac_ct_RANLIB
4587 else
4588   RANLIB="$ac_cv_prog_RANLIB"
4589 fi
4590
4591 for ac_prog in lorder
4592 do
4593   # Extract the first word of "$ac_prog", so it can be a program name with args.
4594 set dummy $ac_prog; ac_word=$2
4595 echo "$as_me:$LINENO: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_LORDER+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   if test -n "$LORDER"; then
4601   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
4602 else
4603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4604 for as_dir in $PATH
4605 do
4606   IFS=$as_save_IFS
4607   test -z "$as_dir" && as_dir=.
4608   for ac_exec_ext in '' $ac_executable_extensions; do
4609   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4610     ac_cv_prog_LORDER="$ac_prog"
4611     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4612     break 2
4613   fi
4614 done
4615 done
4616
4617 fi
4618 fi
4619 LORDER=$ac_cv_prog_LORDER
4620 if test -n "$LORDER"; then
4621   echo "$as_me:$LINENO: result: $LORDER" >&5
4622 echo "${ECHO_T}$LORDER" >&6
4623 else
4624   echo "$as_me:$LINENO: result: no" >&5
4625 echo "${ECHO_T}no" >&6
4626 fi
4627
4628   test -n "$LORDER" && break
4629 done
4630
4631 # Extract the first word of "tar", so it can be a program name with args.
4632 set dummy tar; ac_word=$2
4633 echo "$as_me:$LINENO: checking for $ac_word" >&5
4634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4635 if test "${ac_cv_path_TAR+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   case $TAR in
4639   [\\/]* | ?:[\\/]*)
4640   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
4641   ;;
4642   *)
4643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4644 for as_dir in $PATH
4645 do
4646   IFS=$as_save_IFS
4647   test -z "$as_dir" && as_dir=.
4648   for ac_exec_ext in '' $ac_executable_extensions; do
4649   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4650     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
4651     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4652     break 2
4653   fi
4654 done
4655 done
4656
4657   ;;
4658 esac
4659 fi
4660 TAR=$ac_cv_path_TAR
4661
4662 if test -n "$TAR"; then
4663   echo "$as_me:$LINENO: result: $TAR" >&5
4664 echo "${ECHO_T}$TAR" >&6
4665 else
4666   echo "$as_me:$LINENO: result: no" >&5
4667 echo "${ECHO_T}no" >&6
4668 fi
4669
4670
4671   if test -n "$ac_tool_prefix"; then
4672   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4673 set dummy ${ac_tool_prefix}strip; ac_word=$2
4674 echo "$as_me:$LINENO: checking for $ac_word" >&5
4675 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4676 if test "${ac_cv_prog_STRIP+set}" = set; then
4677   echo $ECHO_N "(cached) $ECHO_C" >&6
4678 else
4679   if test -n "$STRIP"; then
4680   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4681 else
4682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4683 for as_dir in $PATH
4684 do
4685   IFS=$as_save_IFS
4686   test -z "$as_dir" && as_dir=.
4687   for ac_exec_ext in '' $ac_executable_extensions; do
4688   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4689     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4690     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4691     break 2
4692   fi
4693 done
4694 done
4695
4696 fi
4697 fi
4698 STRIP=$ac_cv_prog_STRIP
4699 if test -n "$STRIP"; then
4700   echo "$as_me:$LINENO: result: $STRIP" >&5
4701 echo "${ECHO_T}$STRIP" >&6
4702 else
4703   echo "$as_me:$LINENO: result: no" >&5
4704 echo "${ECHO_T}no" >&6
4705 fi
4706
4707 fi
4708 if test -z "$ac_cv_prog_STRIP"; then
4709   ac_ct_STRIP=$STRIP
4710   # Extract the first word of "strip", so it can be a program name with args.
4711 set dummy strip; ac_word=$2
4712 echo "$as_me:$LINENO: checking for $ac_word" >&5
4713 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4714 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
4715   echo $ECHO_N "(cached) $ECHO_C" >&6
4716 else
4717   if test -n "$ac_ct_STRIP"; then
4718   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4719 else
4720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4721 for as_dir in $PATH
4722 do
4723   IFS=$as_save_IFS
4724   test -z "$as_dir" && as_dir=.
4725   for ac_exec_ext in '' $ac_executable_extensions; do
4726   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4727     ac_cv_prog_ac_ct_STRIP="strip"
4728     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4729     break 2
4730   fi
4731 done
4732 done
4733
4734   test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
4735 fi
4736 fi
4737 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4738 if test -n "$ac_ct_STRIP"; then
4739   echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
4740 echo "${ECHO_T}$ac_ct_STRIP" >&6
4741 else
4742   echo "$as_me:$LINENO: result: no" >&5
4743 echo "${ECHO_T}no" >&6
4744 fi
4745
4746   STRIP=$ac_ct_STRIP
4747 else
4748   STRIP="$ac_cv_prog_STRIP"
4749 fi
4750
4751
4752   echo "$as_me:$LINENO: checking whether it is possible to strip libraries" >&5
4753 echo $ECHO_N "checking whether it is possible to strip libraries... $ECHO_C" >&6
4754   if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
4755     STRIP_STATIC_LIB="$STRIP -x"
4756     STRIP_SHARED_LIB="$STRIP --strip-unneeded"
4757     echo "$as_me:$LINENO: result: yes" >&5
4758 echo "${ECHO_T}yes" >&6
4759   else
4760     STRIP_STATIC_LIB=:
4761     STRIP_SHARED_LIB=:
4762     echo "$as_me:$LINENO: result: no" >&5
4763 echo "${ECHO_T}no" >&6
4764   fi
4765
4766
4767
4768
4769 for ac_prog in 'bison -y'
4770 do
4771   # Extract the first word of "$ac_prog", so it can be a program name with args.
4772 set dummy $ac_prog; ac_word=$2
4773 echo "$as_me:$LINENO: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_YACC+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$YACC"; then
4779   ac_cv_prog_YACC="$YACC" # Let the user override the test.
4780 else
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782 for as_dir in $PATH
4783 do
4784   IFS=$as_save_IFS
4785   test -z "$as_dir" && as_dir=.
4786   for ac_exec_ext in '' $ac_executable_extensions; do
4787   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4788     ac_cv_prog_YACC="$ac_prog"
4789     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4790     break 2
4791   fi
4792 done
4793 done
4794
4795 fi
4796 fi
4797 YACC=$ac_cv_prog_YACC
4798 if test -n "$YACC"; then
4799   echo "$as_me:$LINENO: result: $YACC" >&5
4800 echo "${ECHO_T}$YACC" >&6
4801 else
4802   echo "$as_me:$LINENO: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   test -n "$YACC" && break
4807 done
4808
4809 if test -z "$YACC"; then
4810   { echo "$as_me:$LINENO: WARNING:
4811 *** Without Bison you will not be able to build PostgreSQL from CVS or
4812 *** change any of the parser definition files.  You can obtain Bison from
4813 *** a GNU mirror site.  (If you are using the official distribution of
4814 *** PostgreSQL then you do not need to worry about this because the Bison
4815 *** output is pre-generated.)  To use a different yacc program (possible,
4816 *** but not recommended), set the environment variable YACC before running
4817 *** 'configure'." >&5
4818 echo "$as_me: WARNING:
4819 *** Without Bison you will not be able to build PostgreSQL from CVS or
4820 *** change any of the parser definition files.  You can obtain Bison from
4821 *** a GNU mirror site.  (If you are using the official distribution of
4822 *** PostgreSQL then you do not need to worry about this because the Bison
4823 *** output is pre-generated.)  To use a different yacc program (possible,
4824 *** but not recommended), set the environment variable YACC before running
4825 *** 'configure'." >&2;}
4826 fi
4827
4828
4829 if test "$with_tk" = yes; then
4830     # Extract the first word of "wish", so it can be a program name with args.
4831 set dummy wish; ac_word=$2
4832 echo "$as_me:$LINENO: checking for $ac_word" >&5
4833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4834 if test "${ac_cv_path_WISH+set}" = set; then
4835   echo $ECHO_N "(cached) $ECHO_C" >&6
4836 else
4837   case $WISH in
4838   [\\/]* | ?:[\\/]*)
4839   ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
4840   ;;
4841   *)
4842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843 for as_dir in $PATH
4844 do
4845   IFS=$as_save_IFS
4846   test -z "$as_dir" && as_dir=.
4847   for ac_exec_ext in '' $ac_executable_extensions; do
4848   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4849     ac_cv_path_WISH="$as_dir/$ac_word$ac_exec_ext"
4850     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4851     break 2
4852   fi
4853 done
4854 done
4855
4856   ;;
4857 esac
4858 fi
4859 WISH=$ac_cv_path_WISH
4860
4861 if test -n "$WISH"; then
4862   echo "$as_me:$LINENO: result: $WISH" >&5
4863 echo "${ECHO_T}$WISH" >&6
4864 else
4865   echo "$as_me:$LINENO: result: no" >&5
4866 echo "${ECHO_T}no" >&6
4867 fi
4868
4869     test -z "$WISH" && { { echo "$as_me:$LINENO: error: 'wish' is required for Tk support" >&5
4870 echo "$as_me: error: 'wish' is required for Tk support" >&2;}
4871    { (exit 1); exit 1; }; }
4872 fi
4873
4874 # Extract the first word of "perl", so it can be a program name with args.
4875 set dummy perl; ac_word=$2
4876 echo "$as_me:$LINENO: checking for $ac_word" >&5
4877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4878 if test "${ac_cv_path_PERL+set}" = set; then
4879   echo $ECHO_N "(cached) $ECHO_C" >&6
4880 else
4881   case $PERL in
4882   [\\/]* | ?:[\\/]*)
4883   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4884   ;;
4885   *)
4886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887 for as_dir in $PATH
4888 do
4889   IFS=$as_save_IFS
4890   test -z "$as_dir" && as_dir=.
4891   for ac_exec_ext in '' $ac_executable_extensions; do
4892   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4893     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4894     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4895     break 2
4896   fi
4897 done
4898 done
4899
4900   ;;
4901 esac
4902 fi
4903 PERL=$ac_cv_path_PERL
4904
4905 if test -n "$PERL"; then
4906   echo "$as_me:$LINENO: result: $PERL" >&5
4907 echo "${ECHO_T}$PERL" >&6
4908 else
4909   echo "$as_me:$LINENO: result: no" >&5
4910 echo "${ECHO_T}no" >&6
4911 fi
4912
4913 if test "$with_perl" = yes; then
4914
4915
4916 echo "$as_me:$LINENO: checking Perl installation directories" >&5
4917 echo $ECHO_N "checking Perl installation directories... $ECHO_C" >&6
4918
4919 # These are the ones we currently need.  Others can be added easily.
4920 perl_installsitearch=`$PERL -MConfig -e 'print $Config{installsitearch}'`
4921 perl_installsitelib=`$PERL -MConfig -e 'print $Config{installsitelib}'`
4922 perl_installman3dir=`$PERL -MConfig -e 'print $Config{installman3dir}'`
4923
4924
4925 echo "$as_me:$LINENO: result: done" >&5
4926 echo "${ECHO_T}done" >&6
4927
4928 fi
4929
4930 if test "$with_python" = yes; then
4931   # Extract the first word of "python", so it can be a program name with args.
4932 set dummy python; ac_word=$2
4933 echo "$as_me:$LINENO: checking for $ac_word" >&5
4934 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4935 if test "${ac_cv_path_PYTHON+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938   case $PYTHON in
4939   [\\/]* | ?:[\\/]*)
4940   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
4941   ;;
4942   *)
4943   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944 for as_dir in $PATH
4945 do
4946   IFS=$as_save_IFS
4947   test -z "$as_dir" && as_dir=.
4948   for ac_exec_ext in '' $ac_executable_extensions; do
4949   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950     ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
4951     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4952     break 2
4953   fi
4954 done
4955 done
4956
4957   ;;
4958 esac
4959 fi
4960 PYTHON=$ac_cv_path_PYTHON
4961
4962 if test -n "$PYTHON"; then
4963   echo "$as_me:$LINENO: result: $PYTHON" >&5
4964 echo "${ECHO_T}$PYTHON" >&6
4965 else
4966   echo "$as_me:$LINENO: result: no" >&5
4967 echo "${ECHO_T}no" >&6
4968 fi
4969
4970 if test x"$PYTHON" = x""; then
4971   { { echo "$as_me:$LINENO: error: Python not found" >&5
4972 echo "$as_me: error: Python not found" >&2;}
4973    { (exit 1); exit 1; }; }
4974 fi
4975
4976
4977 echo "$as_me:$LINENO: checking Python installation directories" >&5
4978 echo $ECHO_N "checking Python installation directories... $ECHO_C" >&6
4979 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4980 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
4981 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
4982 python_configdir="${python_execprefix}/lib/python${python_version}/config"
4983 python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
4984 python_moduleexecdir="${python_execprefix}/lib/python${python_version}/site-packages"
4985 python_includespec="-I${python_prefix}/include/python${python_version}"
4986 if test "$python_prefix" != "$python_execprefix"; then
4987   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
4988 fi
4989
4990 # This should be enough of a message.
4991 if test "$python_prefix" != "$python_execprefix"; then
4992   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&5
4993 echo "${ECHO_T}$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" >&6
4994 else
4995   echo "$as_me:$LINENO: result: $python_prefix/lib/python${python_version}" >&5
4996 echo "${ECHO_T}$python_prefix/lib/python${python_version}" >&6
4997 fi
4998
4999
5000
5001
5002
5003 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
5004 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
5005
5006 _python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
5007 _python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
5008 _python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
5009 _python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
5010 _python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
5011
5012 pgac_tab="      " # tab character
5013 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"`
5014
5015 echo "$as_me:$LINENO: result: ${python_libspec}" >&5
5016 echo "${ECHO_T}${python_libspec}" >&6
5017
5018
5019 fi
5020
5021
5022 ##
5023 ## Libraries
5024 ##
5025
5026
5027 echo "$as_me:$LINENO: checking for readline" >&5
5028 echo $ECHO_N "checking for readline... $ECHO_C" >&6
5029
5030 if test "${pgac_cv_check_readline+set}" = set; then
5031   echo $ECHO_N "(cached) $ECHO_C" >&6
5032 else
5033   pgac_cv_check_readline=no
5034 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
5035   for pgac_rllib in -lreadline -ledit ; do
5036     pgac_save_LIBS=$LIBS
5037     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
5038     cat >conftest.$ac_ext <<_ACEOF
5039 #line $LINENO "configure"
5040 #include "confdefs.h"
5041
5042 /* Override any gcc2 internal prototype to avoid an error.  */
5043 #ifdef __cplusplus
5044 extern "C"
5045 #endif
5046 /* We use char because int might match the return type of a gcc2
5047    builtin and then its argument prototype would still apply.  */
5048 char readline ();
5049 #ifdef F77_DUMMY_MAIN
5050 #  ifdef __cplusplus
5051      extern "C"
5052 #  endif
5053    int F77_DUMMY_MAIN() { return 1; }
5054 #endif
5055 int
5056 main ()
5057 {
5058 readline ();
5059   ;
5060   return 0;
5061 }
5062 _ACEOF
5063 rm -f conftest.$ac_objext conftest$ac_exeext
5064 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5065   (eval $ac_link) 2>&5
5066   ac_status=$?
5067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); } &&
5069          { ac_try='test -s conftest$ac_exeext'
5070   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5071   (eval $ac_try) 2>&5
5072   ac_status=$?
5073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5074   (exit $ac_status); }; }; then
5075
5076       # NetBSD and OpenBSD have a broken linker that does not
5077       # recognize dependent libraries
5078       case $host_os in netbsd* | openbsd* )
5079         case $pgac_lib in
5080           *curses*) ;;
5081           *) pgac_lib=" -lcurses" ;;
5082         esac
5083       esac
5084
5085       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
5086       break 2
5087
5088 else
5089   echo "$as_me: failed program was:" >&5
5090 cat conftest.$ac_ext >&5
5091 fi
5092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5093     LIBS=$pgac_save_LIBS
5094   done
5095 done
5096 LIBS=$pgac_save_LIBS
5097
5098 fi
5099
5100 if test "$pgac_cv_check_readline" != no ; then
5101
5102 cat >>confdefs.h <<\_ACEOF
5103 #define HAVE_LIBREADLINE 1
5104 _ACEOF
5105
5106   LIBS="$pgac_cv_check_readline $LIBS"
5107   echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
5108 echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
5109 else
5110   echo "$as_me:$LINENO: result: no" >&5
5111 echo "${ECHO_T}no" >&6
5112 fi
5113 echo "$as_me:$LINENO: checking for library containing using_history" >&5
5114 echo $ECHO_N "checking for library containing using_history... $ECHO_C" >&6
5115 if test "${ac_cv_search_using_history+set}" = set; then
5116   echo $ECHO_N "(cached) $ECHO_C" >&6
5117 else
5118   ac_func_search_save_LIBS=$LIBS
5119 ac_cv_search_using_history=no
5120 cat >conftest.$ac_ext <<_ACEOF
5121 #line $LINENO "configure"
5122 #include "confdefs.h"
5123
5124 /* Override any gcc2 internal prototype to avoid an error.  */
5125 #ifdef __cplusplus
5126 extern "C"
5127 #endif
5128 /* We use char because int might match the return type of a gcc2
5129    builtin and then its argument prototype would still apply.  */
5130 char using_history ();
5131 #ifdef F77_DUMMY_MAIN
5132 #  ifdef __cplusplus
5133      extern "C"
5134 #  endif
5135    int F77_DUMMY_MAIN() { return 1; }
5136 #endif
5137 int
5138 main ()
5139 {
5140 using_history ();
5141   ;
5142   return 0;
5143 }
5144 _ACEOF
5145 rm -f conftest.$ac_objext conftest$ac_exeext
5146 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5147   (eval $ac_link) 2>&5
5148   ac_status=$?
5149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5150   (exit $ac_status); } &&
5151          { ac_try='test -s conftest$ac_exeext'
5152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5153   (eval $ac_try) 2>&5
5154   ac_status=$?
5155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5156   (exit $ac_status); }; }; then
5157   ac_cv_search_using_history="none required"
5158 else
5159   echo "$as_me: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 fi
5162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5163 if test "$ac_cv_search_using_history" = no; then
5164   for ac_lib in history; do
5165     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5166     cat >conftest.$ac_ext <<_ACEOF
5167 #line $LINENO "configure"
5168 #include "confdefs.h"
5169
5170 /* Override any gcc2 internal prototype to avoid an error.  */
5171 #ifdef __cplusplus
5172 extern "C"
5173 #endif
5174 /* We use char because int might match the return type of a gcc2
5175    builtin and then its argument prototype would still apply.  */
5176 char using_history ();
5177 #ifdef F77_DUMMY_MAIN
5178 #  ifdef __cplusplus
5179      extern "C"
5180 #  endif
5181    int F77_DUMMY_MAIN() { return 1; }
5182 #endif
5183 int
5184 main ()
5185 {
5186 using_history ();
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_search_using_history="-l$ac_lib"
5204 break
5205 else
5206   echo "$as_me: failed program was:" >&5
5207 cat conftest.$ac_ext >&5
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210   done
5211 fi
5212 LIBS=$ac_func_search_save_LIBS
5213 fi
5214 echo "$as_me:$LINENO: result: $ac_cv_search_using_history" >&5
5215 echo "${ECHO_T}$ac_cv_search_using_history" >&6
5216 if test "$ac_cv_search_using_history" != no; then
5217   test "$ac_cv_search_using_history" = "none required" || LIBS="$ac_cv_search_using_history $LIBS"
5218
5219 cat >>confdefs.h <<\_ACEOF
5220 #define HAVE_HISTORY_FUNCTIONS 1
5221 _ACEOF
5222
5223 fi
5224
5225
5226 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
5227 then
5228
5229 echo "$as_me:$LINENO: checking for main in -lbsd" >&5
5230 echo $ECHO_N "checking for main in -lbsd... $ECHO_C" >&6
5231 if test "${ac_cv_lib_bsd_main+set}" = set; then
5232   echo $ECHO_N "(cached) $ECHO_C" >&6
5233 else
5234   ac_check_lib_save_LIBS=$LIBS
5235 LIBS="-lbsd  $LIBS"
5236 cat >conftest.$ac_ext <<_ACEOF
5237 #line $LINENO "configure"
5238 #include "confdefs.h"
5239
5240
5241 #ifdef F77_DUMMY_MAIN
5242 #  ifdef __cplusplus
5243      extern "C"
5244 #  endif
5245    int F77_DUMMY_MAIN() { return 1; }
5246 #endif
5247 int
5248 main ()
5249 {
5250 main ();
5251   ;
5252   return 0;
5253 }
5254 _ACEOF
5255 rm -f conftest.$ac_objext conftest$ac_exeext
5256 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5257   (eval $ac_link) 2>&5
5258   ac_status=$?
5259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5260   (exit $ac_status); } &&
5261          { ac_try='test -s conftest$ac_exeext'
5262   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5263   (eval $ac_try) 2>&5
5264   ac_status=$?
5265   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5266   (exit $ac_status); }; }; then
5267   ac_cv_lib_bsd_main=yes
5268 else
5269   echo "$as_me: failed program was:" >&5
5270 cat conftest.$ac_ext >&5
5271 ac_cv_lib_bsd_main=no
5272 fi
5273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5274 LIBS=$ac_check_lib_save_LIBS
5275 fi
5276 echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_main" >&5
5277 echo "${ECHO_T}$ac_cv_lib_bsd_main" >&6
5278 if test $ac_cv_lib_bsd_main = yes; then
5279   cat >>confdefs.h <<_ACEOF
5280 #define HAVE_LIBBSD 1
5281 _ACEOF
5282
5283   LIBS="-lbsd $LIBS"
5284
5285 fi
5286
5287 fi
5288
5289 echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
5290 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
5291 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
5292   echo $ECHO_N "(cached) $ECHO_C" >&6
5293 else
5294   ac_check_lib_save_LIBS=$LIBS
5295 LIBS="-lutil  $LIBS"
5296 cat >conftest.$ac_ext <<_ACEOF
5297 #line $LINENO "configure"
5298 #include "confdefs.h"
5299
5300 /* Override any gcc2 internal prototype to avoid an error.  */
5301 #ifdef __cplusplus
5302 extern "C"
5303 #endif
5304 /* We use char because int might match the return type of a gcc2
5305    builtin and then its argument prototype would still apply.  */
5306 char setproctitle ();
5307 #ifdef F77_DUMMY_MAIN
5308 #  ifdef __cplusplus
5309      extern "C"
5310 #  endif
5311    int F77_DUMMY_MAIN() { return 1; }
5312 #endif
5313 int
5314 main ()
5315 {
5316 setproctitle ();
5317   ;
5318   return 0;
5319 }
5320 _ACEOF
5321 rm -f conftest.$ac_objext conftest$ac_exeext
5322 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5323   (eval $ac_link) 2>&5
5324   ac_status=$?
5325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5326   (exit $ac_status); } &&
5327          { ac_try='test -s conftest$ac_exeext'
5328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5329   (eval $ac_try) 2>&5
5330   ac_status=$?
5331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5332   (exit $ac_status); }; }; then
5333   ac_cv_lib_util_setproctitle=yes
5334 else
5335   echo "$as_me: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 ac_cv_lib_util_setproctitle=no
5338 fi
5339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5340 LIBS=$ac_check_lib_save_LIBS
5341 fi
5342 echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
5343 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
5344 if test $ac_cv_lib_util_setproctitle = yes; then
5345   cat >>confdefs.h <<_ACEOF
5346 #define HAVE_LIBUTIL 1
5347 _ACEOF
5348
5349   LIBS="-lutil $LIBS"
5350
5351 fi
5352
5353
5354 echo "$as_me:$LINENO: checking for main in -lm" >&5
5355 echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
5356 if test "${ac_cv_lib_m_main+set}" = set; then
5357   echo $ECHO_N "(cached) $ECHO_C" >&6
5358 else
5359   ac_check_lib_save_LIBS=$LIBS
5360 LIBS="-lm  $LIBS"
5361 cat >conftest.$ac_ext <<_ACEOF
5362 #line $LINENO "configure"
5363 #include "confdefs.h"
5364
5365
5366 #ifdef F77_DUMMY_MAIN
5367 #  ifdef __cplusplus
5368      extern "C"
5369 #  endif
5370    int F77_DUMMY_MAIN() { return 1; }
5371 #endif
5372 int
5373 main ()
5374 {
5375 main ();
5376   ;
5377   return 0;
5378 }
5379 _ACEOF
5380 rm -f conftest.$ac_objext conftest$ac_exeext
5381 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5382   (eval $ac_link) 2>&5
5383   ac_status=$?
5384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5385   (exit $ac_status); } &&
5386          { ac_try='test -s conftest$ac_exeext'
5387   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5388   (eval $ac_try) 2>&5
5389   ac_status=$?
5390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5391   (exit $ac_status); }; }; then
5392   ac_cv_lib_m_main=yes
5393 else
5394   echo "$as_me: failed program was:" >&5
5395 cat conftest.$ac_ext >&5
5396 ac_cv_lib_m_main=no
5397 fi
5398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5399 LIBS=$ac_check_lib_save_LIBS
5400 fi
5401 echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
5402 echo "${ECHO_T}$ac_cv_lib_m_main" >&6
5403 if test $ac_cv_lib_m_main = yes; then
5404   cat >>confdefs.h <<_ACEOF
5405 #define HAVE_LIBM 1
5406 _ACEOF
5407
5408   LIBS="-lm $LIBS"
5409
5410 fi
5411
5412
5413 echo "$as_me:$LINENO: checking for main in -ldl" >&5
5414 echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6
5415 if test "${ac_cv_lib_dl_main+set}" = set; then
5416   echo $ECHO_N "(cached) $ECHO_C" >&6
5417 else
5418   ac_check_lib_save_LIBS=$LIBS
5419 LIBS="-ldl  $LIBS"
5420 cat >conftest.$ac_ext <<_ACEOF
5421 #line $LINENO "configure"
5422 #include "confdefs.h"
5423
5424
5425 #ifdef F77_DUMMY_MAIN
5426 #  ifdef __cplusplus
5427      extern "C"
5428 #  endif
5429    int F77_DUMMY_MAIN() { return 1; }
5430 #endif
5431 int
5432 main ()
5433 {
5434 main ();
5435   ;
5436   return 0;
5437 }
5438 _ACEOF
5439 rm -f conftest.$ac_objext conftest$ac_exeext
5440 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5441   (eval $ac_link) 2>&5
5442   ac_status=$?
5443   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444   (exit $ac_status); } &&
5445          { ac_try='test -s conftest$ac_exeext'
5446   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5447   (eval $ac_try) 2>&5
5448   ac_status=$?
5449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450   (exit $ac_status); }; }; then
5451   ac_cv_lib_dl_main=yes
5452 else
5453   echo "$as_me: failed program was:" >&5
5454 cat conftest.$ac_ext >&5
5455 ac_cv_lib_dl_main=no
5456 fi
5457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5458 LIBS=$ac_check_lib_save_LIBS
5459 fi
5460 echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5
5461 echo "${ECHO_T}$ac_cv_lib_dl_main" >&6
5462 if test $ac_cv_lib_dl_main = yes; then
5463   cat >>confdefs.h <<_ACEOF
5464 #define HAVE_LIBDL 1
5465 _ACEOF
5466
5467   LIBS="-ldl $LIBS"
5468
5469 fi
5470
5471
5472 echo "$as_me:$LINENO: checking for main in -lsocket" >&5
5473 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
5474 if test "${ac_cv_lib_socket_main+set}" = set; then
5475   echo $ECHO_N "(cached) $ECHO_C" >&6
5476 else
5477   ac_check_lib_save_LIBS=$LIBS
5478 LIBS="-lsocket  $LIBS"
5479 cat >conftest.$ac_ext <<_ACEOF
5480 #line $LINENO "configure"
5481 #include "confdefs.h"
5482
5483
5484 #ifdef F77_DUMMY_MAIN
5485 #  ifdef __cplusplus
5486      extern "C"
5487 #  endif
5488    int F77_DUMMY_MAIN() { return 1; }
5489 #endif
5490 int
5491 main ()
5492 {
5493 main ();
5494   ;
5495   return 0;
5496 }
5497 _ACEOF
5498 rm -f conftest.$ac_objext conftest$ac_exeext
5499 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5500   (eval $ac_link) 2>&5
5501   ac_status=$?
5502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5503   (exit $ac_status); } &&
5504          { ac_try='test -s conftest$ac_exeext'
5505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506   (eval $ac_try) 2>&5
5507   ac_status=$?
5508   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509   (exit $ac_status); }; }; then
5510   ac_cv_lib_socket_main=yes
5511 else
5512   echo "$as_me: failed program was:" >&5
5513 cat conftest.$ac_ext >&5
5514 ac_cv_lib_socket_main=no
5515 fi
5516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5517 LIBS=$ac_check_lib_save_LIBS
5518 fi
5519 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
5520 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
5521 if test $ac_cv_lib_socket_main = yes; then
5522   cat >>confdefs.h <<_ACEOF
5523 #define HAVE_LIBSOCKET 1
5524 _ACEOF
5525
5526   LIBS="-lsocket $LIBS"
5527
5528 fi
5529
5530
5531 echo "$as_me:$LINENO: checking for main in -lnsl" >&5
5532 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
5533 if test "${ac_cv_lib_nsl_main+set}" = set; then
5534   echo $ECHO_N "(cached) $ECHO_C" >&6
5535 else
5536   ac_check_lib_save_LIBS=$LIBS
5537 LIBS="-lnsl  $LIBS"
5538 cat >conftest.$ac_ext <<_ACEOF
5539 #line $LINENO "configure"
5540 #include "confdefs.h"
5541
5542
5543 #ifdef F77_DUMMY_MAIN
5544 #  ifdef __cplusplus
5545      extern "C"
5546 #  endif
5547    int F77_DUMMY_MAIN() { return 1; }
5548 #endif
5549 int
5550 main ()
5551 {
5552 main ();
5553   ;
5554   return 0;
5555 }
5556 _ACEOF
5557 rm -f conftest.$ac_objext conftest$ac_exeext
5558 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5559   (eval $ac_link) 2>&5
5560   ac_status=$?
5561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562   (exit $ac_status); } &&
5563          { ac_try='test -s conftest$ac_exeext'
5564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5565   (eval $ac_try) 2>&5
5566   ac_status=$?
5567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568   (exit $ac_status); }; }; then
5569   ac_cv_lib_nsl_main=yes
5570 else
5571   echo "$as_me: failed program was:" >&5
5572 cat conftest.$ac_ext >&5
5573 ac_cv_lib_nsl_main=no
5574 fi
5575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5576 LIBS=$ac_check_lib_save_LIBS
5577 fi
5578 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
5579 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
5580 if test $ac_cv_lib_nsl_main = yes; then
5581   cat >>confdefs.h <<_ACEOF
5582 #define HAVE_LIBNSL 1
5583 _ACEOF
5584
5585   LIBS="-lnsl $LIBS"
5586
5587 fi
5588
5589
5590 echo "$as_me:$LINENO: checking for main in -lipc" >&5
5591 echo $ECHO_N "checking for main in -lipc... $ECHO_C" >&6
5592 if test "${ac_cv_lib_ipc_main+set}" = set; then
5593   echo $ECHO_N "(cached) $ECHO_C" >&6
5594 else
5595   ac_check_lib_save_LIBS=$LIBS
5596 LIBS="-lipc  $LIBS"
5597 cat >conftest.$ac_ext <<_ACEOF
5598 #line $LINENO "configure"
5599 #include "confdefs.h"
5600
5601
5602 #ifdef F77_DUMMY_MAIN
5603 #  ifdef __cplusplus
5604      extern "C"
5605 #  endif
5606    int F77_DUMMY_MAIN() { return 1; }
5607 #endif
5608 int
5609 main ()
5610 {
5611 main ();
5612   ;
5613   return 0;
5614 }
5615 _ACEOF
5616 rm -f conftest.$ac_objext conftest$ac_exeext
5617 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5618   (eval $ac_link) 2>&5
5619   ac_status=$?
5620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5621   (exit $ac_status); } &&
5622          { ac_try='test -s conftest$ac_exeext'
5623   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5624   (eval $ac_try) 2>&5
5625   ac_status=$?
5626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627   (exit $ac_status); }; }; then
5628   ac_cv_lib_ipc_main=yes
5629 else
5630   echo "$as_me: failed program was:" >&5
5631 cat conftest.$ac_ext >&5
5632 ac_cv_lib_ipc_main=no
5633 fi
5634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5635 LIBS=$ac_check_lib_save_LIBS
5636 fi
5637 echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_main" >&5
5638 echo "${ECHO_T}$ac_cv_lib_ipc_main" >&6
5639 if test $ac_cv_lib_ipc_main = yes; then
5640   cat >>confdefs.h <<_ACEOF
5641 #define HAVE_LIBIPC 1
5642 _ACEOF
5643
5644   LIBS="-lipc $LIBS"
5645
5646 fi
5647
5648
5649 echo "$as_me:$LINENO: checking for main in -lIPC" >&5
5650 echo $ECHO_N "checking for main in -lIPC... $ECHO_C" >&6
5651 if test "${ac_cv_lib_IPC_main+set}" = set; then
5652   echo $ECHO_N "(cached) $ECHO_C" >&6
5653 else
5654   ac_check_lib_save_LIBS=$LIBS
5655 LIBS="-lIPC  $LIBS"
5656 cat >conftest.$ac_ext <<_ACEOF
5657 #line $LINENO "configure"
5658 #include "confdefs.h"
5659
5660
5661 #ifdef F77_DUMMY_MAIN
5662 #  ifdef __cplusplus
5663      extern "C"
5664 #  endif
5665    int F77_DUMMY_MAIN() { return 1; }
5666 #endif
5667 int
5668 main ()
5669 {
5670 main ();
5671   ;
5672   return 0;
5673 }
5674 _ACEOF
5675 rm -f conftest.$ac_objext conftest$ac_exeext
5676 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5677   (eval $ac_link) 2>&5
5678   ac_status=$?
5679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680   (exit $ac_status); } &&
5681          { ac_try='test -s conftest$ac_exeext'
5682   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5683   (eval $ac_try) 2>&5
5684   ac_status=$?
5685   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5686   (exit $ac_status); }; }; then
5687   ac_cv_lib_IPC_main=yes
5688 else
5689   echo "$as_me: failed program was:" >&5
5690 cat conftest.$ac_ext >&5
5691 ac_cv_lib_IPC_main=no
5692 fi
5693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5694 LIBS=$ac_check_lib_save_LIBS
5695 fi
5696 echo "$as_me:$LINENO: result: $ac_cv_lib_IPC_main" >&5
5697 echo "${ECHO_T}$ac_cv_lib_IPC_main" >&6
5698 if test $ac_cv_lib_IPC_main = yes; then
5699   cat >>confdefs.h <<_ACEOF
5700 #define HAVE_LIBIPC 1
5701 _ACEOF
5702
5703   LIBS="-lIPC $LIBS"
5704
5705 fi
5706
5707
5708 echo "$as_me:$LINENO: checking for main in -llc" >&5
5709 echo $ECHO_N "checking for main in -llc... $ECHO_C" >&6
5710 if test "${ac_cv_lib_lc_main+set}" = set; then
5711   echo $ECHO_N "(cached) $ECHO_C" >&6
5712 else
5713   ac_check_lib_save_LIBS=$LIBS
5714 LIBS="-llc  $LIBS"
5715 cat >conftest.$ac_ext <<_ACEOF
5716 #line $LINENO "configure"
5717 #include "confdefs.h"
5718
5719
5720 #ifdef F77_DUMMY_MAIN
5721 #  ifdef __cplusplus
5722      extern "C"
5723 #  endif
5724    int F77_DUMMY_MAIN() { return 1; }
5725 #endif
5726 int
5727 main ()
5728 {
5729 main ();
5730   ;
5731   return 0;
5732 }
5733 _ACEOF
5734 rm -f conftest.$ac_objext conftest$ac_exeext
5735 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5736   (eval $ac_link) 2>&5
5737   ac_status=$?
5738   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739   (exit $ac_status); } &&
5740          { ac_try='test -s conftest$ac_exeext'
5741   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5742   (eval $ac_try) 2>&5
5743   ac_status=$?
5744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5745   (exit $ac_status); }; }; then
5746   ac_cv_lib_lc_main=yes
5747 else
5748   echo "$as_me: failed program was:" >&5
5749 cat conftest.$ac_ext >&5
5750 ac_cv_lib_lc_main=no
5751 fi
5752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5753 LIBS=$ac_check_lib_save_LIBS
5754 fi
5755 echo "$as_me:$LINENO: result: $ac_cv_lib_lc_main" >&5
5756 echo "${ECHO_T}$ac_cv_lib_lc_main" >&6
5757 if test $ac_cv_lib_lc_main = yes; then
5758   cat >>confdefs.h <<_ACEOF
5759 #define HAVE_LIBLC 1
5760 _ACEOF
5761
5762   LIBS="-llc $LIBS"
5763
5764 fi
5765
5766
5767 echo "$as_me:$LINENO: checking for main in -ldld" >&5
5768 echo $ECHO_N "checking for main in -ldld... $ECHO_C" >&6
5769 if test "${ac_cv_lib_dld_main+set}" = set; then
5770   echo $ECHO_N "(cached) $ECHO_C" >&6
5771 else
5772   ac_check_lib_save_LIBS=$LIBS
5773 LIBS="-ldld  $LIBS"
5774 cat >conftest.$ac_ext <<_ACEOF
5775 #line $LINENO "configure"
5776 #include "confdefs.h"
5777
5778
5779 #ifdef F77_DUMMY_MAIN
5780 #  ifdef __cplusplus
5781      extern "C"
5782 #  endif
5783    int F77_DUMMY_MAIN() { return 1; }
5784 #endif
5785 int
5786 main ()
5787 {
5788 main ();
5789   ;
5790   return 0;
5791 }
5792 _ACEOF
5793 rm -f conftest.$ac_objext conftest$ac_exeext
5794 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5795   (eval $ac_link) 2>&5
5796   ac_status=$?
5797   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798   (exit $ac_status); } &&
5799          { ac_try='test -s conftest$ac_exeext'
5800   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5801   (eval $ac_try) 2>&5
5802   ac_status=$?
5803   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5804   (exit $ac_status); }; }; then
5805   ac_cv_lib_dld_main=yes
5806 else
5807   echo "$as_me: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5809 ac_cv_lib_dld_main=no
5810 fi
5811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5812 LIBS=$ac_check_lib_save_LIBS
5813 fi
5814 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_main" >&5
5815 echo "${ECHO_T}$ac_cv_lib_dld_main" >&6
5816 if test $ac_cv_lib_dld_main = yes; then
5817   cat >>confdefs.h <<_ACEOF
5818 #define HAVE_LIBDLD 1
5819 _ACEOF
5820
5821   LIBS="-ldld $LIBS"
5822
5823 fi
5824
5825
5826 echo "$as_me:$LINENO: checking for main in -lld" >&5
5827 echo $ECHO_N "checking for main in -lld... $ECHO_C" >&6
5828 if test "${ac_cv_lib_ld_main+set}" = set; then
5829   echo $ECHO_N "(cached) $ECHO_C" >&6
5830 else
5831   ac_check_lib_save_LIBS=$LIBS
5832 LIBS="-lld  $LIBS"
5833 cat >conftest.$ac_ext <<_ACEOF
5834 #line $LINENO "configure"
5835 #include "confdefs.h"
5836
5837
5838 #ifdef F77_DUMMY_MAIN
5839 #  ifdef __cplusplus
5840      extern "C"
5841 #  endif
5842    int F77_DUMMY_MAIN() { return 1; }
5843 #endif
5844 int
5845 main ()
5846 {
5847 main ();
5848   ;
5849   return 0;
5850 }
5851 _ACEOF
5852 rm -f conftest.$ac_objext conftest$ac_exeext
5853 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5854   (eval $ac_link) 2>&5
5855   ac_status=$?
5856   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5857   (exit $ac_status); } &&
5858          { ac_try='test -s conftest$ac_exeext'
5859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5860   (eval $ac_try) 2>&5
5861   ac_status=$?
5862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5863   (exit $ac_status); }; }; then
5864   ac_cv_lib_ld_main=yes
5865 else
5866   echo "$as_me: failed program was:" >&5
5867 cat conftest.$ac_ext >&5
5868 ac_cv_lib_ld_main=no
5869 fi
5870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5871 LIBS=$ac_check_lib_save_LIBS
5872 fi
5873 echo "$as_me:$LINENO: result: $ac_cv_lib_ld_main" >&5
5874 echo "${ECHO_T}$ac_cv_lib_ld_main" >&6
5875 if test $ac_cv_lib_ld_main = yes; then
5876   cat >>confdefs.h <<_ACEOF
5877 #define HAVE_LIBLD 1
5878 _ACEOF
5879
5880   LIBS="-lld $LIBS"
5881
5882 fi
5883
5884
5885 echo "$as_me:$LINENO: checking for main in -lcompat" >&5
5886 echo $ECHO_N "checking for main in -lcompat... $ECHO_C" >&6
5887 if test "${ac_cv_lib_compat_main+set}" = set; then
5888   echo $ECHO_N "(cached) $ECHO_C" >&6
5889 else
5890   ac_check_lib_save_LIBS=$LIBS
5891 LIBS="-lcompat  $LIBS"
5892 cat >conftest.$ac_ext <<_ACEOF
5893 #line $LINENO "configure"
5894 #include "confdefs.h"
5895
5896
5897 #ifdef F77_DUMMY_MAIN
5898 #  ifdef __cplusplus
5899      extern "C"
5900 #  endif
5901    int F77_DUMMY_MAIN() { return 1; }
5902 #endif
5903 int
5904 main ()
5905 {
5906 main ();
5907   ;
5908   return 0;
5909 }
5910 _ACEOF
5911 rm -f conftest.$ac_objext conftest$ac_exeext
5912 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5913   (eval $ac_link) 2>&5
5914   ac_status=$?
5915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5916   (exit $ac_status); } &&
5917          { ac_try='test -s conftest$ac_exeext'
5918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5919   (eval $ac_try) 2>&5
5920   ac_status=$?
5921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5922   (exit $ac_status); }; }; then
5923   ac_cv_lib_compat_main=yes
5924 else
5925   echo "$as_me: failed program was:" >&5
5926 cat conftest.$ac_ext >&5
5927 ac_cv_lib_compat_main=no
5928 fi
5929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5930 LIBS=$ac_check_lib_save_LIBS
5931 fi
5932 echo "$as_me:$LINENO: result: $ac_cv_lib_compat_main" >&5
5933 echo "${ECHO_T}$ac_cv_lib_compat_main" >&6
5934 if test $ac_cv_lib_compat_main = yes; then
5935   cat >>confdefs.h <<_ACEOF
5936 #define HAVE_LIBCOMPAT 1
5937 _ACEOF
5938
5939   LIBS="-lcompat $LIBS"
5940
5941 fi
5942
5943
5944 echo "$as_me:$LINENO: checking for main in -lBSD" >&5
5945 echo $ECHO_N "checking for main in -lBSD... $ECHO_C" >&6
5946 if test "${ac_cv_lib_BSD_main+set}" = set; then
5947   echo $ECHO_N "(cached) $ECHO_C" >&6
5948 else
5949   ac_check_lib_save_LIBS=$LIBS
5950 LIBS="-lBSD  $LIBS"
5951 cat >conftest.$ac_ext <<_ACEOF
5952 #line $LINENO "configure"
5953 #include "confdefs.h"
5954
5955
5956 #ifdef F77_DUMMY_MAIN
5957 #  ifdef __cplusplus
5958      extern "C"
5959 #  endif
5960    int F77_DUMMY_MAIN() { return 1; }
5961 #endif
5962 int
5963 main ()
5964 {
5965 main ();
5966   ;
5967   return 0;
5968 }
5969 _ACEOF
5970 rm -f conftest.$ac_objext conftest$ac_exeext
5971 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5972   (eval $ac_link) 2>&5
5973   ac_status=$?
5974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975   (exit $ac_status); } &&
5976          { ac_try='test -s conftest$ac_exeext'
5977   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5978   (eval $ac_try) 2>&5
5979   ac_status=$?
5980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5981   (exit $ac_status); }; }; then
5982   ac_cv_lib_BSD_main=yes
5983 else
5984   echo "$as_me: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5986 ac_cv_lib_BSD_main=no
5987 fi
5988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5989 LIBS=$ac_check_lib_save_LIBS
5990 fi
5991 echo "$as_me:$LINENO: result: $ac_cv_lib_BSD_main" >&5
5992 echo "${ECHO_T}$ac_cv_lib_BSD_main" >&6
5993 if test $ac_cv_lib_BSD_main = yes; then
5994   cat >>confdefs.h <<_ACEOF
5995 #define HAVE_LIBBSD 1
5996 _ACEOF
5997
5998   LIBS="-lBSD $LIBS"
5999
6000 fi
6001
6002
6003 echo "$as_me:$LINENO: checking for main in -lgen" >&5
6004 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
6005 if test "${ac_cv_lib_gen_main+set}" = set; then
6006   echo $ECHO_N "(cached) $ECHO_C" >&6
6007 else
6008   ac_check_lib_save_LIBS=$LIBS
6009 LIBS="-lgen  $LIBS"
6010 cat >conftest.$ac_ext <<_ACEOF
6011 #line $LINENO "configure"
6012 #include "confdefs.h"
6013
6014
6015 #ifdef F77_DUMMY_MAIN
6016 #  ifdef __cplusplus
6017      extern "C"
6018 #  endif
6019    int F77_DUMMY_MAIN() { return 1; }
6020 #endif
6021 int
6022 main ()
6023 {
6024 main ();
6025   ;
6026   return 0;
6027 }
6028 _ACEOF
6029 rm -f conftest.$ac_objext conftest$ac_exeext
6030 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6031   (eval $ac_link) 2>&5
6032   ac_status=$?
6033   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6034   (exit $ac_status); } &&
6035          { ac_try='test -s conftest$ac_exeext'
6036   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6037   (eval $ac_try) 2>&5
6038   ac_status=$?
6039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6040   (exit $ac_status); }; }; then
6041   ac_cv_lib_gen_main=yes
6042 else
6043   echo "$as_me: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6045 ac_cv_lib_gen_main=no
6046 fi
6047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6048 LIBS=$ac_check_lib_save_LIBS
6049 fi
6050 echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
6051 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
6052 if test $ac_cv_lib_gen_main = yes; then
6053   cat >>confdefs.h <<_ACEOF
6054 #define HAVE_LIBGEN 1
6055 _ACEOF
6056
6057   LIBS="-lgen $LIBS"
6058
6059 fi
6060
6061
6062 echo "$as_me:$LINENO: checking for main in -lPW" >&5
6063 echo $ECHO_N "checking for main in -lPW... $ECHO_C" >&6
6064 if test "${ac_cv_lib_PW_main+set}" = set; then
6065   echo $ECHO_N "(cached) $ECHO_C" >&6
6066 else
6067   ac_check_lib_save_LIBS=$LIBS
6068 LIBS="-lPW  $LIBS"
6069 cat >conftest.$ac_ext <<_ACEOF
6070 #line $LINENO "configure"
6071 #include "confdefs.h"
6072
6073
6074 #ifdef F77_DUMMY_MAIN
6075 #  ifdef __cplusplus
6076      extern "C"
6077 #  endif
6078    int F77_DUMMY_MAIN() { return 1; }
6079 #endif
6080 int
6081 main ()
6082 {
6083 main ();
6084   ;
6085   return 0;
6086 }
6087 _ACEOF
6088 rm -f conftest.$ac_objext conftest$ac_exeext
6089 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6090   (eval $ac_link) 2>&5
6091   ac_status=$?
6092   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093   (exit $ac_status); } &&
6094          { ac_try='test -s conftest$ac_exeext'
6095   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6096   (eval $ac_try) 2>&5
6097   ac_status=$?
6098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6099   (exit $ac_status); }; }; then
6100   ac_cv_lib_PW_main=yes
6101 else
6102   echo "$as_me: failed program was:" >&5
6103 cat conftest.$ac_ext >&5
6104 ac_cv_lib_PW_main=no
6105 fi
6106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6107 LIBS=$ac_check_lib_save_LIBS
6108 fi
6109 echo "$as_me:$LINENO: result: $ac_cv_lib_PW_main" >&5
6110 echo "${ECHO_T}$ac_cv_lib_PW_main" >&6
6111 if test $ac_cv_lib_PW_main = yes; then
6112   cat >>confdefs.h <<_ACEOF
6113 #define HAVE_LIBPW 1
6114 _ACEOF
6115
6116   LIBS="-lPW $LIBS"
6117
6118 fi
6119
6120
6121 echo "$as_me:$LINENO: checking for main in -lresolv" >&5
6122 echo $ECHO_N "checking for main in -lresolv... $ECHO_C" >&6
6123 if test "${ac_cv_lib_resolv_main+set}" = set; then
6124   echo $ECHO_N "(cached) $ECHO_C" >&6
6125 else
6126   ac_check_lib_save_LIBS=$LIBS
6127 LIBS="-lresolv  $LIBS"
6128 cat >conftest.$ac_ext <<_ACEOF
6129 #line $LINENO "configure"
6130 #include "confdefs.h"
6131
6132
6133 #ifdef F77_DUMMY_MAIN
6134 #  ifdef __cplusplus
6135      extern "C"
6136 #  endif
6137    int F77_DUMMY_MAIN() { return 1; }
6138 #endif
6139 int
6140 main ()
6141 {
6142 main ();
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 rm -f conftest.$ac_objext conftest$ac_exeext
6148 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6149   (eval $ac_link) 2>&5
6150   ac_status=$?
6151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6152   (exit $ac_status); } &&
6153          { ac_try='test -s conftest$ac_exeext'
6154   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6155   (eval $ac_try) 2>&5
6156   ac_status=$?
6157   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158   (exit $ac_status); }; }; then
6159   ac_cv_lib_resolv_main=yes
6160 else
6161   echo "$as_me: failed program was:" >&5
6162 cat conftest.$ac_ext >&5
6163 ac_cv_lib_resolv_main=no
6164 fi
6165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6166 LIBS=$ac_check_lib_save_LIBS
6167 fi
6168 echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_main" >&5
6169 echo "${ECHO_T}$ac_cv_lib_resolv_main" >&6
6170 if test $ac_cv_lib_resolv_main = yes; then
6171   cat >>confdefs.h <<_ACEOF
6172 #define HAVE_LIBRESOLV 1
6173 _ACEOF
6174
6175   LIBS="-lresolv $LIBS"
6176
6177 fi
6178
6179 # QNX:
6180
6181 echo "$as_me:$LINENO: checking for main in -lunix" >&5
6182 echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
6183 if test "${ac_cv_lib_unix_main+set}" = set; then
6184   echo $ECHO_N "(cached) $ECHO_C" >&6
6185 else
6186   ac_check_lib_save_LIBS=$LIBS
6187 LIBS="-lunix  $LIBS"
6188 cat >conftest.$ac_ext <<_ACEOF
6189 #line $LINENO "configure"
6190 #include "confdefs.h"
6191
6192
6193 #ifdef F77_DUMMY_MAIN
6194 #  ifdef __cplusplus
6195      extern "C"
6196 #  endif
6197    int F77_DUMMY_MAIN() { return 1; }
6198 #endif
6199 int
6200 main ()
6201 {
6202 main ();
6203   ;
6204   return 0;
6205 }
6206 _ACEOF
6207 rm -f conftest.$ac_objext conftest$ac_exeext
6208 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6209   (eval $ac_link) 2>&5
6210   ac_status=$?
6211   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6212   (exit $ac_status); } &&
6213          { ac_try='test -s conftest$ac_exeext'
6214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6215   (eval $ac_try) 2>&5
6216   ac_status=$?
6217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6218   (exit $ac_status); }; }; then
6219   ac_cv_lib_unix_main=yes
6220 else
6221   echo "$as_me: failed program was:" >&5
6222 cat conftest.$ac_ext >&5
6223 ac_cv_lib_unix_main=no
6224 fi
6225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6226 LIBS=$ac_check_lib_save_LIBS
6227 fi
6228 echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
6229 echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
6230 if test $ac_cv_lib_unix_main = yes; then
6231   cat >>confdefs.h <<_ACEOF
6232 #define HAVE_LIBUNIX 1
6233 _ACEOF
6234
6235   LIBS="-lunix $LIBS"
6236
6237 fi
6238
6239 echo "$as_me:$LINENO: checking for library containing crypt" >&5
6240 echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
6241 if test "${ac_cv_search_crypt+set}" = set; then
6242   echo $ECHO_N "(cached) $ECHO_C" >&6
6243 else
6244   ac_func_search_save_LIBS=$LIBS
6245 ac_cv_search_crypt=no
6246 cat >conftest.$ac_ext <<_ACEOF
6247 #line $LINENO "configure"
6248 #include "confdefs.h"
6249
6250 /* Override any gcc2 internal prototype to avoid an error.  */
6251 #ifdef __cplusplus
6252 extern "C"
6253 #endif
6254 /* We use char because int might match the return type of a gcc2
6255    builtin and then its argument prototype would still apply.  */
6256 char crypt ();
6257 #ifdef F77_DUMMY_MAIN
6258 #  ifdef __cplusplus
6259      extern "C"
6260 #  endif
6261    int F77_DUMMY_MAIN() { return 1; }
6262 #endif
6263 int
6264 main ()
6265 {
6266 crypt ();
6267   ;
6268   return 0;
6269 }
6270 _ACEOF
6271 rm -f conftest.$ac_objext conftest$ac_exeext
6272 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6273   (eval $ac_link) 2>&5
6274   ac_status=$?
6275   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6276   (exit $ac_status); } &&
6277          { ac_try='test -s conftest$ac_exeext'
6278   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6279   (eval $ac_try) 2>&5
6280   ac_status=$?
6281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6282   (exit $ac_status); }; }; then
6283   ac_cv_search_crypt="none required"
6284 else
6285   echo "$as_me: failed program was:" >&5
6286 cat conftest.$ac_ext >&5
6287 fi
6288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6289 if test "$ac_cv_search_crypt" = no; then
6290   for ac_lib in crypt; do
6291     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6292     cat >conftest.$ac_ext <<_ACEOF
6293 #line $LINENO "configure"
6294 #include "confdefs.h"
6295
6296 /* Override any gcc2 internal prototype to avoid an error.  */
6297 #ifdef __cplusplus
6298 extern "C"
6299 #endif
6300 /* We use char because int might match the return type of a gcc2
6301    builtin and then its argument prototype would still apply.  */
6302 char crypt ();
6303 #ifdef F77_DUMMY_MAIN
6304 #  ifdef __cplusplus
6305      extern "C"
6306 #  endif
6307    int F77_DUMMY_MAIN() { return 1; }
6308 #endif
6309 int
6310 main ()
6311 {
6312 crypt ();
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext conftest$ac_exeext
6318 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6319   (eval $ac_link) 2>&5
6320   ac_status=$?
6321   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest$ac_exeext'
6324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   ac_cv_search_crypt="-l$ac_lib"
6330 break
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 fi
6335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6336   done
6337 fi
6338 LIBS=$ac_func_search_save_LIBS
6339 fi
6340 echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
6341 echo "${ECHO_T}$ac_cv_search_crypt" >&6
6342 if test "$ac_cv_search_crypt" != no; then
6343   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
6344
6345 fi
6346
6347 # BeOS:
6348
6349 echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
6350 echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
6351 if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
6352   echo $ECHO_N "(cached) $ECHO_C" >&6
6353 else
6354   ac_check_lib_save_LIBS=$LIBS
6355 LIBS="-lbind  $LIBS"
6356 cat >conftest.$ac_ext <<_ACEOF
6357 #line $LINENO "configure"
6358 #include "confdefs.h"
6359
6360 /* Override any gcc2 internal prototype to avoid an error.  */
6361 #ifdef __cplusplus
6362 extern "C"
6363 #endif
6364 /* We use char because int might match the return type of a gcc2
6365    builtin and then its argument prototype would still apply.  */
6366 char __inet_ntoa ();
6367 #ifdef F77_DUMMY_MAIN
6368 #  ifdef __cplusplus
6369      extern "C"
6370 #  endif
6371    int F77_DUMMY_MAIN() { return 1; }
6372 #endif
6373 int
6374 main ()
6375 {
6376 __inet_ntoa ();
6377   ;
6378   return 0;
6379 }
6380 _ACEOF
6381 rm -f conftest.$ac_objext conftest$ac_exeext
6382 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6383   (eval $ac_link) 2>&5
6384   ac_status=$?
6385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386   (exit $ac_status); } &&
6387          { ac_try='test -s conftest$ac_exeext'
6388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6389   (eval $ac_try) 2>&5
6390   ac_status=$?
6391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392   (exit $ac_status); }; }; then
6393   ac_cv_lib_bind___inet_ntoa=yes
6394 else
6395   echo "$as_me: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6397 ac_cv_lib_bind___inet_ntoa=no
6398 fi
6399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6400 LIBS=$ac_check_lib_save_LIBS
6401 fi
6402 echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
6403 echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
6404 if test $ac_cv_lib_bind___inet_ntoa = yes; then
6405   cat >>confdefs.h <<_ACEOF
6406 #define HAVE_LIBBIND 1
6407 _ACEOF
6408
6409   LIBS="-lbind $LIBS"
6410
6411 fi
6412
6413 # Only consider libz to be present if we find <zlib.h> as well;
6414 # furthermore, check that <zlib.h> defines z_streamp (versions before
6415 # about 1.0.4 did not).  While we could work around the lack of z_streamp,
6416 # it seems unwise to encourage people to use such old zlib versions...
6417 cat >conftest.$ac_ext <<_ACEOF
6418 #line $LINENO "configure"
6419 #include "confdefs.h"
6420 #include <zlib.h>
6421
6422 _ACEOF
6423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6424   egrep "z_streamp" >/dev/null 2>&1; then
6425
6426
6427 echo "$as_me:$LINENO: checking for inflate in -lz" >&5
6428 echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
6429 if test "${ac_cv_lib_z_inflate+set}" = set; then
6430   echo $ECHO_N "(cached) $ECHO_C" >&6
6431 else
6432   ac_check_lib_save_LIBS=$LIBS
6433 LIBS="-lz  $LIBS"
6434 cat >conftest.$ac_ext <<_ACEOF
6435 #line $LINENO "configure"
6436 #include "confdefs.h"
6437
6438 /* Override any gcc2 internal prototype to avoid an error.  */
6439 #ifdef __cplusplus
6440 extern "C"
6441 #endif
6442 /* We use char because int might match the return type of a gcc2
6443    builtin and then its argument prototype would still apply.  */
6444 char inflate ();
6445 #ifdef F77_DUMMY_MAIN
6446 #  ifdef __cplusplus
6447      extern "C"
6448 #  endif
6449    int F77_DUMMY_MAIN() { return 1; }
6450 #endif
6451 int
6452 main ()
6453 {
6454 inflate ();
6455   ;
6456   return 0;
6457 }
6458 _ACEOF
6459 rm -f conftest.$ac_objext conftest$ac_exeext
6460 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6461   (eval $ac_link) 2>&5
6462   ac_status=$?
6463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464   (exit $ac_status); } &&
6465          { ac_try='test -s conftest$ac_exeext'
6466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6467   (eval $ac_try) 2>&5
6468   ac_status=$?
6469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470   (exit $ac_status); }; }; then
6471   ac_cv_lib_z_inflate=yes
6472 else
6473   echo "$as_me: failed program was:" >&5
6474 cat conftest.$ac_ext >&5
6475 ac_cv_lib_z_inflate=no
6476 fi
6477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6478 LIBS=$ac_check_lib_save_LIBS
6479 fi
6480 echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
6481 echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
6482 if test $ac_cv_lib_z_inflate = yes; then
6483   cat >>confdefs.h <<_ACEOF
6484 #define HAVE_LIBZ 1
6485 _ACEOF
6486
6487   LIBS="-lz $LIBS"
6488
6489 fi
6490
6491
6492 fi
6493 rm -f conftest*
6494
6495 # Solaris:
6496 echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
6497 echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
6498 if test "${ac_cv_search_fdatasync+set}" = set; then
6499   echo $ECHO_N "(cached) $ECHO_C" >&6
6500 else
6501   ac_func_search_save_LIBS=$LIBS
6502 ac_cv_search_fdatasync=no
6503 cat >conftest.$ac_ext <<_ACEOF
6504 #line $LINENO "configure"
6505 #include "confdefs.h"
6506
6507 /* Override any gcc2 internal prototype to avoid an error.  */
6508 #ifdef __cplusplus
6509 extern "C"
6510 #endif
6511 /* We use char because int might match the return type of a gcc2
6512    builtin and then its argument prototype would still apply.  */
6513 char fdatasync ();
6514 #ifdef F77_DUMMY_MAIN
6515 #  ifdef __cplusplus
6516      extern "C"
6517 #  endif
6518    int F77_DUMMY_MAIN() { return 1; }
6519 #endif
6520 int
6521 main ()
6522 {
6523 fdatasync ();
6524   ;
6525   return 0;
6526 }
6527 _ACEOF
6528 rm -f conftest.$ac_objext conftest$ac_exeext
6529 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6530   (eval $ac_link) 2>&5
6531   ac_status=$?
6532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6533   (exit $ac_status); } &&
6534          { ac_try='test -s conftest$ac_exeext'
6535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6536   (eval $ac_try) 2>&5
6537   ac_status=$?
6538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6539   (exit $ac_status); }; }; then
6540   ac_cv_search_fdatasync="none required"
6541 else
6542   echo "$as_me: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6544 fi
6545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6546 if test "$ac_cv_search_fdatasync" = no; then
6547   for ac_lib in rt posix4; do
6548     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6549     cat >conftest.$ac_ext <<_ACEOF
6550 #line $LINENO "configure"
6551 #include "confdefs.h"
6552
6553 /* Override any gcc2 internal prototype to avoid an error.  */
6554 #ifdef __cplusplus
6555 extern "C"
6556 #endif
6557 /* We use char because int might match the return type of a gcc2
6558    builtin and then its argument prototype would still apply.  */
6559 char fdatasync ();
6560 #ifdef F77_DUMMY_MAIN
6561 #  ifdef __cplusplus
6562      extern "C"
6563 #  endif
6564    int F77_DUMMY_MAIN() { return 1; }
6565 #endif
6566 int
6567 main ()
6568 {
6569 fdatasync ();
6570   ;
6571   return 0;
6572 }
6573 _ACEOF
6574 rm -f conftest.$ac_objext conftest$ac_exeext
6575 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6576   (eval $ac_link) 2>&5
6577   ac_status=$?
6578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6579   (exit $ac_status); } &&
6580          { ac_try='test -s conftest$ac_exeext'
6581   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6582   (eval $ac_try) 2>&5
6583   ac_status=$?
6584   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6585   (exit $ac_status); }; }; then
6586   ac_cv_search_fdatasync="-l$ac_lib"
6587 break
6588 else
6589   echo "$as_me: failed program was:" >&5
6590 cat conftest.$ac_ext >&5
6591 fi
6592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6593   done
6594 fi
6595 LIBS=$ac_func_search_save_LIBS
6596 fi
6597 echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
6598 echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
6599 if test "$ac_cv_search_fdatasync" != no; then
6600   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
6601
6602 fi
6603
6604
6605 if test "$with_krb4" = yes ; then
6606
6607 echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
6608 echo $ECHO_N "checking for des_encrypt in -ldes... $ECHO_C" >&6
6609 if test "${ac_cv_lib_des_des_encrypt+set}" = set; then
6610   echo $ECHO_N "(cached) $ECHO_C" >&6
6611 else
6612   ac_check_lib_save_LIBS=$LIBS
6613 LIBS="-ldes  $LIBS"
6614 cat >conftest.$ac_ext <<_ACEOF
6615 #line $LINENO "configure"
6616 #include "confdefs.h"
6617
6618 /* Override any gcc2 internal prototype to avoid an error.  */
6619 #ifdef __cplusplus
6620 extern "C"
6621 #endif
6622 /* We use char because int might match the return type of a gcc2
6623    builtin and then its argument prototype would still apply.  */
6624 char des_encrypt ();
6625 #ifdef F77_DUMMY_MAIN
6626 #  ifdef __cplusplus
6627      extern "C"
6628 #  endif
6629    int F77_DUMMY_MAIN() { return 1; }
6630 #endif
6631 int
6632 main ()
6633 {
6634 des_encrypt ();
6635   ;
6636   return 0;
6637 }
6638 _ACEOF
6639 rm -f conftest.$ac_objext conftest$ac_exeext
6640 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6641   (eval $ac_link) 2>&5
6642   ac_status=$?
6643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6644   (exit $ac_status); } &&
6645          { ac_try='test -s conftest$ac_exeext'
6646   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6647   (eval $ac_try) 2>&5
6648   ac_status=$?
6649   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6650   (exit $ac_status); }; }; then
6651   ac_cv_lib_des_des_encrypt=yes
6652 else
6653   echo "$as_me: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 ac_cv_lib_des_des_encrypt=no
6656 fi
6657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6658 LIBS=$ac_check_lib_save_LIBS
6659 fi
6660 echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_encrypt" >&5
6661 echo "${ECHO_T}$ac_cv_lib_des_des_encrypt" >&6
6662 if test $ac_cv_lib_des_des_encrypt = yes; then
6663   cat >>confdefs.h <<_ACEOF
6664 #define HAVE_LIBDES 1
6665 _ACEOF
6666
6667   LIBS="-ldes $LIBS"
6668
6669 else
6670   { { echo "$as_me:$LINENO: error: library 'des' is required for Kerberos 4" >&5
6671 echo "$as_me: error: library 'des' is required for Kerberos 4" >&2;}
6672    { (exit 1); exit 1; }; }
6673 fi
6674
6675
6676 echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
6677 echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6
6678 if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 else
6681   ac_check_lib_save_LIBS=$LIBS
6682 LIBS="-lkrb  $LIBS"
6683 cat >conftest.$ac_ext <<_ACEOF
6684 #line $LINENO "configure"
6685 #include "confdefs.h"
6686
6687 /* Override any gcc2 internal prototype to avoid an error.  */
6688 #ifdef __cplusplus
6689 extern "C"
6690 #endif
6691 /* We use char because int might match the return type of a gcc2
6692    builtin and then its argument prototype would still apply.  */
6693 char krb_sendauth ();
6694 #ifdef F77_DUMMY_MAIN
6695 #  ifdef __cplusplus
6696      extern "C"
6697 #  endif
6698    int F77_DUMMY_MAIN() { return 1; }
6699 #endif
6700 int
6701 main ()
6702 {
6703 krb_sendauth ();
6704   ;
6705   return 0;
6706 }
6707 _ACEOF
6708 rm -f conftest.$ac_objext conftest$ac_exeext
6709 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6710   (eval $ac_link) 2>&5
6711   ac_status=$?
6712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6713   (exit $ac_status); } &&
6714          { ac_try='test -s conftest$ac_exeext'
6715   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6716   (eval $ac_try) 2>&5
6717   ac_status=$?
6718   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6719   (exit $ac_status); }; }; then
6720   ac_cv_lib_krb_krb_sendauth=yes
6721 else
6722   echo "$as_me: failed program was:" >&5
6723 cat conftest.$ac_ext >&5
6724 ac_cv_lib_krb_krb_sendauth=no
6725 fi
6726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6727 LIBS=$ac_check_lib_save_LIBS
6728 fi
6729 echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
6730 echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6
6731 if test $ac_cv_lib_krb_krb_sendauth = yes; then
6732   cat >>confdefs.h <<_ACEOF
6733 #define HAVE_LIBKRB 1
6734 _ACEOF
6735
6736   LIBS="-lkrb $LIBS"
6737
6738 else
6739   { { echo "$as_me:$LINENO: error: library 'krb' is required for Kerberos 4" >&5
6740 echo "$as_me: error: library 'krb' is required for Kerberos 4" >&2;}
6741    { (exit 1); exit 1; }; }
6742 fi
6743
6744 fi
6745
6746 if test "$with_krb5" = yes ; then
6747   echo "$as_me:$LINENO: checking for library containing com_err" >&5
6748 echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
6749 if test "${ac_cv_search_com_err+set}" = set; then
6750   echo $ECHO_N "(cached) $ECHO_C" >&6
6751 else
6752   ac_func_search_save_LIBS=$LIBS
6753 ac_cv_search_com_err=no
6754 cat >conftest.$ac_ext <<_ACEOF
6755 #line $LINENO "configure"
6756 #include "confdefs.h"
6757
6758 /* Override any gcc2 internal prototype to avoid an error.  */
6759 #ifdef __cplusplus
6760 extern "C"
6761 #endif
6762 /* We use char because int might match the return type of a gcc2
6763    builtin and then its argument prototype would still apply.  */
6764 char com_err ();
6765 #ifdef F77_DUMMY_MAIN
6766 #  ifdef __cplusplus
6767      extern "C"
6768 #  endif
6769    int F77_DUMMY_MAIN() { return 1; }
6770 #endif
6771 int
6772 main ()
6773 {
6774 com_err ();
6775   ;
6776   return 0;
6777 }
6778 _ACEOF
6779 rm -f conftest.$ac_objext conftest$ac_exeext
6780 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6781   (eval $ac_link) 2>&5
6782   ac_status=$?
6783   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6784   (exit $ac_status); } &&
6785          { ac_try='test -s conftest$ac_exeext'
6786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6787   (eval $ac_try) 2>&5
6788   ac_status=$?
6789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6790   (exit $ac_status); }; }; then
6791   ac_cv_search_com_err="none required"
6792 else
6793   echo "$as_me: failed program was:" >&5
6794 cat conftest.$ac_ext >&5
6795 fi
6796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6797 if test "$ac_cv_search_com_err" = no; then
6798   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
6799     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6800     cat >conftest.$ac_ext <<_ACEOF
6801 #line $LINENO "configure"
6802 #include "confdefs.h"
6803
6804 /* Override any gcc2 internal prototype to avoid an error.  */
6805 #ifdef __cplusplus
6806 extern "C"
6807 #endif
6808 /* We use char because int might match the return type of a gcc2
6809    builtin and then its argument prototype would still apply.  */
6810 char com_err ();
6811 #ifdef F77_DUMMY_MAIN
6812 #  ifdef __cplusplus
6813      extern "C"
6814 #  endif
6815    int F77_DUMMY_MAIN() { return 1; }
6816 #endif
6817 int
6818 main ()
6819 {
6820 com_err ();
6821   ;
6822   return 0;
6823 }
6824 _ACEOF
6825 rm -f conftest.$ac_objext conftest$ac_exeext
6826 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6827   (eval $ac_link) 2>&5
6828   ac_status=$?
6829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830   (exit $ac_status); } &&
6831          { ac_try='test -s conftest$ac_exeext'
6832   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6833   (eval $ac_try) 2>&5
6834   ac_status=$?
6835   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6836   (exit $ac_status); }; }; then
6837   ac_cv_search_com_err="-l$ac_lib"
6838 break
6839 else
6840   echo "$as_me: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6842 fi
6843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6844   done
6845 fi
6846 LIBS=$ac_func_search_save_LIBS
6847 fi
6848 echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
6849 echo "${ECHO_T}$ac_cv_search_com_err" >&6
6850 if test "$ac_cv_search_com_err" != no; then
6851   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
6852
6853 else
6854   { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
6855 echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
6856    { (exit 1); exit 1; }; }
6857 fi
6858
6859   echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
6860 echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
6861 if test "${ac_cv_search_krb5_encrypt+set}" = set; then
6862   echo $ECHO_N "(cached) $ECHO_C" >&6
6863 else
6864   ac_func_search_save_LIBS=$LIBS
6865 ac_cv_search_krb5_encrypt=no
6866 cat >conftest.$ac_ext <<_ACEOF
6867 #line $LINENO "configure"
6868 #include "confdefs.h"
6869
6870 /* Override any gcc2 internal prototype to avoid an error.  */
6871 #ifdef __cplusplus
6872 extern "C"
6873 #endif
6874 /* We use char because int might match the return type of a gcc2
6875    builtin and then its argument prototype would still apply.  */
6876 char krb5_encrypt ();
6877 #ifdef F77_DUMMY_MAIN
6878 #  ifdef __cplusplus
6879      extern "C"
6880 #  endif
6881    int F77_DUMMY_MAIN() { return 1; }
6882 #endif
6883 int
6884 main ()
6885 {
6886 krb5_encrypt ();
6887   ;
6888   return 0;
6889 }
6890 _ACEOF
6891 rm -f conftest.$ac_objext conftest$ac_exeext
6892 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6893   (eval $ac_link) 2>&5
6894   ac_status=$?
6895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6896   (exit $ac_status); } &&
6897          { ac_try='test -s conftest$ac_exeext'
6898   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6899   (eval $ac_try) 2>&5
6900   ac_status=$?
6901   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902   (exit $ac_status); }; }; then
6903   ac_cv_search_krb5_encrypt="none required"
6904 else
6905   echo "$as_me: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 fi
6908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6909 if test "$ac_cv_search_krb5_encrypt" = no; then
6910   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
6911     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6912     cat >conftest.$ac_ext <<_ACEOF
6913 #line $LINENO "configure"
6914 #include "confdefs.h"
6915
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 #ifdef __cplusplus
6918 extern "C"
6919 #endif
6920 /* We use char because int might match the return type of a gcc2
6921    builtin and then its argument prototype would still apply.  */
6922 char krb5_encrypt ();
6923 #ifdef F77_DUMMY_MAIN
6924 #  ifdef __cplusplus
6925      extern "C"
6926 #  endif
6927    int F77_DUMMY_MAIN() { return 1; }
6928 #endif
6929 int
6930 main ()
6931 {
6932 krb5_encrypt ();
6933   ;
6934   return 0;
6935 }
6936 _ACEOF
6937 rm -f conftest.$ac_objext conftest$ac_exeext
6938 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6939   (eval $ac_link) 2>&5
6940   ac_status=$?
6941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6942   (exit $ac_status); } &&
6943          { ac_try='test -s conftest$ac_exeext'
6944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6945   (eval $ac_try) 2>&5
6946   ac_status=$?
6947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6948   (exit $ac_status); }; }; then
6949   ac_cv_search_krb5_encrypt="-l$ac_lib"
6950 break
6951 else
6952   echo "$as_me: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 fi
6955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6956   done
6957 fi
6958 LIBS=$ac_func_search_save_LIBS
6959 fi
6960 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
6961 echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
6962 if test "$ac_cv_search_krb5_encrypt" != no; then
6963   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
6964
6965 else
6966   { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
6967 echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
6968    { (exit 1); exit 1; }; }
6969 fi
6970
6971   echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
6972 echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
6973 if test "${ac_cv_search_krb5_sendauth+set}" = set; then
6974   echo $ECHO_N "(cached) $ECHO_C" >&6
6975 else
6976   ac_func_search_save_LIBS=$LIBS
6977 ac_cv_search_krb5_sendauth=no
6978 cat >conftest.$ac_ext <<_ACEOF
6979 #line $LINENO "configure"
6980 #include "confdefs.h"
6981
6982 /* Override any gcc2 internal prototype to avoid an error.  */
6983 #ifdef __cplusplus
6984 extern "C"
6985 #endif
6986 /* We use char because int might match the return type of a gcc2
6987    builtin and then its argument prototype would still apply.  */
6988 char krb5_sendauth ();
6989 #ifdef F77_DUMMY_MAIN
6990 #  ifdef __cplusplus
6991      extern "C"
6992 #  endif
6993    int F77_DUMMY_MAIN() { return 1; }
6994 #endif
6995 int
6996 main ()
6997 {
6998 krb5_sendauth ();
6999   ;
7000   return 0;
7001 }
7002 _ACEOF
7003 rm -f conftest.$ac_objext conftest$ac_exeext
7004 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7005   (eval $ac_link) 2>&5
7006   ac_status=$?
7007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7008   (exit $ac_status); } &&
7009          { ac_try='test -s conftest$ac_exeext'
7010   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7011   (eval $ac_try) 2>&5
7012   ac_status=$?
7013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7014   (exit $ac_status); }; }; then
7015   ac_cv_search_krb5_sendauth="none required"
7016 else
7017   echo "$as_me: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7019 fi
7020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7021 if test "$ac_cv_search_krb5_sendauth" = no; then
7022   for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
7023     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7024     cat >conftest.$ac_ext <<_ACEOF
7025 #line $LINENO "configure"
7026 #include "confdefs.h"
7027
7028 /* Override any gcc2 internal prototype to avoid an error.  */
7029 #ifdef __cplusplus
7030 extern "C"
7031 #endif
7032 /* We use char because int might match the return type of a gcc2
7033    builtin and then its argument prototype would still apply.  */
7034 char krb5_sendauth ();
7035 #ifdef F77_DUMMY_MAIN
7036 #  ifdef __cplusplus
7037      extern "C"
7038 #  endif
7039    int F77_DUMMY_MAIN() { return 1; }
7040 #endif
7041 int
7042 main ()
7043 {
7044 krb5_sendauth ();
7045   ;
7046   return 0;
7047 }
7048 _ACEOF
7049 rm -f conftest.$ac_objext conftest$ac_exeext
7050 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7051   (eval $ac_link) 2>&5
7052   ac_status=$?
7053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7054   (exit $ac_status); } &&
7055          { ac_try='test -s conftest$ac_exeext'
7056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061   ac_cv_search_krb5_sendauth="-l$ac_lib"
7062 break
7063 else
7064   echo "$as_me: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066 fi
7067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7068   done
7069 fi
7070 LIBS=$ac_func_search_save_LIBS
7071 fi
7072 echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
7073 echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
7074 if test "$ac_cv_search_krb5_sendauth" != no; then
7075   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
7076
7077 else
7078   { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
7079 echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
7080    { (exit 1); exit 1; }; }
7081 fi
7082
7083 fi
7084
7085 if test "$with_openssl" = yes ; then
7086
7087 echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
7088 echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
7089 if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
7090   echo $ECHO_N "(cached) $ECHO_C" >&6
7091 else
7092   ac_check_lib_save_LIBS=$LIBS
7093 LIBS="-lcrypto  $LIBS"
7094 cat >conftest.$ac_ext <<_ACEOF
7095 #line $LINENO "configure"
7096 #include "confdefs.h"
7097
7098 /* Override any gcc2 internal prototype to avoid an error.  */
7099 #ifdef __cplusplus
7100 extern "C"
7101 #endif
7102 /* We use char because int might match the return type of a gcc2
7103    builtin and then its argument prototype would still apply.  */
7104 char CRYPTO_new_ex_data ();
7105 #ifdef F77_DUMMY_MAIN
7106 #  ifdef __cplusplus
7107      extern "C"
7108 #  endif
7109    int F77_DUMMY_MAIN() { return 1; }
7110 #endif
7111 int
7112 main ()
7113 {
7114 CRYPTO_new_ex_data ();
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 rm -f conftest.$ac_objext conftest$ac_exeext
7120 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7121   (eval $ac_link) 2>&5
7122   ac_status=$?
7123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest$ac_exeext'
7126   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7135 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
7136 fi
7137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7138 LIBS=$ac_check_lib_save_LIBS
7139 fi
7140 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
7141 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
7142 if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
7143   cat >>confdefs.h <<_ACEOF
7144 #define HAVE_LIBCRYPTO 1
7145 _ACEOF
7146
7147   LIBS="-lcrypto $LIBS"
7148
7149 else
7150   { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
7151 echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
7152    { (exit 1); exit 1; }; }
7153 fi
7154
7155
7156 echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
7157 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
7158 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
7159   echo $ECHO_N "(cached) $ECHO_C" >&6
7160 else
7161   ac_check_lib_save_LIBS=$LIBS
7162 LIBS="-lssl  $LIBS"
7163 cat >conftest.$ac_ext <<_ACEOF
7164 #line $LINENO "configure"
7165 #include "confdefs.h"
7166
7167 /* Override any gcc2 internal prototype to avoid an error.  */
7168 #ifdef __cplusplus
7169 extern "C"
7170 #endif
7171 /* We use char because int might match the return type of a gcc2
7172    builtin and then its argument prototype would still apply.  */
7173 char SSL_library_init ();
7174 #ifdef F77_DUMMY_MAIN
7175 #  ifdef __cplusplus
7176      extern "C"
7177 #  endif
7178    int F77_DUMMY_MAIN() { return 1; }
7179 #endif
7180 int
7181 main ()
7182 {
7183 SSL_library_init ();
7184   ;
7185   return 0;
7186 }
7187 _ACEOF
7188 rm -f conftest.$ac_objext conftest$ac_exeext
7189 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7190   (eval $ac_link) 2>&5
7191   ac_status=$?
7192   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7193   (exit $ac_status); } &&
7194          { ac_try='test -s conftest$ac_exeext'
7195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7199   (exit $ac_status); }; }; then
7200   ac_cv_lib_ssl_SSL_library_init=yes
7201 else
7202   echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7204 ac_cv_lib_ssl_SSL_library_init=no
7205 fi
7206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7207 LIBS=$ac_check_lib_save_LIBS
7208 fi
7209 echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
7210 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
7211 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
7212   cat >>confdefs.h <<_ACEOF
7213 #define HAVE_LIBSSL 1
7214 _ACEOF
7215
7216   LIBS="-lssl $LIBS"
7217
7218 else
7219   { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
7220 echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
7221    { (exit 1); exit 1; }; }
7222 fi
7223
7224 fi
7225
7226 if test "$with_pam" = yes ; then
7227
7228 echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
7229 echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
7230 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
7231   echo $ECHO_N "(cached) $ECHO_C" >&6
7232 else
7233   ac_check_lib_save_LIBS=$LIBS
7234 LIBS="-lpam  $LIBS"
7235 cat >conftest.$ac_ext <<_ACEOF
7236 #line $LINENO "configure"
7237 #include "confdefs.h"
7238
7239 /* Override any gcc2 internal prototype to avoid an error.  */
7240 #ifdef __cplusplus
7241 extern "C"
7242 #endif
7243 /* We use char because int might match the return type of a gcc2
7244    builtin and then its argument prototype would still apply.  */
7245 char pam_start ();
7246 #ifdef F77_DUMMY_MAIN
7247 #  ifdef __cplusplus
7248      extern "C"
7249 #  endif
7250    int F77_DUMMY_MAIN() { return 1; }
7251 #endif
7252 int
7253 main ()
7254 {
7255 pam_start ();
7256   ;
7257   return 0;
7258 }
7259 _ACEOF
7260 rm -f conftest.$ac_objext conftest$ac_exeext
7261 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7262   (eval $ac_link) 2>&5
7263   ac_status=$?
7264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7265   (exit $ac_status); } &&
7266          { ac_try='test -s conftest$ac_exeext'
7267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7268   (eval $ac_try) 2>&5
7269   ac_status=$?
7270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271   (exit $ac_status); }; }; then
7272   ac_cv_lib_pam_pam_start=yes
7273 else
7274   echo "$as_me: failed program was:" >&5
7275 cat conftest.$ac_ext >&5
7276 ac_cv_lib_pam_pam_start=no
7277 fi
7278 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7279 LIBS=$ac_check_lib_save_LIBS
7280 fi
7281 echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
7282 echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
7283 if test $ac_cv_lib_pam_pam_start = yes; then
7284   cat >>confdefs.h <<_ACEOF
7285 #define HAVE_LIBPAM 1
7286 _ACEOF
7287
7288   LIBS="-lpam $LIBS"
7289
7290 else
7291   { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
7292 echo "$as_me: error: library 'pam' is required for PAM" >&2;}
7293    { (exit 1); exit 1; }; }
7294 fi
7295
7296 fi
7297
7298
7299 ##
7300 ## Header files
7301 ##
7302 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7303 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7304 if test "${ac_cv_header_stdc+set}" = set; then
7305   echo $ECHO_N "(cached) $ECHO_C" >&6
7306 else
7307   cat >conftest.$ac_ext <<_ACEOF
7308 #line $LINENO "configure"
7309 #include "confdefs.h"
7310 #include <stdlib.h>
7311 #include <stdarg.h>
7312 #include <string.h>
7313 #include <float.h>
7314
7315 _ACEOF
7316 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7318   ac_status=$?
7319   egrep -v '^ *\+' conftest.er1 >conftest.err
7320   rm -f conftest.er1
7321   cat conftest.err >&5
7322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323   (exit $ac_status); } >/dev/null; then
7324   if test -s conftest.err; then
7325     ac_cpp_err=$ac_c_preproc_warn_flag
7326   else
7327     ac_cpp_err=
7328   fi
7329 else
7330   ac_cpp_err=yes
7331 fi
7332 if test -z "$ac_cpp_err"; then
7333   ac_cv_header_stdc=yes
7334 else
7335   echo "$as_me: failed program was:" >&5
7336   cat conftest.$ac_ext >&5
7337   ac_cv_header_stdc=no
7338 fi
7339 rm -f conftest.err conftest.$ac_ext
7340
7341 if test $ac_cv_header_stdc = yes; then
7342   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7343   cat >conftest.$ac_ext <<_ACEOF
7344 #line $LINENO "configure"
7345 #include "confdefs.h"
7346 #include <string.h>
7347
7348 _ACEOF
7349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7350   egrep "memchr" >/dev/null 2>&1; then
7351   :
7352 else
7353   ac_cv_header_stdc=no
7354 fi
7355 rm -f conftest*
7356
7357 fi
7358
7359 if test $ac_cv_header_stdc = yes; then
7360   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7361   cat >conftest.$ac_ext <<_ACEOF
7362 #line $LINENO "configure"
7363 #include "confdefs.h"
7364 #include <stdlib.h>
7365
7366 _ACEOF
7367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7368   egrep "free" >/dev/null 2>&1; then
7369   :
7370 else
7371   ac_cv_header_stdc=no
7372 fi
7373 rm -f conftest*
7374
7375 fi
7376
7377 if test $ac_cv_header_stdc = yes; then
7378   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7379   if test "$cross_compiling" = yes; then
7380   :
7381 else
7382   cat >conftest.$ac_ext <<_ACEOF
7383 #line $LINENO "configure"
7384 #include "confdefs.h"
7385 #include <ctype.h>
7386 #if ((' ' & 0x0FF) == 0x020)
7387 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7388 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7389 #else
7390 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
7391                      || ('j' <= (c) && (c) <= 'r') \
7392                      || ('s' <= (c) && (c) <= 'z'))
7393 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7394 #endif
7395
7396 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7397 int
7398 main ()
7399 {
7400   int i;
7401   for (i = 0; i < 256; i++)
7402     if (XOR (islower (i), ISLOWER (i))
7403         || toupper (i) != TOUPPER (i))
7404       exit(2);
7405   exit (0);
7406 }
7407 _ACEOF
7408 rm -f conftest$ac_exeext
7409 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7410   (eval $ac_link) 2>&5
7411   ac_status=$?
7412   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7414   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7415   (eval $ac_try) 2>&5
7416   ac_status=$?
7417   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7418   (exit $ac_status); }; }; then
7419   :
7420 else
7421   echo "$as_me: program exited with status $ac_status" >&5
7422 echo "$as_me: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7424 ( exit $ac_status )
7425 ac_cv_header_stdc=no
7426 fi
7427 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7428 fi
7429 fi
7430 fi
7431 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7432 echo "${ECHO_T}$ac_cv_header_stdc" >&6
7433 if test $ac_cv_header_stdc = yes; then
7434
7435 cat >>confdefs.h <<\_ACEOF
7436 #define STDC_HEADERS 1
7437 _ACEOF
7438
7439 fi
7440
7441 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7452                   inttypes.h stdint.h unistd.h
7453 do
7454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7455 echo "$as_me:$LINENO: checking for $ac_header" >&5
7456 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7457 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7458   echo $ECHO_N "(cached) $ECHO_C" >&6
7459 else
7460   cat >conftest.$ac_ext <<_ACEOF
7461 #line $LINENO "configure"
7462 #include "confdefs.h"
7463 $ac_includes_default
7464
7465 #include <$ac_header>
7466 _ACEOF
7467 rm -f conftest.$ac_objext
7468 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7469   (eval $ac_compile) 2>&5
7470   ac_status=$?
7471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7472   (exit $ac_status); } &&
7473          { ac_try='test -s conftest.$ac_objext'
7474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7475   (eval $ac_try) 2>&5
7476   ac_status=$?
7477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478   (exit $ac_status); }; }; then
7479   eval "$as_ac_Header=yes"
7480 else
7481   echo "$as_me: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7483 eval "$as_ac_Header=no"
7484 fi
7485 rm -f conftest.$ac_objext conftest.$ac_ext
7486 fi
7487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7488 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
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 fi
7495
7496 done
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517 for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h
7518 do
7519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7520 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7521   echo "$as_me:$LINENO: checking for $ac_header" >&5
7522 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7523 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7524   echo $ECHO_N "(cached) $ECHO_C" >&6
7525 fi
7526 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7527 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7528 else
7529   # Is the header compilable?
7530 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7531 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7532 cat >conftest.$ac_ext <<_ACEOF
7533 #line $LINENO "configure"
7534 #include "confdefs.h"
7535 $ac_includes_default
7536 #include <$ac_header>
7537 _ACEOF
7538 rm -f conftest.$ac_objext
7539 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7540   (eval $ac_compile) 2>&5
7541   ac_status=$?
7542   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543   (exit $ac_status); } &&
7544          { ac_try='test -s conftest.$ac_objext'
7545   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7546   (eval $ac_try) 2>&5
7547   ac_status=$?
7548   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7549   (exit $ac_status); }; }; then
7550   ac_header_compiler=yes
7551 else
7552   echo "$as_me: failed program was:" >&5
7553 cat conftest.$ac_ext >&5
7554 ac_header_compiler=no
7555 fi
7556 rm -f conftest.$ac_objext conftest.$ac_ext
7557 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7558 echo "${ECHO_T}$ac_header_compiler" >&6
7559
7560 # Is the header present?
7561 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7562 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7563 cat >conftest.$ac_ext <<_ACEOF
7564 #line $LINENO "configure"
7565 #include "confdefs.h"
7566 #include <$ac_header>
7567 _ACEOF
7568 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7570   ac_status=$?
7571   egrep -v '^ *\+' conftest.er1 >conftest.err
7572   rm -f conftest.er1
7573   cat conftest.err >&5
7574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7575   (exit $ac_status); } >/dev/null; then
7576   if test -s conftest.err; then
7577     ac_cpp_err=$ac_c_preproc_warn_flag
7578   else
7579     ac_cpp_err=
7580   fi
7581 else
7582   ac_cpp_err=yes
7583 fi
7584 if test -z "$ac_cpp_err"; then
7585   ac_header_preproc=yes
7586 else
7587   echo "$as_me: failed program was:" >&5
7588   cat conftest.$ac_ext >&5
7589   ac_header_preproc=no
7590 fi
7591 rm -f conftest.err conftest.$ac_ext
7592 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7593 echo "${ECHO_T}$ac_header_preproc" >&6
7594
7595 # So?  What about this header?
7596 case $ac_header_compiler:$ac_header_preproc in
7597   yes:no )
7598     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7599 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7600     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7601 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7602   no:yes )
7603     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7604 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7605     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7606 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7607     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7608 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7609 esac
7610 echo "$as_me:$LINENO: checking for $ac_header" >&5
7611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7613   echo $ECHO_N "(cached) $ECHO_C" >&6
7614 else
7615   eval "$as_ac_Header=$ac_header_preproc"
7616 fi
7617 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7619
7620 fi
7621 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7622   cat >>confdefs.h <<_ACEOF
7623 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7624 _ACEOF
7625
7626 fi
7627
7628 done
7629
7630
7631 # At least on IRIX, cpp test for netinet/tcp.h will fail unless
7632 # netinet/in.h is included first.
7633
7634 for ac_header in netinet/in.h
7635 do
7636 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7637 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7638   echo "$as_me:$LINENO: checking for $ac_header" >&5
7639 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7640 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7641   echo $ECHO_N "(cached) $ECHO_C" >&6
7642 fi
7643 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7644 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7645 else
7646   # Is the header compilable?
7647 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7648 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7649 cat >conftest.$ac_ext <<_ACEOF
7650 #line $LINENO "configure"
7651 #include "confdefs.h"
7652 $ac_includes_default
7653 #include <$ac_header>
7654 _ACEOF
7655 rm -f conftest.$ac_objext
7656 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7657   (eval $ac_compile) 2>&5
7658   ac_status=$?
7659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7660   (exit $ac_status); } &&
7661          { ac_try='test -s conftest.$ac_objext'
7662   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7663   (eval $ac_try) 2>&5
7664   ac_status=$?
7665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7666   (exit $ac_status); }; }; then
7667   ac_header_compiler=yes
7668 else
7669   echo "$as_me: failed program was:" >&5
7670 cat conftest.$ac_ext >&5
7671 ac_header_compiler=no
7672 fi
7673 rm -f conftest.$ac_objext conftest.$ac_ext
7674 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7675 echo "${ECHO_T}$ac_header_compiler" >&6
7676
7677 # Is the header present?
7678 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7679 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7680 cat >conftest.$ac_ext <<_ACEOF
7681 #line $LINENO "configure"
7682 #include "confdefs.h"
7683 #include <$ac_header>
7684 _ACEOF
7685 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7686   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7687   ac_status=$?
7688   egrep -v '^ *\+' conftest.er1 >conftest.err
7689   rm -f conftest.er1
7690   cat conftest.err >&5
7691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7692   (exit $ac_status); } >/dev/null; then
7693   if test -s conftest.err; then
7694     ac_cpp_err=$ac_c_preproc_warn_flag
7695   else
7696     ac_cpp_err=
7697   fi
7698 else
7699   ac_cpp_err=yes
7700 fi
7701 if test -z "$ac_cpp_err"; then
7702   ac_header_preproc=yes
7703 else
7704   echo "$as_me: failed program was:" >&5
7705   cat conftest.$ac_ext >&5
7706   ac_header_preproc=no
7707 fi
7708 rm -f conftest.err conftest.$ac_ext
7709 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7710 echo "${ECHO_T}$ac_header_preproc" >&6
7711
7712 # So?  What about this header?
7713 case $ac_header_compiler:$ac_header_preproc in
7714   yes:no )
7715     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7716 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7717     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7718 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7719   no:yes )
7720     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7721 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7722     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7723 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7724     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7725 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7726 esac
7727 echo "$as_me:$LINENO: checking for $ac_header" >&5
7728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7730   echo $ECHO_N "(cached) $ECHO_C" >&6
7731 else
7732   eval "$as_ac_Header=$ac_header_preproc"
7733 fi
7734 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7736
7737 fi
7738 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7739   cat >>confdefs.h <<_ACEOF
7740 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7741 _ACEOF
7742
7743 fi
7744
7745 done
7746
7747
7748 for ac_header in netinet/tcp.h
7749 do
7750 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7751 echo "$as_me:$LINENO: checking for $ac_header" >&5
7752 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7753 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7754   echo $ECHO_N "(cached) $ECHO_C" >&6
7755 else
7756   cat >conftest.$ac_ext <<_ACEOF
7757 #line $LINENO "configure"
7758 #include "confdefs.h"
7759 $ac_includes_default
7760 #ifdef HAVE_NETINET_IN_H
7761 #include <netinet/in.h>
7762 #endif
7763
7764
7765 #include <$ac_header>
7766 _ACEOF
7767 rm -f conftest.$ac_objext
7768 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7769   (eval $ac_compile) 2>&5
7770   ac_status=$?
7771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7772   (exit $ac_status); } &&
7773          { ac_try='test -s conftest.$ac_objext'
7774   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7775   (eval $ac_try) 2>&5
7776   ac_status=$?
7777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778   (exit $ac_status); }; }; then
7779   eval "$as_ac_Header=yes"
7780 else
7781   echo "$as_me: failed program was:" >&5
7782 cat conftest.$ac_ext >&5
7783 eval "$as_ac_Header=no"
7784 fi
7785 rm -f conftest.$ac_objext conftest.$ac_ext
7786 fi
7787 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7788 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7789 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7790   cat >>confdefs.h <<_ACEOF
7791 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7792 _ACEOF
7793
7794 fi
7795
7796 done
7797
7798
7799
7800
7801 for ac_header in readline/readline.h readline.h
7802 do
7803 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7805   echo "$as_me:$LINENO: checking for $ac_header" >&5
7806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7808   echo $ECHO_N "(cached) $ECHO_C" >&6
7809 fi
7810 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7811 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7812 else
7813   # Is the header compilable?
7814 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7815 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7816 cat >conftest.$ac_ext <<_ACEOF
7817 #line $LINENO "configure"
7818 #include "confdefs.h"
7819 $ac_includes_default
7820 #include <$ac_header>
7821 _ACEOF
7822 rm -f conftest.$ac_objext
7823 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7824   (eval $ac_compile) 2>&5
7825   ac_status=$?
7826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7827   (exit $ac_status); } &&
7828          { ac_try='test -s conftest.$ac_objext'
7829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7830   (eval $ac_try) 2>&5
7831   ac_status=$?
7832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7833   (exit $ac_status); }; }; then
7834   ac_header_compiler=yes
7835 else
7836   echo "$as_me: failed program was:" >&5
7837 cat conftest.$ac_ext >&5
7838 ac_header_compiler=no
7839 fi
7840 rm -f conftest.$ac_objext conftest.$ac_ext
7841 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7842 echo "${ECHO_T}$ac_header_compiler" >&6
7843
7844 # Is the header present?
7845 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7846 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7847 cat >conftest.$ac_ext <<_ACEOF
7848 #line $LINENO "configure"
7849 #include "confdefs.h"
7850 #include <$ac_header>
7851 _ACEOF
7852 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7853   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7854   ac_status=$?
7855   egrep -v '^ *\+' conftest.er1 >conftest.err
7856   rm -f conftest.er1
7857   cat conftest.err >&5
7858   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7859   (exit $ac_status); } >/dev/null; then
7860   if test -s conftest.err; then
7861     ac_cpp_err=$ac_c_preproc_warn_flag
7862   else
7863     ac_cpp_err=
7864   fi
7865 else
7866   ac_cpp_err=yes
7867 fi
7868 if test -z "$ac_cpp_err"; then
7869   ac_header_preproc=yes
7870 else
7871   echo "$as_me: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   ac_header_preproc=no
7874 fi
7875 rm -f conftest.err conftest.$ac_ext
7876 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7877 echo "${ECHO_T}$ac_header_preproc" >&6
7878
7879 # So?  What about this header?
7880 case $ac_header_compiler:$ac_header_preproc in
7881   yes:no )
7882     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7883 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7884     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7885 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7886   no:yes )
7887     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7888 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7889     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7890 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7891     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7892 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
7893 esac
7894 echo "$as_me:$LINENO: checking for $ac_header" >&5
7895 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7897   echo $ECHO_N "(cached) $ECHO_C" >&6
7898 else
7899   eval "$as_ac_Header=$ac_header_preproc"
7900 fi
7901 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7902 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7903
7904 fi
7905 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7906   cat >>confdefs.h <<_ACEOF
7907 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7908 _ACEOF
7909  break
7910 fi
7911
7912 done
7913
7914
7915
7916 for ac_header in readline/history.h history.h
7917 do
7918 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7919 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7920   echo "$as_me:$LINENO: checking for $ac_header" >&5
7921 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7922 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7923   echo $ECHO_N "(cached) $ECHO_C" >&6
7924 fi
7925 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
7926 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7927 else
7928   # Is the header compilable?
7929 echo "$as_me:$LINENO: checking $ac_header usability" >&5
7930 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
7931 cat >conftest.$ac_ext <<_ACEOF
7932 #line $LINENO "configure"
7933 #include "confdefs.h"
7934 $ac_includes_default
7935 #include <$ac_header>
7936 _ACEOF
7937 rm -f conftest.$ac_objext
7938 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7939   (eval $ac_compile) 2>&5
7940   ac_status=$?
7941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7942   (exit $ac_status); } &&
7943          { ac_try='test -s conftest.$ac_objext'
7944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7945   (eval $ac_try) 2>&5
7946   ac_status=$?
7947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7948   (exit $ac_status); }; }; then
7949   ac_header_compiler=yes
7950 else
7951   echo "$as_me: failed program was:" >&5
7952 cat conftest.$ac_ext >&5
7953 ac_header_compiler=no
7954 fi
7955 rm -f conftest.$ac_objext conftest.$ac_ext
7956 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7957 echo "${ECHO_T}$ac_header_compiler" >&6
7958
7959 # Is the header present?
7960 echo "$as_me:$LINENO: checking $ac_header presence" >&5
7961 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
7962 cat >conftest.$ac_ext <<_ACEOF
7963 #line $LINENO "configure"
7964 #include "confdefs.h"
7965 #include <$ac_header>
7966 _ACEOF
7967 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
7968   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7969   ac_status=$?
7970   egrep -v '^ *\+' conftest.er1 >conftest.err
7971   rm -f conftest.er1
7972   cat conftest.err >&5
7973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974   (exit $ac_status); } >/dev/null; then
7975   if test -s conftest.err; then
7976     ac_cpp_err=$ac_c_preproc_warn_flag
7977   else
7978     ac_cpp_err=
7979   fi
7980 else
7981   ac_cpp_err=yes
7982 fi
7983 if test -z "$ac_cpp_err"; then
7984   ac_header_preproc=yes
7985 else
7986   echo "$as_me: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   ac_header_preproc=no
7989 fi
7990 rm -f conftest.err conftest.$ac_ext
7991 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7992 echo "${ECHO_T}$ac_header_preproc" >&6
7993
7994 # So?  What about this header?
7995 case $ac_header_compiler:$ac_header_preproc in
7996   yes:no )
7997     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7998 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7999     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8000 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8001   no:yes )
8002     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8003 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8004     { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8005 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8006     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8007 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8008 esac
8009 echo "$as_me:$LINENO: checking for $ac_header" >&5
8010 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8011 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8012   echo $ECHO_N "(cached) $ECHO_C" >&6
8013 else
8014   eval "$as_ac_Header=$ac_header_preproc"
8015 fi
8016 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8017 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8018
8019 fi
8020 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8021   cat >>confdefs.h <<_ACEOF
8022 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8023 _ACEOF
8024  break
8025 fi
8026
8027 done
8028
8029
8030 if test "$with_krb4" = yes ; then
8031   if test "${ac_cv_header_krb_h+set}" = set; then
8032   echo "$as_me:$LINENO: checking for krb.h" >&5
8033 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8034 if test "${ac_cv_header_krb_h+set}" = set; then
8035   echo $ECHO_N "(cached) $ECHO_C" >&6
8036 fi
8037 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8038 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8039 else
8040   # Is the header compilable?
8041 echo "$as_me:$LINENO: checking krb.h usability" >&5
8042 echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
8043 cat >conftest.$ac_ext <<_ACEOF
8044 #line $LINENO "configure"
8045 #include "confdefs.h"
8046 $ac_includes_default
8047 #include <krb.h>
8048 _ACEOF
8049 rm -f conftest.$ac_objext
8050 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8051   (eval $ac_compile) 2>&5
8052   ac_status=$?
8053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8054   (exit $ac_status); } &&
8055          { ac_try='test -s conftest.$ac_objext'
8056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8057   (eval $ac_try) 2>&5
8058   ac_status=$?
8059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8060   (exit $ac_status); }; }; then
8061   ac_header_compiler=yes
8062 else
8063   echo "$as_me: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8065 ac_header_compiler=no
8066 fi
8067 rm -f conftest.$ac_objext conftest.$ac_ext
8068 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8069 echo "${ECHO_T}$ac_header_compiler" >&6
8070
8071 # Is the header present?
8072 echo "$as_me:$LINENO: checking krb.h presence" >&5
8073 echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
8074 cat >conftest.$ac_ext <<_ACEOF
8075 #line $LINENO "configure"
8076 #include "confdefs.h"
8077 #include <krb.h>
8078 _ACEOF
8079 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8081   ac_status=$?
8082   egrep -v '^ *\+' conftest.er1 >conftest.err
8083   rm -f conftest.er1
8084   cat conftest.err >&5
8085   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8086   (exit $ac_status); } >/dev/null; then
8087   if test -s conftest.err; then
8088     ac_cpp_err=$ac_c_preproc_warn_flag
8089   else
8090     ac_cpp_err=
8091   fi
8092 else
8093   ac_cpp_err=yes
8094 fi
8095 if test -z "$ac_cpp_err"; then
8096   ac_header_preproc=yes
8097 else
8098   echo "$as_me: failed program was:" >&5
8099   cat conftest.$ac_ext >&5
8100   ac_header_preproc=no
8101 fi
8102 rm -f conftest.err conftest.$ac_ext
8103 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8104 echo "${ECHO_T}$ac_header_preproc" >&6
8105
8106 # So?  What about this header?
8107 case $ac_header_compiler:$ac_header_preproc in
8108   yes:no )
8109     { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
8110 echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8111     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8112 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8113   no:yes )
8114     { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
8115 echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
8116     { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
8117 echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
8118     { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
8119 echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
8120 esac
8121 echo "$as_me:$LINENO: checking for krb.h" >&5
8122 echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
8123 if test "${ac_cv_header_krb_h+set}" = set; then
8124   echo $ECHO_N "(cached) $ECHO_C" >&6
8125 else
8126   ac_cv_header_krb_h=$ac_header_preproc
8127 fi
8128 echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
8129 echo "${ECHO_T}$ac_cv_header_krb_h" >&6
8130
8131 fi
8132 if test $ac_cv_header_krb_h = yes; then
8133   :
8134 else
8135   { { echo "$as_me:$LINENO: error: header file <krb.h> is required for Kerberos 4" >&5
8136 echo "$as_me: error: header file <krb.h> is required for Kerberos 4" >&2;}
8137    { (exit 1); exit 1; }; }
8138 fi
8139
8140
8141 fi
8142
8143 if test "$with_krb5" = yes ; then
8144   if test "${ac_cv_header_krb5_h+set}" = set; then
8145   echo "$as_me:$LINENO: checking for krb5.h" >&5
8146 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8147 if test "${ac_cv_header_krb5_h+set}" = set; then
8148   echo $ECHO_N "(cached) $ECHO_C" >&6
8149 fi
8150 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8151 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8152 else
8153   # Is the header compilable?
8154 echo "$as_me:$LINENO: checking krb5.h usability" >&5
8155 echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
8156 cat >conftest.$ac_ext <<_ACEOF
8157 #line $LINENO "configure"
8158 #include "confdefs.h"
8159 $ac_includes_default
8160 #include <krb5.h>
8161 _ACEOF
8162 rm -f conftest.$ac_objext
8163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8164   (eval $ac_compile) 2>&5
8165   ac_status=$?
8166   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167   (exit $ac_status); } &&
8168          { ac_try='test -s conftest.$ac_objext'
8169   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170   (eval $ac_try) 2>&5
8171   ac_status=$?
8172   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173   (exit $ac_status); }; }; then
8174   ac_header_compiler=yes
8175 else
8176   echo "$as_me: failed program was:" >&5
8177 cat conftest.$ac_ext >&5
8178 ac_header_compiler=no
8179 fi
8180 rm -f conftest.$ac_objext conftest.$ac_ext
8181 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8182 echo "${ECHO_T}$ac_header_compiler" >&6
8183
8184 # Is the header present?
8185 echo "$as_me:$LINENO: checking krb5.h presence" >&5
8186 echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
8187 cat >conftest.$ac_ext <<_ACEOF
8188 #line $LINENO "configure"
8189 #include "confdefs.h"
8190 #include <krb5.h>
8191 _ACEOF
8192 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8194   ac_status=$?
8195   egrep -v '^ *\+' conftest.er1 >conftest.err
8196   rm -f conftest.er1
8197   cat conftest.err >&5
8198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8199   (exit $ac_status); } >/dev/null; then
8200   if test -s conftest.err; then
8201     ac_cpp_err=$ac_c_preproc_warn_flag
8202   else
8203     ac_cpp_err=
8204   fi
8205 else
8206   ac_cpp_err=yes
8207 fi
8208 if test -z "$ac_cpp_err"; then
8209   ac_header_preproc=yes
8210 else
8211   echo "$as_me: failed program was:" >&5
8212   cat conftest.$ac_ext >&5
8213   ac_header_preproc=no
8214 fi
8215 rm -f conftest.err conftest.$ac_ext
8216 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8217 echo "${ECHO_T}$ac_header_preproc" >&6
8218
8219 # So?  What about this header?
8220 case $ac_header_compiler:$ac_header_preproc in
8221   yes:no )
8222     { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
8223 echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8224     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8225 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8226   no:yes )
8227     { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
8228 echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
8229     { echo "$as_me:$LINENO: WARNING: krb5.h: check for missing prerequisite headers?" >&5
8230 echo "$as_me: WARNING: krb5.h: check for missing prerequisite headers?" >&2;}
8231     { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
8232 echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
8233 esac
8234 echo "$as_me:$LINENO: checking for krb5.h" >&5
8235 echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
8236 if test "${ac_cv_header_krb5_h+set}" = set; then
8237   echo $ECHO_N "(cached) $ECHO_C" >&6
8238 else
8239   ac_cv_header_krb5_h=$ac_header_preproc
8240 fi
8241 echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
8242 echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
8243
8244 fi
8245 if test $ac_cv_header_krb5_h = yes; then
8246   :
8247 else
8248   { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
8249 echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
8250    { (exit 1); exit 1; }; }
8251 fi
8252
8253
8254   if test "${ac_cv_header_com_err_h+set}" = set; then
8255   echo "$as_me:$LINENO: checking for com_err.h" >&5
8256 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8257 if test "${ac_cv_header_com_err_h+set}" = set; then
8258   echo $ECHO_N "(cached) $ECHO_C" >&6
8259 fi
8260 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8261 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8262 else
8263   # Is the header compilable?
8264 echo "$as_me:$LINENO: checking com_err.h usability" >&5
8265 echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
8266 cat >conftest.$ac_ext <<_ACEOF
8267 #line $LINENO "configure"
8268 #include "confdefs.h"
8269 $ac_includes_default
8270 #include <com_err.h>
8271 _ACEOF
8272 rm -f conftest.$ac_objext
8273 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8274   (eval $ac_compile) 2>&5
8275   ac_status=$?
8276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8277   (exit $ac_status); } &&
8278          { ac_try='test -s conftest.$ac_objext'
8279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8280   (eval $ac_try) 2>&5
8281   ac_status=$?
8282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8283   (exit $ac_status); }; }; then
8284   ac_header_compiler=yes
8285 else
8286   echo "$as_me: failed program was:" >&5
8287 cat conftest.$ac_ext >&5
8288 ac_header_compiler=no
8289 fi
8290 rm -f conftest.$ac_objext conftest.$ac_ext
8291 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8292 echo "${ECHO_T}$ac_header_compiler" >&6
8293
8294 # Is the header present?
8295 echo "$as_me:$LINENO: checking com_err.h presence" >&5
8296 echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
8297 cat >conftest.$ac_ext <<_ACEOF
8298 #line $LINENO "configure"
8299 #include "confdefs.h"
8300 #include <com_err.h>
8301 _ACEOF
8302 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8303   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8304   ac_status=$?
8305   egrep -v '^ *\+' conftest.er1 >conftest.err
8306   rm -f conftest.er1
8307   cat conftest.err >&5
8308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309   (exit $ac_status); } >/dev/null; then
8310   if test -s conftest.err; then
8311     ac_cpp_err=$ac_c_preproc_warn_flag
8312   else
8313     ac_cpp_err=
8314   fi
8315 else
8316   ac_cpp_err=yes
8317 fi
8318 if test -z "$ac_cpp_err"; then
8319   ac_header_preproc=yes
8320 else
8321   echo "$as_me: failed program was:" >&5
8322   cat conftest.$ac_ext >&5
8323   ac_header_preproc=no
8324 fi
8325 rm -f conftest.err conftest.$ac_ext
8326 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8327 echo "${ECHO_T}$ac_header_preproc" >&6
8328
8329 # So?  What about this header?
8330 case $ac_header_compiler:$ac_header_preproc in
8331   yes:no )
8332     { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8333 echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8334     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8335 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8336   no:yes )
8337     { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
8338 echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
8339     { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
8340 echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
8341     { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
8342 echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
8343 esac
8344 echo "$as_me:$LINENO: checking for com_err.h" >&5
8345 echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
8346 if test "${ac_cv_header_com_err_h+set}" = set; then
8347   echo $ECHO_N "(cached) $ECHO_C" >&6
8348 else
8349   ac_cv_header_com_err_h=$ac_header_preproc
8350 fi
8351 echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
8352 echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
8353
8354 fi
8355 if test $ac_cv_header_com_err_h = yes; then
8356   :
8357 else
8358   { { echo "$as_me:$LINENO: error: header file <com_err.h> is required for Kerberos 5" >&5
8359 echo "$as_me: error: header file <com_err.h> is required for Kerberos 5" >&2;}
8360    { (exit 1); exit 1; }; }
8361 fi
8362
8363
8364 fi
8365
8366 if test "$with_openssl" = yes ; then
8367   if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8368   echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8369 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8370 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8371   echo $ECHO_N "(cached) $ECHO_C" >&6
8372 fi
8373 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8374 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8375 else
8376   # Is the header compilable?
8377 echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
8378 echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
8379 cat >conftest.$ac_ext <<_ACEOF
8380 #line $LINENO "configure"
8381 #include "confdefs.h"
8382 $ac_includes_default
8383 #include <openssl/ssl.h>
8384 _ACEOF
8385 rm -f conftest.$ac_objext
8386 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8387   (eval $ac_compile) 2>&5
8388   ac_status=$?
8389   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8390   (exit $ac_status); } &&
8391          { ac_try='test -s conftest.$ac_objext'
8392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8393   (eval $ac_try) 2>&5
8394   ac_status=$?
8395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8396   (exit $ac_status); }; }; then
8397   ac_header_compiler=yes
8398 else
8399   echo "$as_me: failed program was:" >&5
8400 cat conftest.$ac_ext >&5
8401 ac_header_compiler=no
8402 fi
8403 rm -f conftest.$ac_objext conftest.$ac_ext
8404 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8405 echo "${ECHO_T}$ac_header_compiler" >&6
8406
8407 # Is the header present?
8408 echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
8409 echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
8410 cat >conftest.$ac_ext <<_ACEOF
8411 #line $LINENO "configure"
8412 #include "confdefs.h"
8413 #include <openssl/ssl.h>
8414 _ACEOF
8415 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8416   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8417   ac_status=$?
8418   egrep -v '^ *\+' conftest.er1 >conftest.err
8419   rm -f conftest.er1
8420   cat conftest.err >&5
8421   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8422   (exit $ac_status); } >/dev/null; then
8423   if test -s conftest.err; then
8424     ac_cpp_err=$ac_c_preproc_warn_flag
8425   else
8426     ac_cpp_err=
8427   fi
8428 else
8429   ac_cpp_err=yes
8430 fi
8431 if test -z "$ac_cpp_err"; then
8432   ac_header_preproc=yes
8433 else
8434   echo "$as_me: failed program was:" >&5
8435   cat conftest.$ac_ext >&5
8436   ac_header_preproc=no
8437 fi
8438 rm -f conftest.err conftest.$ac_ext
8439 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8440 echo "${ECHO_T}$ac_header_preproc" >&6
8441
8442 # So?  What about this header?
8443 case $ac_header_compiler:$ac_header_preproc in
8444   yes:no )
8445     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8446 echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8447     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8448 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8449   no:yes )
8450     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
8451 echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
8452     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5
8453 echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;}
8454     { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
8455 echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
8456 esac
8457 echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
8458 echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
8459 if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
8460   echo $ECHO_N "(cached) $ECHO_C" >&6
8461 else
8462   ac_cv_header_openssl_ssl_h=$ac_header_preproc
8463 fi
8464 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
8465 echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
8466
8467 fi
8468 if test $ac_cv_header_openssl_ssl_h = yes; then
8469   :
8470 else
8471   { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
8472 echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
8473    { (exit 1); exit 1; }; }
8474 fi
8475
8476
8477   if test "${ac_cv_header_openssl_err_h+set}" = set; then
8478   echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8479 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8480 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8481   echo $ECHO_N "(cached) $ECHO_C" >&6
8482 fi
8483 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8484 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8485 else
8486   # Is the header compilable?
8487 echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
8488 echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
8489 cat >conftest.$ac_ext <<_ACEOF
8490 #line $LINENO "configure"
8491 #include "confdefs.h"
8492 $ac_includes_default
8493 #include <openssl/err.h>
8494 _ACEOF
8495 rm -f conftest.$ac_objext
8496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8497   (eval $ac_compile) 2>&5
8498   ac_status=$?
8499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8500   (exit $ac_status); } &&
8501          { ac_try='test -s conftest.$ac_objext'
8502   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8503   (eval $ac_try) 2>&5
8504   ac_status=$?
8505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8506   (exit $ac_status); }; }; then
8507   ac_header_compiler=yes
8508 else
8509   echo "$as_me: failed program was:" >&5
8510 cat conftest.$ac_ext >&5
8511 ac_header_compiler=no
8512 fi
8513 rm -f conftest.$ac_objext conftest.$ac_ext
8514 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8515 echo "${ECHO_T}$ac_header_compiler" >&6
8516
8517 # Is the header present?
8518 echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
8519 echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
8520 cat >conftest.$ac_ext <<_ACEOF
8521 #line $LINENO "configure"
8522 #include "confdefs.h"
8523 #include <openssl/err.h>
8524 _ACEOF
8525 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8527   ac_status=$?
8528   egrep -v '^ *\+' conftest.er1 >conftest.err
8529   rm -f conftest.er1
8530   cat conftest.err >&5
8531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8532   (exit $ac_status); } >/dev/null; then
8533   if test -s conftest.err; then
8534     ac_cpp_err=$ac_c_preproc_warn_flag
8535   else
8536     ac_cpp_err=
8537   fi
8538 else
8539   ac_cpp_err=yes
8540 fi
8541 if test -z "$ac_cpp_err"; then
8542   ac_header_preproc=yes
8543 else
8544   echo "$as_me: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   ac_header_preproc=no
8547 fi
8548 rm -f conftest.err conftest.$ac_ext
8549 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8550 echo "${ECHO_T}$ac_header_preproc" >&6
8551
8552 # So?  What about this header?
8553 case $ac_header_compiler:$ac_header_preproc in
8554   yes:no )
8555     { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
8556 echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8557     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8558 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8559   no:yes )
8560     { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
8561 echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
8562     { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5
8563 echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;}
8564     { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
8565 echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
8566 esac
8567 echo "$as_me:$LINENO: checking for openssl/err.h" >&5
8568 echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
8569 if test "${ac_cv_header_openssl_err_h+set}" = set; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   ac_cv_header_openssl_err_h=$ac_header_preproc
8573 fi
8574 echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
8575 echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
8576
8577 fi
8578 if test $ac_cv_header_openssl_err_h = yes; then
8579   :
8580 else
8581   { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
8582 echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
8583    { (exit 1); exit 1; }; }
8584 fi
8585
8586
8587 fi
8588
8589 if test "$with_pam" = yes ; then
8590   if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
8591   echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
8592 echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
8593 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
8594   echo $ECHO_N "(cached) $ECHO_C" >&6
8595 fi
8596 echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
8597 echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
8598 else
8599   # Is the header compilable?
8600 echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
8601 echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6
8602 cat >conftest.$ac_ext <<_ACEOF
8603 #line $LINENO "configure"
8604 #include "confdefs.h"
8605 $ac_includes_default
8606 #include <security/pam_appl.h>
8607 _ACEOF
8608 rm -f conftest.$ac_objext
8609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8610   (eval $ac_compile) 2>&5
8611   ac_status=$?
8612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613   (exit $ac_status); } &&
8614          { ac_try='test -s conftest.$ac_objext'
8615   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   ac_header_compiler=yes
8621 else
8622   echo "$as_me: failed program was:" >&5
8623 cat conftest.$ac_ext >&5
8624 ac_header_compiler=no
8625 fi
8626 rm -f conftest.$ac_objext conftest.$ac_ext
8627 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8628 echo "${ECHO_T}$ac_header_compiler" >&6
8629
8630 # Is the header present?
8631 echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
8632 echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6
8633 cat >conftest.$ac_ext <<_ACEOF
8634 #line $LINENO "configure"
8635 #include "confdefs.h"
8636 #include <security/pam_appl.h>
8637 _ACEOF
8638 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8639   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8640   ac_status=$?
8641   egrep -v '^ *\+' conftest.er1 >conftest.err
8642   rm -f conftest.er1
8643   cat conftest.err >&5
8644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8645   (exit $ac_status); } >/dev/null; then
8646   if test -s conftest.err; then
8647     ac_cpp_err=$ac_c_preproc_warn_flag
8648   else
8649     ac_cpp_err=
8650   fi
8651 else
8652   ac_cpp_err=yes
8653 fi
8654 if test -z "$ac_cpp_err"; then
8655   ac_header_preproc=yes
8656 else
8657   echo "$as_me: failed program was:" >&5
8658   cat conftest.$ac_ext >&5
8659   ac_header_preproc=no
8660 fi
8661 rm -f conftest.err conftest.$ac_ext
8662 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8663 echo "${ECHO_T}$ac_header_preproc" >&6
8664
8665 # So?  What about this header?
8666 case $ac_header_compiler:$ac_header_preproc in
8667   yes:no )
8668     { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
8669 echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8670     { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
8671 echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
8672   no:yes )
8673     { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
8674 echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
8675     { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5
8676 echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;}
8677     { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
8678 echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
8679 esac
8680 echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
8681 echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
8682 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
8683   echo $ECHO_N "(cached) $ECHO_C" >&6
8684 else
8685   ac_cv_header_security_pam_appl_h=$ac_header_preproc
8686 fi
8687 echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
8688 echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
8689
8690 fi
8691 if test $ac_cv_header_security_pam_appl_h = yes; then
8692   :
8693 else
8694   { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> is required for PAM" >&5
8695 echo "$as_me: error: header file <security/pam_appl.h> is required for PAM" >&2;}
8696    { (exit 1); exit 1; }; }
8697 fi
8698
8699
8700 fi
8701
8702
8703 ##
8704 ## Types, structures, compiler characteristics
8705 ##
8706
8707 echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8708 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
8709 if test "${ac_cv_c_const+set}" = set; then
8710   echo $ECHO_N "(cached) $ECHO_C" >&6
8711 else
8712   cat >conftest.$ac_ext <<_ACEOF
8713 #line $LINENO "configure"
8714 #include "confdefs.h"
8715
8716 #ifdef F77_DUMMY_MAIN
8717 #  ifdef __cplusplus
8718      extern "C"
8719 #  endif
8720    int F77_DUMMY_MAIN() { return 1; }
8721 #endif
8722 int
8723 main ()
8724 {
8725 /* FIXME: Include the comments suggested by Paul. */
8726 #ifndef __cplusplus
8727   /* Ultrix mips cc rejects this.  */
8728   typedef int charset[2];
8729   const charset x;
8730   /* SunOS 4.1.1 cc rejects this.  */
8731   char const *const *ccp;
8732   char **p;
8733   /* NEC SVR4.0.2 mips cc rejects this.  */
8734   struct point {int x, y;};
8735   static struct point const zero = {0,0};
8736   /* AIX XL C 1.02.0.0 rejects this.
8737      It does not let you subtract one const X* pointer from another in
8738      an arm of an if-expression whose if-part is not a constant
8739      expression */
8740   const char *g = "string";
8741   ccp = &g + (g ? g-g : 0);
8742   /* HPUX 7.0 cc rejects these. */
8743   ++ccp;
8744   p = (char**) ccp;
8745   ccp = (char const *const *) p;
8746   { /* SCO 3.2v4 cc rejects this.  */
8747     char *t;
8748     char const *s = 0 ? (char *) 0 : (char const *) 0;
8749
8750     *t++ = 0;
8751   }
8752   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
8753     int x[] = {25, 17};
8754     const int *foo = &x[0];
8755     ++foo;
8756   }
8757   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8758     typedef const int *iptr;
8759     iptr p = 0;
8760     ++p;
8761   }
8762   { /* AIX XL C 1.02.0.0 rejects this saying
8763        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8764     struct s { int j; const int *ap[3]; };
8765     struct s *b; b->j = 5;
8766   }
8767   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8768     const int foo = 10;
8769   }
8770 #endif
8771
8772   ;
8773   return 0;
8774 }
8775 _ACEOF
8776 rm -f conftest.$ac_objext
8777 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8778   (eval $ac_compile) 2>&5
8779   ac_status=$?
8780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8781   (exit $ac_status); } &&
8782          { ac_try='test -s conftest.$ac_objext'
8783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8784   (eval $ac_try) 2>&5
8785   ac_status=$?
8786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8787   (exit $ac_status); }; }; then
8788   ac_cv_c_const=yes
8789 else
8790   echo "$as_me: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8792 ac_cv_c_const=no
8793 fi
8794 rm -f conftest.$ac_objext conftest.$ac_ext
8795 fi
8796 echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8797 echo "${ECHO_T}$ac_cv_c_const" >&6
8798 if test $ac_cv_c_const = no; then
8799
8800 cat >>confdefs.h <<\_ACEOF
8801 #define const
8802 _ACEOF
8803
8804 fi
8805
8806 echo "$as_me:$LINENO: checking for inline" >&5
8807 echo $ECHO_N "checking for inline... $ECHO_C" >&6
8808 if test "${ac_cv_c_inline+set}" = set; then
8809   echo $ECHO_N "(cached) $ECHO_C" >&6
8810 else
8811   ac_cv_c_inline=no
8812 for ac_kw in inline __inline__ __inline; do
8813   cat >conftest.$ac_ext <<_ACEOF
8814 #line $LINENO "configure"
8815 #include "confdefs.h"
8816 #ifndef __cplusplus
8817 static $ac_kw int static_foo () {return 0; }
8818 $ac_kw int foo () {return 0; }
8819 #endif
8820
8821 _ACEOF
8822 rm -f conftest.$ac_objext
8823 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8824   (eval $ac_compile) 2>&5
8825   ac_status=$?
8826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8827   (exit $ac_status); } &&
8828          { ac_try='test -s conftest.$ac_objext'
8829   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8830   (eval $ac_try) 2>&5
8831   ac_status=$?
8832   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8833   (exit $ac_status); }; }; then
8834   ac_cv_c_inline=$ac_kw; break
8835 else
8836   echo "$as_me: failed program was:" >&5
8837 cat conftest.$ac_ext >&5
8838 fi
8839 rm -f conftest.$ac_objext conftest.$ac_ext
8840 done
8841
8842 fi
8843 echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
8844 echo "${ECHO_T}$ac_cv_c_inline" >&6
8845 case $ac_cv_c_inline in
8846   inline | yes) ;;
8847   no)
8848 cat >>confdefs.h <<\_ACEOF
8849 #define inline
8850 _ACEOF
8851  ;;
8852   *)  cat >>confdefs.h <<_ACEOF
8853 #define inline $ac_cv_c_inline
8854 _ACEOF
8855  ;;
8856 esac
8857
8858 echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
8859 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
8860 if test "${ac_cv_c_stringize+set}" = set; then
8861   echo $ECHO_N "(cached) $ECHO_C" >&6
8862 else
8863   cat >conftest.$ac_ext <<_ACEOF
8864 #line $LINENO "configure"
8865 #include "confdefs.h"
8866 #define x(y) #y
8867
8868 char *s = x(teststring);
8869 _ACEOF
8870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8871   egrep "#teststring" >/dev/null 2>&1; then
8872   ac_cv_c_stringize=no
8873 else
8874   ac_cv_c_stringize=yes
8875 fi
8876 rm -f conftest*
8877
8878 fi
8879 echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
8880 echo "${ECHO_T}$ac_cv_c_stringize" >&6
8881 if test $ac_cv_c_stringize = yes; then
8882
8883 cat >>confdefs.h <<\_ACEOF
8884 #define HAVE_STRINGIZE 1
8885 _ACEOF
8886
8887 fi
8888
8889 echo "$as_me:$LINENO: checking for signed types" >&5
8890 echo $ECHO_N "checking for signed types... $ECHO_C" >&6
8891 if test "${pgac_cv_c_signed+set}" = set; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 else
8894   cat >conftest.$ac_ext <<_ACEOF
8895 #line $LINENO "configure"
8896 #include "confdefs.h"
8897
8898 #ifdef F77_DUMMY_MAIN
8899 #  ifdef __cplusplus
8900      extern "C"
8901 #  endif
8902    int F77_DUMMY_MAIN() { return 1; }
8903 #endif
8904 int
8905 main ()
8906 {
8907 signed char c; signed short s; signed int i;
8908   ;
8909   return 0;
8910 }
8911 _ACEOF
8912 rm -f conftest.$ac_objext
8913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8914   (eval $ac_compile) 2>&5
8915   ac_status=$?
8916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8917   (exit $ac_status); } &&
8918          { ac_try='test -s conftest.$ac_objext'
8919   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8920   (eval $ac_try) 2>&5
8921   ac_status=$?
8922   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8923   (exit $ac_status); }; }; then
8924   pgac_cv_c_signed=yes
8925 else
8926   echo "$as_me: failed program was:" >&5
8927 cat conftest.$ac_ext >&5
8928 pgac_cv_c_signed=no
8929 fi
8930 rm -f conftest.$ac_objext conftest.$ac_ext
8931 fi
8932 echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
8933 echo "${ECHO_T}$pgac_cv_c_signed" >&6
8934 if test x"$pgac_cv_c_signed" = xno ; then
8935
8936 cat >>confdefs.h <<\_ACEOF
8937 #define signed
8938 _ACEOF
8939
8940 fi
8941 echo "$as_me:$LINENO: checking for working volatile" >&5
8942 echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
8943 if test "${ac_cv_c_volatile+set}" = set; then
8944   echo $ECHO_N "(cached) $ECHO_C" >&6
8945 else
8946   cat >conftest.$ac_ext <<_ACEOF
8947 #line $LINENO "configure"
8948 #include "confdefs.h"
8949
8950 #ifdef F77_DUMMY_MAIN
8951 #  ifdef __cplusplus
8952      extern "C"
8953 #  endif
8954    int F77_DUMMY_MAIN() { return 1; }
8955 #endif
8956 int
8957 main ()
8958 {
8959
8960 volatile int x;
8961 int * volatile y;
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest.$ac_objext'
8973   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978   ac_cv_c_volatile=yes
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 ac_cv_c_volatile=no
8983 fi
8984 rm -f conftest.$ac_objext conftest.$ac_ext
8985 fi
8986 echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8987 echo "${ECHO_T}$ac_cv_c_volatile" >&6
8988 if test $ac_cv_c_volatile = no; then
8989
8990 cat >>confdefs.h <<\_ACEOF
8991 #define volatile
8992 _ACEOF
8993
8994 fi
8995
8996 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
8997 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
8998 if test "${ac_cv_struct_tm+set}" = set; then
8999   echo $ECHO_N "(cached) $ECHO_C" >&6
9000 else
9001   cat >conftest.$ac_ext <<_ACEOF
9002 #line $LINENO "configure"
9003 #include "confdefs.h"
9004 #include <sys/types.h>
9005 #include <time.h>
9006
9007 #ifdef F77_DUMMY_MAIN
9008 #  ifdef __cplusplus
9009      extern "C"
9010 #  endif
9011    int F77_DUMMY_MAIN() { return 1; }
9012 #endif
9013 int
9014 main ()
9015 {
9016 struct tm *tp; tp->tm_sec;
9017   ;
9018   return 0;
9019 }
9020 _ACEOF
9021 rm -f conftest.$ac_objext
9022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9023   (eval $ac_compile) 2>&5
9024   ac_status=$?
9025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026   (exit $ac_status); } &&
9027          { ac_try='test -s conftest.$ac_objext'
9028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9029   (eval $ac_try) 2>&5
9030   ac_status=$?
9031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9032   (exit $ac_status); }; }; then
9033   ac_cv_struct_tm=time.h
9034 else
9035   echo "$as_me: failed program was:" >&5
9036 cat conftest.$ac_ext >&5
9037 ac_cv_struct_tm=sys/time.h
9038 fi
9039 rm -f conftest.$ac_objext conftest.$ac_ext
9040 fi
9041 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
9042 echo "${ECHO_T}$ac_cv_struct_tm" >&6
9043 if test $ac_cv_struct_tm = sys/time.h; then
9044
9045 cat >>confdefs.h <<\_ACEOF
9046 #define TM_IN_SYS_TIME 1
9047 _ACEOF
9048
9049 fi
9050
9051 echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
9052 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
9053 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
9054   echo $ECHO_N "(cached) $ECHO_C" >&6
9055 else
9056   cat >conftest.$ac_ext <<_ACEOF
9057 #line $LINENO "configure"
9058 #include "confdefs.h"
9059 #include <sys/types.h>
9060 #include <$ac_cv_struct_tm>
9061
9062
9063 #ifdef F77_DUMMY_MAIN
9064 #  ifdef __cplusplus
9065      extern "C"
9066 #  endif
9067    int F77_DUMMY_MAIN() { return 1; }
9068 #endif
9069 int
9070 main ()
9071 {
9072 static struct tm ac_aggr;
9073 if (ac_aggr.tm_zone)
9074 return 0;
9075   ;
9076   return 0;
9077 }
9078 _ACEOF
9079 rm -f conftest.$ac_objext
9080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9081   (eval $ac_compile) 2>&5
9082   ac_status=$?
9083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9084   (exit $ac_status); } &&
9085          { ac_try='test -s conftest.$ac_objext'
9086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9087   (eval $ac_try) 2>&5
9088   ac_status=$?
9089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090   (exit $ac_status); }; }; then
9091   ac_cv_member_struct_tm_tm_zone=yes
9092 else
9093   echo "$as_me: failed program was:" >&5
9094 cat conftest.$ac_ext >&5
9095 ac_cv_member_struct_tm_tm_zone=no
9096 fi
9097 rm -f conftest.$ac_objext conftest.$ac_ext
9098 fi
9099 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
9100 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
9101 if test $ac_cv_member_struct_tm_tm_zone = yes; then
9102
9103 cat >>confdefs.h <<_ACEOF
9104 #define HAVE_STRUCT_TM_TM_ZONE 1
9105 _ACEOF
9106
9107
9108 fi
9109
9110 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
9111
9112 cat >>confdefs.h <<\_ACEOF
9113 #define HAVE_TM_ZONE 1
9114 _ACEOF
9115
9116 else
9117   echo "$as_me:$LINENO: checking for tzname" >&5
9118 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
9119 if test "${ac_cv_var_tzname+set}" = set; then
9120   echo $ECHO_N "(cached) $ECHO_C" >&6
9121 else
9122   cat >conftest.$ac_ext <<_ACEOF
9123 #line $LINENO "configure"
9124 #include "confdefs.h"
9125 #include <time.h>
9126 #ifndef tzname /* For SGI.  */
9127 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
9128 #endif
9129
9130 #ifdef F77_DUMMY_MAIN
9131 #  ifdef __cplusplus
9132      extern "C"
9133 #  endif
9134    int F77_DUMMY_MAIN() { return 1; }
9135 #endif
9136 int
9137 main ()
9138 {
9139 atoi(*tzname);
9140   ;
9141   return 0;
9142 }
9143 _ACEOF
9144 rm -f conftest.$ac_objext conftest$ac_exeext
9145 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9146   (eval $ac_link) 2>&5
9147   ac_status=$?
9148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9149   (exit $ac_status); } &&
9150          { ac_try='test -s conftest$ac_exeext'
9151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9152   (eval $ac_try) 2>&5
9153   ac_status=$?
9154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9155   (exit $ac_status); }; }; then
9156   ac_cv_var_tzname=yes
9157 else
9158   echo "$as_me: failed program was:" >&5
9159 cat conftest.$ac_ext >&5
9160 ac_cv_var_tzname=no
9161 fi
9162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9163 fi
9164 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
9165 echo "${ECHO_T}$ac_cv_var_tzname" >&6
9166   if test $ac_cv_var_tzname = yes; then
9167
9168 cat >>confdefs.h <<\_ACEOF
9169 #define HAVE_TZNAME 1
9170 _ACEOF
9171
9172   fi
9173 fi
9174
9175 echo "$as_me:$LINENO: checking for union semun" >&5
9176 echo $ECHO_N "checking for union semun... $ECHO_C" >&6
9177 if test "${ac_cv_type_union_semun+set}" = set; then
9178   echo $ECHO_N "(cached) $ECHO_C" >&6
9179 else
9180   cat >conftest.$ac_ext <<_ACEOF
9181 #line $LINENO "configure"
9182 #include "confdefs.h"
9183 #include <sys/types.h>
9184 #include <sys/ipc.h>
9185 #include <sys/sem.h>
9186
9187 #ifdef F77_DUMMY_MAIN
9188 #  ifdef __cplusplus
9189      extern "C"
9190 #  endif
9191    int F77_DUMMY_MAIN() { return 1; }
9192 #endif
9193 int
9194 main ()
9195 {
9196 if ((union semun *) 0)
9197   return 0;
9198 if (sizeof (union semun))
9199   return 0;
9200   ;
9201   return 0;
9202 }
9203 _ACEOF
9204 rm -f conftest.$ac_objext
9205 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9206   (eval $ac_compile) 2>&5
9207   ac_status=$?
9208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9209   (exit $ac_status); } &&
9210          { ac_try='test -s conftest.$ac_objext'
9211   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9212   (eval $ac_try) 2>&5
9213   ac_status=$?
9214   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9215   (exit $ac_status); }; }; then
9216   ac_cv_type_union_semun=yes
9217 else
9218   echo "$as_me: failed program was:" >&5
9219 cat conftest.$ac_ext >&5
9220 ac_cv_type_union_semun=no
9221 fi
9222 rm -f conftest.$ac_objext conftest.$ac_ext
9223 fi
9224 echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
9225 echo "${ECHO_T}$ac_cv_type_union_semun" >&6
9226 if test $ac_cv_type_union_semun = yes; then
9227
9228 cat >>confdefs.h <<_ACEOF
9229 #define HAVE_UNION_SEMUN 1
9230 _ACEOF
9231
9232
9233 fi
9234
9235 echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
9236 echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
9237 if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
9238   echo $ECHO_N "(cached) $ECHO_C" >&6
9239 else
9240   cat >conftest.$ac_ext <<_ACEOF
9241 #line $LINENO "configure"
9242 #include "confdefs.h"
9243 #include <sys/types.h>
9244 #ifdef HAVE_SYS_UN_H
9245 #include <sys/un.h>
9246 #endif
9247
9248
9249 #ifdef F77_DUMMY_MAIN
9250 #  ifdef __cplusplus
9251      extern "C"
9252 #  endif
9253    int F77_DUMMY_MAIN() { return 1; }
9254 #endif
9255 int
9256 main ()
9257 {
9258 if ((struct sockaddr_un *) 0)
9259   return 0;
9260 if (sizeof (struct sockaddr_un))
9261   return 0;
9262   ;
9263   return 0;
9264 }
9265 _ACEOF
9266 rm -f conftest.$ac_objext
9267 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9268   (eval $ac_compile) 2>&5
9269   ac_status=$?
9270   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271   (exit $ac_status); } &&
9272          { ac_try='test -s conftest.$ac_objext'
9273   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9274   (eval $ac_try) 2>&5
9275   ac_status=$?
9276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9277   (exit $ac_status); }; }; then
9278   ac_cv_type_struct_sockaddr_un=yes
9279 else
9280   echo "$as_me: failed program was:" >&5
9281 cat conftest.$ac_ext >&5
9282 ac_cv_type_struct_sockaddr_un=no
9283 fi
9284 rm -f conftest.$ac_objext conftest.$ac_ext
9285 fi
9286 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
9287 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
9288 if test $ac_cv_type_struct_sockaddr_un = yes; then
9289
9290 cat >>confdefs.h <<_ACEOF
9291 #define HAVE_STRUCT_SOCKADDR_UN 1
9292 _ACEOF
9293
9294
9295 fi
9296
9297
9298 echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
9299 echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
9300 if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
9301   echo $ECHO_N "(cached) $ECHO_C" >&6
9302 else
9303   cat >conftest.$ac_ext <<_ACEOF
9304 #line $LINENO "configure"
9305 #include "confdefs.h"
9306 #include <sys/param.h>
9307 #include <sys/socket.h>
9308 #include <sys/ucred.h>
9309
9310 #ifdef F77_DUMMY_MAIN
9311 #  ifdef __cplusplus
9312      extern "C"
9313 #  endif
9314    int F77_DUMMY_MAIN() { return 1; }
9315 #endif
9316 int
9317 main ()
9318 {
9319 if ((struct cmsgcred *) 0)
9320   return 0;
9321 if (sizeof (struct cmsgcred))
9322   return 0;
9323   ;
9324   return 0;
9325 }
9326 _ACEOF
9327 rm -f conftest.$ac_objext
9328 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9329   (eval $ac_compile) 2>&5
9330   ac_status=$?
9331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9332   (exit $ac_status); } &&
9333          { ac_try='test -s conftest.$ac_objext'
9334   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9335   (eval $ac_try) 2>&5
9336   ac_status=$?
9337   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9338   (exit $ac_status); }; }; then
9339   ac_cv_type_struct_cmsgcred=yes
9340 else
9341   echo "$as_me: failed program was:" >&5
9342 cat conftest.$ac_ext >&5
9343 ac_cv_type_struct_cmsgcred=no
9344 fi
9345 rm -f conftest.$ac_objext conftest.$ac_ext
9346 fi
9347 echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
9348 echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
9349 if test $ac_cv_type_struct_cmsgcred = yes; then
9350
9351 cat >>confdefs.h <<_ACEOF
9352 #define HAVE_STRUCT_CMSGCRED 1
9353 _ACEOF
9354
9355
9356 fi
9357 echo "$as_me:$LINENO: checking for struct fcred" >&5
9358 echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
9359 if test "${ac_cv_type_struct_fcred+set}" = set; then
9360   echo $ECHO_N "(cached) $ECHO_C" >&6
9361 else
9362   cat >conftest.$ac_ext <<_ACEOF
9363 #line $LINENO "configure"
9364 #include "confdefs.h"
9365 #include <sys/param.h>
9366 #include <sys/socket.h>
9367 #include <sys/ucred.h>
9368
9369 #ifdef F77_DUMMY_MAIN
9370 #  ifdef __cplusplus
9371      extern "C"
9372 #  endif
9373    int F77_DUMMY_MAIN() { return 1; }
9374 #endif
9375 int
9376 main ()
9377 {
9378 if ((struct fcred *) 0)
9379   return 0;
9380 if (sizeof (struct fcred))
9381   return 0;
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_type_struct_fcred=yes
9399 else
9400   echo "$as_me: failed program was:" >&5
9401 cat conftest.$ac_ext >&5
9402 ac_cv_type_struct_fcred=no
9403 fi
9404 rm -f conftest.$ac_objext conftest.$ac_ext
9405 fi
9406 echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
9407 echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
9408 if test $ac_cv_type_struct_fcred = yes; then
9409
9410 cat >>confdefs.h <<_ACEOF
9411 #define HAVE_STRUCT_FCRED 1
9412 _ACEOF
9413
9414
9415 fi
9416 echo "$as_me:$LINENO: checking for struct sockcred" >&5
9417 echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
9418 if test "${ac_cv_type_struct_sockcred+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 <sys/param.h>
9425 #include <sys/socket.h>
9426 #include <sys/ucred.h>
9427
9428 #ifdef F77_DUMMY_MAIN
9429 #  ifdef __cplusplus
9430      extern "C"
9431 #  endif
9432    int F77_DUMMY_MAIN() { return 1; }
9433 #endif
9434 int
9435 main ()
9436 {
9437 if ((struct sockcred *) 0)
9438   return 0;
9439 if (sizeof (struct sockcred))
9440   return 0;
9441   ;
9442   return 0;
9443 }
9444 _ACEOF
9445 rm -f conftest.$ac_objext
9446 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9447   (eval $ac_compile) 2>&5
9448   ac_status=$?
9449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9450   (exit $ac_status); } &&
9451          { ac_try='test -s conftest.$ac_objext'
9452   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9453   (eval $ac_try) 2>&5
9454   ac_status=$?
9455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9456   (exit $ac_status); }; }; then
9457   ac_cv_type_struct_sockcred=yes
9458 else
9459   echo "$as_me: failed program was:" >&5
9460 cat conftest.$ac_ext >&5
9461 ac_cv_type_struct_sockcred=no
9462 fi
9463 rm -f conftest.$ac_objext conftest.$ac_ext
9464 fi
9465 echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
9466 echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
9467 if test $ac_cv_type_struct_sockcred = yes; then
9468
9469 cat >>confdefs.h <<_ACEOF
9470 #define HAVE_STRUCT_SOCKCRED 1
9471 _ACEOF
9472
9473
9474 fi
9475
9476
9477 if test "$with_krb5" = yes; then
9478 # Check for differences between MIT and Heimdal (KTH) releases
9479   echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
9480 echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
9481 if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
9482   echo $ECHO_N "(cached) $ECHO_C" >&6
9483 else
9484   cat >conftest.$ac_ext <<_ACEOF
9485 #line $LINENO "configure"
9486 #include "confdefs.h"
9487 #include <krb5.h>
9488
9489 #ifdef F77_DUMMY_MAIN
9490 #  ifdef __cplusplus
9491      extern "C"
9492 #  endif
9493    int F77_DUMMY_MAIN() { return 1; }
9494 #endif
9495 int
9496 main ()
9497 {
9498 static krb5_ticket ac_aggr;
9499 if (ac_aggr.enc_part2)
9500 return 0;
9501   ;
9502   return 0;
9503 }
9504 _ACEOF
9505 rm -f conftest.$ac_objext
9506 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9507   (eval $ac_compile) 2>&5
9508   ac_status=$?
9509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510   (exit $ac_status); } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   ac_cv_member_krb5_ticket_enc_part2=yes
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat conftest.$ac_ext >&5
9521 ac_cv_member_krb5_ticket_enc_part2=no
9522 fi
9523 rm -f conftest.$ac_objext conftest.$ac_ext
9524 fi
9525 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
9526 echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
9527 if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
9528
9529 cat >>confdefs.h <<_ACEOF
9530 #define HAVE_KRB5_TICKET_ENC_PART2 1
9531 _ACEOF
9532
9533
9534 else
9535   echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
9536 echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
9537 if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
9538   echo $ECHO_N "(cached) $ECHO_C" >&6
9539 else
9540   cat >conftest.$ac_ext <<_ACEOF
9541 #line $LINENO "configure"
9542 #include "confdefs.h"
9543 #include <krb5.h>
9544
9545 #ifdef F77_DUMMY_MAIN
9546 #  ifdef __cplusplus
9547      extern "C"
9548 #  endif
9549    int F77_DUMMY_MAIN() { return 1; }
9550 #endif
9551 int
9552 main ()
9553 {
9554 static krb5_ticket ac_aggr;
9555 if (ac_aggr.client)
9556 return 0;
9557   ;
9558   return 0;
9559 }
9560 _ACEOF
9561 rm -f conftest.$ac_objext
9562 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9563   (eval $ac_compile) 2>&5
9564   ac_status=$?
9565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9566   (exit $ac_status); } &&
9567          { ac_try='test -s conftest.$ac_objext'
9568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569   (eval $ac_try) 2>&5
9570   ac_status=$?
9571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572   (exit $ac_status); }; }; then
9573   ac_cv_member_krb5_ticket_client=yes
9574 else
9575   echo "$as_me: failed program was:" >&5
9576 cat conftest.$ac_ext >&5
9577 ac_cv_member_krb5_ticket_client=no
9578 fi
9579 rm -f conftest.$ac_objext conftest.$ac_ext
9580 fi
9581 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
9582 echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
9583 if test $ac_cv_member_krb5_ticket_client = yes; then
9584
9585 cat >>confdefs.h <<_ACEOF
9586 #define HAVE_KRB5_TICKET_CLIENT 1
9587 _ACEOF
9588
9589
9590 else
9591   { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
9592 echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
9593    { (exit 1); exit 1; }; }
9594 fi
9595
9596 fi
9597
9598   echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
9599 echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
9600 if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
9601   echo $ECHO_N "(cached) $ECHO_C" >&6
9602 else
9603   cat >conftest.$ac_ext <<_ACEOF
9604 #line $LINENO "configure"
9605 #include "confdefs.h"
9606 #include <krb5.h>
9607
9608 #ifdef F77_DUMMY_MAIN
9609 #  ifdef __cplusplus
9610      extern "C"
9611 #  endif
9612    int F77_DUMMY_MAIN() { return 1; }
9613 #endif
9614 int
9615 main ()
9616 {
9617 static krb5_error ac_aggr;
9618 if (ac_aggr.text.data)
9619 return 0;
9620   ;
9621   return 0;
9622 }
9623 _ACEOF
9624 rm -f conftest.$ac_objext
9625 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9626   (eval $ac_compile) 2>&5
9627   ac_status=$?
9628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9629   (exit $ac_status); } &&
9630          { ac_try='test -s conftest.$ac_objext'
9631   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9632   (eval $ac_try) 2>&5
9633   ac_status=$?
9634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9635   (exit $ac_status); }; }; then
9636   ac_cv_member_krb5_error_text_data=yes
9637 else
9638   echo "$as_me: failed program was:" >&5
9639 cat conftest.$ac_ext >&5
9640 ac_cv_member_krb5_error_text_data=no
9641 fi
9642 rm -f conftest.$ac_objext conftest.$ac_ext
9643 fi
9644 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
9645 echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
9646 if test $ac_cv_member_krb5_error_text_data = yes; then
9647
9648 cat >>confdefs.h <<_ACEOF
9649 #define HAVE_KRB5_ERROR_TEXT_DATA 1
9650 _ACEOF
9651
9652
9653 else
9654   echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
9655 echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
9656 if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
9657   echo $ECHO_N "(cached) $ECHO_C" >&6
9658 else
9659   cat >conftest.$ac_ext <<_ACEOF
9660 #line $LINENO "configure"
9661 #include "confdefs.h"
9662 #include <krb5.h>
9663
9664 #ifdef F77_DUMMY_MAIN
9665 #  ifdef __cplusplus
9666      extern "C"
9667 #  endif
9668    int F77_DUMMY_MAIN() { return 1; }
9669 #endif
9670 int
9671 main ()
9672 {
9673 static krb5_error ac_aggr;
9674 if (ac_aggr.e_data)
9675 return 0;
9676   ;
9677   return 0;
9678 }
9679 _ACEOF
9680 rm -f conftest.$ac_objext
9681 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9682   (eval $ac_compile) 2>&5
9683   ac_status=$?
9684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685   (exit $ac_status); } &&
9686          { ac_try='test -s conftest.$ac_objext'
9687   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9688   (eval $ac_try) 2>&5
9689   ac_status=$?
9690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691   (exit $ac_status); }; }; then
9692   ac_cv_member_krb5_error_e_data=yes
9693 else
9694   echo "$as_me: failed program was:" >&5
9695 cat conftest.$ac_ext >&5
9696 ac_cv_member_krb5_error_e_data=no
9697 fi
9698 rm -f conftest.$ac_objext conftest.$ac_ext
9699 fi
9700 echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
9701 echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
9702 if test $ac_cv_member_krb5_error_e_data = yes; then
9703   :
9704 else
9705   { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
9706 echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
9707    { (exit 1); exit 1; }; }
9708 fi
9709
9710 fi
9711
9712 fi
9713
9714
9715 ##
9716 ## Functions, global variables
9717 ##
9718 echo "$as_me:$LINENO: checking for int timezone" >&5
9719 echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
9720 if test "${pgac_cv_var_int_timezone+set}" = set; then
9721   echo $ECHO_N "(cached) $ECHO_C" >&6
9722 else
9723   cat >conftest.$ac_ext <<_ACEOF
9724 #line $LINENO "configure"
9725 #include "confdefs.h"
9726 #include <time.h>
9727 int res;
9728 #ifdef F77_DUMMY_MAIN
9729 #  ifdef __cplusplus
9730      extern "C"
9731 #  endif
9732    int F77_DUMMY_MAIN() { return 1; }
9733 #endif
9734 int
9735 main ()
9736 {
9737 res = timezone / 60;
9738   ;
9739   return 0;
9740 }
9741 _ACEOF
9742 rm -f conftest.$ac_objext conftest$ac_exeext
9743 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9744   (eval $ac_link) 2>&5
9745   ac_status=$?
9746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9747   (exit $ac_status); } &&
9748          { ac_try='test -s conftest$ac_exeext'
9749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9750   (eval $ac_try) 2>&5
9751   ac_status=$?
9752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9753   (exit $ac_status); }; }; then
9754   pgac_cv_var_int_timezone=yes
9755 else
9756   echo "$as_me: failed program was:" >&5
9757 cat conftest.$ac_ext >&5
9758 pgac_cv_var_int_timezone=no
9759 fi
9760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9761 fi
9762 echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
9763 echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
9764 if test x"$pgac_cv_var_int_timezone" = xyes ; then
9765
9766 cat >>confdefs.h <<\_ACEOF
9767 #define HAVE_INT_TIMEZONE
9768 _ACEOF
9769
9770 fi
9771 echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
9772 echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
9773  if test "${ac_cv_func_accept_arg1+set}" = set; then
9774   echo $ECHO_N "(cached) $ECHO_C" >&6
9775 else
9776    if test "${ac_cv_func_accept_arg2+set}" = set; then
9777   echo $ECHO_N "(cached) $ECHO_C" >&6
9778 else
9779     if test "${ac_cv_func_accept_arg3+set}" = set; then
9780   echo $ECHO_N "(cached) $ECHO_C" >&6
9781 else
9782      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
9783      for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
9784       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
9785        cat >conftest.$ac_ext <<_ACEOF
9786 #line $LINENO "configure"
9787 #include "confdefs.h"
9788 #ifdef HAVE_SYS_TYPES_H
9789 #include <sys/types.h>
9790 #endif
9791 #ifdef HAVE_SYS_SOCKET_H
9792 #include <sys/socket.h>
9793 #endif
9794 extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
9795 #ifdef F77_DUMMY_MAIN
9796 #  ifdef __cplusplus
9797      extern "C"
9798 #  endif
9799    int F77_DUMMY_MAIN() { return 1; }
9800 #endif
9801 int
9802 main ()
9803 {
9804
9805   ;
9806   return 0;
9807 }
9808 _ACEOF
9809 rm -f conftest.$ac_objext
9810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9811   (eval $ac_compile) 2>&5
9812   ac_status=$?
9813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9814   (exit $ac_status); } &&
9815          { ac_try='test -s conftest.$ac_objext'
9816   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9817   (eval $ac_try) 2>&5
9818   ac_status=$?
9819   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9820   (exit $ac_status); }; }; then
9821   ac_not_found=no; break 3
9822 else
9823   echo "$as_me: failed program was:" >&5
9824 cat conftest.$ac_ext >&5
9825 ac_not_found=yes
9826 fi
9827 rm -f conftest.$ac_objext conftest.$ac_ext
9828       done
9829      done
9830     done
9831     if test "$ac_not_found" = yes; then
9832       { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
9833 echo "$as_me: error: could not determine argument types" >&2;}
9834    { (exit 1); exit 1; }; }
9835     fi
9836     if test "$ac_cv_func_accept_arg3" = "void"; then
9837       ac_cv_func_accept_arg3=int
9838     fi
9839
9840 fi
9841
9842 fi
9843
9844 fi
9845  echo "$as_me:$LINENO: result: $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
9846 echo "${ECHO_T}$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
9847
9848 cat >>confdefs.h <<_ACEOF
9849 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
9850 _ACEOF
9851
9852
9853 cat >>confdefs.h <<_ACEOF
9854 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
9855 _ACEOF
9856
9857
9858 cat >>confdefs.h <<_ACEOF
9859 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
9860 _ACEOF
9861
9862
9863 echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
9864 echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
9865 if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
9866   echo $ECHO_N "(cached) $ECHO_C" >&6
9867 else
9868   cat >conftest.$ac_ext <<_ACEOF
9869 #line $LINENO "configure"
9870 #include "confdefs.h"
9871 #include <sys/time.h>
9872 #ifdef F77_DUMMY_MAIN
9873 #  ifdef __cplusplus
9874      extern "C"
9875 #  endif
9876    int F77_DUMMY_MAIN() { return 1; }
9877 #endif
9878 int
9879 main ()
9880 {
9881 struct timeval *tp;
9882 struct timezone *tzp;
9883 gettimeofday(tp,tzp);
9884   ;
9885   return 0;
9886 }
9887 _ACEOF
9888 rm -f conftest.$ac_objext
9889 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9890   (eval $ac_compile) 2>&5
9891   ac_status=$?
9892   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9893   (exit $ac_status); } &&
9894          { ac_try='test -s conftest.$ac_objext'
9895   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9896   (eval $ac_try) 2>&5
9897   ac_status=$?
9898   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9899   (exit $ac_status); }; }; then
9900   pgac_cv_func_gettimeofday_1arg=no
9901 else
9902   echo "$as_me: failed program was:" >&5
9903 cat conftest.$ac_ext >&5
9904 pgac_cv_func_gettimeofday_1arg=yes
9905 fi
9906 rm -f conftest.$ac_objext conftest.$ac_ext
9907 fi
9908 echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
9909 echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
9910 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
9911
9912 cat >>confdefs.h <<\_ACEOF
9913 #define GETTIMEOFDAY_1ARG
9914 _ACEOF
9915
9916 fi
9917
9918 # SunOS doesn't handle negative byte comparisons properly with +/- return
9919 echo "$as_me:$LINENO: checking for 8-bit clean memcmp" >&5
9920 echo $ECHO_N "checking for 8-bit clean memcmp... $ECHO_C" >&6
9921 if test "${pgac_cv_func_memcmp_clean+set}" = set; then
9922   echo $ECHO_N "(cached) $ECHO_C" >&6
9923 else
9924   if test "$cross_compiling" = yes; then
9925   pgac_cv_func_memcmp_clean=no
9926 else
9927   cat >conftest.$ac_ext <<_ACEOF
9928 #line $LINENO "configure"
9929 #include "confdefs.h"
9930
9931 main()
9932 {
9933   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
9934   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
9935 }
9936
9937 _ACEOF
9938 rm -f conftest$ac_exeext
9939 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9940   (eval $ac_link) 2>&5
9941   ac_status=$?
9942   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9944   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9948   (exit $ac_status); }; }; then
9949   pgac_cv_func_memcmp_clean=yes
9950 else
9951   echo "$as_me: program exited with status $ac_status" >&5
9952 echo "$as_me: failed program was:" >&5
9953 cat conftest.$ac_ext >&5
9954 ( exit $ac_status )
9955 pgac_cv_func_memcmp_clean=no
9956 fi
9957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9958 fi
9959 fi
9960 echo "$as_me:$LINENO: result: $pgac_cv_func_memcmp_clean" >&5
9961 echo "${ECHO_T}$pgac_cv_func_memcmp_clean" >&6
9962 if test $pgac_cv_func_memcmp_clean = no ; then
9963   MEMCMP=memcmp.o
9964 else
9965   MEMCMP=
9966 fi
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981 for ac_func in cbrt fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
9982 do
9983 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9984 echo "$as_me:$LINENO: checking for $ac_func" >&5
9985 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9986 if eval "test \"\${$as_ac_var+set}\" = set"; then
9987   echo $ECHO_N "(cached) $ECHO_C" >&6
9988 else
9989   cat >conftest.$ac_ext <<_ACEOF
9990 #line $LINENO "configure"
9991 #include "confdefs.h"
9992 /* System header to define __stub macros and hopefully few prototypes,
9993     which can conflict with char $ac_func (); below.  */
9994 #include <assert.h>
9995 /* Override any gcc2 internal prototype to avoid an error.  */
9996 #ifdef __cplusplus
9997 extern "C"
9998 #endif
9999 /* We use char because int might match the return type of a gcc2
10000    builtin and then its argument prototype would still apply.  */
10001 char $ac_func ();
10002 char (*f) ();
10003
10004 #ifdef F77_DUMMY_MAIN
10005 #  ifdef __cplusplus
10006      extern "C"
10007 #  endif
10008    int F77_DUMMY_MAIN() { return 1; }
10009 #endif
10010 int
10011 main ()
10012 {
10013 /* The GNU C library defines this for functions which it implements
10014     to always fail with ENOSYS.  Some functions are actually named
10015     something starting with __ and the normal name is an alias.  */
10016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10017 choke me
10018 #else
10019 f = $ac_func;
10020 #endif
10021
10022   ;
10023   return 0;
10024 }
10025 _ACEOF
10026 rm -f conftest.$ac_objext conftest$ac_exeext
10027 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10028   (eval $ac_link) 2>&5
10029   ac_status=$?
10030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10031   (exit $ac_status); } &&
10032          { ac_try='test -s conftest$ac_exeext'
10033   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10034   (eval $ac_try) 2>&5
10035   ac_status=$?
10036   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10037   (exit $ac_status); }; }; then
10038   eval "$as_ac_var=yes"
10039 else
10040   echo "$as_me: failed program was:" >&5
10041 cat conftest.$ac_ext >&5
10042 eval "$as_ac_var=no"
10043 fi
10044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10045 fi
10046 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10047 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10048 if test `eval echo '${'$as_ac_var'}'` = yes; then
10049   cat >>confdefs.h <<_ACEOF
10050 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10051 _ACEOF
10052
10053 fi
10054 done
10055
10056
10057 echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
10058 echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
10059 if test "${ac_cv_have_decl_fdatasync+set}" = set; then
10060   echo $ECHO_N "(cached) $ECHO_C" >&6
10061 else
10062   cat >conftest.$ac_ext <<_ACEOF
10063 #line $LINENO "configure"
10064 #include "confdefs.h"
10065 #include <unistd.h>
10066
10067 #ifdef F77_DUMMY_MAIN
10068 #  ifdef __cplusplus
10069      extern "C"
10070 #  endif
10071    int F77_DUMMY_MAIN() { return 1; }
10072 #endif
10073 int
10074 main ()
10075 {
10076 #ifndef fdatasync
10077   char *p = (char *) fdatasync;
10078 #endif
10079
10080   ;
10081   return 0;
10082 }
10083 _ACEOF
10084 rm -f conftest.$ac_objext
10085 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10086   (eval $ac_compile) 2>&5
10087   ac_status=$?
10088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089   (exit $ac_status); } &&
10090          { ac_try='test -s conftest.$ac_objext'
10091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10092   (eval $ac_try) 2>&5
10093   ac_status=$?
10094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10095   (exit $ac_status); }; }; then
10096   ac_cv_have_decl_fdatasync=yes
10097 else
10098   echo "$as_me: failed program was:" >&5
10099 cat conftest.$ac_ext >&5
10100 ac_cv_have_decl_fdatasync=no
10101 fi
10102 rm -f conftest.$ac_objext conftest.$ac_ext
10103 fi
10104 echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
10105 echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
10106 if test $ac_cv_have_decl_fdatasync = yes; then
10107
10108 cat >>confdefs.h <<_ACEOF
10109 #define HAVE_DECL_FDATASYNC 1
10110 _ACEOF
10111
10112
10113 else
10114   cat >>confdefs.h <<_ACEOF
10115 #define HAVE_DECL_FDATASYNC 0
10116 _ACEOF
10117
10118
10119 fi
10120
10121
10122
10123 echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
10124 echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
10125 if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
10126   echo $ECHO_N "(cached) $ECHO_C" >&6
10127 else
10128   cat >conftest.$ac_ext <<_ACEOF
10129 #line $LINENO "configure"
10130 #include "confdefs.h"
10131 #include <machine/vmparam.h>
10132 #include <sys/exec.h>
10133
10134 #ifdef F77_DUMMY_MAIN
10135 #  ifdef __cplusplus
10136      extern "C"
10137 #  endif
10138    int F77_DUMMY_MAIN() { return 1; }
10139 #endif
10140 int
10141 main ()
10142 {
10143 PS_STRINGS->ps_nargvstr = 1;
10144 PS_STRINGS->ps_argvstr = "foo";
10145   ;
10146   return 0;
10147 }
10148 _ACEOF
10149 rm -f conftest.$ac_objext conftest$ac_exeext
10150 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10151   (eval $ac_link) 2>&5
10152   ac_status=$?
10153   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154   (exit $ac_status); } &&
10155          { ac_try='test -s conftest$ac_exeext'
10156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157   (eval $ac_try) 2>&5
10158   ac_status=$?
10159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160   (exit $ac_status); }; }; then
10161   pgac_cv_var_PS_STRINGS=yes
10162 else
10163   echo "$as_me: failed program was:" >&5
10164 cat conftest.$ac_ext >&5
10165 pgac_cv_var_PS_STRINGS=no
10166 fi
10167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10168 fi
10169 echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
10170 echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
10171 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
10172
10173 cat >>confdefs.h <<\_ACEOF
10174 #define HAVE_PS_STRINGS
10175 _ACEOF
10176
10177 fi
10178
10179
10180 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
10181 # is missing.  Yes, there are machines that have only one.  We may
10182 # also decide to use snprintf.c if snprintf() is present but does not
10183 # have working "long long int" support -- see below.
10184
10185 SNPRINTF=''
10186
10187 for ac_func in snprintf
10188 do
10189 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10190 echo "$as_me:$LINENO: checking for $ac_func" >&5
10191 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10192 if eval "test \"\${$as_ac_var+set}\" = set"; then
10193   echo $ECHO_N "(cached) $ECHO_C" >&6
10194 else
10195   cat >conftest.$ac_ext <<_ACEOF
10196 #line $LINENO "configure"
10197 #include "confdefs.h"
10198 /* System header to define __stub macros and hopefully few prototypes,
10199     which can conflict with char $ac_func (); below.  */
10200 #include <assert.h>
10201 /* Override any gcc2 internal prototype to avoid an error.  */
10202 #ifdef __cplusplus
10203 extern "C"
10204 #endif
10205 /* We use char because int might match the return type of a gcc2
10206    builtin and then its argument prototype would still apply.  */
10207 char $ac_func ();
10208 char (*f) ();
10209
10210 #ifdef F77_DUMMY_MAIN
10211 #  ifdef __cplusplus
10212      extern "C"
10213 #  endif
10214    int F77_DUMMY_MAIN() { return 1; }
10215 #endif
10216 int
10217 main ()
10218 {
10219 /* The GNU C library defines this for functions which it implements
10220     to always fail with ENOSYS.  Some functions are actually named
10221     something starting with __ and the normal name is an alias.  */
10222 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10223 choke me
10224 #else
10225 f = $ac_func;
10226 #endif
10227
10228   ;
10229   return 0;
10230 }
10231 _ACEOF
10232 rm -f conftest.$ac_objext conftest$ac_exeext
10233 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10234   (eval $ac_link) 2>&5
10235   ac_status=$?
10236   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10237   (exit $ac_status); } &&
10238          { ac_try='test -s conftest$ac_exeext'
10239   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10240   (eval $ac_try) 2>&5
10241   ac_status=$?
10242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243   (exit $ac_status); }; }; then
10244   eval "$as_ac_var=yes"
10245 else
10246   echo "$as_me: failed program was:" >&5
10247 cat conftest.$ac_ext >&5
10248 eval "$as_ac_var=no"
10249 fi
10250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10251 fi
10252 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10253 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10254 if test `eval echo '${'$as_ac_var'}'` = yes; then
10255   cat >>confdefs.h <<_ACEOF
10256 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10257 _ACEOF
10258
10259 else
10260   SNPRINTF='snprintf.o'
10261 fi
10262 done
10263
10264
10265 for ac_func in vsnprintf
10266 do
10267 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10268 echo "$as_me:$LINENO: checking for $ac_func" >&5
10269 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10270 if eval "test \"\${$as_ac_var+set}\" = set"; then
10271   echo $ECHO_N "(cached) $ECHO_C" >&6
10272 else
10273   cat >conftest.$ac_ext <<_ACEOF
10274 #line $LINENO "configure"
10275 #include "confdefs.h"
10276 /* System header to define __stub macros and hopefully few prototypes,
10277     which can conflict with char $ac_func (); below.  */
10278 #include <assert.h>
10279 /* Override any gcc2 internal prototype to avoid an error.  */
10280 #ifdef __cplusplus
10281 extern "C"
10282 #endif
10283 /* We use char because int might match the return type of a gcc2
10284    builtin and then its argument prototype would still apply.  */
10285 char $ac_func ();
10286 char (*f) ();
10287
10288 #ifdef F77_DUMMY_MAIN
10289 #  ifdef __cplusplus
10290      extern "C"
10291 #  endif
10292    int F77_DUMMY_MAIN() { return 1; }
10293 #endif
10294 int
10295 main ()
10296 {
10297 /* The GNU C library defines this for functions which it implements
10298     to always fail with ENOSYS.  Some functions are actually named
10299     something starting with __ and the normal name is an alias.  */
10300 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10301 choke me
10302 #else
10303 f = $ac_func;
10304 #endif
10305
10306   ;
10307   return 0;
10308 }
10309 _ACEOF
10310 rm -f conftest.$ac_objext conftest$ac_exeext
10311 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10312   (eval $ac_link) 2>&5
10313   ac_status=$?
10314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10315   (exit $ac_status); } &&
10316          { ac_try='test -s conftest$ac_exeext'
10317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10318   (eval $ac_try) 2>&5
10319   ac_status=$?
10320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10321   (exit $ac_status); }; }; then
10322   eval "$as_ac_var=yes"
10323 else
10324   echo "$as_me: failed program was:" >&5
10325 cat conftest.$ac_ext >&5
10326 eval "$as_ac_var=no"
10327 fi
10328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10329 fi
10330 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10331 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10332 if test `eval echo '${'$as_ac_var'}'` = yes; then
10333   cat >>confdefs.h <<_ACEOF
10334 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10335 _ACEOF
10336
10337 else
10338   SNPRINTF='snprintf.o'
10339 fi
10340 done
10341
10342
10343
10344
10345 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
10346 # include/c.h will provide declarations.  Note this is a separate test
10347 # from whether the functions exist in the C library --- there are
10348 # systems that have the functions but don't bother to declare them :-(
10349
10350 echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
10351 echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
10352 if test "${ac_cv_have_decl_snprintf+set}" = set; then
10353   echo $ECHO_N "(cached) $ECHO_C" >&6
10354 else
10355   cat >conftest.$ac_ext <<_ACEOF
10356 #line $LINENO "configure"
10357 #include "confdefs.h"
10358 $ac_includes_default
10359 #ifdef F77_DUMMY_MAIN
10360 #  ifdef __cplusplus
10361      extern "C"
10362 #  endif
10363    int F77_DUMMY_MAIN() { return 1; }
10364 #endif
10365 int
10366 main ()
10367 {
10368 #ifndef snprintf
10369   char *p = (char *) snprintf;
10370 #endif
10371
10372   ;
10373   return 0;
10374 }
10375 _ACEOF
10376 rm -f conftest.$ac_objext
10377 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10378   (eval $ac_compile) 2>&5
10379   ac_status=$?
10380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10381   (exit $ac_status); } &&
10382          { ac_try='test -s conftest.$ac_objext'
10383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10384   (eval $ac_try) 2>&5
10385   ac_status=$?
10386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10387   (exit $ac_status); }; }; then
10388   ac_cv_have_decl_snprintf=yes
10389 else
10390   echo "$as_me: failed program was:" >&5
10391 cat conftest.$ac_ext >&5
10392 ac_cv_have_decl_snprintf=no
10393 fi
10394 rm -f conftest.$ac_objext conftest.$ac_ext
10395 fi
10396 echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
10397 echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
10398 if test $ac_cv_have_decl_snprintf = yes; then
10399
10400 cat >>confdefs.h <<_ACEOF
10401 #define HAVE_DECL_SNPRINTF 1
10402 _ACEOF
10403
10404
10405 else
10406   cat >>confdefs.h <<_ACEOF
10407 #define HAVE_DECL_SNPRINTF 0
10408 _ACEOF
10409
10410
10411 fi
10412 echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
10413 echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
10414 if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
10415   echo $ECHO_N "(cached) $ECHO_C" >&6
10416 else
10417   cat >conftest.$ac_ext <<_ACEOF
10418 #line $LINENO "configure"
10419 #include "confdefs.h"
10420 $ac_includes_default
10421 #ifdef F77_DUMMY_MAIN
10422 #  ifdef __cplusplus
10423      extern "C"
10424 #  endif
10425    int F77_DUMMY_MAIN() { return 1; }
10426 #endif
10427 int
10428 main ()
10429 {
10430 #ifndef vsnprintf
10431   char *p = (char *) vsnprintf;
10432 #endif
10433
10434   ;
10435   return 0;
10436 }
10437 _ACEOF
10438 rm -f conftest.$ac_objext
10439 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10440   (eval $ac_compile) 2>&5
10441   ac_status=$?
10442   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443   (exit $ac_status); } &&
10444          { ac_try='test -s conftest.$ac_objext'
10445   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10446   (eval $ac_try) 2>&5
10447   ac_status=$?
10448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10449   (exit $ac_status); }; }; then
10450   ac_cv_have_decl_vsnprintf=yes
10451 else
10452   echo "$as_me: failed program was:" >&5
10453 cat conftest.$ac_ext >&5
10454 ac_cv_have_decl_vsnprintf=no
10455 fi
10456 rm -f conftest.$ac_objext conftest.$ac_ext
10457 fi
10458 echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
10459 echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
10460 if test $ac_cv_have_decl_vsnprintf = yes; then
10461
10462 cat >>confdefs.h <<_ACEOF
10463 #define HAVE_DECL_VSNPRINTF 1
10464 _ACEOF
10465
10466
10467 else
10468   cat >>confdefs.h <<_ACEOF
10469 #define HAVE_DECL_VSNPRINTF 0
10470 _ACEOF
10471
10472
10473 fi
10474
10475
10476
10477
10478 # do this one the hard way in case isinf() is a macro
10479 echo "$as_me:$LINENO: checking for isinf" >&5
10480 echo $ECHO_N "checking for isinf... $ECHO_C" >&6
10481 if test "${ac_cv_func_isinf+set}" = set; then
10482   echo $ECHO_N "(cached) $ECHO_C" >&6
10483 else
10484   cat >conftest.$ac_ext <<_ACEOF
10485 #line $LINENO "configure"
10486 #include "confdefs.h"
10487 #include <math.h>
10488
10489 #ifdef F77_DUMMY_MAIN
10490 #  ifdef __cplusplus
10491      extern "C"
10492 #  endif
10493    int F77_DUMMY_MAIN() { return 1; }
10494 #endif
10495 int
10496 main ()
10497 {
10498 double x = 0.0; int res = isinf(x);
10499   ;
10500   return 0;
10501 }
10502 _ACEOF
10503 rm -f conftest.$ac_objext conftest$ac_exeext
10504 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10505   (eval $ac_link) 2>&5
10506   ac_status=$?
10507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10508   (exit $ac_status); } &&
10509          { ac_try='test -s conftest$ac_exeext'
10510   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10511   (eval $ac_try) 2>&5
10512   ac_status=$?
10513   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10514   (exit $ac_status); }; }; then
10515   ac_cv_func_isinf=yes
10516 else
10517   echo "$as_me: failed program was:" >&5
10518 cat conftest.$ac_ext >&5
10519 ac_cv_func_isinf=no
10520 fi
10521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10522 fi
10523 echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
10524 echo "${ECHO_T}$ac_cv_func_isinf" >&6
10525
10526 if test $ac_cv_func_isinf = yes ; then
10527
10528 cat >>confdefs.h <<\_ACEOF
10529 #define HAVE_ISINF 1
10530 _ACEOF
10531
10532   ISINF=
10533 else
10534   ISINF='isinf.o'
10535   # Look for a way to implement a substitute for isinf()
10536
10537
10538
10539
10540 for ac_func in fpclass fp_class fp_class_d class
10541 do
10542 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10543 echo "$as_me:$LINENO: checking for $ac_func" >&5
10544 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10545 if eval "test \"\${$as_ac_var+set}\" = set"; then
10546   echo $ECHO_N "(cached) $ECHO_C" >&6
10547 else
10548   cat >conftest.$ac_ext <<_ACEOF
10549 #line $LINENO "configure"
10550 #include "confdefs.h"
10551 /* System header to define __stub macros and hopefully few prototypes,
10552     which can conflict with char $ac_func (); below.  */
10553 #include <assert.h>
10554 /* Override any gcc2 internal prototype to avoid an error.  */
10555 #ifdef __cplusplus
10556 extern "C"
10557 #endif
10558 /* We use char because int might match the return type of a gcc2
10559    builtin and then its argument prototype would still apply.  */
10560 char $ac_func ();
10561 char (*f) ();
10562
10563 #ifdef F77_DUMMY_MAIN
10564 #  ifdef __cplusplus
10565      extern "C"
10566 #  endif
10567    int F77_DUMMY_MAIN() { return 1; }
10568 #endif
10569 int
10570 main ()
10571 {
10572 /* The GNU C library defines this for functions which it implements
10573     to always fail with ENOSYS.  Some functions are actually named
10574     something starting with __ and the normal name is an alias.  */
10575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10576 choke me
10577 #else
10578 f = $ac_func;
10579 #endif
10580
10581   ;
10582   return 0;
10583 }
10584 _ACEOF
10585 rm -f conftest.$ac_objext conftest$ac_exeext
10586 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10587   (eval $ac_link) 2>&5
10588   ac_status=$?
10589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590   (exit $ac_status); } &&
10591          { ac_try='test -s conftest$ac_exeext'
10592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10593   (eval $ac_try) 2>&5
10594   ac_status=$?
10595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596   (exit $ac_status); }; }; then
10597   eval "$as_ac_var=yes"
10598 else
10599   echo "$as_me: failed program was:" >&5
10600 cat conftest.$ac_ext >&5
10601 eval "$as_ac_var=no"
10602 fi
10603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10604 fi
10605 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10606 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10607 if test `eval echo '${'$as_ac_var'}'` = yes; then
10608   cat >>confdefs.h <<_ACEOF
10609 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10610 _ACEOF
10611  break
10612 fi
10613 done
10614
10615 fi
10616
10617
10618
10619
10620 for ac_func in getrusage
10621 do
10622 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10623 echo "$as_me:$LINENO: checking for $ac_func" >&5
10624 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10625 if eval "test \"\${$as_ac_var+set}\" = set"; then
10626   echo $ECHO_N "(cached) $ECHO_C" >&6
10627 else
10628   cat >conftest.$ac_ext <<_ACEOF
10629 #line $LINENO "configure"
10630 #include "confdefs.h"
10631 /* System header to define __stub macros and hopefully few prototypes,
10632     which can conflict with char $ac_func (); below.  */
10633 #include <assert.h>
10634 /* Override any gcc2 internal prototype to avoid an error.  */
10635 #ifdef __cplusplus
10636 extern "C"
10637 #endif
10638 /* We use char because int might match the return type of a gcc2
10639    builtin and then its argument prototype would still apply.  */
10640 char $ac_func ();
10641 char (*f) ();
10642
10643 #ifdef F77_DUMMY_MAIN
10644 #  ifdef __cplusplus
10645      extern "C"
10646 #  endif
10647    int F77_DUMMY_MAIN() { return 1; }
10648 #endif
10649 int
10650 main ()
10651 {
10652 /* The GNU C library defines this for functions which it implements
10653     to always fail with ENOSYS.  Some functions are actually named
10654     something starting with __ and the normal name is an alias.  */
10655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10656 choke me
10657 #else
10658 f = $ac_func;
10659 #endif
10660
10661   ;
10662   return 0;
10663 }
10664 _ACEOF
10665 rm -f conftest.$ac_objext conftest$ac_exeext
10666 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10667   (eval $ac_link) 2>&5
10668   ac_status=$?
10669   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670   (exit $ac_status); } &&
10671          { ac_try='test -s conftest$ac_exeext'
10672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10673   (eval $ac_try) 2>&5
10674   ac_status=$?
10675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10676   (exit $ac_status); }; }; then
10677   eval "$as_ac_var=yes"
10678 else
10679   echo "$as_me: failed program was:" >&5
10680 cat conftest.$ac_ext >&5
10681 eval "$as_ac_var=no"
10682 fi
10683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10684 fi
10685 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10686 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10687 if test `eval echo '${'$as_ac_var'}'` = yes; then
10688   cat >>confdefs.h <<_ACEOF
10689 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10690 _ACEOF
10691
10692 else
10693   GETRUSAGE='getrusage.o'
10694 fi
10695 done
10696
10697
10698
10699 for ac_func in srandom
10700 do
10701 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10702 echo "$as_me:$LINENO: checking for $ac_func" >&5
10703 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10704 if eval "test \"\${$as_ac_var+set}\" = set"; then
10705   echo $ECHO_N "(cached) $ECHO_C" >&6
10706 else
10707   cat >conftest.$ac_ext <<_ACEOF
10708 #line $LINENO "configure"
10709 #include "confdefs.h"
10710 /* System header to define __stub macros and hopefully few prototypes,
10711     which can conflict with char $ac_func (); below.  */
10712 #include <assert.h>
10713 /* Override any gcc2 internal prototype to avoid an error.  */
10714 #ifdef __cplusplus
10715 extern "C"
10716 #endif
10717 /* We use char because int might match the return type of a gcc2
10718    builtin and then its argument prototype would still apply.  */
10719 char $ac_func ();
10720 char (*f) ();
10721
10722 #ifdef F77_DUMMY_MAIN
10723 #  ifdef __cplusplus
10724      extern "C"
10725 #  endif
10726    int F77_DUMMY_MAIN() { return 1; }
10727 #endif
10728 int
10729 main ()
10730 {
10731 /* The GNU C library defines this for functions which it implements
10732     to always fail with ENOSYS.  Some functions are actually named
10733     something starting with __ and the normal name is an alias.  */
10734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10735 choke me
10736 #else
10737 f = $ac_func;
10738 #endif
10739
10740   ;
10741   return 0;
10742 }
10743 _ACEOF
10744 rm -f conftest.$ac_objext conftest$ac_exeext
10745 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10746   (eval $ac_link) 2>&5
10747   ac_status=$?
10748   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10749   (exit $ac_status); } &&
10750          { ac_try='test -s conftest$ac_exeext'
10751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10752   (eval $ac_try) 2>&5
10753   ac_status=$?
10754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10755   (exit $ac_status); }; }; then
10756   eval "$as_ac_var=yes"
10757 else
10758   echo "$as_me: failed program was:" >&5
10759 cat conftest.$ac_ext >&5
10760 eval "$as_ac_var=no"
10761 fi
10762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10763 fi
10764 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10765 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10766 if test `eval echo '${'$as_ac_var'}'` = yes; then
10767   cat >>confdefs.h <<_ACEOF
10768 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10769 _ACEOF
10770
10771 else
10772   SRANDOM='srandom.o'
10773 fi
10774 done
10775
10776
10777
10778 for ac_func in gethostname
10779 do
10780 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10781 echo "$as_me:$LINENO: checking for $ac_func" >&5
10782 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10783 if eval "test \"\${$as_ac_var+set}\" = set"; then
10784   echo $ECHO_N "(cached) $ECHO_C" >&6
10785 else
10786   cat >conftest.$ac_ext <<_ACEOF
10787 #line $LINENO "configure"
10788 #include "confdefs.h"
10789 /* System header to define __stub macros and hopefully few prototypes,
10790     which can conflict with char $ac_func (); below.  */
10791 #include <assert.h>
10792 /* Override any gcc2 internal prototype to avoid an error.  */
10793 #ifdef __cplusplus
10794 extern "C"
10795 #endif
10796 /* We use char because int might match the return type of a gcc2
10797    builtin and then its argument prototype would still apply.  */
10798 char $ac_func ();
10799 char (*f) ();
10800
10801 #ifdef F77_DUMMY_MAIN
10802 #  ifdef __cplusplus
10803      extern "C"
10804 #  endif
10805    int F77_DUMMY_MAIN() { return 1; }
10806 #endif
10807 int
10808 main ()
10809 {
10810 /* The GNU C library defines this for functions which it implements
10811     to always fail with ENOSYS.  Some functions are actually named
10812     something starting with __ and the normal name is an alias.  */
10813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10814 choke me
10815 #else
10816 f = $ac_func;
10817 #endif
10818
10819   ;
10820   return 0;
10821 }
10822 _ACEOF
10823 rm -f conftest.$ac_objext conftest$ac_exeext
10824 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10825   (eval $ac_link) 2>&5
10826   ac_status=$?
10827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10828   (exit $ac_status); } &&
10829          { ac_try='test -s conftest$ac_exeext'
10830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10831   (eval $ac_try) 2>&5
10832   ac_status=$?
10833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10834   (exit $ac_status); }; }; then
10835   eval "$as_ac_var=yes"
10836 else
10837   echo "$as_me: failed program was:" >&5
10838 cat conftest.$ac_ext >&5
10839 eval "$as_ac_var=no"
10840 fi
10841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10842 fi
10843 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10844 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10845 if test `eval echo '${'$as_ac_var'}'` = yes; then
10846   cat >>confdefs.h <<_ACEOF
10847 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10848 _ACEOF
10849
10850 else
10851   GETHOSTNAME='gethostname.o'
10852 fi
10853 done
10854
10855
10856
10857 for ac_func in random
10858 do
10859 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10860 echo "$as_me:$LINENO: checking for $ac_func" >&5
10861 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10862 if eval "test \"\${$as_ac_var+set}\" = set"; then
10863   echo $ECHO_N "(cached) $ECHO_C" >&6
10864 else
10865   cat >conftest.$ac_ext <<_ACEOF
10866 #line $LINENO "configure"
10867 #include "confdefs.h"
10868 /* System header to define __stub macros and hopefully few prototypes,
10869     which can conflict with char $ac_func (); below.  */
10870 #include <assert.h>
10871 /* Override any gcc2 internal prototype to avoid an error.  */
10872 #ifdef __cplusplus
10873 extern "C"
10874 #endif
10875 /* We use char because int might match the return type of a gcc2
10876    builtin and then its argument prototype would still apply.  */
10877 char $ac_func ();
10878 char (*f) ();
10879
10880 #ifdef F77_DUMMY_MAIN
10881 #  ifdef __cplusplus
10882      extern "C"
10883 #  endif
10884    int F77_DUMMY_MAIN() { return 1; }
10885 #endif
10886 int
10887 main ()
10888 {
10889 /* The GNU C library defines this for functions which it implements
10890     to always fail with ENOSYS.  Some functions are actually named
10891     something starting with __ and the normal name is an alias.  */
10892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10893 choke me
10894 #else
10895 f = $ac_func;
10896 #endif
10897
10898   ;
10899   return 0;
10900 }
10901 _ACEOF
10902 rm -f conftest.$ac_objext conftest$ac_exeext
10903 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10904   (eval $ac_link) 2>&5
10905   ac_status=$?
10906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10907   (exit $ac_status); } &&
10908          { ac_try='test -s conftest$ac_exeext'
10909   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10910   (eval $ac_try) 2>&5
10911   ac_status=$?
10912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10913   (exit $ac_status); }; }; then
10914   eval "$as_ac_var=yes"
10915 else
10916   echo "$as_me: failed program was:" >&5
10917 cat conftest.$ac_ext >&5
10918 eval "$as_ac_var=no"
10919 fi
10920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10921 fi
10922 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
10923 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10924 if test `eval echo '${'$as_ac_var'}'` = yes; then
10925   cat >>confdefs.h <<_ACEOF
10926 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10927 _ACEOF
10928
10929 else
10930   MISSING_RANDOM='random.o'
10931 fi
10932 done
10933
10934
10935
10936 for ac_func in inet_aton
10937 do
10938 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10939 echo "$as_me:$LINENO: checking for $ac_func" >&5
10940 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10941 if eval "test \"\${$as_ac_var+set}\" = set"; then
10942   echo $ECHO_N "(cached) $ECHO_C" >&6
10943 else
10944   cat >conftest.$ac_ext <<_ACEOF
10945 #line $LINENO "configure"
10946 #include "confdefs.h"
10947 /* System header to define __stub macros and hopefully few prototypes,
10948     which can conflict with char $ac_func (); below.  */
10949 #include <assert.h>
10950 /* Override any gcc2 internal prototype to avoid an error.  */
10951 #ifdef __cplusplus
10952 extern "C"
10953 #endif
10954 /* We use char because int might match the return type of a gcc2
10955    builtin and then its argument prototype would still apply.  */
10956 char $ac_func ();
10957 char (*f) ();
10958
10959 #ifdef F77_DUMMY_MAIN
10960 #  ifdef __cplusplus
10961      extern "C"
10962 #  endif
10963    int F77_DUMMY_MAIN() { return 1; }
10964 #endif
10965 int
10966 main ()
10967 {
10968 /* The GNU C library defines this for functions which it implements
10969     to always fail with ENOSYS.  Some functions are actually named
10970     something starting with __ and the normal name is an alias.  */
10971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10972 choke me
10973 #else
10974 f = $ac_func;
10975 #endif
10976
10977   ;
10978   return 0;
10979 }
10980 _ACEOF
10981 rm -f conftest.$ac_objext conftest$ac_exeext
10982 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10983   (eval $ac_link) 2>&5
10984   ac_status=$?
10985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10986   (exit $ac_status); } &&
10987          { ac_try='test -s conftest$ac_exeext'
10988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10989   (eval $ac_try) 2>&5
10990   ac_status=$?
10991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992   (exit $ac_status); }; }; then
10993   eval "$as_ac_var=yes"
10994 else
10995   echo "$as_me: failed program was:" >&5
10996 cat conftest.$ac_ext >&5
10997 eval "$as_ac_var=no"
10998 fi
10999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11000 fi
11001 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11002 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11003 if test `eval echo '${'$as_ac_var'}'` = yes; then
11004   cat >>confdefs.h <<_ACEOF
11005 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11006 _ACEOF
11007
11008 else
11009   INET_ATON='inet_aton.o'
11010 fi
11011 done
11012
11013
11014
11015 for ac_func in strerror
11016 do
11017 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11018 echo "$as_me:$LINENO: checking for $ac_func" >&5
11019 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11020 if eval "test \"\${$as_ac_var+set}\" = set"; then
11021   echo $ECHO_N "(cached) $ECHO_C" >&6
11022 else
11023   cat >conftest.$ac_ext <<_ACEOF
11024 #line $LINENO "configure"
11025 #include "confdefs.h"
11026 /* System header to define __stub macros and hopefully few prototypes,
11027     which can conflict with char $ac_func (); below.  */
11028 #include <assert.h>
11029 /* Override any gcc2 internal prototype to avoid an error.  */
11030 #ifdef __cplusplus
11031 extern "C"
11032 #endif
11033 /* We use char because int might match the return type of a gcc2
11034    builtin and then its argument prototype would still apply.  */
11035 char $ac_func ();
11036 char (*f) ();
11037
11038 #ifdef F77_DUMMY_MAIN
11039 #  ifdef __cplusplus
11040      extern "C"
11041 #  endif
11042    int F77_DUMMY_MAIN() { return 1; }
11043 #endif
11044 int
11045 main ()
11046 {
11047 /* The GNU C library defines this for functions which it implements
11048     to always fail with ENOSYS.  Some functions are actually named
11049     something starting with __ and the normal name is an alias.  */
11050 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11051 choke me
11052 #else
11053 f = $ac_func;
11054 #endif
11055
11056   ;
11057   return 0;
11058 }
11059 _ACEOF
11060 rm -f conftest.$ac_objext conftest$ac_exeext
11061 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11062   (eval $ac_link) 2>&5
11063   ac_status=$?
11064   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11065   (exit $ac_status); } &&
11066          { ac_try='test -s conftest$ac_exeext'
11067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11068   (eval $ac_try) 2>&5
11069   ac_status=$?
11070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11071   (exit $ac_status); }; }; then
11072   eval "$as_ac_var=yes"
11073 else
11074   echo "$as_me: failed program was:" >&5
11075 cat conftest.$ac_ext >&5
11076 eval "$as_ac_var=no"
11077 fi
11078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11079 fi
11080 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11081 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11082 if test `eval echo '${'$as_ac_var'}'` = yes; then
11083   cat >>confdefs.h <<_ACEOF
11084 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11085 _ACEOF
11086
11087 else
11088   STRERROR='strerror.o'
11089 fi
11090 done
11091
11092
11093
11094 for ac_func in strdup
11095 do
11096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11097 echo "$as_me:$LINENO: checking for $ac_func" >&5
11098 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11099 if eval "test \"\${$as_ac_var+set}\" = set"; then
11100   echo $ECHO_N "(cached) $ECHO_C" >&6
11101 else
11102   cat >conftest.$ac_ext <<_ACEOF
11103 #line $LINENO "configure"
11104 #include "confdefs.h"
11105 /* System header to define __stub macros and hopefully few prototypes,
11106     which can conflict with char $ac_func (); below.  */
11107 #include <assert.h>
11108 /* Override any gcc2 internal prototype to avoid an error.  */
11109 #ifdef __cplusplus
11110 extern "C"
11111 #endif
11112 /* We use char because int might match the return type of a gcc2
11113    builtin and then its argument prototype would still apply.  */
11114 char $ac_func ();
11115 char (*f) ();
11116
11117 #ifdef F77_DUMMY_MAIN
11118 #  ifdef __cplusplus
11119      extern "C"
11120 #  endif
11121    int F77_DUMMY_MAIN() { return 1; }
11122 #endif
11123 int
11124 main ()
11125 {
11126 /* The GNU C library defines this for functions which it implements
11127     to always fail with ENOSYS.  Some functions are actually named
11128     something starting with __ and the normal name is an alias.  */
11129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11130 choke me
11131 #else
11132 f = $ac_func;
11133 #endif
11134
11135   ;
11136   return 0;
11137 }
11138 _ACEOF
11139 rm -f conftest.$ac_objext conftest$ac_exeext
11140 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11141   (eval $ac_link) 2>&5
11142   ac_status=$?
11143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -s conftest$ac_exeext'
11146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11147   (eval $ac_try) 2>&5
11148   ac_status=$?
11149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150   (exit $ac_status); }; }; then
11151   eval "$as_ac_var=yes"
11152 else
11153   echo "$as_me: failed program was:" >&5
11154 cat conftest.$ac_ext >&5
11155 eval "$as_ac_var=no"
11156 fi
11157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11158 fi
11159 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11160 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11161 if test `eval echo '${'$as_ac_var'}'` = yes; then
11162   cat >>confdefs.h <<_ACEOF
11163 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11164 _ACEOF
11165
11166 else
11167   STRDUP='../../utils/strdup.o'
11168 fi
11169 done
11170
11171
11172
11173 for ac_func in strtol
11174 do
11175 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11176 echo "$as_me:$LINENO: checking for $ac_func" >&5
11177 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11178 if eval "test \"\${$as_ac_var+set}\" = set"; then
11179   echo $ECHO_N "(cached) $ECHO_C" >&6
11180 else
11181   cat >conftest.$ac_ext <<_ACEOF
11182 #line $LINENO "configure"
11183 #include "confdefs.h"
11184 /* System header to define __stub macros and hopefully few prototypes,
11185     which can conflict with char $ac_func (); below.  */
11186 #include <assert.h>
11187 /* Override any gcc2 internal prototype to avoid an error.  */
11188 #ifdef __cplusplus
11189 extern "C"
11190 #endif
11191 /* We use char because int might match the return type of a gcc2
11192    builtin and then its argument prototype would still apply.  */
11193 char $ac_func ();
11194 char (*f) ();
11195
11196 #ifdef F77_DUMMY_MAIN
11197 #  ifdef __cplusplus
11198      extern "C"
11199 #  endif
11200    int F77_DUMMY_MAIN() { return 1; }
11201 #endif
11202 int
11203 main ()
11204 {
11205 /* The GNU C library defines this for functions which it implements
11206     to always fail with ENOSYS.  Some functions are actually named
11207     something starting with __ and the normal name is an alias.  */
11208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11209 choke me
11210 #else
11211 f = $ac_func;
11212 #endif
11213
11214   ;
11215   return 0;
11216 }
11217 _ACEOF
11218 rm -f conftest.$ac_objext conftest$ac_exeext
11219 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11220   (eval $ac_link) 2>&5
11221   ac_status=$?
11222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11223   (exit $ac_status); } &&
11224          { ac_try='test -s conftest$ac_exeext'
11225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11226   (eval $ac_try) 2>&5
11227   ac_status=$?
11228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11229   (exit $ac_status); }; }; then
11230   eval "$as_ac_var=yes"
11231 else
11232   echo "$as_me: failed program was:" >&5
11233 cat conftest.$ac_ext >&5
11234 eval "$as_ac_var=no"
11235 fi
11236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11237 fi
11238 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11239 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11240 if test `eval echo '${'$as_ac_var'}'` = yes; then
11241   cat >>confdefs.h <<_ACEOF
11242 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11243 _ACEOF
11244
11245 else
11246   STRTOL='strtol.o'
11247 fi
11248 done
11249
11250
11251
11252 for ac_func in strtoul
11253 do
11254 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11255 echo "$as_me:$LINENO: checking for $ac_func" >&5
11256 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11257 if eval "test \"\${$as_ac_var+set}\" = set"; then
11258   echo $ECHO_N "(cached) $ECHO_C" >&6
11259 else
11260   cat >conftest.$ac_ext <<_ACEOF
11261 #line $LINENO "configure"
11262 #include "confdefs.h"
11263 /* System header to define __stub macros and hopefully few prototypes,
11264     which can conflict with char $ac_func (); below.  */
11265 #include <assert.h>
11266 /* Override any gcc2 internal prototype to avoid an error.  */
11267 #ifdef __cplusplus
11268 extern "C"
11269 #endif
11270 /* We use char because int might match the return type of a gcc2
11271    builtin and then its argument prototype would still apply.  */
11272 char $ac_func ();
11273 char (*f) ();
11274
11275 #ifdef F77_DUMMY_MAIN
11276 #  ifdef __cplusplus
11277      extern "C"
11278 #  endif
11279    int F77_DUMMY_MAIN() { return 1; }
11280 #endif
11281 int
11282 main ()
11283 {
11284 /* The GNU C library defines this for functions which it implements
11285     to always fail with ENOSYS.  Some functions are actually named
11286     something starting with __ and the normal name is an alias.  */
11287 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11288 choke me
11289 #else
11290 f = $ac_func;
11291 #endif
11292
11293   ;
11294   return 0;
11295 }
11296 _ACEOF
11297 rm -f conftest.$ac_objext conftest$ac_exeext
11298 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11299   (eval $ac_link) 2>&5
11300   ac_status=$?
11301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11302   (exit $ac_status); } &&
11303          { ac_try='test -s conftest$ac_exeext'
11304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11305   (eval $ac_try) 2>&5
11306   ac_status=$?
11307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308   (exit $ac_status); }; }; then
11309   eval "$as_ac_var=yes"
11310 else
11311   echo "$as_me: failed program was:" >&5
11312 cat conftest.$ac_ext >&5
11313 eval "$as_ac_var=no"
11314 fi
11315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11316 fi
11317 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11318 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11319 if test `eval echo '${'$as_ac_var'}'` = yes; then
11320   cat >>confdefs.h <<_ACEOF
11321 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11322 _ACEOF
11323
11324 else
11325   STRTOUL='strtoul.o'
11326 fi
11327 done
11328
11329
11330
11331 for ac_func in strcasecmp
11332 do
11333 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11334 echo "$as_me:$LINENO: checking for $ac_func" >&5
11335 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11336 if eval "test \"\${$as_ac_var+set}\" = set"; then
11337   echo $ECHO_N "(cached) $ECHO_C" >&6
11338 else
11339   cat >conftest.$ac_ext <<_ACEOF
11340 #line $LINENO "configure"
11341 #include "confdefs.h"
11342 /* System header to define __stub macros and hopefully few prototypes,
11343     which can conflict with char $ac_func (); below.  */
11344 #include <assert.h>
11345 /* Override any gcc2 internal prototype to avoid an error.  */
11346 #ifdef __cplusplus
11347 extern "C"
11348 #endif
11349 /* We use char because int might match the return type of a gcc2
11350    builtin and then its argument prototype would still apply.  */
11351 char $ac_func ();
11352 char (*f) ();
11353
11354 #ifdef F77_DUMMY_MAIN
11355 #  ifdef __cplusplus
11356      extern "C"
11357 #  endif
11358    int F77_DUMMY_MAIN() { return 1; }
11359 #endif
11360 int
11361 main ()
11362 {
11363 /* The GNU C library defines this for functions which it implements
11364     to always fail with ENOSYS.  Some functions are actually named
11365     something starting with __ and the normal name is an alias.  */
11366 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11367 choke me
11368 #else
11369 f = $ac_func;
11370 #endif
11371
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 rm -f conftest.$ac_objext conftest$ac_exeext
11377 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11378   (eval $ac_link) 2>&5
11379   ac_status=$?
11380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11381   (exit $ac_status); } &&
11382          { ac_try='test -s conftest$ac_exeext'
11383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11384   (eval $ac_try) 2>&5
11385   ac_status=$?
11386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387   (exit $ac_status); }; }; then
11388   eval "$as_ac_var=yes"
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 cat conftest.$ac_ext >&5
11392 eval "$as_ac_var=no"
11393 fi
11394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11395 fi
11396 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11397 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11398 if test `eval echo '${'$as_ac_var'}'` = yes; then
11399   cat >>confdefs.h <<_ACEOF
11400 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11401 _ACEOF
11402
11403 else
11404   STRCASECMP='strcasecmp.o'
11405 fi
11406 done
11407
11408
11409
11410 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
11411 # this hackery with HPUXMATHLIB allows us to cope.
11412 HPUXMATHLIB=""
11413 case $host_cpu in
11414   hppa1.1)
11415         if [ -r /lib/pa1.1/libm.a ] ; then
11416             HPUXMATHLIB="-L /lib/pa1.1 -lm"
11417         fi ;;
11418 esac
11419
11420
11421
11422 for ac_func in rint
11423 do
11424 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11425 echo "$as_me:$LINENO: checking for $ac_func" >&5
11426 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11427 if eval "test \"\${$as_ac_var+set}\" = set"; then
11428   echo $ECHO_N "(cached) $ECHO_C" >&6
11429 else
11430   cat >conftest.$ac_ext <<_ACEOF
11431 #line $LINENO "configure"
11432 #include "confdefs.h"
11433 /* System header to define __stub macros and hopefully few prototypes,
11434     which can conflict with char $ac_func (); below.  */
11435 #include <assert.h>
11436 /* Override any gcc2 internal prototype to avoid an error.  */
11437 #ifdef __cplusplus
11438 extern "C"
11439 #endif
11440 /* We use char because int might match the return type of a gcc2
11441    builtin and then its argument prototype would still apply.  */
11442 char $ac_func ();
11443 char (*f) ();
11444
11445 #ifdef F77_DUMMY_MAIN
11446 #  ifdef __cplusplus
11447      extern "C"
11448 #  endif
11449    int F77_DUMMY_MAIN() { return 1; }
11450 #endif
11451 int
11452 main ()
11453 {
11454 /* The GNU C library defines this for functions which it implements
11455     to always fail with ENOSYS.  Some functions are actually named
11456     something starting with __ and the normal name is an alias.  */
11457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11458 choke me
11459 #else
11460 f = $ac_func;
11461 #endif
11462
11463   ;
11464   return 0;
11465 }
11466 _ACEOF
11467 rm -f conftest.$ac_objext conftest$ac_exeext
11468 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11469   (eval $ac_link) 2>&5
11470   ac_status=$?
11471   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472   (exit $ac_status); } &&
11473          { ac_try='test -s conftest$ac_exeext'
11474   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11475   (eval $ac_try) 2>&5
11476   ac_status=$?
11477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11478   (exit $ac_status); }; }; then
11479   eval "$as_ac_var=yes"
11480 else
11481   echo "$as_me: failed program was:" >&5
11482 cat conftest.$ac_ext >&5
11483 eval "$as_ac_var=no"
11484 fi
11485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11486 fi
11487 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11488 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11489 if test `eval echo '${'$as_ac_var'}'` = yes; then
11490   cat >>confdefs.h <<_ACEOF
11491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11492 _ACEOF
11493
11494 else
11495   echo "$as_me:$LINENO: checking for rint in -lm" >&5
11496 echo $ECHO_N "checking for rint in -lm... $ECHO_C" >&6
11497 if test "${ac_cv_lib_m_rint+set}" = set; then
11498   echo $ECHO_N "(cached) $ECHO_C" >&6
11499 else
11500   ac_check_lib_save_LIBS=$LIBS
11501 LIBS="-lm $HPUXMATHLIB $LIBS"
11502 cat >conftest.$ac_ext <<_ACEOF
11503 #line $LINENO "configure"
11504 #include "confdefs.h"
11505
11506 /* Override any gcc2 internal prototype to avoid an error.  */
11507 #ifdef __cplusplus
11508 extern "C"
11509 #endif
11510 /* We use char because int might match the return type of a gcc2
11511    builtin and then its argument prototype would still apply.  */
11512 char rint ();
11513 #ifdef F77_DUMMY_MAIN
11514 #  ifdef __cplusplus
11515      extern "C"
11516 #  endif
11517    int F77_DUMMY_MAIN() { return 1; }
11518 #endif
11519 int
11520 main ()
11521 {
11522 rint ();
11523   ;
11524   return 0;
11525 }
11526 _ACEOF
11527 rm -f conftest.$ac_objext conftest$ac_exeext
11528 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11529   (eval $ac_link) 2>&5
11530   ac_status=$?
11531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11532   (exit $ac_status); } &&
11533          { ac_try='test -s conftest$ac_exeext'
11534   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11535   (eval $ac_try) 2>&5
11536   ac_status=$?
11537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11538   (exit $ac_status); }; }; then
11539   ac_cv_lib_m_rint=yes
11540 else
11541   echo "$as_me: failed program was:" >&5
11542 cat conftest.$ac_ext >&5
11543 ac_cv_lib_m_rint=no
11544 fi
11545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11546 LIBS=$ac_check_lib_save_LIBS
11547 fi
11548 echo "$as_me:$LINENO: result: $ac_cv_lib_m_rint" >&5
11549 echo "${ECHO_T}$ac_cv_lib_m_rint" >&6
11550 if test $ac_cv_lib_m_rint = yes; then
11551   cat >>confdefs.h <<\_ACEOF
11552 #define HAVE_RINT 1
11553 _ACEOF
11554
11555 fi
11556
11557 fi
11558 done
11559
11560
11561
11562 # Readline versions < 2.1 don't have rl_completion_append_character
11563 echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
11564 echo $ECHO_N "checking for rl_completion_append_character... $ECHO_C" >&6
11565 cat >conftest.$ac_ext <<_ACEOF
11566 #line $LINENO "configure"
11567 #include "confdefs.h"
11568 #include <stdio.h>
11569 #ifdef HAVE_READLINE_READLINE_H
11570 # include <readline/readline.h>
11571 #elif defined(HAVE_READLINE_H)
11572 # include <readline.h>
11573 #endif
11574
11575 #ifdef F77_DUMMY_MAIN
11576 #  ifdef __cplusplus
11577      extern "C"
11578 #  endif
11579    int F77_DUMMY_MAIN() { return 1; }
11580 #endif
11581 int
11582 main ()
11583 {
11584 rl_completion_append_character = 'x';
11585   ;
11586   return 0;
11587 }
11588 _ACEOF
11589 rm -f conftest.$ac_objext conftest$ac_exeext
11590 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11591   (eval $ac_link) 2>&5
11592   ac_status=$?
11593   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11594   (exit $ac_status); } &&
11595          { ac_try='test -s conftest$ac_exeext'
11596   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11597   (eval $ac_try) 2>&5
11598   ac_status=$?
11599   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11600   (exit $ac_status); }; }; then
11601   echo "$as_me:$LINENO: result: yes" >&5
11602 echo "${ECHO_T}yes" >&6
11603
11604 cat >>confdefs.h <<\_ACEOF
11605 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
11606 _ACEOF
11607
11608 else
11609   echo "$as_me: failed program was:" >&5
11610 cat conftest.$ac_ext >&5
11611 echo "$as_me:$LINENO: result: no" >&5
11612 echo "${ECHO_T}no" >&6
11613 fi
11614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11615
11616
11617
11618 for ac_func in rl_completion_matches rl_filename_completion_function
11619 do
11620 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11621 echo "$as_me:$LINENO: checking for $ac_func" >&5
11622 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11623 if eval "test \"\${$as_ac_var+set}\" = set"; then
11624   echo $ECHO_N "(cached) $ECHO_C" >&6
11625 else
11626   cat >conftest.$ac_ext <<_ACEOF
11627 #line $LINENO "configure"
11628 #include "confdefs.h"
11629 /* System header to define __stub macros and hopefully few prototypes,
11630     which can conflict with char $ac_func (); below.  */
11631 #include <assert.h>
11632 /* Override any gcc2 internal prototype to avoid an error.  */
11633 #ifdef __cplusplus
11634 extern "C"
11635 #endif
11636 /* We use char because int might match the return type of a gcc2
11637    builtin and then its argument prototype would still apply.  */
11638 char $ac_func ();
11639 char (*f) ();
11640
11641 #ifdef F77_DUMMY_MAIN
11642 #  ifdef __cplusplus
11643      extern "C"
11644 #  endif
11645    int F77_DUMMY_MAIN() { return 1; }
11646 #endif
11647 int
11648 main ()
11649 {
11650 /* The GNU C library defines this for functions which it implements
11651     to always fail with ENOSYS.  Some functions are actually named
11652     something starting with __ and the normal name is an alias.  */
11653 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11654 choke me
11655 #else
11656 f = $ac_func;
11657 #endif
11658
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext conftest$ac_exeext
11664 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11665   (eval $ac_link) 2>&5
11666   ac_status=$?
11667   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668   (exit $ac_status); } &&
11669          { ac_try='test -s conftest$ac_exeext'
11670   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11671   (eval $ac_try) 2>&5
11672   ac_status=$?
11673   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11674   (exit $ac_status); }; }; then
11675   eval "$as_ac_var=yes"
11676 else
11677   echo "$as_me: failed program was:" >&5
11678 cat conftest.$ac_ext >&5
11679 eval "$as_ac_var=no"
11680 fi
11681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11682 fi
11683 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11684 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11685 if test `eval echo '${'$as_ac_var'}'` = yes; then
11686   cat >>confdefs.h <<_ACEOF
11687 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11688 _ACEOF
11689
11690 fi
11691 done
11692
11693
11694
11695 echo "$as_me:$LINENO: checking for finite" >&5
11696 echo $ECHO_N "checking for finite... $ECHO_C" >&6
11697 cat >conftest.$ac_ext <<_ACEOF
11698 #line $LINENO "configure"
11699 #include "confdefs.h"
11700 #include <math.h>
11701 #ifdef F77_DUMMY_MAIN
11702 #  ifdef __cplusplus
11703      extern "C"
11704 #  endif
11705    int F77_DUMMY_MAIN() { return 1; }
11706 #endif
11707 int
11708 main ()
11709 {
11710 int dummy=finite(1.0);
11711   ;
11712   return 0;
11713 }
11714 _ACEOF
11715 rm -f conftest.$ac_objext conftest$ac_exeext
11716 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11717   (eval $ac_link) 2>&5
11718   ac_status=$?
11719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720   (exit $ac_status); } &&
11721          { ac_try='test -s conftest$ac_exeext'
11722   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11723   (eval $ac_try) 2>&5
11724   ac_status=$?
11725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11726   (exit $ac_status); }; }; then
11727
11728 cat >>confdefs.h <<\_ACEOF
11729 #define HAVE_FINITE 1
11730 _ACEOF
11731
11732 echo "$as_me:$LINENO: result: yes" >&5
11733 echo "${ECHO_T}yes" >&6
11734 else
11735   echo "$as_me: failed program was:" >&5
11736 cat conftest.$ac_ext >&5
11737 echo "$as_me:$LINENO: result: no" >&5
11738 echo "${ECHO_T}no" >&6
11739 fi
11740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11741
11742 echo "$as_me:$LINENO: checking for sigsetjmp" >&5
11743 echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
11744 cat >conftest.$ac_ext <<_ACEOF
11745 #line $LINENO "configure"
11746 #include "confdefs.h"
11747 #include <setjmp.h>
11748 #ifdef F77_DUMMY_MAIN
11749 #  ifdef __cplusplus
11750      extern "C"
11751 #  endif
11752    int F77_DUMMY_MAIN() { return 1; }
11753 #endif
11754 int
11755 main ()
11756 {
11757 sigjmp_buf x; sigsetjmp(x, 1);
11758   ;
11759   return 0;
11760 }
11761 _ACEOF
11762 rm -f conftest.$ac_objext conftest$ac_exeext
11763 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11764   (eval $ac_link) 2>&5
11765   ac_status=$?
11766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767   (exit $ac_status); } &&
11768          { ac_try='test -s conftest$ac_exeext'
11769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11770   (eval $ac_try) 2>&5
11771   ac_status=$?
11772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11773   (exit $ac_status); }; }; then
11774
11775 cat >>confdefs.h <<\_ACEOF
11776 #define HAVE_SIGSETJMP 1
11777 _ACEOF
11778
11779 echo "$as_me:$LINENO: result: yes" >&5
11780 echo "${ECHO_T}yes" >&6
11781 else
11782   echo "$as_me: failed program was:" >&5
11783 cat conftest.$ac_ext >&5
11784 echo "$as_me:$LINENO: result: no" >&5
11785 echo "${ECHO_T}no" >&6
11786 fi
11787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11788
11789
11790
11791
11792 # Check whether --enable-syslog or --disable-syslog was given.
11793 if test "${enable_syslog+set}" = set; then
11794   enableval="$enable_syslog"
11795
11796   case $enableval in
11797     yes)
11798       echo "$as_me:$LINENO: checking for syslog" >&5
11799 echo $ECHO_N "checking for syslog... $ECHO_C" >&6
11800 if test "${ac_cv_func_syslog+set}" = set; then
11801   echo $ECHO_N "(cached) $ECHO_C" >&6
11802 else
11803   cat >conftest.$ac_ext <<_ACEOF
11804 #line $LINENO "configure"
11805 #include "confdefs.h"
11806 /* System header to define __stub macros and hopefully few prototypes,
11807     which can conflict with char syslog (); below.  */
11808 #include <assert.h>
11809 /* Override any gcc2 internal prototype to avoid an error.  */
11810 #ifdef __cplusplus
11811 extern "C"
11812 #endif
11813 /* We use char because int might match the return type of a gcc2
11814    builtin and then its argument prototype would still apply.  */
11815 char syslog ();
11816 char (*f) ();
11817
11818 #ifdef F77_DUMMY_MAIN
11819 #  ifdef __cplusplus
11820      extern "C"
11821 #  endif
11822    int F77_DUMMY_MAIN() { return 1; }
11823 #endif
11824 int
11825 main ()
11826 {
11827 /* The GNU C library defines this for functions which it implements
11828     to always fail with ENOSYS.  Some functions are actually named
11829     something starting with __ and the normal name is an alias.  */
11830 #if defined (__stub_syslog) || defined (__stub___syslog)
11831 choke me
11832 #else
11833 f = syslog;
11834 #endif
11835
11836   ;
11837   return 0;
11838 }
11839 _ACEOF
11840 rm -f conftest.$ac_objext conftest$ac_exeext
11841 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11842   (eval $ac_link) 2>&5
11843   ac_status=$?
11844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845   (exit $ac_status); } &&
11846          { ac_try='test -s conftest$ac_exeext'
11847   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848   (eval $ac_try) 2>&5
11849   ac_status=$?
11850   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851   (exit $ac_status); }; }; then
11852   ac_cv_func_syslog=yes
11853 else
11854   echo "$as_me: failed program was:" >&5
11855 cat conftest.$ac_ext >&5
11856 ac_cv_func_syslog=no
11857 fi
11858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11859 fi
11860 echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
11861 echo "${ECHO_T}$ac_cv_func_syslog" >&6
11862 if test $ac_cv_func_syslog = yes; then
11863
11864 cat >>confdefs.h <<\_ACEOF
11865 #define ENABLE_SYSLOG 1
11866 _ACEOF
11867
11868 else
11869   { { echo "$as_me:$LINENO: error: no syslog interface found" >&5
11870 echo "$as_me: error: no syslog interface found" >&2;}
11871    { (exit 1); exit 1; }; }
11872 fi
11873
11874       ;;
11875     no)
11876       :
11877       ;;
11878     *)
11879       { { echo "$as_me:$LINENO: error: no argument expected for --enable-syslog option" >&5
11880 echo "$as_me: error: no argument expected for --enable-syslog option" >&2;}
11881    { (exit 1); exit 1; }; }
11882       ;;
11883   esac
11884
11885 else
11886   enable_syslog=no
11887
11888 fi;
11889
11890
11891
11892 echo "$as_me:$LINENO: checking for optreset" >&5
11893 echo $ECHO_N "checking for optreset... $ECHO_C" >&6
11894 if test "${pgac_cv_var_int_optreset+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 #include <unistd.h>
11901 #ifdef F77_DUMMY_MAIN
11902 #  ifdef __cplusplus
11903      extern "C"
11904 #  endif
11905    int F77_DUMMY_MAIN() { return 1; }
11906 #endif
11907 int
11908 main ()
11909 {
11910 extern int optreset; optreset = 1;
11911   ;
11912   return 0;
11913 }
11914 _ACEOF
11915 rm -f conftest.$ac_objext conftest$ac_exeext
11916 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11917   (eval $ac_link) 2>&5
11918   ac_status=$?
11919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920   (exit $ac_status); } &&
11921          { ac_try='test -s conftest$ac_exeext'
11922   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11923   (eval $ac_try) 2>&5
11924   ac_status=$?
11925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11926   (exit $ac_status); }; }; then
11927   pgac_cv_var_int_optreset=yes
11928 else
11929   echo "$as_me: failed program was:" >&5
11930 cat conftest.$ac_ext >&5
11931 pgac_cv_var_int_optreset=no
11932 fi
11933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11934 fi
11935 echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
11936 echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
11937 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
11938
11939 cat >>confdefs.h <<\_ACEOF
11940 #define HAVE_INT_OPTRESET 1
11941 _ACEOF
11942
11943 fi
11944
11945
11946 # This test makes sure that run tests work at all.  Sometimes a shared
11947 # library is found by the linker, but the runtime linker can't find it.
11948 # This check should come after all modifications of compiler or linker
11949 # variables, and before any other run tests.
11950 echo "$as_me:$LINENO: checking test program" >&5
11951 echo $ECHO_N "checking test program... $ECHO_C" >&6
11952 if test "$cross_compiling" = yes; then
11953   echo "$as_me:$LINENO: result: cross-compiling" >&5
11954 echo "${ECHO_T}cross-compiling" >&6
11955 else
11956   cat >conftest.$ac_ext <<_ACEOF
11957 #line $LINENO "configure"
11958 #include "confdefs.h"
11959 int main() { return 0; }
11960 _ACEOF
11961 rm -f conftest$ac_exeext
11962 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11963   (eval $ac_link) 2>&5
11964   ac_status=$?
11965   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11966   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11967   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   echo "$as_me:$LINENO: result: ok" >&5
11973 echo "${ECHO_T}ok" >&6
11974 else
11975   echo "$as_me: program exited with status $ac_status" >&5
11976 echo "$as_me: failed program was:" >&5
11977 cat conftest.$ac_ext >&5
11978 ( exit $ac_status )
11979 echo "$as_me:$LINENO: result: failed" >&5
11980 echo "${ECHO_T}failed" >&6
11981 { { echo "$as_me:$LINENO: error:
11982 *** Could not execute a simple test program.  This may be a problem
11983 *** related to locating shared libraries.  Check the file 'config.log'
11984 *** for the exact reason." >&5
11985 echo "$as_me: error:
11986 *** Could not execute a simple test program.  This may be a problem
11987 *** related to locating shared libraries.  Check the file 'config.log'
11988 *** for the exact reason." >&2;}
11989    { (exit 1); exit 1; }; }
11990 fi
11991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11992 fi
11993
11994
11995
11996 echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
11997 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
11998 if test "${pgac_cv_type_long_int_64+set}" = set; then
11999   echo $ECHO_N "(cached) $ECHO_C" >&6
12000 else
12001   if test "$cross_compiling" = yes; then
12002   pgac_cv_type_long_int_64=no
12003 { echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
12004 echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
12005 else
12006   cat >conftest.$ac_ext <<_ACEOF
12007 #line $LINENO "configure"
12008 #include "confdefs.h"
12009 typedef long int int64;
12010
12011 /*
12012  * These are globals to discourage the compiler from folding all the
12013  * arithmetic tests down to compile-time constants.
12014  */
12015 int64 a = 20000001;
12016 int64 b = 40000005;
12017
12018 int does_int64_work()
12019 {
12020   int64 c,d;
12021
12022   if (sizeof(int64) != 8)
12023     return 0;                   /* definitely not the right size */
12024
12025   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12026   c = a * b;
12027   d = (c + b) / b;
12028   if (d != a+1)
12029     return 0;
12030   return 1;
12031 }
12032 main() {
12033   exit(! does_int64_work());
12034 }
12035 _ACEOF
12036 rm -f conftest$ac_exeext
12037 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12038   (eval $ac_link) 2>&5
12039   ac_status=$?
12040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12041   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12042   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12043   (eval $ac_try) 2>&5
12044   ac_status=$?
12045   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12046   (exit $ac_status); }; }; then
12047   pgac_cv_type_long_int_64=yes
12048 else
12049   echo "$as_me: program exited with status $ac_status" >&5
12050 echo "$as_me: failed program was:" >&5
12051 cat conftest.$ac_ext >&5
12052 ( exit $ac_status )
12053 pgac_cv_type_long_int_64=no
12054 fi
12055 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12056 fi
12057 fi
12058 echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
12059 echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
12060
12061 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
12062 if test x"$pgac_cv_type_long_int_64" = xyes ; then
12063
12064 cat >>confdefs.h <<\_ACEOF
12065 #define HAVE_LONG_INT_64
12066 _ACEOF
12067
12068 fi
12069
12070
12071 if test x"$HAVE_LONG_INT_64" = x"no" ; then
12072   echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
12073 echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
12074 if test "${pgac_cv_type_long_long_int_64+set}" = set; then
12075   echo $ECHO_N "(cached) $ECHO_C" >&6
12076 else
12077   if test "$cross_compiling" = yes; then
12078   pgac_cv_type_long_long_int_64=no
12079 { echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
12080 echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
12081 else
12082   cat >conftest.$ac_ext <<_ACEOF
12083 #line $LINENO "configure"
12084 #include "confdefs.h"
12085 typedef long long int int64;
12086
12087 /*
12088  * These are globals to discourage the compiler from folding all the
12089  * arithmetic tests down to compile-time constants.
12090  */
12091 int64 a = 20000001;
12092 int64 b = 40000005;
12093
12094 int does_int64_work()
12095 {
12096   int64 c,d;
12097
12098   if (sizeof(int64) != 8)
12099     return 0;                   /* definitely not the right size */
12100
12101   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
12102   c = a * b;
12103   d = (c + b) / b;
12104   if (d != a+1)
12105     return 0;
12106   return 1;
12107 }
12108 main() {
12109   exit(! does_int64_work());
12110 }
12111 _ACEOF
12112 rm -f conftest$ac_exeext
12113 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12114   (eval $ac_link) 2>&5
12115   ac_status=$?
12116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12117   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12118   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12119   (eval $ac_try) 2>&5
12120   ac_status=$?
12121   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12122   (exit $ac_status); }; }; then
12123   pgac_cv_type_long_long_int_64=yes
12124 else
12125   echo "$as_me: program exited with status $ac_status" >&5
12126 echo "$as_me: failed program was:" >&5
12127 cat conftest.$ac_ext >&5
12128 ( exit $ac_status )
12129 pgac_cv_type_long_long_int_64=no
12130 fi
12131 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12132 fi
12133 fi
12134 echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
12135 echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
12136
12137 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
12138 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
12139
12140 cat >>confdefs.h <<\_ACEOF
12141 #define HAVE_LONG_LONG_INT_64
12142 _ACEOF
12143
12144 fi
12145
12146 fi
12147
12148
12149
12150 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
12151   cat >conftest.$ac_ext <<_ACEOF
12152 #line $LINENO "configure"
12153 #include "confdefs.h"
12154
12155 #define INT64CONST(x)  x##LL
12156 long long int foo = INT64CONST(0x1234567890123456);
12157
12158 #ifdef F77_DUMMY_MAIN
12159 #  ifdef __cplusplus
12160      extern "C"
12161 #  endif
12162    int F77_DUMMY_MAIN() { return 1; }
12163 #endif
12164 int
12165 main ()
12166 {
12167
12168   ;
12169   return 0;
12170 }
12171 _ACEOF
12172 rm -f conftest.$ac_objext
12173 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12174   (eval $ac_compile) 2>&5
12175   ac_status=$?
12176   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12177   (exit $ac_status); } &&
12178          { ac_try='test -s conftest.$ac_objext'
12179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12180   (eval $ac_try) 2>&5
12181   ac_status=$?
12182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12183   (exit $ac_status); }; }; then
12184
12185 cat >>confdefs.h <<\_ACEOF
12186 #define HAVE_LL_CONSTANTS 1
12187 _ACEOF
12188
12189 else
12190   echo "$as_me: failed program was:" >&5
12191 cat conftest.$ac_ext >&5
12192 fi
12193 rm -f conftest.$ac_objext conftest.$ac_ext
12194 fi
12195
12196
12197
12198 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
12199   if [ x$SNPRINTF = x ] ; then
12200     echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %lld" >&5
12201 echo $ECHO_N "checking whether snprintf handles 'long long int' as %lld... $ECHO_C" >&6
12202     if test "$cross_compiling" = yes; then
12203    echo "$as_me:$LINENO: result: assuming not on target machine" >&5
12204 echo "${ECHO_T}assuming not on target machine" >&6
12205         # Force usage of our own snprintf, since we cannot test foreign snprintf
12206         SNPRINTF='snprintf.o'
12207         INT64_FORMAT='"%lld"'
12208
12209 else
12210   cat >conftest.$ac_ext <<_ACEOF
12211 #line $LINENO "configure"
12212 #include "confdefs.h"
12213 #include <stdio.h>
12214 typedef long long int int64;
12215 #define INT64_FORMAT "%lld"
12216
12217 int64 a = 20000001;
12218 int64 b = 40000005;
12219
12220 int does_int64_snprintf_work()
12221 {
12222   int64 c;
12223   char buf[100];
12224
12225   if (sizeof(int64) != 8)
12226     return 0;                   /* doesn't look like the right size */
12227
12228   c = a * b;
12229   snprintf(buf, 100, INT64_FORMAT, c);
12230   if (strcmp(buf, "800000140000005") != 0)
12231     return 0;                   /* either multiply or snprintf is busted */
12232   return 1;
12233 }
12234 main() {
12235   exit(! does_int64_snprintf_work());
12236 }
12237 _ACEOF
12238 rm -f conftest$ac_exeext
12239 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12240   (eval $ac_link) 2>&5
12241   ac_status=$?
12242   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12245   (eval $ac_try) 2>&5
12246   ac_status=$?
12247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12248   (exit $ac_status); }; }; then
12249    echo "$as_me:$LINENO: result: yes" >&5
12250 echo "${ECHO_T}yes" >&6
12251           INT64_FORMAT='"%lld"'
12252
12253 else
12254   echo "$as_me: program exited with status $ac_status" >&5
12255 echo "$as_me: failed program was:" >&5
12256 cat conftest.$ac_ext >&5
12257 ( exit $ac_status )
12258  echo "$as_me:$LINENO: result: no" >&5
12259 echo "${ECHO_T}no" >&6
12260     echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %qd" >&5
12261 echo $ECHO_N "checking whether snprintf handles 'long long int' as %qd... $ECHO_C" >&6
12262     if test "$cross_compiling" = yes; then
12263    echo "$as_me:$LINENO: result: assuming not on target machine" >&5
12264 echo "${ECHO_T}assuming not on target machine" >&6
12265         # Force usage of our own snprintf, since we cannot test foreign snprintf
12266         SNPRINTF='snprintf.o'
12267         INT64_FORMAT='"%lld"'
12268
12269 else
12270   cat >conftest.$ac_ext <<_ACEOF
12271 #line $LINENO "configure"
12272 #include "confdefs.h"
12273 #include <stdio.h>
12274 typedef long long int int64;
12275 #define INT64_FORMAT "%qd"
12276
12277 int64 a = 20000001;
12278 int64 b = 40000005;
12279
12280 int does_int64_snprintf_work()
12281 {
12282   int64 c;
12283   char buf[100];
12284
12285   if (sizeof(int64) != 8)
12286     return 0;     /* doesn't look like the right size */
12287
12288   c = a * b;
12289   snprintf(buf, 100, INT64_FORMAT, c);
12290   if (strcmp(buf, "800000140000005") != 0)
12291     return 0;     /* either multiply or snprintf is busted */
12292   return 1;
12293 }
12294 main() {
12295   exit(! does_int64_snprintf_work());
12296 }
12297 _ACEOF
12298 rm -f conftest$ac_exeext
12299 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12300   (eval $ac_link) 2>&5
12301   ac_status=$?
12302   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12303   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12305   (eval $ac_try) 2>&5
12306   ac_status=$?
12307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12308   (exit $ac_status); }; }; then
12309    echo "$as_me:$LINENO: result: yes" >&5
12310 echo "${ECHO_T}yes" >&6
12311     INT64_FORMAT='"%qd"'
12312
12313 else
12314   echo "$as_me: program exited with status $ac_status" >&5
12315 echo "$as_me: failed program was:" >&5
12316 cat conftest.$ac_ext >&5
12317 ( exit $ac_status )
12318  echo "$as_me:$LINENO: result: no" >&5
12319 echo "${ECHO_T}no" >&6
12320         # Force usage of our own snprintf, since system snprintf is broken
12321         SNPRINTF='snprintf.o'
12322         INT64_FORMAT='"%lld"'
12323
12324 fi
12325 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12326 fi
12327 fi
12328 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12329 fi
12330   else
12331     # here if we previously decided we needed to use our own snprintf
12332     INT64_FORMAT='"%lld"'
12333   fi
12334 else
12335   # Here if we are not using 'long long int' at all
12336   INT64_FORMAT='"%ld"'
12337 fi
12338
12339
12340 cat >>confdefs.h <<_ACEOF
12341 #define INT64_FORMAT $INT64_FORMAT
12342 _ACEOF
12343
12344
12345
12346
12347
12348 for ac_func in strtoll strtoq
12349 do
12350 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12351 echo "$as_me:$LINENO: checking for $ac_func" >&5
12352 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12353 if eval "test \"\${$as_ac_var+set}\" = set"; then
12354   echo $ECHO_N "(cached) $ECHO_C" >&6
12355 else
12356   cat >conftest.$ac_ext <<_ACEOF
12357 #line $LINENO "configure"
12358 #include "confdefs.h"
12359 /* System header to define __stub macros and hopefully few prototypes,
12360     which can conflict with char $ac_func (); below.  */
12361 #include <assert.h>
12362 /* Override any gcc2 internal prototype to avoid an error.  */
12363 #ifdef __cplusplus
12364 extern "C"
12365 #endif
12366 /* We use char because int might match the return type of a gcc2
12367    builtin and then its argument prototype would still apply.  */
12368 char $ac_func ();
12369 char (*f) ();
12370
12371 #ifdef F77_DUMMY_MAIN
12372 #  ifdef __cplusplus
12373      extern "C"
12374 #  endif
12375    int F77_DUMMY_MAIN() { return 1; }
12376 #endif
12377 int
12378 main ()
12379 {
12380 /* The GNU C library defines this for functions which it implements
12381     to always fail with ENOSYS.  Some functions are actually named
12382     something starting with __ and the normal name is an alias.  */
12383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12384 choke me
12385 #else
12386 f = $ac_func;
12387 #endif
12388
12389   ;
12390   return 0;
12391 }
12392 _ACEOF
12393 rm -f conftest.$ac_objext conftest$ac_exeext
12394 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12395   (eval $ac_link) 2>&5
12396   ac_status=$?
12397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12398   (exit $ac_status); } &&
12399          { ac_try='test -s conftest$ac_exeext'
12400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12401   (eval $ac_try) 2>&5
12402   ac_status=$?
12403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12404   (exit $ac_status); }; }; then
12405   eval "$as_ac_var=yes"
12406 else
12407   echo "$as_me: failed program was:" >&5
12408 cat conftest.$ac_ext >&5
12409 eval "$as_ac_var=no"
12410 fi
12411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12412 fi
12413 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12414 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12415 if test `eval echo '${'$as_ac_var'}'` = yes; then
12416   cat >>confdefs.h <<_ACEOF
12417 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12418 _ACEOF
12419  break
12420 fi
12421 done
12422
12423
12424
12425 for ac_func in strtoull strtouq
12426 do
12427 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12428 echo "$as_me:$LINENO: checking for $ac_func" >&5
12429 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12430 if eval "test \"\${$as_ac_var+set}\" = set"; then
12431   echo $ECHO_N "(cached) $ECHO_C" >&6
12432 else
12433   cat >conftest.$ac_ext <<_ACEOF
12434 #line $LINENO "configure"
12435 #include "confdefs.h"
12436 /* System header to define __stub macros and hopefully few prototypes,
12437     which can conflict with char $ac_func (); below.  */
12438 #include <assert.h>
12439 /* Override any gcc2 internal prototype to avoid an error.  */
12440 #ifdef __cplusplus
12441 extern "C"
12442 #endif
12443 /* We use char because int might match the return type of a gcc2
12444    builtin and then its argument prototype would still apply.  */
12445 char $ac_func ();
12446 char (*f) ();
12447
12448 #ifdef F77_DUMMY_MAIN
12449 #  ifdef __cplusplus
12450      extern "C"
12451 #  endif
12452    int F77_DUMMY_MAIN() { return 1; }
12453 #endif
12454 int
12455 main ()
12456 {
12457 /* The GNU C library defines this for functions which it implements
12458     to always fail with ENOSYS.  Some functions are actually named
12459     something starting with __ and the normal name is an alias.  */
12460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12461 choke me
12462 #else
12463 f = $ac_func;
12464 #endif
12465
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 rm -f conftest.$ac_objext conftest$ac_exeext
12471 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12472   (eval $ac_link) 2>&5
12473   ac_status=$?
12474   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12475   (exit $ac_status); } &&
12476          { ac_try='test -s conftest$ac_exeext'
12477   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   eval "$as_ac_var=yes"
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 cat conftest.$ac_ext >&5
12486 eval "$as_ac_var=no"
12487 fi
12488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489 fi
12490 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12491 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12492 if test `eval echo '${'$as_ac_var'}'` = yes; then
12493   cat >>confdefs.h <<_ACEOF
12494 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12495 _ACEOF
12496  break
12497 fi
12498 done
12499
12500
12501 # Check for one of atexit() or on_exit()
12502
12503 for ac_func in atexit
12504 do
12505 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12506 echo "$as_me:$LINENO: checking for $ac_func" >&5
12507 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12508 if eval "test \"\${$as_ac_var+set}\" = set"; then
12509   echo $ECHO_N "(cached) $ECHO_C" >&6
12510 else
12511   cat >conftest.$ac_ext <<_ACEOF
12512 #line $LINENO "configure"
12513 #include "confdefs.h"
12514 /* System header to define __stub macros and hopefully few prototypes,
12515     which can conflict with char $ac_func (); below.  */
12516 #include <assert.h>
12517 /* Override any gcc2 internal prototype to avoid an error.  */
12518 #ifdef __cplusplus
12519 extern "C"
12520 #endif
12521 /* We use char because int might match the return type of a gcc2
12522    builtin and then its argument prototype would still apply.  */
12523 char $ac_func ();
12524 char (*f) ();
12525
12526 #ifdef F77_DUMMY_MAIN
12527 #  ifdef __cplusplus
12528      extern "C"
12529 #  endif
12530    int F77_DUMMY_MAIN() { return 1; }
12531 #endif
12532 int
12533 main ()
12534 {
12535 /* The GNU C library defines this for functions which it implements
12536     to always fail with ENOSYS.  Some functions are actually named
12537     something starting with __ and the normal name is an alias.  */
12538 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12539 choke me
12540 #else
12541 f = $ac_func;
12542 #endif
12543
12544   ;
12545   return 0;
12546 }
12547 _ACEOF
12548 rm -f conftest.$ac_objext conftest$ac_exeext
12549 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12550   (eval $ac_link) 2>&5
12551   ac_status=$?
12552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12553   (exit $ac_status); } &&
12554          { ac_try='test -s conftest$ac_exeext'
12555   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12556   (eval $ac_try) 2>&5
12557   ac_status=$?
12558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559   (exit $ac_status); }; }; then
12560   eval "$as_ac_var=yes"
12561 else
12562   echo "$as_me: failed program was:" >&5
12563 cat conftest.$ac_ext >&5
12564 eval "$as_ac_var=no"
12565 fi
12566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12567 fi
12568 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12569 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12570 if test `eval echo '${'$as_ac_var'}'` = yes; then
12571   cat >>confdefs.h <<_ACEOF
12572 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12573 _ACEOF
12574
12575 else
12576
12577 for ac_func in on_exit
12578 do
12579 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12580 echo "$as_me:$LINENO: checking for $ac_func" >&5
12581 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12582 if eval "test \"\${$as_ac_var+set}\" = set"; then
12583   echo $ECHO_N "(cached) $ECHO_C" >&6
12584 else
12585   cat >conftest.$ac_ext <<_ACEOF
12586 #line $LINENO "configure"
12587 #include "confdefs.h"
12588 /* System header to define __stub macros and hopefully few prototypes,
12589     which can conflict with char $ac_func (); below.  */
12590 #include <assert.h>
12591 /* Override any gcc2 internal prototype to avoid an error.  */
12592 #ifdef __cplusplus
12593 extern "C"
12594 #endif
12595 /* We use char because int might match the return type of a gcc2
12596    builtin and then its argument prototype would still apply.  */
12597 char $ac_func ();
12598 char (*f) ();
12599
12600 #ifdef F77_DUMMY_MAIN
12601 #  ifdef __cplusplus
12602      extern "C"
12603 #  endif
12604    int F77_DUMMY_MAIN() { return 1; }
12605 #endif
12606 int
12607 main ()
12608 {
12609 /* The GNU C library defines this for functions which it implements
12610     to always fail with ENOSYS.  Some functions are actually named
12611     something starting with __ and the normal name is an alias.  */
12612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12613 choke me
12614 #else
12615 f = $ac_func;
12616 #endif
12617
12618   ;
12619   return 0;
12620 }
12621 _ACEOF
12622 rm -f conftest.$ac_objext conftest$ac_exeext
12623 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12624   (eval $ac_link) 2>&5
12625   ac_status=$?
12626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627   (exit $ac_status); } &&
12628          { ac_try='test -s conftest$ac_exeext'
12629   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12630   (eval $ac_try) 2>&5
12631   ac_status=$?
12632   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633   (exit $ac_status); }; }; then
12634   eval "$as_ac_var=yes"
12635 else
12636   echo "$as_me: failed program was:" >&5
12637 cat conftest.$ac_ext >&5
12638 eval "$as_ac_var=no"
12639 fi
12640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12641 fi
12642 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12643 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12644 if test `eval echo '${'$as_ac_var'}'` = yes; then
12645   cat >>confdefs.h <<_ACEOF
12646 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12647 _ACEOF
12648
12649 else
12650   { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
12651 echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
12652    { (exit 1); exit 1; }; }
12653 fi
12654 done
12655
12656 fi
12657 done
12658
12659
12660
12661 echo "$as_me:$LINENO: checking for unsigned long" >&5
12662 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6
12663 if test "${ac_cv_type_unsigned_long+set}" = set; then
12664   echo $ECHO_N "(cached) $ECHO_C" >&6
12665 else
12666   cat >conftest.$ac_ext <<_ACEOF
12667 #line $LINENO "configure"
12668 #include "confdefs.h"
12669 $ac_includes_default
12670 #ifdef F77_DUMMY_MAIN
12671 #  ifdef __cplusplus
12672      extern "C"
12673 #  endif
12674    int F77_DUMMY_MAIN() { return 1; }
12675 #endif
12676 int
12677 main ()
12678 {
12679 if ((unsigned long *) 0)
12680   return 0;
12681 if (sizeof (unsigned long))
12682   return 0;
12683   ;
12684   return 0;
12685 }
12686 _ACEOF
12687 rm -f conftest.$ac_objext
12688 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12689   (eval $ac_compile) 2>&5
12690   ac_status=$?
12691   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12692   (exit $ac_status); } &&
12693          { ac_try='test -s conftest.$ac_objext'
12694   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12695   (eval $ac_try) 2>&5
12696   ac_status=$?
12697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12698   (exit $ac_status); }; }; then
12699   ac_cv_type_unsigned_long=yes
12700 else
12701   echo "$as_me: failed program was:" >&5
12702 cat conftest.$ac_ext >&5
12703 ac_cv_type_unsigned_long=no
12704 fi
12705 rm -f conftest.$ac_objext conftest.$ac_ext
12706 fi
12707 echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5
12708 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6
12709
12710 echo "$as_me:$LINENO: checking size of unsigned long" >&5
12711 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6
12712 if test "${ac_cv_sizeof_unsigned_long+set}" = set; then
12713   echo $ECHO_N "(cached) $ECHO_C" >&6
12714 else
12715   if test "$ac_cv_type_unsigned_long" = yes; then
12716   # The cast to unsigned long works around a bug in the HP C Compiler
12717   # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12718   # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12719   # This bug is HP SR number 8606223364.
12720   if test "$cross_compiling" = yes; then
12721   # Depending upon the size, compute the lo and hi bounds.
12722 cat >conftest.$ac_ext <<_ACEOF
12723 #line $LINENO "configure"
12724 #include "confdefs.h"
12725 $ac_includes_default
12726 #ifdef F77_DUMMY_MAIN
12727 #  ifdef __cplusplus
12728      extern "C"
12729 #  endif
12730    int F77_DUMMY_MAIN() { return 1; }
12731 #endif
12732 int
12733 main ()
12734 {
12735 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= 0)];
12736 test_array [0] = 0
12737
12738   ;
12739   return 0;
12740 }
12741 _ACEOF
12742 rm -f conftest.$ac_objext
12743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12744   (eval $ac_compile) 2>&5
12745   ac_status=$?
12746   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747   (exit $ac_status); } &&
12748          { ac_try='test -s conftest.$ac_objext'
12749   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12750   (eval $ac_try) 2>&5
12751   ac_status=$?
12752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753   (exit $ac_status); }; }; then
12754   ac_lo=0 ac_mid=0
12755   while :; do
12756     cat >conftest.$ac_ext <<_ACEOF
12757 #line $LINENO "configure"
12758 #include "confdefs.h"
12759 $ac_includes_default
12760 #ifdef F77_DUMMY_MAIN
12761 #  ifdef __cplusplus
12762      extern "C"
12763 #  endif
12764    int F77_DUMMY_MAIN() { return 1; }
12765 #endif
12766 int
12767 main ()
12768 {
12769 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
12770 test_array [0] = 0
12771
12772   ;
12773   return 0;
12774 }
12775 _ACEOF
12776 rm -f conftest.$ac_objext
12777 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12778   (eval $ac_compile) 2>&5
12779   ac_status=$?
12780   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12781   (exit $ac_status); } &&
12782          { ac_try='test -s conftest.$ac_objext'
12783   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12784   (eval $ac_try) 2>&5
12785   ac_status=$?
12786   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12787   (exit $ac_status); }; }; then
12788   ac_hi=$ac_mid; break
12789 else
12790   echo "$as_me: failed program was:" >&5
12791 cat conftest.$ac_ext >&5
12792 ac_lo=`expr $ac_mid + 1`
12793                     if test $ac_lo -le $ac_mid; then
12794                       ac_lo= ac_hi=
12795                       break
12796                     fi
12797                     ac_mid=`expr 2 '*' $ac_mid + 1`
12798 fi
12799 rm -f conftest.$ac_objext conftest.$ac_ext
12800   done
12801 else
12802   echo "$as_me: failed program was:" >&5
12803 cat conftest.$ac_ext >&5
12804 cat >conftest.$ac_ext <<_ACEOF
12805 #line $LINENO "configure"
12806 #include "confdefs.h"
12807 $ac_includes_default
12808 #ifdef F77_DUMMY_MAIN
12809 #  ifdef __cplusplus
12810      extern "C"
12811 #  endif
12812    int F77_DUMMY_MAIN() { return 1; }
12813 #endif
12814 int
12815 main ()
12816 {
12817 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) < 0)];
12818 test_array [0] = 0
12819
12820   ;
12821   return 0;
12822 }
12823 _ACEOF
12824 rm -f conftest.$ac_objext
12825 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12826   (eval $ac_compile) 2>&5
12827   ac_status=$?
12828   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829   (exit $ac_status); } &&
12830          { ac_try='test -s conftest.$ac_objext'
12831   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12832   (eval $ac_try) 2>&5
12833   ac_status=$?
12834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12835   (exit $ac_status); }; }; then
12836   ac_hi=-1 ac_mid=-1
12837   while :; do
12838     cat >conftest.$ac_ext <<_ACEOF
12839 #line $LINENO "configure"
12840 #include "confdefs.h"
12841 $ac_includes_default
12842 #ifdef F77_DUMMY_MAIN
12843 #  ifdef __cplusplus
12844      extern "C"
12845 #  endif
12846    int F77_DUMMY_MAIN() { return 1; }
12847 #endif
12848 int
12849 main ()
12850 {
12851 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) >= $ac_mid)];
12852 test_array [0] = 0
12853
12854   ;
12855   return 0;
12856 }
12857 _ACEOF
12858 rm -f conftest.$ac_objext
12859 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12860   (eval $ac_compile) 2>&5
12861   ac_status=$?
12862   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12863   (exit $ac_status); } &&
12864          { ac_try='test -s conftest.$ac_objext'
12865   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12866   (eval $ac_try) 2>&5
12867   ac_status=$?
12868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12869   (exit $ac_status); }; }; then
12870   ac_lo=$ac_mid; break
12871 else
12872   echo "$as_me: failed program was:" >&5
12873 cat conftest.$ac_ext >&5
12874 ac_hi=`expr '(' $ac_mid ')' - 1`
12875                        if test $ac_mid -le $ac_hi; then
12876                          ac_lo= ac_hi=
12877                          break
12878                        fi
12879                        ac_mid=`expr 2 '*' $ac_mid`
12880 fi
12881 rm -f conftest.$ac_objext conftest.$ac_ext
12882   done
12883 else
12884   echo "$as_me: failed program was:" >&5
12885 cat conftest.$ac_ext >&5
12886 ac_lo= ac_hi=
12887 fi
12888 rm -f conftest.$ac_objext conftest.$ac_ext
12889 fi
12890 rm -f conftest.$ac_objext conftest.$ac_ext
12891 # Binary search between lo and hi bounds.
12892 while test "x$ac_lo" != "x$ac_hi"; do
12893   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12894   cat >conftest.$ac_ext <<_ACEOF
12895 #line $LINENO "configure"
12896 #include "confdefs.h"
12897 $ac_includes_default
12898 #ifdef F77_DUMMY_MAIN
12899 #  ifdef __cplusplus
12900      extern "C"
12901 #  endif
12902    int F77_DUMMY_MAIN() { return 1; }
12903 #endif
12904 int
12905 main ()
12906 {
12907 static int test_array [1 - 2 * !(((long) (sizeof (unsigned long))) <= $ac_mid)];
12908 test_array [0] = 0
12909
12910   ;
12911   return 0;
12912 }
12913 _ACEOF
12914 rm -f conftest.$ac_objext
12915 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12916   (eval $ac_compile) 2>&5
12917   ac_status=$?
12918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12919   (exit $ac_status); } &&
12920          { ac_try='test -s conftest.$ac_objext'
12921   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12922   (eval $ac_try) 2>&5
12923   ac_status=$?
12924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12925   (exit $ac_status); }; }; then
12926   ac_hi=$ac_mid
12927 else
12928   echo "$as_me: failed program was:" >&5
12929 cat conftest.$ac_ext >&5
12930 ac_lo=`expr '(' $ac_mid ')' + 1`
12931 fi
12932 rm -f conftest.$ac_objext conftest.$ac_ext
12933 done
12934 case $ac_lo in
12935 ?*) ac_cv_sizeof_unsigned_long=$ac_lo;;
12936 '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
12937 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
12938    { (exit 1); exit 1; }; } ;;
12939 esac
12940 else
12941   if test "$cross_compiling" = yes; then
12942   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
12943 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12944    { (exit 1); exit 1; }; }
12945 else
12946   cat >conftest.$ac_ext <<_ACEOF
12947 #line $LINENO "configure"
12948 #include "confdefs.h"
12949 $ac_includes_default
12950 long longval () { return (long) (sizeof (unsigned long)); }
12951 unsigned long ulongval () { return (long) (sizeof (unsigned long)); }
12952 #include <stdio.h>
12953 #include <stdlib.h>
12954 #ifdef F77_DUMMY_MAIN
12955 #  ifdef __cplusplus
12956      extern "C"
12957 #  endif
12958    int F77_DUMMY_MAIN() { return 1; }
12959 #endif
12960 int
12961 main ()
12962 {
12963
12964   FILE *f = fopen ("conftest.val", "w");
12965   if (! f)
12966     exit (1);
12967   if (((long) (sizeof (unsigned long))) < 0)
12968     {
12969       long i = longval ();
12970       if (i != ((long) (sizeof (unsigned long))))
12971         exit (1);
12972       fprintf (f, "%ld\n", i);
12973     }
12974   else
12975     {
12976       unsigned long i = ulongval ();
12977       if (i != ((long) (sizeof (unsigned long))))
12978         exit (1);
12979       fprintf (f, "%lu\n", i);
12980     }
12981   exit (ferror (f) || fclose (f) != 0);
12982
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f conftest$ac_exeext
12988 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12989   (eval $ac_link) 2>&5
12990   ac_status=$?
12991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12993   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12994   (eval $ac_try) 2>&5
12995   ac_status=$?
12996   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12997   (exit $ac_status); }; }; then
12998   ac_cv_sizeof_unsigned_long=`cat conftest.val`
12999 else
13000   echo "$as_me: program exited with status $ac_status" >&5
13001 echo "$as_me: failed program was:" >&5
13002 cat conftest.$ac_ext >&5
13003 ( exit $ac_status )
13004 { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long), 77" >&5
13005 echo "$as_me: error: cannot compute sizeof (unsigned long), 77" >&2;}
13006    { (exit 1); exit 1; }; }
13007 fi
13008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13009 fi
13010 fi
13011 rm -f conftest.val
13012 else
13013   ac_cv_sizeof_unsigned_long=0
13014 fi
13015 fi
13016 echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5
13017 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6
13018 cat >>confdefs.h <<_ACEOF
13019 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
13020 _ACEOF
13021
13022
13023
13024 cat >>confdefs.h <<_ACEOF
13025 #define SIZEOF_DATUM $ac_cv_sizeof_unsigned_long
13026 _ACEOF
13027
13028
13029 # Determine memory alignment requirements for the basic C data types.
13030
13031 echo "$as_me:$LINENO: checking for short" >&5
13032 echo $ECHO_N "checking for short... $ECHO_C" >&6
13033 if test "${ac_cv_type_short+set}" = set; then
13034   echo $ECHO_N "(cached) $ECHO_C" >&6
13035 else
13036   cat >conftest.$ac_ext <<_ACEOF
13037 #line $LINENO "configure"
13038 #include "confdefs.h"
13039 $ac_includes_default
13040 #ifdef F77_DUMMY_MAIN
13041 #  ifdef __cplusplus
13042      extern "C"
13043 #  endif
13044    int F77_DUMMY_MAIN() { return 1; }
13045 #endif
13046 int
13047 main ()
13048 {
13049 if ((short *) 0)
13050   return 0;
13051 if (sizeof (short))
13052   return 0;
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext
13058 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13059   (eval $ac_compile) 2>&5
13060   ac_status=$?
13061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest.$ac_objext'
13064   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   ac_cv_type_short=yes
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 ac_cv_type_short=no
13074 fi
13075 rm -f conftest.$ac_objext conftest.$ac_ext
13076 fi
13077 echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
13078 echo "${ECHO_T}$ac_cv_type_short" >&6
13079
13080 echo "$as_me:$LINENO: checking alignment of short" >&5
13081 echo $ECHO_N "checking alignment of short... $ECHO_C" >&6
13082 if test "${pgac_cv_alignof_short+set}" = set; then
13083   echo $ECHO_N "(cached) $ECHO_C" >&6
13084 else
13085   if test "$ac_cv_type_short" = yes; then
13086   if test "$cross_compiling" = yes; then
13087   # Depending upon the size, compute the lo and hi bounds.
13088 cat >conftest.$ac_ext <<_ACEOF
13089 #line $LINENO "configure"
13090 #include "confdefs.h"
13091 $ac_includes_default
13092 struct { char filler; short field; } pgac_struct;
13093 #ifdef F77_DUMMY_MAIN
13094 #  ifdef __cplusplus
13095      extern "C"
13096 #  endif
13097    int F77_DUMMY_MAIN() { return 1; }
13098 #endif
13099 int
13100 main ()
13101 {
13102 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
13103 test_array [0] = 0
13104
13105   ;
13106   return 0;
13107 }
13108 _ACEOF
13109 rm -f conftest.$ac_objext
13110 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13111   (eval $ac_compile) 2>&5
13112   ac_status=$?
13113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13114   (exit $ac_status); } &&
13115          { ac_try='test -s conftest.$ac_objext'
13116   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120   (exit $ac_status); }; }; then
13121   ac_lo=0 ac_mid=0
13122   while :; do
13123     cat >conftest.$ac_ext <<_ACEOF
13124 #line $LINENO "configure"
13125 #include "confdefs.h"
13126 $ac_includes_default
13127 struct { char filler; short field; } pgac_struct;
13128 #ifdef F77_DUMMY_MAIN
13129 #  ifdef __cplusplus
13130      extern "C"
13131 #  endif
13132    int F77_DUMMY_MAIN() { return 1; }
13133 #endif
13134 int
13135 main ()
13136 {
13137 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
13138 test_array [0] = 0
13139
13140   ;
13141   return 0;
13142 }
13143 _ACEOF
13144 rm -f conftest.$ac_objext
13145 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13146   (eval $ac_compile) 2>&5
13147   ac_status=$?
13148   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13149   (exit $ac_status); } &&
13150          { ac_try='test -s conftest.$ac_objext'
13151   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13152   (eval $ac_try) 2>&5
13153   ac_status=$?
13154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13155   (exit $ac_status); }; }; then
13156   ac_hi=$ac_mid; break
13157 else
13158   echo "$as_me: failed program was:" >&5
13159 cat conftest.$ac_ext >&5
13160 ac_lo=`expr $ac_mid + 1`
13161                     if test $ac_lo -le $ac_mid; then
13162                       ac_lo= ac_hi=
13163                       break
13164                     fi
13165                     ac_mid=`expr 2 '*' $ac_mid + 1`
13166 fi
13167 rm -f conftest.$ac_objext conftest.$ac_ext
13168   done
13169 else
13170   echo "$as_me: failed program was:" >&5
13171 cat conftest.$ac_ext >&5
13172 cat >conftest.$ac_ext <<_ACEOF
13173 #line $LINENO "configure"
13174 #include "confdefs.h"
13175 $ac_includes_default
13176 struct { char filler; short field; } pgac_struct;
13177 #ifdef F77_DUMMY_MAIN
13178 #  ifdef __cplusplus
13179      extern "C"
13180 #  endif
13181    int F77_DUMMY_MAIN() { return 1; }
13182 #endif
13183 int
13184 main ()
13185 {
13186 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
13187 test_array [0] = 0
13188
13189   ;
13190   return 0;
13191 }
13192 _ACEOF
13193 rm -f conftest.$ac_objext
13194 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13195   (eval $ac_compile) 2>&5
13196   ac_status=$?
13197   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13198   (exit $ac_status); } &&
13199          { ac_try='test -s conftest.$ac_objext'
13200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13201   (eval $ac_try) 2>&5
13202   ac_status=$?
13203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13204   (exit $ac_status); }; }; then
13205   ac_hi=-1 ac_mid=-1
13206   while :; do
13207     cat >conftest.$ac_ext <<_ACEOF
13208 #line $LINENO "configure"
13209 #include "confdefs.h"
13210 $ac_includes_default
13211 struct { char filler; short field; } pgac_struct;
13212 #ifdef F77_DUMMY_MAIN
13213 #  ifdef __cplusplus
13214      extern "C"
13215 #  endif
13216    int F77_DUMMY_MAIN() { return 1; }
13217 #endif
13218 int
13219 main ()
13220 {
13221 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
13222 test_array [0] = 0
13223
13224   ;
13225   return 0;
13226 }
13227 _ACEOF
13228 rm -f conftest.$ac_objext
13229 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13230   (eval $ac_compile) 2>&5
13231   ac_status=$?
13232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233   (exit $ac_status); } &&
13234          { ac_try='test -s conftest.$ac_objext'
13235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13236   (eval $ac_try) 2>&5
13237   ac_status=$?
13238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13239   (exit $ac_status); }; }; then
13240   ac_lo=$ac_mid; break
13241 else
13242   echo "$as_me: failed program was:" >&5
13243 cat conftest.$ac_ext >&5
13244 ac_hi=`expr '(' $ac_mid ')' - 1`
13245                        if test $ac_mid -le $ac_hi; then
13246                          ac_lo= ac_hi=
13247                          break
13248                        fi
13249                        ac_mid=`expr 2 '*' $ac_mid`
13250 fi
13251 rm -f conftest.$ac_objext conftest.$ac_ext
13252   done
13253 else
13254   echo "$as_me: failed program was:" >&5
13255 cat conftest.$ac_ext >&5
13256 ac_lo= ac_hi=
13257 fi
13258 rm -f conftest.$ac_objext conftest.$ac_ext
13259 fi
13260 rm -f conftest.$ac_objext conftest.$ac_ext
13261 # Binary search between lo and hi bounds.
13262 while test "x$ac_lo" != "x$ac_hi"; do
13263   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13264   cat >conftest.$ac_ext <<_ACEOF
13265 #line $LINENO "configure"
13266 #include "confdefs.h"
13267 $ac_includes_default
13268 struct { char filler; short field; } pgac_struct;
13269 #ifdef F77_DUMMY_MAIN
13270 #  ifdef __cplusplus
13271      extern "C"
13272 #  endif
13273    int F77_DUMMY_MAIN() { return 1; }
13274 #endif
13275 int
13276 main ()
13277 {
13278 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
13279 test_array [0] = 0
13280
13281   ;
13282   return 0;
13283 }
13284 _ACEOF
13285 rm -f conftest.$ac_objext
13286 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13287   (eval $ac_compile) 2>&5
13288   ac_status=$?
13289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13290   (exit $ac_status); } &&
13291          { ac_try='test -s conftest.$ac_objext'
13292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13293   (eval $ac_try) 2>&5
13294   ac_status=$?
13295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13296   (exit $ac_status); }; }; then
13297   ac_hi=$ac_mid
13298 else
13299   echo "$as_me: failed program was:" >&5
13300 cat conftest.$ac_ext >&5
13301 ac_lo=`expr '(' $ac_mid ')' + 1`
13302 fi
13303 rm -f conftest.$ac_objext conftest.$ac_ext
13304 done
13305 case $ac_lo in
13306 ?*) pgac_cv_alignof_short=$ac_lo;;
13307 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
13308 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
13309    { (exit 1); exit 1; }; } ;;
13310 esac
13311 else
13312   if test "$cross_compiling" = yes; then
13313   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
13314 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13315    { (exit 1); exit 1; }; }
13316 else
13317   cat >conftest.$ac_ext <<_ACEOF
13318 #line $LINENO "configure"
13319 #include "confdefs.h"
13320 $ac_includes_default
13321 struct { char filler; short field; } pgac_struct;
13322 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
13323 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
13324 #include <stdio.h>
13325 #include <stdlib.h>
13326 #ifdef F77_DUMMY_MAIN
13327 #  ifdef __cplusplus
13328      extern "C"
13329 #  endif
13330    int F77_DUMMY_MAIN() { return 1; }
13331 #endif
13332 int
13333 main ()
13334 {
13335
13336   FILE *f = fopen ("conftest.val", "w");
13337   if (! f)
13338     exit (1);
13339   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
13340     {
13341       long i = longval ();
13342       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
13343         exit (1);
13344       fprintf (f, "%ld\n", i);
13345     }
13346   else
13347     {
13348       unsigned long i = ulongval ();
13349       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
13350         exit (1);
13351       fprintf (f, "%lu\n", i);
13352     }
13353   exit (ferror (f) || fclose (f) != 0);
13354
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest$ac_exeext
13360 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13361   (eval $ac_link) 2>&5
13362   ac_status=$?
13363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13364   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13365   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13369   (exit $ac_status); }; }; then
13370   pgac_cv_alignof_short=`cat conftest.val`
13371 else
13372   echo "$as_me: program exited with status $ac_status" >&5
13373 echo "$as_me: failed program was:" >&5
13374 cat conftest.$ac_ext >&5
13375 ( exit $ac_status )
13376 { { echo "$as_me:$LINENO: error: cannot compute alignment of short, 77" >&5
13377 echo "$as_me: error: cannot compute alignment of short, 77" >&2;}
13378    { (exit 1); exit 1; }; }
13379 fi
13380 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13381 fi
13382 fi
13383 rm -f conftest.val
13384 else
13385   pgac_cv_alignof_short=0
13386 fi
13387 fi
13388 echo "$as_me:$LINENO: result: $pgac_cv_alignof_short" >&5
13389 echo "${ECHO_T}$pgac_cv_alignof_short" >&6
13390 cat >>confdefs.h <<_ACEOF
13391 #define ALIGNOF_SHORT $pgac_cv_alignof_short
13392 _ACEOF
13393
13394
13395 echo "$as_me:$LINENO: checking for int" >&5
13396 echo $ECHO_N "checking for int... $ECHO_C" >&6
13397 if test "${ac_cv_type_int+set}" = set; then
13398   echo $ECHO_N "(cached) $ECHO_C" >&6
13399 else
13400   cat >conftest.$ac_ext <<_ACEOF
13401 #line $LINENO "configure"
13402 #include "confdefs.h"
13403 $ac_includes_default
13404 #ifdef F77_DUMMY_MAIN
13405 #  ifdef __cplusplus
13406      extern "C"
13407 #  endif
13408    int F77_DUMMY_MAIN() { return 1; }
13409 #endif
13410 int
13411 main ()
13412 {
13413 if ((int *) 0)
13414   return 0;
13415 if (sizeof (int))
13416   return 0;
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f conftest.$ac_objext
13422 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13423   (eval $ac_compile) 2>&5
13424   ac_status=$?
13425   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426   (exit $ac_status); } &&
13427          { ac_try='test -s conftest.$ac_objext'
13428   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13432   (exit $ac_status); }; }; then
13433   ac_cv_type_int=yes
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat conftest.$ac_ext >&5
13437 ac_cv_type_int=no
13438 fi
13439 rm -f conftest.$ac_objext conftest.$ac_ext
13440 fi
13441 echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
13442 echo "${ECHO_T}$ac_cv_type_int" >&6
13443
13444 echo "$as_me:$LINENO: checking alignment of int" >&5
13445 echo $ECHO_N "checking alignment of int... $ECHO_C" >&6
13446 if test "${pgac_cv_alignof_int+set}" = set; then
13447   echo $ECHO_N "(cached) $ECHO_C" >&6
13448 else
13449   if test "$ac_cv_type_int" = yes; then
13450   if test "$cross_compiling" = yes; then
13451   # Depending upon the size, compute the lo and hi bounds.
13452 cat >conftest.$ac_ext <<_ACEOF
13453 #line $LINENO "configure"
13454 #include "confdefs.h"
13455 $ac_includes_default
13456 struct { char filler; int field; } pgac_struct;
13457 #ifdef F77_DUMMY_MAIN
13458 #  ifdef __cplusplus
13459      extern "C"
13460 #  endif
13461    int F77_DUMMY_MAIN() { return 1; }
13462 #endif
13463 int
13464 main ()
13465 {
13466 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
13467 test_array [0] = 0
13468
13469   ;
13470   return 0;
13471 }
13472 _ACEOF
13473 rm -f conftest.$ac_objext
13474 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13475   (eval $ac_compile) 2>&5
13476   ac_status=$?
13477   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478   (exit $ac_status); } &&
13479          { ac_try='test -s conftest.$ac_objext'
13480   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13481   (eval $ac_try) 2>&5
13482   ac_status=$?
13483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13484   (exit $ac_status); }; }; then
13485   ac_lo=0 ac_mid=0
13486   while :; do
13487     cat >conftest.$ac_ext <<_ACEOF
13488 #line $LINENO "configure"
13489 #include "confdefs.h"
13490 $ac_includes_default
13491 struct { char filler; int field; } pgac_struct;
13492 #ifdef F77_DUMMY_MAIN
13493 #  ifdef __cplusplus
13494      extern "C"
13495 #  endif
13496    int F77_DUMMY_MAIN() { return 1; }
13497 #endif
13498 int
13499 main ()
13500 {
13501 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
13502 test_array [0] = 0
13503
13504   ;
13505   return 0;
13506 }
13507 _ACEOF
13508 rm -f conftest.$ac_objext
13509 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13510   (eval $ac_compile) 2>&5
13511   ac_status=$?
13512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13513   (exit $ac_status); } &&
13514          { ac_try='test -s conftest.$ac_objext'
13515   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13516   (eval $ac_try) 2>&5
13517   ac_status=$?
13518   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13519   (exit $ac_status); }; }; then
13520   ac_hi=$ac_mid; break
13521 else
13522   echo "$as_me: failed program was:" >&5
13523 cat conftest.$ac_ext >&5
13524 ac_lo=`expr $ac_mid + 1`
13525                     if test $ac_lo -le $ac_mid; then
13526                       ac_lo= ac_hi=
13527                       break
13528                     fi
13529                     ac_mid=`expr 2 '*' $ac_mid + 1`
13530 fi
13531 rm -f conftest.$ac_objext conftest.$ac_ext
13532   done
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 cat >conftest.$ac_ext <<_ACEOF
13537 #line $LINENO "configure"
13538 #include "confdefs.h"
13539 $ac_includes_default
13540 struct { char filler; int field; } pgac_struct;
13541 #ifdef F77_DUMMY_MAIN
13542 #  ifdef __cplusplus
13543      extern "C"
13544 #  endif
13545    int F77_DUMMY_MAIN() { return 1; }
13546 #endif
13547 int
13548 main ()
13549 {
13550 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
13551 test_array [0] = 0
13552
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f conftest.$ac_objext
13558 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13559   (eval $ac_compile) 2>&5
13560   ac_status=$?
13561   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13562   (exit $ac_status); } &&
13563          { ac_try='test -s conftest.$ac_objext'
13564   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568   (exit $ac_status); }; }; then
13569   ac_hi=-1 ac_mid=-1
13570   while :; do
13571     cat >conftest.$ac_ext <<_ACEOF
13572 #line $LINENO "configure"
13573 #include "confdefs.h"
13574 $ac_includes_default
13575 struct { char filler; int field; } pgac_struct;
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 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
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   ac_lo=$ac_mid; break
13605 else
13606   echo "$as_me: failed program was:" >&5
13607 cat conftest.$ac_ext >&5
13608 ac_hi=`expr '(' $ac_mid ')' - 1`
13609                        if test $ac_mid -le $ac_hi; then
13610                          ac_lo= ac_hi=
13611                          break
13612                        fi
13613                        ac_mid=`expr 2 '*' $ac_mid`
13614 fi
13615 rm -f conftest.$ac_objext conftest.$ac_ext
13616   done
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 cat conftest.$ac_ext >&5
13620 ac_lo= ac_hi=
13621 fi
13622 rm -f conftest.$ac_objext conftest.$ac_ext
13623 fi
13624 rm -f conftest.$ac_objext conftest.$ac_ext
13625 # Binary search between lo and hi bounds.
13626 while test "x$ac_lo" != "x$ac_hi"; do
13627   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13628   cat >conftest.$ac_ext <<_ACEOF
13629 #line $LINENO "configure"
13630 #include "confdefs.h"
13631 $ac_includes_default
13632 struct { char filler; int field; } pgac_struct;
13633 #ifdef F77_DUMMY_MAIN
13634 #  ifdef __cplusplus
13635      extern "C"
13636 #  endif
13637    int F77_DUMMY_MAIN() { return 1; }
13638 #endif
13639 int
13640 main ()
13641 {
13642 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
13643 test_array [0] = 0
13644
13645   ;
13646   return 0;
13647 }
13648 _ACEOF
13649 rm -f conftest.$ac_objext
13650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13651   (eval $ac_compile) 2>&5
13652   ac_status=$?
13653   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13654   (exit $ac_status); } &&
13655          { ac_try='test -s conftest.$ac_objext'
13656   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13657   (eval $ac_try) 2>&5
13658   ac_status=$?
13659   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660   (exit $ac_status); }; }; then
13661   ac_hi=$ac_mid
13662 else
13663   echo "$as_me: failed program was:" >&5
13664 cat conftest.$ac_ext >&5
13665 ac_lo=`expr '(' $ac_mid ')' + 1`
13666 fi
13667 rm -f conftest.$ac_objext conftest.$ac_ext
13668 done
13669 case $ac_lo in
13670 ?*) pgac_cv_alignof_int=$ac_lo;;
13671 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
13672 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
13673    { (exit 1); exit 1; }; } ;;
13674 esac
13675 else
13676   if test "$cross_compiling" = yes; then
13677   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
13678 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13679    { (exit 1); exit 1; }; }
13680 else
13681   cat >conftest.$ac_ext <<_ACEOF
13682 #line $LINENO "configure"
13683 #include "confdefs.h"
13684 $ac_includes_default
13685 struct { char filler; int field; } pgac_struct;
13686 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
13687 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
13688 #include <stdio.h>
13689 #include <stdlib.h>
13690 #ifdef F77_DUMMY_MAIN
13691 #  ifdef __cplusplus
13692      extern "C"
13693 #  endif
13694    int F77_DUMMY_MAIN() { return 1; }
13695 #endif
13696 int
13697 main ()
13698 {
13699
13700   FILE *f = fopen ("conftest.val", "w");
13701   if (! f)
13702     exit (1);
13703   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
13704     {
13705       long i = longval ();
13706       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
13707         exit (1);
13708       fprintf (f, "%ld\n", i);
13709     }
13710   else
13711     {
13712       unsigned long i = ulongval ();
13713       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
13714         exit (1);
13715       fprintf (f, "%lu\n", i);
13716     }
13717   exit (ferror (f) || fclose (f) != 0);
13718
13719   ;
13720   return 0;
13721 }
13722 _ACEOF
13723 rm -f conftest$ac_exeext
13724 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13725   (eval $ac_link) 2>&5
13726   ac_status=$?
13727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13728   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13730   (eval $ac_try) 2>&5
13731   ac_status=$?
13732   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733   (exit $ac_status); }; }; then
13734   pgac_cv_alignof_int=`cat conftest.val`
13735 else
13736   echo "$as_me: program exited with status $ac_status" >&5
13737 echo "$as_me: failed program was:" >&5
13738 cat conftest.$ac_ext >&5
13739 ( exit $ac_status )
13740 { { echo "$as_me:$LINENO: error: cannot compute alignment of int, 77" >&5
13741 echo "$as_me: error: cannot compute alignment of int, 77" >&2;}
13742    { (exit 1); exit 1; }; }
13743 fi
13744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13745 fi
13746 fi
13747 rm -f conftest.val
13748 else
13749   pgac_cv_alignof_int=0
13750 fi
13751 fi
13752 echo "$as_me:$LINENO: result: $pgac_cv_alignof_int" >&5
13753 echo "${ECHO_T}$pgac_cv_alignof_int" >&6
13754 cat >>confdefs.h <<_ACEOF
13755 #define ALIGNOF_INT $pgac_cv_alignof_int
13756 _ACEOF
13757
13758
13759 echo "$as_me:$LINENO: checking for long" >&5
13760 echo $ECHO_N "checking for long... $ECHO_C" >&6
13761 if test "${ac_cv_type_long+set}" = set; then
13762   echo $ECHO_N "(cached) $ECHO_C" >&6
13763 else
13764   cat >conftest.$ac_ext <<_ACEOF
13765 #line $LINENO "configure"
13766 #include "confdefs.h"
13767 $ac_includes_default
13768 #ifdef F77_DUMMY_MAIN
13769 #  ifdef __cplusplus
13770      extern "C"
13771 #  endif
13772    int F77_DUMMY_MAIN() { return 1; }
13773 #endif
13774 int
13775 main ()
13776 {
13777 if ((long *) 0)
13778   return 0;
13779 if (sizeof (long))
13780   return 0;
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f conftest.$ac_objext
13786 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>&5
13788   ac_status=$?
13789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13790   (exit $ac_status); } &&
13791          { ac_try='test -s conftest.$ac_objext'
13792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796   (exit $ac_status); }; }; then
13797   ac_cv_type_long=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat conftest.$ac_ext >&5
13801 ac_cv_type_long=no
13802 fi
13803 rm -f conftest.$ac_objext conftest.$ac_ext
13804 fi
13805 echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
13806 echo "${ECHO_T}$ac_cv_type_long" >&6
13807
13808 echo "$as_me:$LINENO: checking alignment of long" >&5
13809 echo $ECHO_N "checking alignment of long... $ECHO_C" >&6
13810 if test "${pgac_cv_alignof_long+set}" = set; then
13811   echo $ECHO_N "(cached) $ECHO_C" >&6
13812 else
13813   if test "$ac_cv_type_long" = yes; then
13814   if test "$cross_compiling" = yes; then
13815   # Depending upon the size, compute the lo and hi bounds.
13816 cat >conftest.$ac_ext <<_ACEOF
13817 #line $LINENO "configure"
13818 #include "confdefs.h"
13819 $ac_includes_default
13820 struct { char filler; long field; } pgac_struct;
13821 #ifdef F77_DUMMY_MAIN
13822 #  ifdef __cplusplus
13823      extern "C"
13824 #  endif
13825    int F77_DUMMY_MAIN() { return 1; }
13826 #endif
13827 int
13828 main ()
13829 {
13830 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
13831 test_array [0] = 0
13832
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 rm -f conftest.$ac_objext
13838 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13839   (eval $ac_compile) 2>&5
13840   ac_status=$?
13841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842   (exit $ac_status); } &&
13843          { ac_try='test -s conftest.$ac_objext'
13844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13845   (eval $ac_try) 2>&5
13846   ac_status=$?
13847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13848   (exit $ac_status); }; }; then
13849   ac_lo=0 ac_mid=0
13850   while :; do
13851     cat >conftest.$ac_ext <<_ACEOF
13852 #line $LINENO "configure"
13853 #include "confdefs.h"
13854 $ac_includes_default
13855 struct { char filler; long field; } pgac_struct;
13856 #ifdef F77_DUMMY_MAIN
13857 #  ifdef __cplusplus
13858      extern "C"
13859 #  endif
13860    int F77_DUMMY_MAIN() { return 1; }
13861 #endif
13862 int
13863 main ()
13864 {
13865 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
13866 test_array [0] = 0
13867
13868   ;
13869   return 0;
13870 }
13871 _ACEOF
13872 rm -f conftest.$ac_objext
13873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13874   (eval $ac_compile) 2>&5
13875   ac_status=$?
13876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877   (exit $ac_status); } &&
13878          { ac_try='test -s conftest.$ac_objext'
13879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880   (eval $ac_try) 2>&5
13881   ac_status=$?
13882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883   (exit $ac_status); }; }; then
13884   ac_hi=$ac_mid; break
13885 else
13886   echo "$as_me: failed program was:" >&5
13887 cat conftest.$ac_ext >&5
13888 ac_lo=`expr $ac_mid + 1`
13889                     if test $ac_lo -le $ac_mid; then
13890                       ac_lo= ac_hi=
13891                       break
13892                     fi
13893                     ac_mid=`expr 2 '*' $ac_mid + 1`
13894 fi
13895 rm -f conftest.$ac_objext conftest.$ac_ext
13896   done
13897 else
13898   echo "$as_me: failed program was:" >&5
13899 cat conftest.$ac_ext >&5
13900 cat >conftest.$ac_ext <<_ACEOF
13901 #line $LINENO "configure"
13902 #include "confdefs.h"
13903 $ac_includes_default
13904 struct { char filler; long field; } pgac_struct;
13905 #ifdef F77_DUMMY_MAIN
13906 #  ifdef __cplusplus
13907      extern "C"
13908 #  endif
13909    int F77_DUMMY_MAIN() { return 1; }
13910 #endif
13911 int
13912 main ()
13913 {
13914 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
13915 test_array [0] = 0
13916
13917   ;
13918   return 0;
13919 }
13920 _ACEOF
13921 rm -f conftest.$ac_objext
13922 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13923   (eval $ac_compile) 2>&5
13924   ac_status=$?
13925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13926   (exit $ac_status); } &&
13927          { ac_try='test -s conftest.$ac_objext'
13928   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13929   (eval $ac_try) 2>&5
13930   ac_status=$?
13931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932   (exit $ac_status); }; }; then
13933   ac_hi=-1 ac_mid=-1
13934   while :; do
13935     cat >conftest.$ac_ext <<_ACEOF
13936 #line $LINENO "configure"
13937 #include "confdefs.h"
13938 $ac_includes_default
13939 struct { char filler; long field; } pgac_struct;
13940 #ifdef F77_DUMMY_MAIN
13941 #  ifdef __cplusplus
13942      extern "C"
13943 #  endif
13944    int F77_DUMMY_MAIN() { return 1; }
13945 #endif
13946 int
13947 main ()
13948 {
13949 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
13950 test_array [0] = 0
13951
13952   ;
13953   return 0;
13954 }
13955 _ACEOF
13956 rm -f conftest.$ac_objext
13957 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13958   (eval $ac_compile) 2>&5
13959   ac_status=$?
13960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13961   (exit $ac_status); } &&
13962          { ac_try='test -s conftest.$ac_objext'
13963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13964   (eval $ac_try) 2>&5
13965   ac_status=$?
13966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13967   (exit $ac_status); }; }; then
13968   ac_lo=$ac_mid; break
13969 else
13970   echo "$as_me: failed program was:" >&5
13971 cat conftest.$ac_ext >&5
13972 ac_hi=`expr '(' $ac_mid ')' - 1`
13973                        if test $ac_mid -le $ac_hi; then
13974                          ac_lo= ac_hi=
13975                          break
13976                        fi
13977                        ac_mid=`expr 2 '*' $ac_mid`
13978 fi
13979 rm -f conftest.$ac_objext conftest.$ac_ext
13980   done
13981 else
13982   echo "$as_me: failed program was:" >&5
13983 cat conftest.$ac_ext >&5
13984 ac_lo= ac_hi=
13985 fi
13986 rm -f conftest.$ac_objext conftest.$ac_ext
13987 fi
13988 rm -f conftest.$ac_objext conftest.$ac_ext
13989 # Binary search between lo and hi bounds.
13990 while test "x$ac_lo" != "x$ac_hi"; do
13991   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13992   cat >conftest.$ac_ext <<_ACEOF
13993 #line $LINENO "configure"
13994 #include "confdefs.h"
13995 $ac_includes_default
13996 struct { char filler; long field; } pgac_struct;
13997 #ifdef F77_DUMMY_MAIN
13998 #  ifdef __cplusplus
13999      extern "C"
14000 #  endif
14001    int F77_DUMMY_MAIN() { return 1; }
14002 #endif
14003 int
14004 main ()
14005 {
14006 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14007 test_array [0] = 0
14008
14009   ;
14010   return 0;
14011 }
14012 _ACEOF
14013 rm -f conftest.$ac_objext
14014 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14015   (eval $ac_compile) 2>&5
14016   ac_status=$?
14017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14018   (exit $ac_status); } &&
14019          { ac_try='test -s conftest.$ac_objext'
14020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14021   (eval $ac_try) 2>&5
14022   ac_status=$?
14023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14024   (exit $ac_status); }; }; then
14025   ac_hi=$ac_mid
14026 else
14027   echo "$as_me: failed program was:" >&5
14028 cat conftest.$ac_ext >&5
14029 ac_lo=`expr '(' $ac_mid ')' + 1`
14030 fi
14031 rm -f conftest.$ac_objext conftest.$ac_ext
14032 done
14033 case $ac_lo in
14034 ?*) pgac_cv_alignof_long=$ac_lo;;
14035 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
14036 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
14037    { (exit 1); exit 1; }; } ;;
14038 esac
14039 else
14040   if test "$cross_compiling" = yes; then
14041   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14042 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14043    { (exit 1); exit 1; }; }
14044 else
14045   cat >conftest.$ac_ext <<_ACEOF
14046 #line $LINENO "configure"
14047 #include "confdefs.h"
14048 $ac_includes_default
14049 struct { char filler; long field; } pgac_struct;
14050 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14051 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14052 #include <stdio.h>
14053 #include <stdlib.h>
14054 #ifdef F77_DUMMY_MAIN
14055 #  ifdef __cplusplus
14056      extern "C"
14057 #  endif
14058    int F77_DUMMY_MAIN() { return 1; }
14059 #endif
14060 int
14061 main ()
14062 {
14063
14064   FILE *f = fopen ("conftest.val", "w");
14065   if (! f)
14066     exit (1);
14067   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
14068     {
14069       long i = longval ();
14070       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14071         exit (1);
14072       fprintf (f, "%ld\n", i);
14073     }
14074   else
14075     {
14076       unsigned long i = ulongval ();
14077       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14078         exit (1);
14079       fprintf (f, "%lu\n", i);
14080     }
14081   exit (ferror (f) || fclose (f) != 0);
14082
14083   ;
14084   return 0;
14085 }
14086 _ACEOF
14087 rm -f conftest$ac_exeext
14088 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14089   (eval $ac_link) 2>&5
14090   ac_status=$?
14091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14092   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14094   (eval $ac_try) 2>&5
14095   ac_status=$?
14096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14097   (exit $ac_status); }; }; then
14098   pgac_cv_alignof_long=`cat conftest.val`
14099 else
14100   echo "$as_me: program exited with status $ac_status" >&5
14101 echo "$as_me: failed program was:" >&5
14102 cat conftest.$ac_ext >&5
14103 ( exit $ac_status )
14104 { { echo "$as_me:$LINENO: error: cannot compute alignment of long, 77" >&5
14105 echo "$as_me: error: cannot compute alignment of long, 77" >&2;}
14106    { (exit 1); exit 1; }; }
14107 fi
14108 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14109 fi
14110 fi
14111 rm -f conftest.val
14112 else
14113   pgac_cv_alignof_long=0
14114 fi
14115 fi
14116 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long" >&5
14117 echo "${ECHO_T}$pgac_cv_alignof_long" >&6
14118 cat >>confdefs.h <<_ACEOF
14119 #define ALIGNOF_LONG $pgac_cv_alignof_long
14120 _ACEOF
14121
14122
14123 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14124   echo "$as_me:$LINENO: checking for long long int" >&5
14125 echo $ECHO_N "checking for long long int... $ECHO_C" >&6
14126 if test "${ac_cv_type_long_long_int+set}" = set; then
14127   echo $ECHO_N "(cached) $ECHO_C" >&6
14128 else
14129   cat >conftest.$ac_ext <<_ACEOF
14130 #line $LINENO "configure"
14131 #include "confdefs.h"
14132 $ac_includes_default
14133 #ifdef F77_DUMMY_MAIN
14134 #  ifdef __cplusplus
14135      extern "C"
14136 #  endif
14137    int F77_DUMMY_MAIN() { return 1; }
14138 #endif
14139 int
14140 main ()
14141 {
14142 if ((long long int *) 0)
14143   return 0;
14144 if (sizeof (long long int))
14145   return 0;
14146   ;
14147   return 0;
14148 }
14149 _ACEOF
14150 rm -f conftest.$ac_objext
14151 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14152   (eval $ac_compile) 2>&5
14153   ac_status=$?
14154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14155   (exit $ac_status); } &&
14156          { ac_try='test -s conftest.$ac_objext'
14157   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14158   (eval $ac_try) 2>&5
14159   ac_status=$?
14160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14161   (exit $ac_status); }; }; then
14162   ac_cv_type_long_long_int=yes
14163 else
14164   echo "$as_me: failed program was:" >&5
14165 cat conftest.$ac_ext >&5
14166 ac_cv_type_long_long_int=no
14167 fi
14168 rm -f conftest.$ac_objext conftest.$ac_ext
14169 fi
14170 echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
14171 echo "${ECHO_T}$ac_cv_type_long_long_int" >&6
14172
14173 echo "$as_me:$LINENO: checking alignment of long long int" >&5
14174 echo $ECHO_N "checking alignment of long long int... $ECHO_C" >&6
14175 if test "${pgac_cv_alignof_long_long_int+set}" = set; then
14176   echo $ECHO_N "(cached) $ECHO_C" >&6
14177 else
14178   if test "$ac_cv_type_long_long_int" = yes; then
14179   if test "$cross_compiling" = yes; then
14180   # Depending upon the size, compute the lo and hi bounds.
14181 cat >conftest.$ac_ext <<_ACEOF
14182 #line $LINENO "configure"
14183 #include "confdefs.h"
14184 $ac_includes_default
14185 struct { char filler; long long int field; } pgac_struct;
14186 #ifdef F77_DUMMY_MAIN
14187 #  ifdef __cplusplus
14188      extern "C"
14189 #  endif
14190    int F77_DUMMY_MAIN() { return 1; }
14191 #endif
14192 int
14193 main ()
14194 {
14195 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14196 test_array [0] = 0
14197
14198   ;
14199   return 0;
14200 }
14201 _ACEOF
14202 rm -f conftest.$ac_objext
14203 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14204   (eval $ac_compile) 2>&5
14205   ac_status=$?
14206   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207   (exit $ac_status); } &&
14208          { ac_try='test -s conftest.$ac_objext'
14209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210   (eval $ac_try) 2>&5
14211   ac_status=$?
14212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213   (exit $ac_status); }; }; then
14214   ac_lo=0 ac_mid=0
14215   while :; do
14216     cat >conftest.$ac_ext <<_ACEOF
14217 #line $LINENO "configure"
14218 #include "confdefs.h"
14219 $ac_includes_default
14220 struct { char filler; long long int field; } pgac_struct;
14221 #ifdef F77_DUMMY_MAIN
14222 #  ifdef __cplusplus
14223      extern "C"
14224 #  endif
14225    int F77_DUMMY_MAIN() { return 1; }
14226 #endif
14227 int
14228 main ()
14229 {
14230 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14231 test_array [0] = 0
14232
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 rm -f conftest.$ac_objext
14238 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14239   (eval $ac_compile) 2>&5
14240   ac_status=$?
14241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14242   (exit $ac_status); } &&
14243          { ac_try='test -s conftest.$ac_objext'
14244   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14245   (eval $ac_try) 2>&5
14246   ac_status=$?
14247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14248   (exit $ac_status); }; }; then
14249   ac_hi=$ac_mid; break
14250 else
14251   echo "$as_me: failed program was:" >&5
14252 cat conftest.$ac_ext >&5
14253 ac_lo=`expr $ac_mid + 1`
14254                     if test $ac_lo -le $ac_mid; then
14255                       ac_lo= ac_hi=
14256                       break
14257                     fi
14258                     ac_mid=`expr 2 '*' $ac_mid + 1`
14259 fi
14260 rm -f conftest.$ac_objext conftest.$ac_ext
14261   done
14262 else
14263   echo "$as_me: failed program was:" >&5
14264 cat conftest.$ac_ext >&5
14265 cat >conftest.$ac_ext <<_ACEOF
14266 #line $LINENO "configure"
14267 #include "confdefs.h"
14268 $ac_includes_default
14269 struct { char filler; long long int field; } pgac_struct;
14270 #ifdef F77_DUMMY_MAIN
14271 #  ifdef __cplusplus
14272      extern "C"
14273 #  endif
14274    int F77_DUMMY_MAIN() { return 1; }
14275 #endif
14276 int
14277 main ()
14278 {
14279 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
14280 test_array [0] = 0
14281
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 rm -f conftest.$ac_objext
14287 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14288   (eval $ac_compile) 2>&5
14289   ac_status=$?
14290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291   (exit $ac_status); } &&
14292          { ac_try='test -s conftest.$ac_objext'
14293   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14294   (eval $ac_try) 2>&5
14295   ac_status=$?
14296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297   (exit $ac_status); }; }; then
14298   ac_hi=-1 ac_mid=-1
14299   while :; do
14300     cat >conftest.$ac_ext <<_ACEOF
14301 #line $LINENO "configure"
14302 #include "confdefs.h"
14303 $ac_includes_default
14304 struct { char filler; long long int field; } pgac_struct;
14305 #ifdef F77_DUMMY_MAIN
14306 #  ifdef __cplusplus
14307      extern "C"
14308 #  endif
14309    int F77_DUMMY_MAIN() { return 1; }
14310 #endif
14311 int
14312 main ()
14313 {
14314 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
14315 test_array [0] = 0
14316
14317   ;
14318   return 0;
14319 }
14320 _ACEOF
14321 rm -f conftest.$ac_objext
14322 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14323   (eval $ac_compile) 2>&5
14324   ac_status=$?
14325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14326   (exit $ac_status); } &&
14327          { ac_try='test -s conftest.$ac_objext'
14328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14329   (eval $ac_try) 2>&5
14330   ac_status=$?
14331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14332   (exit $ac_status); }; }; then
14333   ac_lo=$ac_mid; break
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat conftest.$ac_ext >&5
14337 ac_hi=`expr '(' $ac_mid ')' - 1`
14338                        if test $ac_mid -le $ac_hi; then
14339                          ac_lo= ac_hi=
14340                          break
14341                        fi
14342                        ac_mid=`expr 2 '*' $ac_mid`
14343 fi
14344 rm -f conftest.$ac_objext conftest.$ac_ext
14345   done
14346 else
14347   echo "$as_me: failed program was:" >&5
14348 cat conftest.$ac_ext >&5
14349 ac_lo= ac_hi=
14350 fi
14351 rm -f conftest.$ac_objext conftest.$ac_ext
14352 fi
14353 rm -f conftest.$ac_objext conftest.$ac_ext
14354 # Binary search between lo and hi bounds.
14355 while test "x$ac_lo" != "x$ac_hi"; do
14356   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14357   cat >conftest.$ac_ext <<_ACEOF
14358 #line $LINENO "configure"
14359 #include "confdefs.h"
14360 $ac_includes_default
14361 struct { char filler; long long int field; } pgac_struct;
14362 #ifdef F77_DUMMY_MAIN
14363 #  ifdef __cplusplus
14364      extern "C"
14365 #  endif
14366    int F77_DUMMY_MAIN() { return 1; }
14367 #endif
14368 int
14369 main ()
14370 {
14371 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14372 test_array [0] = 0
14373
14374   ;
14375   return 0;
14376 }
14377 _ACEOF
14378 rm -f conftest.$ac_objext
14379 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14380   (eval $ac_compile) 2>&5
14381   ac_status=$?
14382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14383   (exit $ac_status); } &&
14384          { ac_try='test -s conftest.$ac_objext'
14385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14386   (eval $ac_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14389   (exit $ac_status); }; }; then
14390   ac_hi=$ac_mid
14391 else
14392   echo "$as_me: failed program was:" >&5
14393 cat conftest.$ac_ext >&5
14394 ac_lo=`expr '(' $ac_mid ')' + 1`
14395 fi
14396 rm -f conftest.$ac_objext conftest.$ac_ext
14397 done
14398 case $ac_lo in
14399 ?*) pgac_cv_alignof_long_long_int=$ac_lo;;
14400 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
14401 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
14402    { (exit 1); exit 1; }; } ;;
14403 esac
14404 else
14405   if test "$cross_compiling" = yes; then
14406   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14407 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14408    { (exit 1); exit 1; }; }
14409 else
14410   cat >conftest.$ac_ext <<_ACEOF
14411 #line $LINENO "configure"
14412 #include "confdefs.h"
14413 $ac_includes_default
14414 struct { char filler; long long int field; } pgac_struct;
14415 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14416 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14417 #include <stdio.h>
14418 #include <stdlib.h>
14419 #ifdef F77_DUMMY_MAIN
14420 #  ifdef __cplusplus
14421      extern "C"
14422 #  endif
14423    int F77_DUMMY_MAIN() { return 1; }
14424 #endif
14425 int
14426 main ()
14427 {
14428
14429   FILE *f = fopen ("conftest.val", "w");
14430   if (! f)
14431     exit (1);
14432   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
14433     {
14434       long i = longval ();
14435       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14436         exit (1);
14437       fprintf (f, "%ld\n", i);
14438     }
14439   else
14440     {
14441       unsigned long i = ulongval ();
14442       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14443         exit (1);
14444       fprintf (f, "%lu\n", i);
14445     }
14446   exit (ferror (f) || fclose (f) != 0);
14447
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 rm -f conftest$ac_exeext
14453 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14454   (eval $ac_link) 2>&5
14455   ac_status=$?
14456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14458   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14459   (eval $ac_try) 2>&5
14460   ac_status=$?
14461   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14462   (exit $ac_status); }; }; then
14463   pgac_cv_alignof_long_long_int=`cat conftest.val`
14464 else
14465   echo "$as_me: program exited with status $ac_status" >&5
14466 echo "$as_me: failed program was:" >&5
14467 cat conftest.$ac_ext >&5
14468 ( exit $ac_status )
14469 { { echo "$as_me:$LINENO: error: cannot compute alignment of long long int, 77" >&5
14470 echo "$as_me: error: cannot compute alignment of long long int, 77" >&2;}
14471    { (exit 1); exit 1; }; }
14472 fi
14473 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14474 fi
14475 fi
14476 rm -f conftest.val
14477 else
14478   pgac_cv_alignof_long_long_int=0
14479 fi
14480 fi
14481 echo "$as_me:$LINENO: result: $pgac_cv_alignof_long_long_int" >&5
14482 echo "${ECHO_T}$pgac_cv_alignof_long_long_int" >&6
14483 cat >>confdefs.h <<_ACEOF
14484 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
14485 _ACEOF
14486
14487
14488 fi
14489 echo "$as_me:$LINENO: checking for double" >&5
14490 echo $ECHO_N "checking for double... $ECHO_C" >&6
14491 if test "${ac_cv_type_double+set}" = set; then
14492   echo $ECHO_N "(cached) $ECHO_C" >&6
14493 else
14494   cat >conftest.$ac_ext <<_ACEOF
14495 #line $LINENO "configure"
14496 #include "confdefs.h"
14497 $ac_includes_default
14498 #ifdef F77_DUMMY_MAIN
14499 #  ifdef __cplusplus
14500      extern "C"
14501 #  endif
14502    int F77_DUMMY_MAIN() { return 1; }
14503 #endif
14504 int
14505 main ()
14506 {
14507 if ((double *) 0)
14508   return 0;
14509 if (sizeof (double))
14510   return 0;
14511   ;
14512   return 0;
14513 }
14514 _ACEOF
14515 rm -f conftest.$ac_objext
14516 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14517   (eval $ac_compile) 2>&5
14518   ac_status=$?
14519   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14520   (exit $ac_status); } &&
14521          { ac_try='test -s conftest.$ac_objext'
14522   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14523   (eval $ac_try) 2>&5
14524   ac_status=$?
14525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14526   (exit $ac_status); }; }; then
14527   ac_cv_type_double=yes
14528 else
14529   echo "$as_me: failed program was:" >&5
14530 cat conftest.$ac_ext >&5
14531 ac_cv_type_double=no
14532 fi
14533 rm -f conftest.$ac_objext conftest.$ac_ext
14534 fi
14535 echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
14536 echo "${ECHO_T}$ac_cv_type_double" >&6
14537
14538 echo "$as_me:$LINENO: checking alignment of double" >&5
14539 echo $ECHO_N "checking alignment of double... $ECHO_C" >&6
14540 if test "${pgac_cv_alignof_double+set}" = set; then
14541   echo $ECHO_N "(cached) $ECHO_C" >&6
14542 else
14543   if test "$ac_cv_type_double" = yes; then
14544   if test "$cross_compiling" = yes; then
14545   # Depending upon the size, compute the lo and hi bounds.
14546 cat >conftest.$ac_ext <<_ACEOF
14547 #line $LINENO "configure"
14548 #include "confdefs.h"
14549 $ac_includes_default
14550 struct { char filler; double field; } pgac_struct;
14551 #ifdef F77_DUMMY_MAIN
14552 #  ifdef __cplusplus
14553      extern "C"
14554 #  endif
14555    int F77_DUMMY_MAIN() { return 1; }
14556 #endif
14557 int
14558 main ()
14559 {
14560 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= 0)];
14561 test_array [0] = 0
14562
14563   ;
14564   return 0;
14565 }
14566 _ACEOF
14567 rm -f conftest.$ac_objext
14568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14569   (eval $ac_compile) 2>&5
14570   ac_status=$?
14571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572   (exit $ac_status); } &&
14573          { ac_try='test -s conftest.$ac_objext'
14574   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14575   (eval $ac_try) 2>&5
14576   ac_status=$?
14577   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14578   (exit $ac_status); }; }; then
14579   ac_lo=0 ac_mid=0
14580   while :; do
14581     cat >conftest.$ac_ext <<_ACEOF
14582 #line $LINENO "configure"
14583 #include "confdefs.h"
14584 $ac_includes_default
14585 struct { char filler; double field; } pgac_struct;
14586 #ifdef F77_DUMMY_MAIN
14587 #  ifdef __cplusplus
14588      extern "C"
14589 #  endif
14590    int F77_DUMMY_MAIN() { return 1; }
14591 #endif
14592 int
14593 main ()
14594 {
14595 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14596 test_array [0] = 0
14597
14598   ;
14599   return 0;
14600 }
14601 _ACEOF
14602 rm -f conftest.$ac_objext
14603 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14604   (eval $ac_compile) 2>&5
14605   ac_status=$?
14606   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14607   (exit $ac_status); } &&
14608          { ac_try='test -s conftest.$ac_objext'
14609   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14610   (eval $ac_try) 2>&5
14611   ac_status=$?
14612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14613   (exit $ac_status); }; }; then
14614   ac_hi=$ac_mid; break
14615 else
14616   echo "$as_me: failed program was:" >&5
14617 cat conftest.$ac_ext >&5
14618 ac_lo=`expr $ac_mid + 1`
14619                     if test $ac_lo -le $ac_mid; then
14620                       ac_lo= ac_hi=
14621                       break
14622                     fi
14623                     ac_mid=`expr 2 '*' $ac_mid + 1`
14624 fi
14625 rm -f conftest.$ac_objext conftest.$ac_ext
14626   done
14627 else
14628   echo "$as_me: failed program was:" >&5
14629 cat conftest.$ac_ext >&5
14630 cat >conftest.$ac_ext <<_ACEOF
14631 #line $LINENO "configure"
14632 #include "confdefs.h"
14633 $ac_includes_default
14634 struct { char filler; double field; } pgac_struct;
14635 #ifdef F77_DUMMY_MAIN
14636 #  ifdef __cplusplus
14637      extern "C"
14638 #  endif
14639    int F77_DUMMY_MAIN() { return 1; }
14640 #endif
14641 int
14642 main ()
14643 {
14644 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)];
14645 test_array [0] = 0
14646
14647   ;
14648   return 0;
14649 }
14650 _ACEOF
14651 rm -f conftest.$ac_objext
14652 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14653   (eval $ac_compile) 2>&5
14654   ac_status=$?
14655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14656   (exit $ac_status); } &&
14657          { ac_try='test -s conftest.$ac_objext'
14658   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662   (exit $ac_status); }; }; then
14663   ac_hi=-1 ac_mid=-1
14664   while :; do
14665     cat >conftest.$ac_ext <<_ACEOF
14666 #line $LINENO "configure"
14667 #include "confdefs.h"
14668 $ac_includes_default
14669 struct { char filler; double field; } pgac_struct;
14670 #ifdef F77_DUMMY_MAIN
14671 #  ifdef __cplusplus
14672      extern "C"
14673 #  endif
14674    int F77_DUMMY_MAIN() { return 1; }
14675 #endif
14676 int
14677 main ()
14678 {
14679 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) >= $ac_mid)];
14680 test_array [0] = 0
14681
14682   ;
14683   return 0;
14684 }
14685 _ACEOF
14686 rm -f conftest.$ac_objext
14687 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14688   (eval $ac_compile) 2>&5
14689   ac_status=$?
14690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14691   (exit $ac_status); } &&
14692          { ac_try='test -s conftest.$ac_objext'
14693   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14694   (eval $ac_try) 2>&5
14695   ac_status=$?
14696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697   (exit $ac_status); }; }; then
14698   ac_lo=$ac_mid; break
14699 else
14700   echo "$as_me: failed program was:" >&5
14701 cat conftest.$ac_ext >&5
14702 ac_hi=`expr '(' $ac_mid ')' - 1`
14703                        if test $ac_mid -le $ac_hi; then
14704                          ac_lo= ac_hi=
14705                          break
14706                        fi
14707                        ac_mid=`expr 2 '*' $ac_mid`
14708 fi
14709 rm -f conftest.$ac_objext conftest.$ac_ext
14710   done
14711 else
14712   echo "$as_me: failed program was:" >&5
14713 cat conftest.$ac_ext >&5
14714 ac_lo= ac_hi=
14715 fi
14716 rm -f conftest.$ac_objext conftest.$ac_ext
14717 fi
14718 rm -f conftest.$ac_objext conftest.$ac_ext
14719 # Binary search between lo and hi bounds.
14720 while test "x$ac_lo" != "x$ac_hi"; do
14721   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14722   cat >conftest.$ac_ext <<_ACEOF
14723 #line $LINENO "configure"
14724 #include "confdefs.h"
14725 $ac_includes_default
14726 struct { char filler; double field; } pgac_struct;
14727 #ifdef F77_DUMMY_MAIN
14728 #  ifdef __cplusplus
14729      extern "C"
14730 #  endif
14731    int F77_DUMMY_MAIN() { return 1; }
14732 #endif
14733 int
14734 main ()
14735 {
14736 static int test_array [1 - 2 * !((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) <= $ac_mid)];
14737 test_array [0] = 0
14738
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 rm -f conftest.$ac_objext
14744 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14745   (eval $ac_compile) 2>&5
14746   ac_status=$?
14747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14748   (exit $ac_status); } &&
14749          { ac_try='test -s conftest.$ac_objext'
14750   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14751   (eval $ac_try) 2>&5
14752   ac_status=$?
14753   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14754   (exit $ac_status); }; }; then
14755   ac_hi=$ac_mid
14756 else
14757   echo "$as_me: failed program was:" >&5
14758 cat conftest.$ac_ext >&5
14759 ac_lo=`expr '(' $ac_mid ')' + 1`
14760 fi
14761 rm -f conftest.$ac_objext conftest.$ac_ext
14762 done
14763 case $ac_lo in
14764 ?*) pgac_cv_alignof_double=$ac_lo;;
14765 '') { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
14766 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
14767    { (exit 1); exit 1; }; } ;;
14768 esac
14769 else
14770   if test "$cross_compiling" = yes; then
14771   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
14772 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14773    { (exit 1); exit 1; }; }
14774 else
14775   cat >conftest.$ac_ext <<_ACEOF
14776 #line $LINENO "configure"
14777 #include "confdefs.h"
14778 $ac_includes_default
14779 struct { char filler; double field; } pgac_struct;
14780 long longval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14781 unsigned long ulongval () { return ((char*) & pgac_struct.field) - ((char*) & pgac_struct); }
14782 #include <stdio.h>
14783 #include <stdlib.h>
14784 #ifdef F77_DUMMY_MAIN
14785 #  ifdef __cplusplus
14786      extern "C"
14787 #  endif
14788    int F77_DUMMY_MAIN() { return 1; }
14789 #endif
14790 int
14791 main ()
14792 {
14793
14794   FILE *f = fopen ("conftest.val", "w");
14795   if (! f)
14796     exit (1);
14797   if ((((char*) & pgac_struct.field) - ((char*) & pgac_struct)) < 0)
14798     {
14799       long i = longval ();
14800       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14801         exit (1);
14802       fprintf (f, "%ld\n", i);
14803     }
14804   else
14805     {
14806       unsigned long i = ulongval ();
14807       if (i != (((char*) & pgac_struct.field) - ((char*) & pgac_struct)))
14808         exit (1);
14809       fprintf (f, "%lu\n", i);
14810     }
14811   exit (ferror (f) || fclose (f) != 0);
14812
14813   ;
14814   return 0;
14815 }
14816 _ACEOF
14817 rm -f conftest$ac_exeext
14818 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14819   (eval $ac_link) 2>&5
14820   ac_status=$?
14821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14822   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14823   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14824   (eval $ac_try) 2>&5
14825   ac_status=$?
14826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14827   (exit $ac_status); }; }; then
14828   pgac_cv_alignof_double=`cat conftest.val`
14829 else
14830   echo "$as_me: program exited with status $ac_status" >&5
14831 echo "$as_me: failed program was:" >&5
14832 cat conftest.$ac_ext >&5
14833 ( exit $ac_status )
14834 { { echo "$as_me:$LINENO: error: cannot compute alignment of double, 77" >&5
14835 echo "$as_me: error: cannot compute alignment of double, 77" >&2;}
14836    { (exit 1); exit 1; }; }
14837 fi
14838 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14839 fi
14840 fi
14841 rm -f conftest.val
14842 else
14843   pgac_cv_alignof_double=0
14844 fi
14845 fi
14846 echo "$as_me:$LINENO: result: $pgac_cv_alignof_double" >&5
14847 echo "${ECHO_T}$pgac_cv_alignof_double" >&6
14848 cat >>confdefs.h <<_ACEOF
14849 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
14850 _ACEOF
14851
14852
14853
14854 # Compute maximum alignment of any basic type.
14855 # We assume long's alignment is at least as strong as char, short, or int;
14856 # but we must check long long (if it exists) and double.
14857
14858 MAX_ALIGNOF=$pgac_cv_alignof_long
14859 if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
14860   MAX_ALIGNOF=$pgac_cv_alignof_double
14861 fi
14862 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
14863   MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
14864 fi
14865
14866 cat >>confdefs.h <<_ACEOF
14867 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14868 _ACEOF
14869
14870
14871
14872 # Some platforms predefine the types int8, int16, etc.  Only check
14873 # a (hopefully) representative subset.
14874 echo "$as_me:$LINENO: checking for int8" >&5
14875 echo $ECHO_N "checking for int8... $ECHO_C" >&6
14876 if test "${ac_cv_type_int8+set}" = set; then
14877   echo $ECHO_N "(cached) $ECHO_C" >&6
14878 else
14879   cat >conftest.$ac_ext <<_ACEOF
14880 #line $LINENO "configure"
14881 #include "confdefs.h"
14882 #include <stdio.h>
14883 #ifdef HAVE_SUPPORTDEFS_H
14884 #include <SupportDefs.h>
14885 #endif
14886
14887 #ifdef F77_DUMMY_MAIN
14888 #  ifdef __cplusplus
14889      extern "C"
14890 #  endif
14891    int F77_DUMMY_MAIN() { return 1; }
14892 #endif
14893 int
14894 main ()
14895 {
14896 if ((int8 *) 0)
14897   return 0;
14898 if (sizeof (int8))
14899   return 0;
14900   ;
14901   return 0;
14902 }
14903 _ACEOF
14904 rm -f conftest.$ac_objext
14905 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14906   (eval $ac_compile) 2>&5
14907   ac_status=$?
14908   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14909   (exit $ac_status); } &&
14910          { ac_try='test -s conftest.$ac_objext'
14911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14912   (eval $ac_try) 2>&5
14913   ac_status=$?
14914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14915   (exit $ac_status); }; }; then
14916   ac_cv_type_int8=yes
14917 else
14918   echo "$as_me: failed program was:" >&5
14919 cat conftest.$ac_ext >&5
14920 ac_cv_type_int8=no
14921 fi
14922 rm -f conftest.$ac_objext conftest.$ac_ext
14923 fi
14924 echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
14925 echo "${ECHO_T}$ac_cv_type_int8" >&6
14926 if test $ac_cv_type_int8 = yes; then
14927
14928 cat >>confdefs.h <<_ACEOF
14929 #define HAVE_INT8 1
14930 _ACEOF
14931
14932
14933 fi
14934 echo "$as_me:$LINENO: checking for uint8" >&5
14935 echo $ECHO_N "checking for uint8... $ECHO_C" >&6
14936 if test "${ac_cv_type_uint8+set}" = set; then
14937   echo $ECHO_N "(cached) $ECHO_C" >&6
14938 else
14939   cat >conftest.$ac_ext <<_ACEOF
14940 #line $LINENO "configure"
14941 #include "confdefs.h"
14942 #include <stdio.h>
14943 #ifdef HAVE_SUPPORTDEFS_H
14944 #include <SupportDefs.h>
14945 #endif
14946
14947 #ifdef F77_DUMMY_MAIN
14948 #  ifdef __cplusplus
14949      extern "C"
14950 #  endif
14951    int F77_DUMMY_MAIN() { return 1; }
14952 #endif
14953 int
14954 main ()
14955 {
14956 if ((uint8 *) 0)
14957   return 0;
14958 if (sizeof (uint8))
14959   return 0;
14960   ;
14961   return 0;
14962 }
14963 _ACEOF
14964 rm -f conftest.$ac_objext
14965 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14966   (eval $ac_compile) 2>&5
14967   ac_status=$?
14968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969   (exit $ac_status); } &&
14970          { ac_try='test -s conftest.$ac_objext'
14971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14972   (eval $ac_try) 2>&5
14973   ac_status=$?
14974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14975   (exit $ac_status); }; }; then
14976   ac_cv_type_uint8=yes
14977 else
14978   echo "$as_me: failed program was:" >&5
14979 cat conftest.$ac_ext >&5
14980 ac_cv_type_uint8=no
14981 fi
14982 rm -f conftest.$ac_objext conftest.$ac_ext
14983 fi
14984 echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
14985 echo "${ECHO_T}$ac_cv_type_uint8" >&6
14986 if test $ac_cv_type_uint8 = yes; then
14987
14988 cat >>confdefs.h <<_ACEOF
14989 #define HAVE_UINT8 1
14990 _ACEOF
14991
14992
14993 fi
14994 echo "$as_me:$LINENO: checking for int64" >&5
14995 echo $ECHO_N "checking for int64... $ECHO_C" >&6
14996 if test "${ac_cv_type_int64+set}" = set; then
14997   echo $ECHO_N "(cached) $ECHO_C" >&6
14998 else
14999   cat >conftest.$ac_ext <<_ACEOF
15000 #line $LINENO "configure"
15001 #include "confdefs.h"
15002 #include <stdio.h>
15003 #ifdef HAVE_SUPPORTDEFS_H
15004 #include <SupportDefs.h>
15005 #endif
15006
15007 #ifdef F77_DUMMY_MAIN
15008 #  ifdef __cplusplus
15009      extern "C"
15010 #  endif
15011    int F77_DUMMY_MAIN() { return 1; }
15012 #endif
15013 int
15014 main ()
15015 {
15016 if ((int64 *) 0)
15017   return 0;
15018 if (sizeof (int64))
15019   return 0;
15020   ;
15021   return 0;
15022 }
15023 _ACEOF
15024 rm -f conftest.$ac_objext
15025 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15026   (eval $ac_compile) 2>&5
15027   ac_status=$?
15028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029   (exit $ac_status); } &&
15030          { ac_try='test -s conftest.$ac_objext'
15031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15032   (eval $ac_try) 2>&5
15033   ac_status=$?
15034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15035   (exit $ac_status); }; }; then
15036   ac_cv_type_int64=yes
15037 else
15038   echo "$as_me: failed program was:" >&5
15039 cat conftest.$ac_ext >&5
15040 ac_cv_type_int64=no
15041 fi
15042 rm -f conftest.$ac_objext conftest.$ac_ext
15043 fi
15044 echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
15045 echo "${ECHO_T}$ac_cv_type_int64" >&6
15046 if test $ac_cv_type_int64 = yes; then
15047
15048 cat >>confdefs.h <<_ACEOF
15049 #define HAVE_INT64 1
15050 _ACEOF
15051
15052
15053 fi
15054 echo "$as_me:$LINENO: checking for uint64" >&5
15055 echo $ECHO_N "checking for uint64... $ECHO_C" >&6
15056 if test "${ac_cv_type_uint64+set}" = set; then
15057   echo $ECHO_N "(cached) $ECHO_C" >&6
15058 else
15059   cat >conftest.$ac_ext <<_ACEOF
15060 #line $LINENO "configure"
15061 #include "confdefs.h"
15062 #include <stdio.h>
15063 #ifdef HAVE_SUPPORTDEFS_H
15064 #include <SupportDefs.h>
15065 #endif
15066
15067 #ifdef F77_DUMMY_MAIN
15068 #  ifdef __cplusplus
15069      extern "C"
15070 #  endif
15071    int F77_DUMMY_MAIN() { return 1; }
15072 #endif
15073 int
15074 main ()
15075 {
15076 if ((uint64 *) 0)
15077   return 0;
15078 if (sizeof (uint64))
15079   return 0;
15080   ;
15081   return 0;
15082 }
15083 _ACEOF
15084 rm -f conftest.$ac_objext
15085 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15086   (eval $ac_compile) 2>&5
15087   ac_status=$?
15088   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15089   (exit $ac_status); } &&
15090          { ac_try='test -s conftest.$ac_objext'
15091   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15092   (eval $ac_try) 2>&5
15093   ac_status=$?
15094   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15095   (exit $ac_status); }; }; then
15096   ac_cv_type_uint64=yes
15097 else
15098   echo "$as_me: failed program was:" >&5
15099 cat conftest.$ac_ext >&5
15100 ac_cv_type_uint64=no
15101 fi
15102 rm -f conftest.$ac_objext conftest.$ac_ext
15103 fi
15104 echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
15105 echo "${ECHO_T}$ac_cv_type_uint64" >&6
15106 if test $ac_cv_type_uint64 = yes; then
15107
15108 cat >>confdefs.h <<_ACEOF
15109 #define HAVE_UINT64 1
15110 _ACEOF
15111
15112
15113 fi
15114
15115
15116 # We also check for sig_atomic_t, which *should* be defined per ANSI
15117 # C, but is missing on some old platforms.
15118 echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
15119 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
15120 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
15121   echo $ECHO_N "(cached) $ECHO_C" >&6
15122 else
15123   cat >conftest.$ac_ext <<_ACEOF
15124 #line $LINENO "configure"
15125 #include "confdefs.h"
15126 #include <signal.h>
15127
15128 #ifdef F77_DUMMY_MAIN
15129 #  ifdef __cplusplus
15130      extern "C"
15131 #  endif
15132    int F77_DUMMY_MAIN() { return 1; }
15133 #endif
15134 int
15135 main ()
15136 {
15137 if ((sig_atomic_t *) 0)
15138   return 0;
15139 if (sizeof (sig_atomic_t))
15140   return 0;
15141   ;
15142   return 0;
15143 }
15144 _ACEOF
15145 rm -f conftest.$ac_objext
15146 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15147   (eval $ac_compile) 2>&5
15148   ac_status=$?
15149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15150   (exit $ac_status); } &&
15151          { ac_try='test -s conftest.$ac_objext'
15152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15153   (eval $ac_try) 2>&5
15154   ac_status=$?
15155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15156   (exit $ac_status); }; }; then
15157   ac_cv_type_sig_atomic_t=yes
15158 else
15159   echo "$as_me: failed program was:" >&5
15160 cat conftest.$ac_ext >&5
15161 ac_cv_type_sig_atomic_t=no
15162 fi
15163 rm -f conftest.$ac_objext conftest.$ac_ext
15164 fi
15165 echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
15166 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
15167 if test $ac_cv_type_sig_atomic_t = yes; then
15168
15169 cat >>confdefs.h <<_ACEOF
15170 #define HAVE_SIG_ATOMIC_T 1
15171 _ACEOF
15172
15173
15174 fi
15175
15176
15177
15178 echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
15179 echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
15180 if test "${pgac_cv_func_posix_signals+set}" = set; then
15181   echo $ECHO_N "(cached) $ECHO_C" >&6
15182 else
15183   cat >conftest.$ac_ext <<_ACEOF
15184 #line $LINENO "configure"
15185 #include "confdefs.h"
15186 #include <signal.h>
15187
15188 #ifdef F77_DUMMY_MAIN
15189 #  ifdef __cplusplus
15190      extern "C"
15191 #  endif
15192    int F77_DUMMY_MAIN() { return 1; }
15193 #endif
15194 int
15195 main ()
15196 {
15197 struct sigaction act, oact;
15198 sigemptyset(&act.sa_mask);
15199 act.sa_flags = SA_RESTART;
15200 sigaction(0, &act, &oact);
15201   ;
15202   return 0;
15203 }
15204 _ACEOF
15205 rm -f conftest.$ac_objext conftest$ac_exeext
15206 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15207   (eval $ac_link) 2>&5
15208   ac_status=$?
15209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15210   (exit $ac_status); } &&
15211          { ac_try='test -s conftest$ac_exeext'
15212   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15213   (eval $ac_try) 2>&5
15214   ac_status=$?
15215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15216   (exit $ac_status); }; }; then
15217   pgac_cv_func_posix_signals=yes
15218 else
15219   echo "$as_me: failed program was:" >&5
15220 cat conftest.$ac_ext >&5
15221 pgac_cv_func_posix_signals=no
15222 fi
15223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15224 fi
15225 echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
15226 echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
15227 if test x"$pgac_cv_func_posix_signals" = xyes ; then
15228
15229 cat >>confdefs.h <<\_ACEOF
15230 #define HAVE_POSIX_SIGNALS
15231 _ACEOF
15232
15233 fi
15234 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
15235
15236
15237
15238 if test "$enable_nls" = yes ; then
15239
15240   echo "$as_me:$LINENO: checking for library containing gettext" >&5
15241 echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6
15242 if test "${ac_cv_search_gettext+set}" = set; then
15243   echo $ECHO_N "(cached) $ECHO_C" >&6
15244 else
15245   ac_func_search_save_LIBS=$LIBS
15246 ac_cv_search_gettext=no
15247 cat >conftest.$ac_ext <<_ACEOF
15248 #line $LINENO "configure"
15249 #include "confdefs.h"
15250
15251 /* Override any gcc2 internal prototype to avoid an error.  */
15252 #ifdef __cplusplus
15253 extern "C"
15254 #endif
15255 /* We use char because int might match the return type of a gcc2
15256    builtin and then its argument prototype would still apply.  */
15257 char gettext ();
15258 #ifdef F77_DUMMY_MAIN
15259 #  ifdef __cplusplus
15260      extern "C"
15261 #  endif
15262    int F77_DUMMY_MAIN() { return 1; }
15263 #endif
15264 int
15265 main ()
15266 {
15267 gettext ();
15268   ;
15269   return 0;
15270 }
15271 _ACEOF
15272 rm -f conftest.$ac_objext conftest$ac_exeext
15273 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15274   (eval $ac_link) 2>&5
15275   ac_status=$?
15276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15277   (exit $ac_status); } &&
15278          { ac_try='test -s conftest$ac_exeext'
15279   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15280   (eval $ac_try) 2>&5
15281   ac_status=$?
15282   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15283   (exit $ac_status); }; }; then
15284   ac_cv_search_gettext="none required"
15285 else
15286   echo "$as_me: failed program was:" >&5
15287 cat conftest.$ac_ext >&5
15288 fi
15289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290 if test "$ac_cv_search_gettext" = no; then
15291   for ac_lib in intl; do
15292     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15293     cat >conftest.$ac_ext <<_ACEOF
15294 #line $LINENO "configure"
15295 #include "confdefs.h"
15296
15297 /* Override any gcc2 internal prototype to avoid an error.  */
15298 #ifdef __cplusplus
15299 extern "C"
15300 #endif
15301 /* We use char because int might match the return type of a gcc2
15302    builtin and then its argument prototype would still apply.  */
15303 char gettext ();
15304 #ifdef F77_DUMMY_MAIN
15305 #  ifdef __cplusplus
15306      extern "C"
15307 #  endif
15308    int F77_DUMMY_MAIN() { return 1; }
15309 #endif
15310 int
15311 main ()
15312 {
15313 gettext ();
15314   ;
15315   return 0;
15316 }
15317 _ACEOF
15318 rm -f conftest.$ac_objext conftest$ac_exeext
15319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15320   (eval $ac_link) 2>&5
15321   ac_status=$?
15322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323   (exit $ac_status); } &&
15324          { ac_try='test -s conftest$ac_exeext'
15325   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15326   (eval $ac_try) 2>&5
15327   ac_status=$?
15328   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15329   (exit $ac_status); }; }; then
15330   ac_cv_search_gettext="-l$ac_lib"
15331 break
15332 else
15333   echo "$as_me: failed program was:" >&5
15334 cat conftest.$ac_ext >&5
15335 fi
15336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15337   done
15338 fi
15339 LIBS=$ac_func_search_save_LIBS
15340 fi
15341 echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
15342 echo "${ECHO_T}$ac_cv_search_gettext" >&6
15343 if test "$ac_cv_search_gettext" != no; then
15344   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
15345
15346 else
15347   { { echo "$as_me:$LINENO: error: a gettext implementation is required for NLS" >&5
15348 echo "$as_me: error: a gettext implementation is required for NLS" >&2;}
15349    { (exit 1); exit 1; }; }
15350 fi
15351
15352   if test "${ac_cv_header_libintl_h+set}" = set; then
15353   echo "$as_me:$LINENO: checking for libintl.h" >&5
15354 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
15355 if test "${ac_cv_header_libintl_h+set}" = set; then
15356   echo $ECHO_N "(cached) $ECHO_C" >&6
15357 fi
15358 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
15359 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
15360 else
15361   # Is the header compilable?
15362 echo "$as_me:$LINENO: checking libintl.h usability" >&5
15363 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
15364 cat >conftest.$ac_ext <<_ACEOF
15365 #line $LINENO "configure"
15366 #include "confdefs.h"
15367 $ac_includes_default
15368 #include <libintl.h>
15369 _ACEOF
15370 rm -f conftest.$ac_objext
15371 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15372   (eval $ac_compile) 2>&5
15373   ac_status=$?
15374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15375   (exit $ac_status); } &&
15376          { ac_try='test -s conftest.$ac_objext'
15377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15378   (eval $ac_try) 2>&5
15379   ac_status=$?
15380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15381   (exit $ac_status); }; }; then
15382   ac_header_compiler=yes
15383 else
15384   echo "$as_me: failed program was:" >&5
15385 cat conftest.$ac_ext >&5
15386 ac_header_compiler=no
15387 fi
15388 rm -f conftest.$ac_objext conftest.$ac_ext
15389 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15390 echo "${ECHO_T}$ac_header_compiler" >&6
15391
15392 # Is the header present?
15393 echo "$as_me:$LINENO: checking libintl.h presence" >&5
15394 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
15395 cat >conftest.$ac_ext <<_ACEOF
15396 #line $LINENO "configure"
15397 #include "confdefs.h"
15398 #include <libintl.h>
15399 _ACEOF
15400 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15401   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15402   ac_status=$?
15403   egrep -v '^ *\+' conftest.er1 >conftest.err
15404   rm -f conftest.er1
15405   cat conftest.err >&5
15406   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15407   (exit $ac_status); } >/dev/null; then
15408   if test -s conftest.err; then
15409     ac_cpp_err=$ac_c_preproc_warn_flag
15410   else
15411     ac_cpp_err=
15412   fi
15413 else
15414   ac_cpp_err=yes
15415 fi
15416 if test -z "$ac_cpp_err"; then
15417   ac_header_preproc=yes
15418 else
15419   echo "$as_me: failed program was:" >&5
15420   cat conftest.$ac_ext >&5
15421   ac_header_preproc=no
15422 fi
15423 rm -f conftest.err conftest.$ac_ext
15424 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15425 echo "${ECHO_T}$ac_header_preproc" >&6
15426
15427 # So?  What about this header?
15428 case $ac_header_compiler:$ac_header_preproc in
15429   yes:no )
15430     { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
15431 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15432     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
15433 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
15434   no:yes )
15435     { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
15436 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
15437     { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
15438 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
15439     { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
15440 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;};;
15441 esac
15442 echo "$as_me:$LINENO: checking for libintl.h" >&5
15443 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
15444 if test "${ac_cv_header_libintl_h+set}" = set; then
15445   echo $ECHO_N "(cached) $ECHO_C" >&6
15446 else
15447   ac_cv_header_libintl_h=$ac_header_preproc
15448 fi
15449 echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
15450 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
15451
15452 fi
15453 if test $ac_cv_header_libintl_h = yes; then
15454   :
15455 else
15456   { { echo "$as_me:$LINENO: error: header file <libintl.h> is required for NLS" >&5
15457 echo "$as_me: error: header file <libintl.h> is required for NLS" >&2;}
15458    { (exit 1); exit 1; }; }
15459 fi
15460
15461
15462   for ac_prog in msgfmt
15463 do
15464   # Extract the first word of "$ac_prog", so it can be a program name with args.
15465 set dummy $ac_prog; ac_word=$2
15466 echo "$as_me:$LINENO: checking for $ac_word" >&5
15467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15468 if test "${ac_cv_prog_MSGFMT+set}" = set; then
15469   echo $ECHO_N "(cached) $ECHO_C" >&6
15470 else
15471   if test -n "$MSGFMT"; then
15472   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15473 else
15474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15475 for as_dir in $PATH
15476 do
15477   IFS=$as_save_IFS
15478   test -z "$as_dir" && as_dir=.
15479   for ac_exec_ext in '' $ac_executable_extensions; do
15480   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15481     ac_cv_prog_MSGFMT="$ac_prog"
15482     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15483     break 2
15484   fi
15485 done
15486 done
15487
15488 fi
15489 fi
15490 MSGFMT=$ac_cv_prog_MSGFMT
15491 if test -n "$MSGFMT"; then
15492   echo "$as_me:$LINENO: result: $MSGFMT" >&5
15493 echo "${ECHO_T}$MSGFMT" >&6
15494 else
15495   echo "$as_me:$LINENO: result: no" >&5
15496 echo "${ECHO_T}no" >&6
15497 fi
15498
15499   test -n "$MSGFMT" && break
15500 done
15501
15502   if test -z "$MSGFMT"; then
15503     { { echo "$as_me:$LINENO: error: msgfmt is required for NLS" >&5
15504 echo "$as_me: error: msgfmt is required for NLS" >&2;}
15505    { (exit 1); exit 1; }; }
15506   fi
15507   for ac_prog in msgmerge
15508 do
15509   # Extract the first word of "$ac_prog", so it can be a program name with args.
15510 set dummy $ac_prog; ac_word=$2
15511 echo "$as_me:$LINENO: checking for $ac_word" >&5
15512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15513 if test "${ac_cv_prog_MSGMERGE+set}" = set; then
15514   echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516   if test -n "$MSGMERGE"; then
15517   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15518 else
15519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15520 for as_dir in $PATH
15521 do
15522   IFS=$as_save_IFS
15523   test -z "$as_dir" && as_dir=.
15524   for ac_exec_ext in '' $ac_executable_extensions; do
15525   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15526     ac_cv_prog_MSGMERGE="$ac_prog"
15527     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15528     break 2
15529   fi
15530 done
15531 done
15532
15533 fi
15534 fi
15535 MSGMERGE=$ac_cv_prog_MSGMERGE
15536 if test -n "$MSGMERGE"; then
15537   echo "$as_me:$LINENO: result: $MSGMERGE" >&5
15538 echo "${ECHO_T}$MSGMERGE" >&6
15539 else
15540   echo "$as_me:$LINENO: result: no" >&5
15541 echo "${ECHO_T}no" >&6
15542 fi
15543
15544   test -n "$MSGMERGE" && break
15545 done
15546
15547   for ac_prog in xgettext
15548 do
15549   # Extract the first word of "$ac_prog", so it can be a program name with args.
15550 set dummy $ac_prog; ac_word=$2
15551 echo "$as_me:$LINENO: checking for $ac_word" >&5
15552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15553 if test "${ac_cv_prog_XGETTEXT+set}" = set; then
15554   echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556   if test -n "$XGETTEXT"; then
15557   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15558 else
15559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15560 for as_dir in $PATH
15561 do
15562   IFS=$as_save_IFS
15563   test -z "$as_dir" && as_dir=.
15564   for ac_exec_ext in '' $ac_executable_extensions; do
15565   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15566     ac_cv_prog_XGETTEXT="$ac_prog"
15567     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15568     break 2
15569   fi
15570 done
15571 done
15572
15573 fi
15574 fi
15575 XGETTEXT=$ac_cv_prog_XGETTEXT
15576 if test -n "$XGETTEXT"; then
15577   echo "$as_me:$LINENO: result: $XGETTEXT" >&5
15578 echo "${ECHO_T}$XGETTEXT" >&6
15579 else
15580   echo "$as_me:$LINENO: result: no" >&5
15581 echo "${ECHO_T}no" >&6
15582 fi
15583
15584   test -n "$XGETTEXT" && break
15585 done
15586
15587
15588   # Note: share/locale is always the default, independent of $datadir
15589   localedir='${prefix}/share/locale'
15590   if test x"$prefix" = x"NONE"; then
15591     exp_localedir="$ac_default_prefix/share/locale"
15592   else
15593     exp_localedir="$prefix/share/locale"
15594   fi
15595
15596
15597
15598 cat >>confdefs.h <<_ACEOF
15599 #define LOCALEDIR "$exp_localedir"
15600 _ACEOF
15601
15602
15603 fi
15604
15605 if test "$with_CXX" = yes; then
15606
15607
15608 ac_ext=cc
15609 ac_cpp='$CXXCPP $CPPFLAGS'
15610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15611 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15613
15614 if test "${ac_cv_header_string+set}" = set; then
15615   echo "$as_me:$LINENO: checking for string" >&5
15616 echo $ECHO_N "checking for string... $ECHO_C" >&6
15617 if test "${ac_cv_header_string+set}" = set; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 fi
15620 echo "$as_me:$LINENO: result: $ac_cv_header_string" >&5
15621 echo "${ECHO_T}$ac_cv_header_string" >&6
15622 else
15623   # Is the header compilable?
15624 echo "$as_me:$LINENO: checking string usability" >&5
15625 echo $ECHO_N "checking string usability... $ECHO_C" >&6
15626 cat >conftest.$ac_ext <<_ACEOF
15627 #line $LINENO "configure"
15628 #include "confdefs.h"
15629 $ac_includes_default
15630 #include <string>
15631 _ACEOF
15632 rm -f conftest.$ac_objext
15633 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15634   (eval $ac_compile) 2>&5
15635   ac_status=$?
15636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637   (exit $ac_status); } &&
15638          { ac_try='test -s conftest.$ac_objext'
15639   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15640   (eval $ac_try) 2>&5
15641   ac_status=$?
15642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15643   (exit $ac_status); }; }; then
15644   ac_header_compiler=yes
15645 else
15646   echo "$as_me: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15648 ac_header_compiler=no
15649 fi
15650 rm -f conftest.$ac_objext conftest.$ac_ext
15651 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15652 echo "${ECHO_T}$ac_header_compiler" >&6
15653
15654 # Is the header present?
15655 echo "$as_me:$LINENO: checking string presence" >&5
15656 echo $ECHO_N "checking string presence... $ECHO_C" >&6
15657 cat >conftest.$ac_ext <<_ACEOF
15658 #line $LINENO "configure"
15659 #include "confdefs.h"
15660 #include <string>
15661 _ACEOF
15662 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
15663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15664   ac_status=$?
15665   egrep -v '^ *\+' conftest.er1 >conftest.err
15666   rm -f conftest.er1
15667   cat conftest.err >&5
15668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15669   (exit $ac_status); } >/dev/null; then
15670   if test -s conftest.err; then
15671     ac_cpp_err=$ac_cxx_preproc_warn_flag
15672   else
15673     ac_cpp_err=
15674   fi
15675 else
15676   ac_cpp_err=yes
15677 fi
15678 if test -z "$ac_cpp_err"; then
15679   ac_header_preproc=yes
15680 else
15681   echo "$as_me: failed program was:" >&5
15682   cat conftest.$ac_ext >&5
15683   ac_header_preproc=no
15684 fi
15685 rm -f conftest.err conftest.$ac_ext
15686 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15687 echo "${ECHO_T}$ac_header_preproc" >&6
15688
15689 # So?  What about this header?
15690 case $ac_header_compiler:$ac_header_preproc in
15691   yes:no )
15692     { echo "$as_me:$LINENO: WARNING: string: accepted by the compiler, rejected by the preprocessor!" >&5
15693 echo "$as_me: WARNING: string: accepted by the compiler, rejected by the preprocessor!" >&2;}
15694     { echo "$as_me:$LINENO: WARNING: string: proceeding with the preprocessor's result" >&5
15695 echo "$as_me: WARNING: string: proceeding with the preprocessor's result" >&2;};;
15696   no:yes )
15697     { echo "$as_me:$LINENO: WARNING: string: present but cannot be compiled" >&5
15698 echo "$as_me: WARNING: string: present but cannot be compiled" >&2;}
15699     { echo "$as_me:$LINENO: WARNING: string: check for missing prerequisite headers?" >&5
15700 echo "$as_me: WARNING: string: check for missing prerequisite headers?" >&2;}
15701     { echo "$as_me:$LINENO: WARNING: string: proceeding with the preprocessor's result" >&5
15702 echo "$as_me: WARNING: string: proceeding with the preprocessor's result" >&2;};;
15703 esac
15704 echo "$as_me:$LINENO: checking for string" >&5
15705 echo $ECHO_N "checking for string... $ECHO_C" >&6
15706 if test "${ac_cv_header_string+set}" = set; then
15707   echo $ECHO_N "(cached) $ECHO_C" >&6
15708 else
15709   ac_cv_header_string=$ac_header_preproc
15710 fi
15711 echo "$as_me:$LINENO: result: $ac_cv_header_string" >&5
15712 echo "${ECHO_T}$ac_cv_header_string" >&6
15713
15714 fi
15715 if test $ac_cv_header_string = yes; then
15716
15717 cat >>confdefs.h <<\_ACEOF
15718 #define HAVE_CXX_STRING_HEADER 1
15719 _ACEOF
15720
15721 else
15722   echo "$as_me:$LINENO: checking for class string in <string.h>" >&5
15723 echo $ECHO_N "checking for class string in <string.h>... $ECHO_C" >&6
15724 if test "${pgac_cv_class_string_in_string_h+set}" = set; then
15725   echo $ECHO_N "(cached) $ECHO_C" >&6
15726 else
15727   cat >conftest.$ac_ext <<_ACEOF
15728 #line $LINENO "configure"
15729 #include "confdefs.h"
15730 #include <stdio.h>
15731 #include <stdlib.h>
15732 #include <string.h>
15733
15734 #ifdef F77_DUMMY_MAIN
15735 #  ifdef __cplusplus
15736      extern "C"
15737 #  endif
15738    int F77_DUMMY_MAIN() { return 1; }
15739 #endif
15740 int
15741 main ()
15742 {
15743 string foo = "test"
15744   ;
15745   return 0;
15746 }
15747 _ACEOF
15748 rm -f conftest.$ac_objext
15749 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15750   (eval $ac_compile) 2>&5
15751   ac_status=$?
15752   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15753   (exit $ac_status); } &&
15754          { ac_try='test -s conftest.$ac_objext'
15755   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15756   (eval $ac_try) 2>&5
15757   ac_status=$?
15758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759   (exit $ac_status); }; }; then
15760   pgac_cv_class_string_in_string_h=yes
15761 else
15762   echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764 pgac_cv_class_string_in_string_h=no
15765 fi
15766 rm -f conftest.$ac_objext conftest.$ac_ext
15767 fi
15768 echo "$as_me:$LINENO: result: $pgac_cv_class_string_in_string_h" >&5
15769 echo "${ECHO_T}$pgac_cv_class_string_in_string_h" >&6
15770
15771   if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
15772     { { echo "$as_me:$LINENO: error: neither <string> nor <string.h> seem to define the C++ class 'string'" >&5
15773 echo "$as_me: error: neither <string> nor <string.h> seem to define the C++ class 'string'" >&2;}
15774    { (exit 1); exit 1; }; }
15775   fi
15776
15777 fi
15778
15779
15780 ac_ext=c
15781 ac_cpp='$CPP $CPPFLAGS'
15782 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15783 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15784 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15785
15786
15787 echo "$as_me:$LINENO: checking for namespace std in C++" >&5
15788 echo $ECHO_N "checking for namespace std in C++... $ECHO_C" >&6
15789 if test "${pgac_cv_cxx_namespace_std+set}" = set; then
15790   echo $ECHO_N "(cached) $ECHO_C" >&6
15791 else
15792
15793 ac_ext=cc
15794 ac_cpp='$CXXCPP $CPPFLAGS'
15795 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15796 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15797 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15798
15799 cat >conftest.$ac_ext <<_ACEOF
15800 #line $LINENO "configure"
15801 #include "confdefs.h"
15802 #include <stdio.h>
15803 #include <stdlib.h>
15804 #ifdef HAVE_CXX_STRING_HEADER
15805 #include <string>
15806 #endif
15807 using namespace std;
15808
15809 #ifdef F77_DUMMY_MAIN
15810 #  ifdef __cplusplus
15811      extern "C"
15812 #  endif
15813    int F77_DUMMY_MAIN() { return 1; }
15814 #endif
15815 int
15816 main ()
15817 {
15818
15819   ;
15820   return 0;
15821 }
15822 _ACEOF
15823 rm -f conftest.$ac_objext
15824 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15825   (eval $ac_compile) 2>&5
15826   ac_status=$?
15827   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15828   (exit $ac_status); } &&
15829          { ac_try='test -s conftest.$ac_objext'
15830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15831   (eval $ac_try) 2>&5
15832   ac_status=$?
15833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15834   (exit $ac_status); }; }; then
15835   pgac_cv_cxx_namespace_std=yes
15836 else
15837   echo "$as_me: failed program was:" >&5
15838 cat conftest.$ac_ext >&5
15839 pgac_cv_cxx_namespace_std=no
15840 fi
15841 rm -f conftest.$ac_objext conftest.$ac_ext
15842 ac_ext=c
15843 ac_cpp='$CPP $CPPFLAGS'
15844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15847
15848 fi
15849 echo "$as_me:$LINENO: result: $pgac_cv_cxx_namespace_std" >&5
15850 echo "${ECHO_T}$pgac_cv_cxx_namespace_std" >&6
15851
15852 if test $pgac_cv_cxx_namespace_std = yes ; then
15853
15854 cat >>confdefs.h <<\_ACEOF
15855 #define HAVE_NAMESPACE_STD 1
15856 _ACEOF
15857
15858 fi
15859 fi
15860
15861
15862 # Check for Tcl configuration script tclConfig.sh
15863 if test "$with_tcl" = yes; then
15864     for ac_prog in tclsh tcl
15865 do
15866   # Extract the first word of "$ac_prog", so it can be a program name with args.
15867 set dummy $ac_prog; ac_word=$2
15868 echo "$as_me:$LINENO: checking for $ac_word" >&5
15869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15870 if test "${ac_cv_path_TCLSH+set}" = set; then
15871   echo $ECHO_N "(cached) $ECHO_C" >&6
15872 else
15873   case $TCLSH in
15874   [\\/]* | ?:[\\/]*)
15875   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15876   ;;
15877   *)
15878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15879 for as_dir in $PATH
15880 do
15881   IFS=$as_save_IFS
15882   test -z "$as_dir" && as_dir=.
15883   for ac_exec_ext in '' $ac_executable_extensions; do
15884   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15885     ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15886     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15887     break 2
15888   fi
15889 done
15890 done
15891
15892   ;;
15893 esac
15894 fi
15895 TCLSH=$ac_cv_path_TCLSH
15896
15897 if test -n "$TCLSH"; then
15898   echo "$as_me:$LINENO: result: $TCLSH" >&5
15899 echo "${ECHO_T}$TCLSH" >&6
15900 else
15901   echo "$as_me:$LINENO: result: no" >&5
15902 echo "${ECHO_T}no" >&6
15903 fi
15904
15905   test -n "$TCLSH" && break
15906 done
15907
15908 echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
15909 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6
15910 # Let user override test
15911 if test -z "$TCL_CONFIG_SH"; then
15912     pgac_test_dirs="$with_tclconfig"
15913
15914     set X $pgac_test_dirs; shift
15915     if test $# -eq 0; then
15916         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tclConfig.sh because no Tcl shell was found" >&5
15917 echo "$as_me: error: unable to locate tclConfig.sh because no Tcl shell was found" >&2;}
15918    { (exit 1); exit 1; }; }
15919         set X `echo 'puts $auto_path' | $TCLSH`; shift
15920     fi
15921
15922     for pgac_dir do
15923         if test -r "$pgac_dir/tclConfig.sh"; then
15924             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15925             break
15926         fi
15927     done
15928 fi
15929
15930 if test -z "$TCL_CONFIG_SH"; then
15931     echo "$as_me:$LINENO: result: no" >&5
15932 echo "${ECHO_T}no" >&6
15933     { { echo "$as_me:$LINENO: error: file 'tclConfig.sh' is required for Tcl" >&5
15934 echo "$as_me: error: file 'tclConfig.sh' is required for Tcl" >&2;}
15935    { (exit 1); exit 1; }; }
15936 else
15937     echo "$as_me:$LINENO: result: $TCL_CONFIG_SH" >&5
15938 echo "${ECHO_T}$TCL_CONFIG_SH" >&6
15939 fi
15940
15941
15942
15943 fi
15944
15945 # Check for Tk configuration script tkConfig.sh
15946 if test "$with_tk" = yes; then
15947     echo "$as_me:$LINENO: checking for tkConfig.sh" >&5
15948 echo $ECHO_N "checking for tkConfig.sh... $ECHO_C" >&6
15949 # Let user override test
15950 if test -z "$TK_CONFIG_SH"; then
15951     pgac_test_dirs="$with_tkconfig $with_tclconfig"
15952
15953     set X $pgac_test_dirs; shift
15954     if test $# -eq 0; then
15955         test -z "$TCLSH" && { { echo "$as_me:$LINENO: error: unable to locate tkConfig.sh because no Tcl shell was found" >&5
15956 echo "$as_me: error: unable to locate tkConfig.sh because no Tcl shell was found" >&2;}
15957    { (exit 1); exit 1; }; }
15958         set X `echo 'puts $auto_path' | $TCLSH`; shift
15959     fi
15960
15961     for pgac_dir do
15962         if test -r "$pgac_dir/tkConfig.sh"; then
15963             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
15964             break
15965         fi
15966     done
15967 fi
15968
15969 if test -z "$TK_CONFIG_SH"; then
15970     echo "$as_me:$LINENO: result: no" >&5
15971 echo "${ECHO_T}no" >&6
15972     { { echo "$as_me:$LINENO: error: file 'tkConfig.sh' is required for Tk" >&5
15973 echo "$as_me: error: file 'tkConfig.sh' is required for Tk" >&2;}
15974    { (exit 1); exit 1; }; }
15975 else
15976     echo "$as_me:$LINENO: result: $TK_CONFIG_SH" >&5
15977 echo "${ECHO_T}$TK_CONFIG_SH" >&6
15978 fi
15979
15980
15981
15982 fi
15983
15984
15985 #
15986 # Check for DocBook and tools
15987 #
15988 for ac_prog in onsgmls nsgmls
15989 do
15990   # Extract the first word of "$ac_prog", so it can be a program name with args.
15991 set dummy $ac_prog; ac_word=$2
15992 echo "$as_me:$LINENO: checking for $ac_word" >&5
15993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15994 if test "${ac_cv_prog_NSGMLS+set}" = set; then
15995   echo $ECHO_N "(cached) $ECHO_C" >&6
15996 else
15997   if test -n "$NSGMLS"; then
15998   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15999 else
16000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16001 for as_dir in $PATH
16002 do
16003   IFS=$as_save_IFS
16004   test -z "$as_dir" && as_dir=.
16005   for ac_exec_ext in '' $ac_executable_extensions; do
16006   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16007     ac_cv_prog_NSGMLS="$ac_prog"
16008     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16009     break 2
16010   fi
16011 done
16012 done
16013
16014 fi
16015 fi
16016 NSGMLS=$ac_cv_prog_NSGMLS
16017 if test -n "$NSGMLS"; then
16018   echo "$as_me:$LINENO: result: $NSGMLS" >&5
16019 echo "${ECHO_T}$NSGMLS" >&6
16020 else
16021   echo "$as_me:$LINENO: result: no" >&5
16022 echo "${ECHO_T}no" >&6
16023 fi
16024
16025   test -n "$NSGMLS" && break
16026 done
16027
16028 # If you don't have nsgmls you won't get very far, so save the cycles.
16029 if test -n "$NSGMLS"; then
16030   for ac_prog in openjade jade
16031 do
16032   # Extract the first word of "$ac_prog", so it can be a program name with args.
16033 set dummy $ac_prog; ac_word=$2
16034 echo "$as_me:$LINENO: checking for $ac_word" >&5
16035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16036 if test "${ac_cv_prog_JADE+set}" = set; then
16037   echo $ECHO_N "(cached) $ECHO_C" >&6
16038 else
16039   if test -n "$JADE"; then
16040   ac_cv_prog_JADE="$JADE" # Let the user override the test.
16041 else
16042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16043 for as_dir in $PATH
16044 do
16045   IFS=$as_save_IFS
16046   test -z "$as_dir" && as_dir=.
16047   for ac_exec_ext in '' $ac_executable_extensions; do
16048   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16049     ac_cv_prog_JADE="$ac_prog"
16050     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16051     break 2
16052   fi
16053 done
16054 done
16055
16056 fi
16057 fi
16058 JADE=$ac_cv_prog_JADE
16059 if test -n "$JADE"; then
16060   echo "$as_me:$LINENO: result: $JADE" >&5
16061 echo "${ECHO_T}$JADE" >&6
16062 else
16063   echo "$as_me:$LINENO: result: no" >&5
16064 echo "${ECHO_T}no" >&6
16065 fi
16066
16067   test -n "$JADE" && break
16068 done
16069
16070
16071 echo "$as_me:$LINENO: checking for DocBook V3.1" >&5
16072 echo $ECHO_N "checking for DocBook V3.1... $ECHO_C" >&6
16073 if test "${pgac_cv_check_docbook+set}" = set; then
16074   echo $ECHO_N "(cached) $ECHO_C" >&6
16075 else
16076   cat >conftest.sgml <<EOF
16077 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
16078 <book>
16079  <title>test</title>
16080  <chapter>
16081   <title>random</title>
16082    <sect1>
16083     <title>testsect</title>
16084     <para>text</para>
16085   </sect1>
16086  </chapter>
16087 </book>
16088 EOF
16089
16090 ${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
16091 if test $? -eq 0; then
16092   pgac_cv_check_docbook=yes
16093 else
16094   pgac_cv_check_docbook=no
16095 fi
16096 rm -f conftest.sgml
16097 fi
16098 echo "$as_me:$LINENO: result: $pgac_cv_check_docbook" >&5
16099 echo "${ECHO_T}$pgac_cv_check_docbook" >&6
16100
16101 have_docbook=$pgac_cv_check_docbook
16102
16103
16104   echo "$as_me:$LINENO: checking for DocBook stylesheets" >&5
16105 echo $ECHO_N "checking for DocBook stylesheets... $ECHO_C" >&6
16106 if test "${pgac_cv_path_stylesheets+set}" = set; then
16107   echo $ECHO_N "(cached) $ECHO_C" >&6
16108 else
16109   if test -n "$DOCBOOKSTYLE"; then
16110   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
16111 else
16112   for pgac_prefix in /usr /usr/local /opt; do
16113     for pgac_infix in share lib; do
16114       for pgac_postfix in \
16115         sgml/stylesheets/nwalsh-modular \
16116         sgml/stylesheets/docbook \
16117         sgml/docbook/dsssl/modular
16118       do
16119         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
16120         if test -r "$pgac_candidate/html/docbook.dsl" \
16121            && test -r "$pgac_candidate/print/docbook.dsl"
16122         then
16123           pgac_cv_path_stylesheets=$pgac_candidate
16124           break 3
16125         fi
16126       done
16127     done
16128   done
16129 fi
16130 fi
16131
16132 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
16133
16134 if test -n "$DOCBOOKSTYLE"; then
16135   echo "$as_me:$LINENO: result: $DOCBOOKSTYLE" >&5
16136 echo "${ECHO_T}$DOCBOOKSTYLE" >&6
16137 else
16138   echo "$as_me:$LINENO: result: no" >&5
16139 echo "${ECHO_T}no" >&6
16140 fi
16141   for ac_prog in sgmlspl
16142 do
16143   # Extract the first word of "$ac_prog", so it can be a program name with args.
16144 set dummy $ac_prog; ac_word=$2
16145 echo "$as_me:$LINENO: checking for $ac_word" >&5
16146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16147 if test "${ac_cv_prog_SGMLSPL+set}" = set; then
16148   echo $ECHO_N "(cached) $ECHO_C" >&6
16149 else
16150   if test -n "$SGMLSPL"; then
16151   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
16152 else
16153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16154 for as_dir in $PATH
16155 do
16156   IFS=$as_save_IFS
16157   test -z "$as_dir" && as_dir=.
16158   for ac_exec_ext in '' $ac_executable_extensions; do
16159   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16160     ac_cv_prog_SGMLSPL="$ac_prog"
16161     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16162     break 2
16163   fi
16164 done
16165 done
16166
16167 fi
16168 fi
16169 SGMLSPL=$ac_cv_prog_SGMLSPL
16170 if test -n "$SGMLSPL"; then
16171   echo "$as_me:$LINENO: result: $SGMLSPL" >&5
16172 echo "${ECHO_T}$SGMLSPL" >&6
16173 else
16174   echo "$as_me:$LINENO: result: no" >&5
16175 echo "${ECHO_T}no" >&6
16176 fi
16177
16178   test -n "$SGMLSPL" && break
16179 done
16180
16181 fi
16182
16183
16184 # prepare build tree if outside source tree
16185 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16186 # Note 2: /bin/pwd might be better than shell's built-in at getting
16187 #         a symlink-free name.
16188 if test "$no_create" != yes; then
16189   if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16190     :
16191   else
16192     vpath_build=yes
16193
16194     echo $ECHO_N "preparing build tree... $ECHO_C" >&6
16195     pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16196     $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16197       || { { echo "$as_me:$LINENO: error: failed" >&5
16198 echo "$as_me: error: failed" >&2;}
16199    { (exit 1); exit 1; }; }
16200     echo "$as_me:$LINENO: result: done" >&5
16201 echo "${ECHO_T}done" >&6
16202   fi
16203 fi
16204
16205
16206 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16207
16208
16209 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c 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}"
16210
16211
16212 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16213
16214
16215 cat >confcache <<\_ACEOF
16216 # This file is a shell script that caches the results of configure
16217 # tests run on this system so they can be shared between configure
16218 # scripts and configure runs, see configure's option --config-cache.
16219 # It is not useful on other systems.  If it contains results you don't
16220 # want to keep, you may remove or edit it.
16221 #
16222 # config.status only pays attention to the cache file if you give it
16223 # the --recheck option to rerun configure.
16224 #
16225 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16226 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16227 # following values.
16228
16229 _ACEOF
16230
16231 # The following way of writing the cache mishandles newlines in values,
16232 # but we know of no workaround that is simple, portable, and efficient.
16233 # So, don't put newlines in cache variables' values.
16234 # Ultrix sh set writes to stderr and can't be redirected directly,
16235 # and sets the high bit in the cache file unless we assign to the vars.
16236 {
16237   (set) 2>&1 |
16238     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16239     *ac_space=\ *)
16240       # `set' does not quote correctly, so add quotes (double-quote
16241       # substitution turns \\\\ into \\, and sed turns \\ into \).
16242       sed -n \
16243         "s/'/'\\\\''/g;
16244           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16245       ;;
16246     *)
16247       # `set' quotes correctly as required by POSIX, so do not add quotes.
16248       sed -n \
16249         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16250       ;;
16251     esac;
16252 } |
16253   sed '
16254      t clear
16255      : clear
16256      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16257      t end
16258      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16259      : end' >>confcache
16260 if cmp -s $cache_file confcache; then :; else
16261   if test -w $cache_file; then
16262     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16263     cat confcache >$cache_file
16264   else
16265     echo "not updating unwritable cache $cache_file"
16266   fi
16267 fi
16268 rm -f confcache
16269
16270 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16271 # Let make expand exec_prefix.
16272 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16273
16274 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16275 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16276 # trailing colons and then remove the whole line if VPATH becomes empty
16277 # (actually we leave an empty line to preserve line numbers).
16278 if test "x$srcdir" = x.; then
16279   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16280 s/:*\$(srcdir):*/:/;
16281 s/:*\${srcdir}:*/:/;
16282 s/:*@srcdir@:*/:/;
16283 s/^\([^=]*=[    ]*\):*/\1/;
16284 s/:*$//;
16285 s/^[^=]*=[      ]*$//;
16286 }'
16287 fi
16288
16289 DEFS=-DHAVE_CONFIG_H
16290
16291
16292 : ${CONFIG_STATUS=./config.status}
16293 ac_clean_files_save=$ac_clean_files
16294 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16295 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16296 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16297 cat >$CONFIG_STATUS <<_ACEOF
16298 #! $SHELL
16299 # Generated by $as_me.
16300 # Run this file to recreate the current configuration.
16301 # Compiler output produced by configure, useful for debugging
16302 # configure, is in config.log if it exists.
16303
16304 debug=false
16305 SHELL=\${CONFIG_SHELL-$SHELL}
16306 _ACEOF
16307
16308 cat >>$CONFIG_STATUS <<\_ACEOF
16309
16310 ## --------------------- ##
16311 ## M4sh Initialization.  ##
16312 ## --------------------- ##
16313
16314 # Be Bourne compatible
16315 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16316   emulate sh
16317   NULLCMD=:
16318 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16319   set -o posix
16320 fi
16321
16322 # NLS nuisances.
16323 # Support unset when possible.
16324 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16325   as_unset=unset
16326 else
16327   as_unset=false
16328 fi
16329
16330 (set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
16331     { $as_unset LANG || test "${LANG+set}" != set; } ||
16332       { LANG=C; export LANG; }
16333 (set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
16334     { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
16335       { LC_ALL=C; export LC_ALL; }
16336 (set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
16337     { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
16338       { LC_TIME=C; export LC_TIME; }
16339 (set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
16340     { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
16341       { LC_CTYPE=C; export LC_CTYPE; }
16342 (set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
16343     { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
16344       { LANGUAGE=C; export LANGUAGE; }
16345 (set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
16346     { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
16347       { LC_COLLATE=C; export LC_COLLATE; }
16348 (set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
16349     { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
16350       { LC_NUMERIC=C; export LC_NUMERIC; }
16351 (set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
16352     { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
16353       { LC_MESSAGES=C; export LC_MESSAGES; }
16354
16355
16356 # Name of the executable.
16357 as_me=`(basename "$0") 2>/dev/null ||
16358 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16359          X"$0" : 'X\(//\)$' \| \
16360          X"$0" : 'X\(/\)$' \| \
16361          .     : '\(.\)' 2>/dev/null ||
16362 echo X/"$0" |
16363     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16364           /^X\/\(\/\/\)$/{ s//\1/; q; }
16365           /^X\/\(\/\).*/{ s//\1/; q; }
16366           s/.*/./; q'`
16367
16368 # PATH needs CR, and LINENO needs CR and PATH.
16369 # Avoid depending upon Character Ranges.
16370 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16371 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16372 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16373 as_cr_digits='0123456789'
16374 as_cr_alnum=$as_cr_Letters$as_cr_digits
16375
16376 # The user is always right.
16377 if test "${PATH_SEPARATOR+set}" != set; then
16378   echo "#! /bin/sh" >conftest.sh
16379   echo  "exit 0"   >>conftest.sh
16380   chmod +x conftest.sh
16381   if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
16382     PATH_SEPARATOR=';'
16383   else
16384     PATH_SEPARATOR=:
16385   fi
16386   rm -f conftest.sh
16387 fi
16388
16389
16390   as_lineno_1=$LINENO
16391   as_lineno_2=$LINENO
16392   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16393   test "x$as_lineno_1" != "x$as_lineno_2" &&
16394   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
16395   # Find who we are.  Look in the path if we contain no path at all
16396   # relative or not.
16397   case $0 in
16398     *[\\/]* ) as_myself=$0 ;;
16399     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16400 for as_dir in $PATH
16401 do
16402   IFS=$as_save_IFS
16403   test -z "$as_dir" && as_dir=.
16404   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16405 done
16406
16407        ;;
16408   esac
16409   # We did not find ourselves, most probably we were run as `sh COMMAND'
16410   # in which case we are not to be found in the path.
16411   if test "x$as_myself" = x; then
16412     as_myself=$0
16413   fi
16414   if test ! -f "$as_myself"; then
16415     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16416 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16417    { (exit 1); exit 1; }; }
16418   fi
16419   case $CONFIG_SHELL in
16420   '')
16421     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16422 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16423 do
16424   IFS=$as_save_IFS
16425   test -z "$as_dir" && as_dir=.
16426   for as_base in sh bash ksh sh5; do
16427          case $as_dir in
16428          /*)
16429            if ("$as_dir/$as_base" -c '
16430   as_lineno_1=$LINENO
16431   as_lineno_2=$LINENO
16432   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16433   test "x$as_lineno_1" != "x$as_lineno_2" &&
16434   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
16435              CONFIG_SHELL=$as_dir/$as_base
16436              export CONFIG_SHELL
16437              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16438            fi;;
16439          esac
16440        done
16441 done
16442 ;;
16443   esac
16444
16445   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16446   # uniformly replaced by the line number.  The first 'sed' inserts a
16447   # line-number line before each line; the second 'sed' does the real
16448   # work.  The second script uses 'N' to pair each line-number line
16449   # with the numbered line, and appends trailing '-' during
16450   # substitution so that $LINENO is not a special case at line end.
16451   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16452   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
16453   sed '=' <$as_myself |
16454     sed '
16455       N
16456       s,$,-,
16457       : loop
16458       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16459       t loop
16460       s,-$,,
16461       s,^['$as_cr_digits']*\n,,
16462     ' >$as_me.lineno &&
16463   chmod +x $as_me.lineno ||
16464     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16465 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16466    { (exit 1); exit 1; }; }
16467
16468   # Don't try to exec as it changes $[0], causing all sort of problems
16469   # (the dirname of $[0] is not the place where we might find the
16470   # original and so on.  Autoconf is especially sensible to this).
16471   . ./$as_me.lineno
16472   # Exit status is that of the last command.
16473   exit
16474 }
16475
16476
16477 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16478   *c*,-n*) ECHO_N= ECHO_C='
16479 ' ECHO_T='      ' ;;
16480   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16481   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
16482 esac
16483
16484 if expr a : '\(a\)' >/dev/null 2>&1; then
16485   as_expr=expr
16486 else
16487   as_expr=false
16488 fi
16489
16490 rm -f conf$$ conf$$.exe conf$$.file
16491 echo >conf$$.file
16492 if ln -s conf$$.file conf$$ 2>/dev/null; then
16493   # We could just check for DJGPP; but this test a) works b) is more generic
16494   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16495   if test -f conf$$.exe; then
16496     # Don't use ln at all; we don't have any links
16497     as_ln_s='cp -p'
16498   else
16499     as_ln_s='ln -s'
16500   fi
16501 elif ln conf$$.file conf$$ 2>/dev/null; then
16502   as_ln_s=ln
16503 else
16504   as_ln_s='cp -p'
16505 fi
16506 rm -f conf$$ conf$$.exe conf$$.file
16507
16508 as_executable_p="test -f"
16509
16510 # Sed expression to map a string onto a valid CPP name.
16511 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
16512
16513 # Sed expression to map a string onto a valid variable name.
16514 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
16515
16516
16517 # IFS
16518 # We need space, tab and new line, in precisely that order.
16519 as_nl='
16520 '
16521 IFS="   $as_nl"
16522
16523 # CDPATH.
16524 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
16525
16526 exec 6>&1
16527
16528 # Open the log real soon, to keep \$[0] and so on meaningful, and to
16529 # report actual input values of CONFIG_FILES etc. instead of their
16530 # values after options handling.  Logging --version etc. is OK.
16531 exec 5>>config.log
16532 {
16533   echo
16534   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16535 ## Running $as_me. ##
16536 _ASBOX
16537 } >&5
16538 cat >&5 <<_CSEOF
16539
16540 This file was extended by PostgreSQL $as_me 7.3devel, which was
16541 generated by GNU Autoconf 2.53.  Invocation command line was
16542
16543   CONFIG_FILES    = $CONFIG_FILES
16544   CONFIG_HEADERS  = $CONFIG_HEADERS
16545   CONFIG_LINKS    = $CONFIG_LINKS
16546   CONFIG_COMMANDS = $CONFIG_COMMANDS
16547   $ $0 $@
16548
16549 _CSEOF
16550 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16551 echo >&5
16552 _ACEOF
16553
16554 # Files that config.status was made for.
16555 if test -n "$ac_config_files"; then
16556   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16557 fi
16558
16559 if test -n "$ac_config_headers"; then
16560   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16561 fi
16562
16563 if test -n "$ac_config_links"; then
16564   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16565 fi
16566
16567 if test -n "$ac_config_commands"; then
16568   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16569 fi
16570
16571 cat >>$CONFIG_STATUS <<\_ACEOF
16572
16573 ac_cs_usage="\
16574 \`$as_me' instantiates files from templates according to the
16575 current configuration.
16576
16577 Usage: $0 [OPTIONS] [FILE]...
16578
16579   -h, --help       print this help, then exit
16580   -V, --version    print version number, then exit
16581   -d, --debug      don't remove temporary files
16582       --recheck    update $as_me by reconfiguring in the same conditions
16583   --file=FILE[:TEMPLATE]
16584                    instantiate the configuration file FILE
16585   --header=FILE[:TEMPLATE]
16586                    instantiate the configuration header FILE
16587
16588 Configuration files:
16589 $config_files
16590
16591 Configuration headers:
16592 $config_headers
16593
16594 Configuration links:
16595 $config_links
16596
16597 Report bugs to <bug-autoconf@gnu.org>."
16598 _ACEOF
16599
16600 cat >>$CONFIG_STATUS <<_ACEOF
16601 ac_cs_version="\\
16602 PostgreSQL config.status 7.3devel
16603 configured by $0, generated by GNU Autoconf 2.53,
16604   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16605
16606 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16607 Free Software Foundation, Inc.
16608 This config.status script is free software; the Free Software Foundation
16609 gives unlimited permission to copy, distribute and modify it."
16610 srcdir=$srcdir
16611 _ACEOF
16612
16613 cat >>$CONFIG_STATUS <<\_ACEOF
16614 # If no file are specified by the user, then we need to provide default
16615 # value.  By we need to know if files were specified by the user.
16616 ac_need_defaults=:
16617 while test $# != 0
16618 do
16619   case $1 in
16620   --*=*)
16621     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16622     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16623     shift
16624     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16625     shift
16626     ;;
16627   -*);;
16628   *) # This is not an option, so the user has probably given explicit
16629      # arguments.
16630      ac_need_defaults=false;;
16631   esac
16632
16633   case $1 in
16634   # Handling of the options.
16635 _ACEOF
16636 cat >>$CONFIG_STATUS <<_ACEOF
16637   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16638     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16639     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16640 _ACEOF
16641 cat >>$CONFIG_STATUS <<\_ACEOF
16642   --version | --vers* | -V )
16643     echo "$ac_cs_version"; exit 0 ;;
16644   --he | --h)
16645     # Conflict between --help and --header
16646     { { echo "$as_me:$LINENO: error: ambiguous option: $1
16647 Try \`$0 --help' for more information." >&5
16648 echo "$as_me: error: ambiguous option: $1
16649 Try \`$0 --help' for more information." >&2;}
16650    { (exit 1); exit 1; }; };;
16651   --help | --hel | -h )
16652     echo "$ac_cs_usage"; exit 0 ;;
16653   --debug | --d* | -d )
16654     debug=: ;;
16655   --file | --fil | --fi | --f )
16656     shift
16657     CONFIG_FILES="$CONFIG_FILES $1"
16658     ac_need_defaults=false;;
16659   --header | --heade | --head | --hea )
16660     shift
16661     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16662     ac_need_defaults=false;;
16663
16664   # This is an error.
16665   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16666 Try \`$0 --help' for more information." >&5
16667 echo "$as_me: error: unrecognized option: $1
16668 Try \`$0 --help' for more information." >&2;}
16669    { (exit 1); exit 1; }; } ;;
16670
16671   *) ac_config_targets="$ac_config_targets $1" ;;
16672
16673   esac
16674   shift
16675 done
16676
16677 _ACEOF
16678
16679
16680
16681
16682
16683 cat >>$CONFIG_STATUS <<\_ACEOF
16684 for ac_config_target in $ac_config_targets
16685 do
16686   case "$ac_config_target" in
16687   # Handling of arguments.
16688   "GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
16689   "src/Makefile.global" ) CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
16690   "src/backend/port/tas.s" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
16691   "src/backend/port/dynloader.c" ) CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
16692   "src/include/dynloader.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
16693   "src/include/pg_config_os.h" ) CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
16694   "src/Makefile.port" ) CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
16695   "src/include/pg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
16696   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
16697 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16698    { (exit 1); exit 1; }; };;
16699   esac
16700 done
16701
16702 # If the user did not use the arguments to specify the items to instantiate,
16703 # then the envvar interface is used.  Set only those that are not.
16704 # We use the long form for the default assignment because of an extremely
16705 # bizarre bug on SunOS 4.1.3.
16706 if $ac_need_defaults; then
16707   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16708   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16709   test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
16710 fi
16711
16712 # Create a temporary directory, and hook for its removal unless debugging.
16713 $debug ||
16714 {
16715   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16716   trap '{ (exit 1); exit 1; }' 1 2 13 15
16717 }
16718
16719 # Create a (secure) tmp directory for tmp files.
16720 : ${TMPDIR=/tmp}
16721 {
16722   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16723   test -n "$tmp" && test -d "$tmp"
16724 }  ||
16725 {
16726   tmp=$TMPDIR/cs$$-$RANDOM
16727   (umask 077 && mkdir $tmp)
16728 } ||
16729 {
16730    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16731    { (exit 1); exit 1; }
16732 }
16733
16734 _ACEOF
16735
16736 cat >>$CONFIG_STATUS <<_ACEOF
16737
16738 #
16739 # CONFIG_FILES section.
16740 #
16741
16742 # No need to generate the scripts if there are no CONFIG_FILES.
16743 # This happens for instance when ./config.status config.h
16744 if test -n "\$CONFIG_FILES"; then
16745   # Protect against being on the right side of a sed subst in config.status.
16746   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16747    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16748 s,@SHELL@,$SHELL,;t t
16749 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16750 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16751 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16752 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16753 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16754 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16755 s,@exec_prefix@,$exec_prefix,;t t
16756 s,@prefix@,$prefix,;t t
16757 s,@program_transform_name@,$program_transform_name,;t t
16758 s,@bindir@,$bindir,;t t
16759 s,@sbindir@,$sbindir,;t t
16760 s,@libexecdir@,$libexecdir,;t t
16761 s,@datadir@,$datadir,;t t
16762 s,@sysconfdir@,$sysconfdir,;t t
16763 s,@sharedstatedir@,$sharedstatedir,;t t
16764 s,@localstatedir@,$localstatedir,;t t
16765 s,@libdir@,$libdir,;t t
16766 s,@includedir@,$includedir,;t t
16767 s,@oldincludedir@,$oldincludedir,;t t
16768 s,@infodir@,$infodir,;t t
16769 s,@mandir@,$mandir,;t t
16770 s,@build_alias@,$build_alias,;t t
16771 s,@host_alias@,$host_alias,;t t
16772 s,@target_alias@,$target_alias,;t t
16773 s,@DEFS@,$DEFS,;t t
16774 s,@ECHO_C@,$ECHO_C,;t t
16775 s,@ECHO_N@,$ECHO_N,;t t
16776 s,@ECHO_T@,$ECHO_T,;t t
16777 s,@LIBS@,$LIBS,;t t
16778 s,@docdir@,$docdir,;t t
16779 s,@configure_args@,$configure_args,;t t
16780 s,@build@,$build,;t t
16781 s,@build_cpu@,$build_cpu,;t t
16782 s,@build_vendor@,$build_vendor,;t t
16783 s,@build_os@,$build_os,;t t
16784 s,@host@,$host,;t t
16785 s,@host_cpu@,$host_cpu,;t t
16786 s,@host_vendor@,$host_vendor,;t t
16787 s,@host_os@,$host_os,;t t
16788 s,@PORTNAME@,$PORTNAME,;t t
16789 s,@TAS@,$TAS,;t t
16790 s,@MULTIBYTE@,$MULTIBYTE,;t t
16791 s,@enable_nls@,$enable_nls,;t t
16792 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
16793 s,@default_port@,$default_port,;t t
16794 s,@enable_shared@,$enable_shared,;t t
16795 s,@enable_rpath@,$enable_rpath,;t t
16796 s,@enable_debug@,$enable_debug,;t t
16797 s,@CC@,$CC,;t t
16798 s,@CFLAGS@,$CFLAGS,;t t
16799 s,@LDFLAGS@,$LDFLAGS,;t t
16800 s,@CPPFLAGS@,$CPPFLAGS,;t t
16801 s,@ac_ct_CC@,$ac_ct_CC,;t t
16802 s,@EXEEXT@,$EXEEXT,;t t
16803 s,@OBJEXT@,$OBJEXT,;t t
16804 s,@CPP@,$CPP,;t t
16805 s,@GCC@,$GCC,;t t
16806 s,@autodepend@,$autodepend,;t t
16807 s,@INCLUDES@,$INCLUDES,;t t
16808 s,@with_tcl@,$with_tcl,;t t
16809 s,@with_tk@,$with_tk,;t t
16810 s,@with_perl@,$with_perl,;t t
16811 s,@with_python@,$with_python,;t t
16812 s,@ANT@,$ANT,;t t
16813 s,@with_java@,$with_java,;t t
16814 s,@with_krb4@,$with_krb4,;t t
16815 s,@with_krb5@,$with_krb5,;t t
16816 s,@krb_srvtab@,$krb_srvtab,;t t
16817 s,@with_pam@,$with_pam,;t t
16818 s,@with_openssl@,$with_openssl,;t t
16819 s,@enable_odbc@,$enable_odbc,;t t
16820 s,@with_unixodbc@,$with_unixodbc,;t t
16821 s,@with_iodbc@,$with_iodbc,;t t
16822 s,@odbcinst_ini_dir@,$odbcinst_ini_dir,;t t
16823 s,@ELF_SYS@,$ELF_SYS,;t t
16824 s,@CXX@,$CXX,;t t
16825 s,@CXXFLAGS@,$CXXFLAGS,;t t
16826 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
16827 s,@CXXCPP@,$CXXCPP,;t t
16828 s,@with_CXX@,$with_CXX,;t t
16829 s,@GXX@,$GXX,;t t
16830 s,@AWK@,$AWK,;t t
16831 s,@FLEX@,$FLEX,;t t
16832 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
16833 s,@LN_S@,$LN_S,;t t
16834 s,@LD@,$LD,;t t
16835 s,@with_gnu_ld@,$with_gnu_ld,;t t
16836 s,@ld_R_works@,$ld_R_works,;t t
16837 s,@RANLIB@,$RANLIB,;t t
16838 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16839 s,@LORDER@,$LORDER,;t t
16840 s,@TAR@,$TAR,;t t
16841 s,@STRIP@,$STRIP,;t t
16842 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
16843 s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
16844 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
16845 s,@YACC@,$YACC,;t t
16846 s,@YFLAGS@,$YFLAGS,;t t
16847 s,@WISH@,$WISH,;t t
16848 s,@PERL@,$PERL,;t t
16849 s,@perl_installsitearch@,$perl_installsitearch,;t t
16850 s,@perl_installsitelib@,$perl_installsitelib,;t t
16851 s,@perl_installman3dir@,$perl_installman3dir,;t t
16852 s,@PYTHON@,$PYTHON,;t t
16853 s,@python_version@,$python_version,;t t
16854 s,@python_prefix@,$python_prefix,;t t
16855 s,@python_execprefix@,$python_execprefix,;t t
16856 s,@python_configdir@,$python_configdir,;t t
16857 s,@python_moduledir@,$python_moduledir,;t t
16858 s,@python_moduleexecdir@,$python_moduleexecdir,;t t
16859 s,@python_includespec@,$python_includespec,;t t
16860 s,@python_libspec@,$python_libspec,;t t
16861 s,@MEMCMP@,$MEMCMP,;t t
16862 s,@SNPRINTF@,$SNPRINTF,;t t
16863 s,@ISINF@,$ISINF,;t t
16864 s,@GETRUSAGE@,$GETRUSAGE,;t t
16865 s,@SRANDOM@,$SRANDOM,;t t
16866 s,@GETHOSTNAME@,$GETHOSTNAME,;t t
16867 s,@MISSING_RANDOM@,$MISSING_RANDOM,;t t
16868 s,@INET_ATON@,$INET_ATON,;t t
16869 s,@STRERROR@,$STRERROR,;t t
16870 s,@STRDUP@,$STRDUP,;t t
16871 s,@STRTOL@,$STRTOL,;t t
16872 s,@STRTOUL@,$STRTOUL,;t t
16873 s,@STRCASECMP@,$STRCASECMP,;t t
16874 s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t
16875 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
16876 s,@MSGFMT@,$MSGFMT,;t t
16877 s,@MSGMERGE@,$MSGMERGE,;t t
16878 s,@XGETTEXT@,$XGETTEXT,;t t
16879 s,@localedir@,$localedir,;t t
16880 s,@TCLSH@,$TCLSH,;t t
16881 s,@TCL_CONFIG_SH@,$TCL_CONFIG_SH,;t t
16882 s,@TK_CONFIG_SH@,$TK_CONFIG_SH,;t t
16883 s,@NSGMLS@,$NSGMLS,;t t
16884 s,@JADE@,$JADE,;t t
16885 s,@have_docbook@,$have_docbook,;t t
16886 s,@DOCBOOKSTYLE@,$DOCBOOKSTYLE,;t t
16887 s,@SGMLSPL@,$SGMLSPL,;t t
16888 s,@vpath_build@,$vpath_build,;t t
16889 CEOF
16890
16891 _ACEOF
16892
16893   cat >>$CONFIG_STATUS <<\_ACEOF
16894   # Split the substitutions into bite-sized pieces for seds with
16895   # small command number limits, like on Digital OSF/1 and HP-UX.
16896   ac_max_sed_lines=48
16897   ac_sed_frag=1 # Number of current file.
16898   ac_beg=1 # First line for current file.
16899   ac_end=$ac_max_sed_lines # Line after last line for current file.
16900   ac_more_lines=:
16901   ac_sed_cmds=
16902   while $ac_more_lines; do
16903     if test $ac_beg -gt 1; then
16904       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16905     else
16906       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16907     fi
16908     if test ! -s $tmp/subs.frag; then
16909       ac_more_lines=false
16910     else
16911       # The purpose of the label and of the branching condition is to
16912       # speed up the sed processing (if there are no `@' at all, there
16913       # is no need to browse any of the substitutions).
16914       # These are the two extra sed commands mentioned above.
16915       (echo ':t
16916   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16917       if test -z "$ac_sed_cmds"; then
16918         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16919       else
16920         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16921       fi
16922       ac_sed_frag=`expr $ac_sed_frag + 1`
16923       ac_beg=$ac_end
16924       ac_end=`expr $ac_end + $ac_max_sed_lines`
16925     fi
16926   done
16927   if test -z "$ac_sed_cmds"; then
16928     ac_sed_cmds=cat
16929   fi
16930 fi # test -n "$CONFIG_FILES"
16931
16932 _ACEOF
16933 cat >>$CONFIG_STATUS <<\_ACEOF
16934 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16935   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16936   case $ac_file in
16937   - | *:- | *:-:* ) # input from stdin
16938         cat >$tmp/stdin
16939         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16940         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16941   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16942         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16943   * )   ac_file_in=$ac_file.in ;;
16944   esac
16945
16946   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16947   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
16948 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16949          X"$ac_file" : 'X\(//\)[^/]' \| \
16950          X"$ac_file" : 'X\(//\)$' \| \
16951          X"$ac_file" : 'X\(/\)' \| \
16952          .     : '\(.\)' 2>/dev/null ||
16953 echo X"$ac_file" |
16954     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16955           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16956           /^X\(\/\/\)$/{ s//\1/; q; }
16957           /^X\(\/\).*/{ s//\1/; q; }
16958           s/.*/./; q'`
16959   { case "$ac_dir" in
16960   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16961   *)                      as_incr_dir=.;;
16962 esac
16963 as_dummy="$ac_dir"
16964 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16965   case $as_mkdir_dir in
16966     # Skip DOS drivespec
16967     ?:) as_incr_dir=$as_mkdir_dir ;;
16968     *)
16969       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16970       test -d "$as_incr_dir" ||
16971         mkdir "$as_incr_dir" ||
16972         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
16973 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
16974    { (exit 1); exit 1; }; }
16975     ;;
16976   esac
16977 done; }
16978
16979   ac_builddir=.
16980
16981 if test "$ac_dir" != .; then
16982   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
16983   # A "../" for each directory in $ac_dir_suffix.
16984   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
16985 else
16986   ac_dir_suffix= ac_top_builddir=
16987 fi
16988
16989 case $srcdir in
16990   .)  # No --srcdir option.  We are building in place.
16991     ac_srcdir=.
16992     if test -z "$ac_top_builddir"; then
16993        ac_top_srcdir=.
16994     else
16995        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
16996     fi ;;
16997   [\\/]* | ?:[\\/]* )  # Absolute path.
16998     ac_srcdir=$srcdir$ac_dir_suffix;
16999     ac_top_srcdir=$srcdir ;;
17000   *) # Relative path.
17001     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17002     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17003 esac
17004 # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
17005 # absolute.
17006 ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
17007 ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
17008 ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
17009 ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
17010
17011
17012
17013   if test x"$ac_file" != x-; then
17014     { echo "$as_me:$LINENO: creating $ac_file" >&5
17015 echo "$as_me: creating $ac_file" >&6;}
17016     rm -f "$ac_file"
17017   fi
17018   # Let's still pretend it is `configure' which instantiates (i.e., don't
17019   # use $as_me), people would be surprised to read:
17020   #    /* config.h.  Generated by config.status.  */
17021   if test x"$ac_file" = x-; then
17022     configure_input=
17023   else
17024     configure_input="$ac_file.  "
17025   fi
17026   configure_input=$configure_input"Generated from `echo $ac_file_in |
17027                                      sed 's,.*/,,'` by configure."
17028
17029   # First look for the input files in the build tree, otherwise in the
17030   # src tree.
17031   ac_file_inputs=`IFS=:
17032     for f in $ac_file_in; do
17033       case $f in
17034       -) echo $tmp/stdin ;;
17035       [\\/$]*)
17036          # Absolute (can't be DOS-style, as IFS=:)
17037          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17038 echo "$as_me: error: cannot find input file: $f" >&2;}
17039    { (exit 1); exit 1; }; }
17040          echo $f;;
17041       *) # Relative
17042          if test -f "$f"; then
17043            # Build tree
17044            echo $f
17045          elif test -f "$srcdir/$f"; then
17046            # Source tree
17047            echo $srcdir/$f
17048          else
17049            # /dev/null tree
17050            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17051 echo "$as_me: error: cannot find input file: $f" >&2;}
17052    { (exit 1); exit 1; }; }
17053          fi;;
17054       esac
17055     done` || { (exit 1); exit 1; }
17056 _ACEOF
17057 cat >>$CONFIG_STATUS <<_ACEOF
17058   sed "$ac_vpsub
17059 $extrasub
17060 _ACEOF
17061 cat >>$CONFIG_STATUS <<\_ACEOF
17062 :t
17063 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17064 s,@configure_input@,$configure_input,;t t
17065 s,@srcdir@,$ac_srcdir,;t t
17066 s,@abs_srcdir@,$ac_abs_srcdir,;t t
17067 s,@top_srcdir@,$ac_top_srcdir,;t t
17068 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17069 s,@builddir@,$ac_builddir,;t t
17070 s,@abs_builddir@,$ac_abs_builddir,;t t
17071 s,@top_builddir@,$ac_top_builddir,;t t
17072 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17073 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17074   rm -f $tmp/stdin
17075   if test x"$ac_file" != x-; then
17076     mv $tmp/out $ac_file
17077   else
17078     cat $tmp/out
17079     rm -f $tmp/out
17080   fi
17081
17082 done
17083 _ACEOF
17084 cat >>$CONFIG_STATUS <<\_ACEOF
17085
17086 #
17087 # CONFIG_HEADER section.
17088 #
17089
17090 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17091 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17092 #
17093 # ac_d sets the value in "#define NAME VALUE" lines.
17094 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17095 ac_dB='[        ].*$,\1#\2'
17096 ac_dC=' '
17097 ac_dD=',;t'
17098 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17099 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17100 ac_uB='$,\1#\2define\3'
17101 ac_uC=' '
17102 ac_uD=',;t'
17103
17104 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17105   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17106   case $ac_file in
17107   - | *:- | *:-:* ) # input from stdin
17108         cat >$tmp/stdin
17109         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17110         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17111   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17112         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17113   * )   ac_file_in=$ac_file.in ;;
17114   esac
17115
17116   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
17117 echo "$as_me: creating $ac_file" >&6;}
17118
17119   # First look for the input files in the build tree, otherwise in the
17120   # src tree.
17121   ac_file_inputs=`IFS=:
17122     for f in $ac_file_in; do
17123       case $f in
17124       -) echo $tmp/stdin ;;
17125       [\\/$]*)
17126          # Absolute (can't be DOS-style, as IFS=:)
17127          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17128 echo "$as_me: error: cannot find input file: $f" >&2;}
17129    { (exit 1); exit 1; }; }
17130          echo $f;;
17131       *) # Relative
17132          if test -f "$f"; then
17133            # Build tree
17134            echo $f
17135          elif test -f "$srcdir/$f"; then
17136            # Source tree
17137            echo $srcdir/$f
17138          else
17139            # /dev/null tree
17140            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17141 echo "$as_me: error: cannot find input file: $f" >&2;}
17142    { (exit 1); exit 1; }; }
17143          fi;;
17144       esac
17145     done` || { (exit 1); exit 1; }
17146   # Remove the trailing spaces.
17147   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17148
17149 _ACEOF
17150
17151 # Transform confdefs.h into two sed scripts, `conftest.defines' and
17152 # `conftest.undefs', that substitutes the proper values into
17153 # config.h.in to produce config.h.  The first handles `#define'
17154 # templates, and the second `#undef' templates.
17155 # And first: Protect against being on the right side of a sed subst in
17156 # config.status.  Protect against being in an unquoted here document
17157 # in config.status.
17158 rm -f conftest.defines conftest.undefs
17159 # Using a here document instead of a string reduces the quoting nightmare.
17160 # Putting comments in sed scripts is not portable.
17161 #
17162 # `end' is used to avoid that the second main sed command (meant for
17163 # 0-ary CPP macros) applies to n-ary macro definitions.
17164 # See the Autoconf documentation for `clear'.
17165 cat >confdef2sed.sed <<\_ACEOF
17166 s/[\\&,]/\\&/g
17167 s,[\\$`],\\&,g
17168 t clear
17169 : clear
17170 s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
17171 t end
17172 s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
17173 : end
17174 _ACEOF
17175 # If some macros were called several times there might be several times
17176 # the same #defines, which is useless.  Nevertheless, we may not want to
17177 # sort them, since we want the *last* AC-DEFINE to be honored.
17178 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
17179 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
17180 rm -f confdef2sed.sed
17181
17182 # This sed command replaces #undef with comments.  This is necessary, for
17183 # example, in the case of _POSIX_SOURCE, which is predefined and required
17184 # on some systems where configure will not decide to define it.
17185 cat >>conftest.undefs <<\_ACEOF
17186 s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
17187 _ACEOF
17188
17189 # Break up conftest.defines because some shells have a limit on the size
17190 # of here documents, and old seds have small limits too (100 cmds).
17191 echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
17192 echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
17193 echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
17194 echo '  :' >>$CONFIG_STATUS
17195 rm -f conftest.tail
17196 while grep . conftest.defines >/dev/null
17197 do
17198   # Write a limited-size here document to $tmp/defines.sed.
17199   echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
17200   # Speed up: don't consider the non `#define' lines.
17201   echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
17202   # Work around the forget-to-reset-the-flag bug.
17203   echo 't clr' >>$CONFIG_STATUS
17204   echo ': clr' >>$CONFIG_STATUS
17205   sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
17206   echo 'CEOF
17207   sed -f $tmp/defines.sed $tmp/in >$tmp/out
17208   rm -f $tmp/in
17209   mv $tmp/out $tmp/in
17210 ' >>$CONFIG_STATUS
17211   sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
17212   rm -f conftest.defines
17213   mv conftest.tail conftest.defines
17214 done
17215 rm -f conftest.defines
17216 echo '  fi # egrep' >>$CONFIG_STATUS
17217 echo >>$CONFIG_STATUS
17218
17219 # Break up conftest.undefs because some shells have a limit on the size
17220 # of here documents, and old seds have small limits too (100 cmds).
17221 echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
17222 rm -f conftest.tail
17223 while grep . conftest.undefs >/dev/null
17224 do
17225   # Write a limited-size here document to $tmp/undefs.sed.
17226   echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
17227   # Speed up: don't consider the non `#undef'
17228   echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
17229   # Work around the forget-to-reset-the-flag bug.
17230   echo 't clr' >>$CONFIG_STATUS
17231   echo ': clr' >>$CONFIG_STATUS
17232   sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
17233   echo 'CEOF
17234   sed -f $tmp/undefs.sed $tmp/in >$tmp/out
17235   rm -f $tmp/in
17236   mv $tmp/out $tmp/in
17237 ' >>$CONFIG_STATUS
17238   sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
17239   rm -f conftest.undefs
17240   mv conftest.tail conftest.undefs
17241 done
17242 rm -f conftest.undefs
17243
17244 cat >>$CONFIG_STATUS <<\_ACEOF
17245   # Let's still pretend it is `configure' which instantiates (i.e., don't
17246   # use $as_me), people would be surprised to read:
17247   #    /* config.h.  Generated by config.status.  */
17248   if test x"$ac_file" = x-; then
17249     echo "/* Generated by configure.  */" >$tmp/config.h
17250   else
17251     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
17252   fi
17253   cat $tmp/in >>$tmp/config.h
17254   rm -f $tmp/in
17255   if test x"$ac_file" != x-; then
17256     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17257       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
17258 echo "$as_me: $ac_file is unchanged" >&6;}
17259     else
17260       ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17261 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17262          X"$ac_file" : 'X\(//\)[^/]' \| \
17263          X"$ac_file" : 'X\(//\)$' \| \
17264          X"$ac_file" : 'X\(/\)' \| \
17265          .     : '\(.\)' 2>/dev/null ||
17266 echo X"$ac_file" |
17267     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17268           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17269           /^X\(\/\/\)$/{ s//\1/; q; }
17270           /^X\(\/\).*/{ s//\1/; q; }
17271           s/.*/./; q'`
17272       { case "$ac_dir" in
17273   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17274   *)                      as_incr_dir=.;;
17275 esac
17276 as_dummy="$ac_dir"
17277 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17278   case $as_mkdir_dir in
17279     # Skip DOS drivespec
17280     ?:) as_incr_dir=$as_mkdir_dir ;;
17281     *)
17282       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17283       test -d "$as_incr_dir" ||
17284         mkdir "$as_incr_dir" ||
17285         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
17286 echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
17287    { (exit 1); exit 1; }; }
17288     ;;
17289   esac
17290 done; }
17291
17292       rm -f $ac_file
17293       mv $tmp/config.h $ac_file
17294     fi
17295   else
17296     cat $tmp/config.h
17297     rm -f $tmp/config.h
17298   fi
17299   # Run the commands associated with the file.
17300   case $ac_file in
17301     src/include/pg_config.h )
17302 # Update timestamp for pg_config.h (see Makefile.global)
17303 echo >src/include/stamp-h
17304  ;;
17305   esac
17306 done
17307 _ACEOF
17308 cat >>$CONFIG_STATUS <<\_ACEOF
17309
17310 #
17311 # CONFIG_LINKS section.
17312 #
17313
17314 for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
17315   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17316   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17317
17318   { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
17319 echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
17320
17321   if test ! -r $srcdir/$ac_source; then
17322     { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
17323 echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
17324    { (exit 1); exit 1; }; }
17325   fi
17326   rm -f $ac_dest
17327
17328   # Make relative symlinks.
17329   ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
17330 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17331          X"$ac_dest" : 'X\(//\)[^/]' \| \
17332          X"$ac_dest" : 'X\(//\)$' \| \
17333          X"$ac_dest" : 'X\(/\)' \| \
17334          .     : '\(.\)' 2>/dev/null ||
17335 echo X"$ac_dest" |
17336     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17337           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17338           /^X\(\/\/\)$/{ s//\1/; q; }
17339           /^X\(\/\).*/{ s//\1/; q; }
17340           s/.*/./; q'`
17341   { case "$ac_dest_dir" in
17342   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17343   *)                      as_incr_dir=.;;
17344 esac
17345 as_dummy="$ac_dest_dir"
17346 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17347   case $as_mkdir_dir in
17348     # Skip DOS drivespec
17349     ?:) as_incr_dir=$as_mkdir_dir ;;
17350     *)
17351       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17352       test -d "$as_incr_dir" ||
17353         mkdir "$as_incr_dir" ||
17354         { { echo "$as_me:$LINENO: error: cannot create \"$ac_dest_dir\"" >&5
17355 echo "$as_me: error: cannot create \"$ac_dest_dir\"" >&2;}
17356    { (exit 1); exit 1; }; }
17357     ;;
17358   esac
17359 done; }
17360
17361   ac_builddir=.
17362
17363 if test "$ac_dest_dir" != .; then
17364   ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
17365   # A "../" for each directory in $ac_dir_suffix.
17366   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17367 else
17368   ac_dir_suffix= ac_top_builddir=
17369 fi
17370
17371 case $srcdir in
17372   .)  # No --srcdir option.  We are building in place.
17373     ac_srcdir=.
17374     if test -z "$ac_top_builddir"; then
17375        ac_top_srcdir=.
17376     else
17377        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17378     fi ;;
17379   [\\/]* | ?:[\\/]* )  # Absolute path.
17380     ac_srcdir=$srcdir$ac_dir_suffix;
17381     ac_top_srcdir=$srcdir ;;
17382   *) # Relative path.
17383     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17384     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17385 esac
17386 # Don't blindly perform a `cd "$ac_dest_dir"/$ac_foo && pwd` since $ac_foo can be
17387 # absolute.
17388 ac_abs_builddir=`cd "$ac_dest_dir" && cd $ac_builddir && pwd`
17389 ac_abs_top_builddir=`cd "$ac_dest_dir" && cd $ac_top_builddir && pwd`
17390 ac_abs_srcdir=`cd "$ac_dest_dir" && cd $ac_srcdir && pwd`
17391 ac_abs_top_srcdir=`cd "$ac_dest_dir" && cd $ac_top_srcdir && pwd`
17392
17393
17394   case $srcdir in
17395   [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
17396       *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
17397   esac
17398
17399   # Make a symlink if possible; otherwise try a hard link.
17400   ln -s $ac_rel_source $ac_dest 2>/dev/null ||
17401     ln $srcdir/$ac_source $ac_dest ||
17402     { { echo "$as_me:$LINENO: error: cannot link $ac_dest to $srcdir/$ac_source" >&5
17403 echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
17404    { (exit 1); exit 1; }; }
17405 done
17406 _ACEOF
17407
17408 cat >>$CONFIG_STATUS <<\_ACEOF
17409
17410 { (exit 0); exit 0; }
17411 _ACEOF
17412 chmod +x $CONFIG_STATUS
17413 ac_clean_files=$ac_clean_files_save
17414
17415
17416 # configure is writing to config.log, and then calls config.status.
17417 # config.status does its own redirection, appending to config.log.
17418 # Unfortunately, on DOS this fails, as config.log is still kept open
17419 # by configure, so config.status won't be able to write to it; its
17420 # output is simply discarded.  So we exec the FD to /dev/null,
17421 # effectively closing config.log, so it can be properly (re)opened and
17422 # appended to by config.status.  When coming back to configure, we
17423 # need to make the FD available again.
17424 if test "$no_create" != yes; then
17425   ac_cs_success=:
17426   exec 5>/dev/null
17427   $SHELL $CONFIG_STATUS || ac_cs_success=false
17428   exec 5>>config.log
17429   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17430   # would make configure fail if this is the last instruction.
17431   $ac_cs_success || { (exit 1); exit 1; }
17432 fi
17433