OSDN Git Service

RC2 preparations ...
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/pgsql
15 ac_help="$ac_help
16   --with-includes=DIRS    look for additional header files in DIRS"
17 ac_help="$ac_help
18   --with-libraries=DIRS   look for additional libraries in DIRS"
19 ac_help="$ac_help
20   --with-libs=DIRS        alternative spelling of --with-libraries"
21 ac_help="$ac_help
22   --enable-locale         enable locale support"
23 ac_help="$ac_help
24   --enable-recode         enable character set recode support"
25 ac_help="$ac_help
26   --enable-multibyte      enable multibyte character support"
27 ac_help="$ac_help
28   --enable-unicode-conversion  enable unicode conversion support"
29 ac_help="$ac_help
30   --with-pgport=PORTNUM   change default port number [5432]"
31 ac_help="$ac_help
32   --with-maxbackends=N    set default maximum number of connections [32]"
33 ac_help="$ac_help
34   --disable-shared        do not build shared libraries"
35 ac_help="$ac_help
36   --disable-rpath         do not embed shared library search path in executables"
37 ac_help="$ac_help
38   --enable-debug          build with debugging symbols (-g)"
39 ac_help="$ac_help
40   --enable-depend         turn on automatic dependency tracking"
41 ac_help="$ac_help
42   --enable-cassert        enable assertion checks (for debugging)"
43 ac_help="$ac_help
44   --with-tcl              build Tcl and Tk interfaces"
45 ac_help="$ac_help
46   --without-tk            do not build Tk interfaces if Tcl is enabled"
47 ac_help="$ac_help
48   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR"
49 ac_help="$ac_help
50   --with-tkconfig=DIR     tkConfig.sh is in DIR"
51 ac_help="$ac_help
52   --with-perl             build Perl interface and PL/Perl"
53 ac_help="$ac_help
54   --with-python           build Python interface module"
55 ac_help="$ac_help
56   --with-java             build JDBC interface and Java tools"
57 ac_help="$ac_help
58   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]"
59 ac_help="$ac_help
60   --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]"
61 ac_help="$ac_help
62   --with-krb-srvnam=NAME  name of the service principal in Kerberos [postgres]"
63 ac_help="$ac_help
64   --with-openssl[=DIR]    build with OpenSSL support [/usr/local/ssl]"
65 ac_help="$ac_help
66   --enable-odbc           build the ODBC driver package"
67 ac_help="$ac_help
68   --with-odbcinst=DIR     default directory for odbcinst.ini [sysconfdir]"
69 ac_help="$ac_help
70   --with-CXX              build C++ modules (libpq++)"
71 ac_help="$ac_help
72   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
73 ac_help="$ac_help
74   --enable-syslog         enable logging to syslog"
75
76 # Initialize some variables set by options.
77 # The variables have the same names as the options, with
78 # dashes changed to underlines.
79 build=NONE
80 cache_file=./config.cache
81 exec_prefix=NONE
82 host=NONE
83 no_create=
84 nonopt=NONE
85 no_recursion=
86 prefix=NONE
87 program_prefix=NONE
88 program_suffix=NONE
89 program_transform_name=s,x,x,
90 silent=
91 site=
92 srcdir=
93 target=NONE
94 verbose=
95 x_includes=NONE
96 x_libraries=NONE
97 bindir='${exec_prefix}/bin'
98 sbindir='${exec_prefix}/sbin'
99 libexecdir='${exec_prefix}/libexec'
100 datadir='${prefix}/share'
101 sysconfdir='${prefix}/etc'
102 sharedstatedir='${prefix}/com'
103 localstatedir='${prefix}/var'
104 libdir='${exec_prefix}/lib'
105 includedir='${prefix}/include'
106 oldincludedir='/usr/include'
107 docdir='${prefix}/doc'
108 mandir='${prefix}/man'
109
110 # Initialize some other variables.
111 subdirs=
112 MFLAGS= MAKEFLAGS=
113 SHELL=${CONFIG_SHELL-/bin/sh}
114 # Maximum number of lines to put in a shell here document.
115 ac_max_here_lines=12
116
117 ac_prev=
118 for ac_option
119 do
120
121   # If the previous option needs an argument, assign it.
122   if test -n "$ac_prev"; then
123     eval "$ac_prev=\$ac_option"
124     ac_prev=
125     continue
126   fi
127
128   case "$ac_option" in
129   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
130   *) ac_optarg= ;;
131   esac
132
133   # Accept the important Cygnus configure options, so we can diagnose typos.
134
135   case "$ac_option" in
136
137   -bindir | --bindir | --bindi | --bind | --bin | --bi)
138     ac_prev=bindir ;;
139   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
140     bindir="$ac_optarg" ;;
141
142   -build | --build | --buil | --bui | --bu)
143     ac_prev=build ;;
144   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
145     build="$ac_optarg" ;;
146
147   -cache-file | --cache-file | --cache-fil | --cache-fi \
148   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
149     ac_prev=cache_file ;;
150   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
151   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
152     cache_file="$ac_optarg" ;;
153
154   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
155     ac_prev=datadir ;;
156   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
157   | --da=*)
158     datadir="$ac_optarg" ;;
159
160   -disable-* | --disable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     eval "enable_${ac_feature}=no" ;;
168
169   -enable-* | --enable-*)
170     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
171     # Reject names that are not valid shell variable names.
172     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
173       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
174     fi
175     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
176     case "$ac_option" in
177       *=*) ;;
178       *) ac_optarg=yes ;;
179     esac
180     eval "enable_${ac_feature}='$ac_optarg'" ;;
181
182   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
183   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
184   | --exec | --exe | --ex)
185     ac_prev=exec_prefix ;;
186   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
187   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
188   | --exec=* | --exe=* | --ex=*)
189     exec_prefix="$ac_optarg" ;;
190
191   -gas | --gas | --ga | --g)
192     # Obsolete; use --with-gas.
193     with_gas=yes ;;
194
195   -help | --help | --hel | --he)
196     # Omit some internal or obsolete options to make the list less imposing.
197     # This message is too long to be a string in the A/UX 3.1 sh.
198     cat << EOF
199 Usage: configure [options] [host]
200 Options: [defaults in brackets after descriptions]
201 Configuration:
202   --cache-file=FILE       cache test results in FILE
203   --help                  print this message
204   --no-create             do not create output files
205   --quiet, --silent       do not print \`checking...' messages
206   --version               print the version of autoconf that created configure
207 Directory and file names:
208   --prefix=PREFIX         install architecture-independent files in PREFIX
209                           [$ac_default_prefix]
210   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
211                           [same as prefix]
212   --bindir=DIR            user executables in DIR [EPREFIX/bin]
213   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
214   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
215   --datadir=DIR           read-only architecture-independent data in DIR
216                           [PREFIX/share]
217   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
218   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
219                           [PREFIX/com]
220   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
221   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
222   --includedir=DIR        C header files in DIR [PREFIX/include]
223   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
224   --docdir=DIR           doc documentation in DIR [PREFIX/doc]
225   --mandir=DIR            man documentation in DIR [PREFIX/man]
226   --srcdir=DIR            find the sources in DIR [configure dir or ..]
227   --program-prefix=PREFIX prepend PREFIX to installed program names
228   --program-suffix=SUFFIX append SUFFIX to installed program names
229   --program-transform-name=PROGRAM
230                           run sed PROGRAM on installed program names
231 EOF
232     cat << EOF
233 Host type:
234   --build=BUILD           configure for building on BUILD [BUILD=HOST]
235   --host=HOST             configure for HOST [guessed]
236   --target=TARGET         configure for TARGET [TARGET=HOST]
237 Features and packages:
238   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
239   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
240   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
241   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
242   --x-includes=DIR        X include files are in DIR
243   --x-libraries=DIR       X library files are in DIR
244 EOF
245     if test -n "$ac_help"; then
246       echo "--enable and --with options recognized:$ac_help"
247     fi
248     exit 0 ;;
249
250   -host | --host | --hos | --ho)
251     ac_prev=host ;;
252   -host=* | --host=* | --hos=* | --ho=*)
253     host="$ac_optarg" ;;
254
255   -includedir | --includedir | --includedi | --included | --include \
256   | --includ | --inclu | --incl | --inc)
257     ac_prev=includedir ;;
258   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
259   | --includ=* | --inclu=* | --incl=* | --inc=*)
260     includedir="$ac_optarg" ;;
261
262   -docdir | --docdir | --infodi | --infod | --doc | --inf)
263     ac_prev=docdir ;;
264   -docdir=* | --docdir=* | --infodi=* | --infod=* | --doc=* | --inf=*)
265     docdir="$ac_optarg" ;;
266
267   -libdir | --libdir | --libdi | --libd)
268     ac_prev=libdir ;;
269   -libdir=* | --libdir=* | --libdi=* | --libd=*)
270     libdir="$ac_optarg" ;;
271
272   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
273   | --libexe | --libex | --libe)
274     ac_prev=libexecdir ;;
275   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
276   | --libexe=* | --libex=* | --libe=*)
277     libexecdir="$ac_optarg" ;;
278
279   -localstatedir | --localstatedir | --localstatedi | --localstated \
280   | --localstate | --localstat | --localsta | --localst \
281   | --locals | --local | --loca | --loc | --lo)
282     ac_prev=localstatedir ;;
283   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
284   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
285   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
286     localstatedir="$ac_optarg" ;;
287
288   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
289     ac_prev=mandir ;;
290   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
291     mandir="$ac_optarg" ;;
292
293   -nfp | --nfp | --nf)
294     # Obsolete; use --without-fp.
295     with_fp=no ;;
296
297   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
298   | --no-cr | --no-c)
299     no_create=yes ;;
300
301   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
302   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
303     no_recursion=yes ;;
304
305   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
306   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
307   | --oldin | --oldi | --old | --ol | --o)
308     ac_prev=oldincludedir ;;
309   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
310   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
311   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
312     oldincludedir="$ac_optarg" ;;
313
314   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
315     ac_prev=prefix ;;
316   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
317     prefix="$ac_optarg" ;;
318
319   -program-prefix | --program-prefix | --program-prefi | --program-pref \
320   | --program-pre | --program-pr | --program-p)
321     ac_prev=program_prefix ;;
322   -program-prefix=* | --program-prefix=* | --program-prefi=* \
323   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
324     program_prefix="$ac_optarg" ;;
325
326   -program-suffix | --program-suffix | --program-suffi | --program-suff \
327   | --program-suf | --program-su | --program-s)
328     ac_prev=program_suffix ;;
329   -program-suffix=* | --program-suffix=* | --program-suffi=* \
330   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
331     program_suffix="$ac_optarg" ;;
332
333   -program-transform-name | --program-transform-name \
334   | --program-transform-nam | --program-transform-na \
335   | --program-transform-n | --program-transform- \
336   | --program-transform | --program-transfor \
337   | --program-transfo | --program-transf \
338   | --program-trans | --program-tran \
339   | --progr-tra | --program-tr | --program-t)
340     ac_prev=program_transform_name ;;
341   -program-transform-name=* | --program-transform-name=* \
342   | --program-transform-nam=* | --program-transform-na=* \
343   | --program-transform-n=* | --program-transform-=* \
344   | --program-transform=* | --program-transfor=* \
345   | --program-transfo=* | --program-transf=* \
346   | --program-trans=* | --program-tran=* \
347   | --progr-tra=* | --program-tr=* | --program-t=*)
348     program_transform_name="$ac_optarg" ;;
349
350   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
351   | -silent | --silent | --silen | --sile | --sil)
352     silent=yes ;;
353
354   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
355     ac_prev=sbindir ;;
356   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
357   | --sbi=* | --sb=*)
358     sbindir="$ac_optarg" ;;
359
360   -sharedstatedir | --sharedstatedir | --sharedstatedi \
361   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
362   | --sharedst | --shareds | --shared | --share | --shar \
363   | --sha | --sh)
364     ac_prev=sharedstatedir ;;
365   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
366   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
367   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
368   | --sha=* | --sh=*)
369     sharedstatedir="$ac_optarg" ;;
370
371   -site | --site | --sit)
372     ac_prev=site ;;
373   -site=* | --site=* | --sit=*)
374     site="$ac_optarg" ;;
375
376   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
377     ac_prev=srcdir ;;
378   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
379     srcdir="$ac_optarg" ;;
380
381   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
382   | --syscon | --sysco | --sysc | --sys | --sy)
383     ac_prev=sysconfdir ;;
384   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
385   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
386     sysconfdir="$ac_optarg" ;;
387
388   -target | --target | --targe | --targ | --tar | --ta | --t)
389     ac_prev=target ;;
390   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
391     target="$ac_optarg" ;;
392
393   -v | -verbose | --verbose | --verbos | --verbo | --verb)
394     verbose=yes ;;
395
396   -version | --version | --versio | --versi | --vers)
397     echo "configure generated by autoconf version 2.13"
398     exit 0 ;;
399
400   -with-* | --with-*)
401     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
402     # Reject names that are not valid shell variable names.
403     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
404       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
405     fi
406     ac_package=`echo $ac_package| sed 's/-/_/g'`
407     case "$ac_option" in
408       *=*) ;;
409       *) ac_optarg=yes ;;
410     esac
411     eval "with_${ac_package}='$ac_optarg'" ;;
412
413   -without-* | --without-*)
414     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
418     fi
419     ac_package=`echo $ac_package| sed 's/-/_/g'`
420     eval "with_${ac_package}=no" ;;
421
422   --x)
423     # Obsolete; use --with-x.
424     with_x=yes ;;
425
426   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
427   | --x-incl | --x-inc | --x-in | --x-i)
428     ac_prev=x_includes ;;
429   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
430   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
431     x_includes="$ac_optarg" ;;
432
433   -x-libraries | --x-libraries | --x-librarie | --x-librari \
434   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
435     ac_prev=x_libraries ;;
436   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
437   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
438     x_libraries="$ac_optarg" ;;
439
440   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
441     ;;
442
443   *)
444     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
445       echo "configure: warning: $ac_option: invalid host type" 1>&2
446     fi
447     if test "x$nonopt" != xNONE; then
448       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449     fi
450     nonopt="$ac_option"
451     ;;
452
453   esac
454 done
455
456 if test -n "$ac_prev"; then
457   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
458 fi
459
460 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
461
462 # File descriptor usage:
463 # 0 standard input
464 # 1 file creation
465 # 2 errors and warnings
466 # 3 some systems may open it to /dev/tty
467 # 4 used on the Kubota Titan
468 # 6 checking for... messages and results
469 # 5 compiler messages saved in config.log
470 if test "$silent" = yes; then
471   exec 6>/dev/null
472 else
473   exec 6>&1
474 fi
475 exec 5>./config.log
476
477 echo "\
478 This file contains any messages produced by compilers while
479 running configure, to aid debugging if configure makes a mistake.
480 " 1>&5
481
482 # Strip out --no-create and --no-recursion so they do not pile up.
483 # Also quote any args containing shell metacharacters.
484 ac_configure_args=
485 for ac_arg
486 do
487   case "$ac_arg" in
488   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
489   | --no-cr | --no-c) ;;
490   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
491   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
492   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
493   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
494   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
495   esac
496 done
497
498 # NLS nuisances.
499 # Only set these to C if already set.  These must not be set unconditionally
500 # because not all systems understand e.g. LANG=C (notably SCO).
501 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
502 # Non-C LC_CTYPE values break the ctype check.
503 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
504 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
505 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
506 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
507
508 # confdefs.h avoids OS command line length limits that DEFS can exceed.
509 rm -rf conftest* confdefs.h
510 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
511 echo > confdefs.h
512
513 # A filename unique to this package, relative to the directory that
514 # configure is in, which we can look for to find out if srcdir is correct.
515 ac_unique_file=src/backend/access/common/heaptuple.c
516
517 # Find the source files, if location was not specified.
518 if test -z "$srcdir"; then
519   ac_srcdir_defaulted=yes
520   # Try the directory containing this script, then its parent.
521   ac_prog=$0
522   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
523   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
524   srcdir=$ac_confdir
525   if test ! -r $srcdir/$ac_unique_file; then
526     srcdir=..
527   fi
528 else
529   ac_srcdir_defaulted=no
530 fi
531 if test ! -r $srcdir/$ac_unique_file; then
532   if test "$ac_srcdir_defaulted" = yes; then
533     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
534   else
535     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
536   fi
537 fi
538 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
539
540 # Prefer explicitly selected file to automatically selected ones.
541 if test -z "$CONFIG_SITE"; then
542   if test "x$prefix" != xNONE; then
543     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544   else
545     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546   fi
547 fi
548 for ac_site_file in $CONFIG_SITE; do
549   if test -r "$ac_site_file"; then
550     echo "loading site script $ac_site_file"
551     . "$ac_site_file"
552   fi
553 done
554
555 if test -r "$cache_file"; then
556   echo "loading cache $cache_file"
557   . $cache_file
558 else
559   echo "creating cache $cache_file"
560   > $cache_file
561 fi
562
563 ac_ext=c
564 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
565 ac_cpp='$CPP $CPPFLAGS'
566 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
567 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
568 cross_compiling=$ac_cv_prog_cc_cross
569
570 ac_exeext=
571 ac_objext=o
572 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
573   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
574   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
575     ac_n= ac_c='
576 ' ac_t='        '
577   else
578     ac_n=-n ac_c= ac_t=
579   fi
580 else
581   ac_n= ac_c='\c' ac_t=
582 fi
583
584
585
586
587
588
589
590
591
592 ac_aux_dir=
593 for ac_dir in config $srcdir/config; do
594   if test -f $ac_dir/install-sh; then
595     ac_aux_dir=$ac_dir
596     ac_install_sh="$ac_aux_dir/install-sh -c"
597     break
598   elif test -f $ac_dir/install.sh; then
599     ac_aux_dir=$ac_dir
600     ac_install_sh="$ac_aux_dir/install.sh -c"
601     break
602   fi
603 done
604 if test -z "$ac_aux_dir"; then
605   { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
606 fi
607 ac_config_guess=$ac_aux_dir/config.guess
608 ac_config_sub=$ac_aux_dir/config.sub
609 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
610
611
612 VERSION='7.1RC2'
613
614 cat >> confdefs.h <<EOF
615 #define PG_VERSION "$VERSION"
616 EOF
617
618
619 unset CDPATH
620
621
622 # Make sure we can run config.sub.
623 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
624 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
625 fi
626
627 echo $ac_n "checking host system type""... $ac_c" 1>&6
628 echo "configure:629: checking host system type" >&5
629
630 host_alias=$host
631 case "$host_alias" in
632 NONE)
633   case $nonopt in
634   NONE)
635     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
636     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
637     fi ;;
638   *) host_alias=$nonopt ;;
639   esac ;;
640 esac
641
642 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
643 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$host" 1>&6
647
648
649
650
651
652 template=
653 echo $ac_n "checking which template to use""... $ac_c" 1>&6
654 echo "configure:655: checking which template to use" >&5
655
656 # Check whether --with-template was given
657 if test x"${with_template+set}" = xset; then
658   case $with_template in
659     yes)
660       { echo "configure: error: argument required for --with-template option" 1>&2; exit 1; }
661       ;;
662     no)
663       { echo "configure: error: argument required for --with-template option" 1>&2; exit 1; }
664       ;;
665     *)
666       withval=$with_template
667       
668   case $withval in
669     list)   echo; ls "$srcdir/src/template"; exit;;
670     *)      if test -f "$srcdir/src/template/$with_template" ; then
671               template=$withval
672             else
673               { echo "configure: error: '$withval' is not a valid template name. Use 'list' for a list." 1>&2; exit 1; }
674             fi;;
675   esac
676
677       ;;
678   esac # $with_template
679 else
680   
681   # --with-template not given
682
683 case $host_os in
684      aix*) template=aix ;;
685     beos*) template=beos ;;
686     bsdi*) template=bsdi ;;
687   cygwin*) template=win ;;
688   darwin*) template=darwin ;;
689     dgux*) template=dgux ;;
690  freebsd*) template=freebsd ;;
691     hpux*) template=hpux ;;
692     irix*) template=irix5 ;;
693    linux*) template=linux ;;
694   netbsd*) template=netbsd ;;
695 nextstep*) template=nextstep ;;
696  openbsd*) template=openbsd ;;
697      osf*) template=osf ;;
698      qnx*) template=qnx4 ;;
699      sco*) template=sco ;;
700  solaris*) template=solaris ;;
701    sunos*) template=sunos4 ;;
702  sysv4.2*)
703         case $host_vendor in
704           univel) template=univel ;;
705         esac ;;
706    sysv4*) template=svr4 ;;
707  sysv5uw*) template=unixware ;;
708   ultrix*) template=ultrix4 ;;
709 esac
710
711   if test x"$template" = x"" ; then
712     { echo "configure: error: 
713 *******************************************************************
714 PostgreSQL has apparently not been ported to your platform yet.
715 To try a manual configuration, look into the src/template directory
716 for a similar platform and use the '--with-template=' option.
717
718 Please also contact <pgsql-ports@postgresql.org> to see about
719 rectifying this.  Include the above 'checking host system type...'
720 line.
721 *******************************************************************
722 " 1>&2; exit 1; }
723   fi
724
725
726 fi
727
728 echo "$ac_t""$template" 1>&6
729
730 PORTNAME=$template
731
732
733
734
735
736
737
738 # Pick right test-and-set (TAS) code.  Most platforms have inline
739 # assembler code in src/include/storage/s_lock.h, so we just use
740 # a dummy file here.
741 case $host in
742   *-*-hpux*)        need_tas=yes; tas_file=hpux.s ;;
743   sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
744   i?86-*-solaris)   need_tas=yes; tas_file=solaris_i386.s ;;
745   *)                need_tas=no;  tas_file=dummy.s ;;
746 esac
747
748
749 if test "$need_tas" = yes ; then
750   TAS=tas.o
751 fi
752
753
754
755
756 ##
757 ## Command line options
758 ##
759
760
761 #
762 # Add non-standard directories to the include path
763 #
764 # Check whether --with-includes was given
765 if test x"${with_includes+set}" = xset; then
766   case $with_includes in
767     yes)
768       { echo "configure: error: argument required for --with-includes option" 1>&2; exit 1; }
769       ;;
770     no)
771       { echo "configure: error: argument required for --with-includes option" 1>&2; exit 1; }
772       ;;
773   esac # $with_includes
774 fi
775
776
777 #
778 # Add non-standard directories to the library search path
779 #
780 # Check whether --with-libraries was given
781 if test x"${with_libraries+set}" = xset; then
782   case $with_libraries in
783     yes)
784       { echo "configure: error: argument required for --with-libraries option" 1>&2; exit 1; }
785       ;;
786     no)
787       { echo "configure: error: argument required for --with-libraries option" 1>&2; exit 1; }
788       ;;
789     *)
790       withval=$with_libraries
791       LIBRARY_DIRS=$withval
792       ;;
793   esac # $with_libraries
794 fi
795
796 # Check whether --with-libs was given
797 if test x"${with_libs+set}" = xset; then
798   case $with_libs in
799     yes)
800       { echo "configure: error: argument required for --with-libs option" 1>&2; exit 1; }
801       ;;
802     no)
803       { echo "configure: error: argument required for --with-libs option" 1>&2; exit 1; }
804       ;;
805     *)
806       withval=$with_libs
807       LIBRARY_DIRS=$withval
808       ;;
809   esac # $with_libs
810 fi
811
812
813 #
814 # Locale (--enable-locale)
815 #
816 echo $ac_n "checking whether to build with locale support""... $ac_c" 1>&6
817 echo "configure:818: checking whether to build with locale support" >&5
818 # Check whether --enable-locale was given
819 if test x"${enable_locale+set}" = xset; then
820   case $enable_locale in
821     yes)
822       cat >> confdefs.h <<\EOF
823 #define USE_LOCALE 1
824 EOF
825
826       ;;
827     no)
828       :
829       ;;
830     *)
831       enableval=$enable_locale
832       { echo "configure: error: no argument expected for --enable-locale option" 1>&2; exit 1; }
833       ;;
834   esac # $enable_locale
835 else
836   enable_locale=no
837
838 fi
839 echo "$ac_t""$enable_locale" 1>&6
840
841
842 #
843 # Character set recode (--enable-recode)
844 #
845 echo $ac_n "checking whether to build with recode support""... $ac_c" 1>&6
846 echo "configure:847: checking whether to build with recode support" >&5
847 # Check whether --enable-recode was given
848 if test x"${enable_recode+set}" = xset; then
849   case $enable_recode in
850     yes)
851       cat >> confdefs.h <<\EOF
852 #define CYR_RECODE 1
853 EOF
854
855       ;;
856     no)
857       :
858       ;;
859     *)
860       enableval=$enable_recode
861       { echo "configure: error: no argument expected for --enable-recode option" 1>&2; exit 1; }
862       ;;
863   esac # $enable_recode
864 else
865   enable_recode=no
866
867 fi
868 echo "$ac_t""$enable_recode" 1>&6
869
870
871 #
872 # Multibyte support
873 #
874 MULTIBYTE=
875 echo $ac_n "checking whether to build with multibyte character support""... $ac_c" 1>&6
876 echo "configure:877: checking whether to build with multibyte character support" >&5
877
878 # Check whether --enable-multibyte was given
879 if test x"${enable_multibyte+set}" = xset; then
880   case $enable_multibyte in
881     yes)
882       MULTIBYTE=SQL_ASCII
883       ;;
884     no)
885       :
886       ;;
887     *)
888       enableval=$enable_multibyte
889       enable_multibyte=yes
890
891   case $enableval in
892     SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|KOI8|WIN|ALT)
893       MULTIBYTE=$enableval;;
894     *)
895       { echo "configure: error: argument to --enable-multibyte must be one of:
896   SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW,
897   UNICODE, MULE_INTERNAL,
898   LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
899   KOI8, WIN, ALT
900 Or do not specify an argument to the option to use the default." 1>&2; exit 1; };;
901   esac
902
903       ;;
904   esac # $enable_multibyte
905 else
906   enable_multibyte=no
907 fi
908
909 if test "$enable_multibyte" = yes; then
910   
911   cat >> confdefs.h <<\EOF
912 #define MULTIBYTE 1
913 EOF
914
915   echo "$ac_t""yes, default $MULTIBYTE" 1>&6
916
917 else
918   echo "$ac_t""no" 1>&6
919 fi
920
921
922
923
924 #
925 # Unicode conversion (--enable-unicode-conversion)
926 #
927 echo $ac_n "checking whether to build with Unicode conversion support""... $ac_c" 1>&6
928 echo "configure:929: checking whether to build with Unicode conversion support" >&5
929 # Check whether --enable-unicode-conversion was given
930 if test x"${enable_unicode_conversion+set}" = xset; then
931   case $enable_unicode_conversion in
932     yes)
933       if test -z "$MULTIBYTE"; then
934   { echo "configure: error: --enable-unicode-conversion only works with --enable-multibyte" 1>&2; exit 1; }
935 fi
936 cat >> confdefs.h <<\EOF
937 #define UNICODE_CONVERSION 1
938 EOF
939
940       ;;
941     no)
942       :
943       ;;
944     *)
945       enableval=$enable_unicode_conversion
946       { echo "configure: error: no argument expected for --enable-unicode-conversion option" 1>&2; exit 1; }
947       ;;
948   esac # $enable_unicode_conversion
949 else
950   enable_unicode_conversion=no
951
952 fi
953 echo "$ac_t""$enable_unicode_conversion" 1>&6
954
955 #
956 # Default port number (--with-pgport), default 5432
957 #
958 echo $ac_n "checking for default port number""... $ac_c" 1>&6
959 echo "configure:960: checking for default port number" >&5
960 # Check whether --with-pgport was given
961 if test x"${with_pgport+set}" = xset; then
962   case $with_pgport in
963     yes)
964       { echo "configure: error: argument required for --with-pgport option" 1>&2; exit 1; }
965       ;;
966     no)
967       { echo "configure: error: argument required for --with-pgport option" 1>&2; exit 1; }
968       ;;
969     *)
970       withval=$with_pgport
971       default_port=$withval
972       ;;
973   esac # $with_pgport
974 else
975   default_port=5432
976 fi
977 echo "$ac_t""$default_port" 1>&6
978 # Need both of these because some places want an integer and some a string
979 cat >> confdefs.h <<EOF
980 #define DEF_PGPORT ${default_port}
981 EOF
982
983 cat >> confdefs.h <<EOF
984 #define DEF_PGPORT_STR "${default_port}"
985 EOF
986
987
988
989 #
990 # Maximum number of allowed connections (--with-maxbackends), default 32
991 #
992 echo $ac_n "checking for default soft limit on number of connections""... $ac_c" 1>&6
993 echo "configure:994: checking for default soft limit on number of connections" >&5
994 # Check whether --with-maxbackends was given
995 if test x"${with_maxbackends+set}" = xset; then
996   case $with_maxbackends in
997     yes)
998       { echo "configure: error: argument required for --with-maxbackends option" 1>&2; exit 1; }
999       ;;
1000     no)
1001       { echo "configure: error: argument required for --with-maxbackends option" 1>&2; exit 1; }
1002       ;;
1003   esac # $with_maxbackends
1004 else
1005   with_maxbackends=32
1006 fi
1007 echo "$ac_t""$with_maxbackends" 1>&6
1008 cat >> confdefs.h <<EOF
1009 #define DEF_MAXBACKENDS $with_maxbackends
1010 EOF
1011
1012
1013
1014 #
1015 # Option to disable shared libraries
1016 #
1017 # Check whether --enable-shared was given
1018 if test x"${enable_shared+set}" = xset; then
1019   case $enable_shared in
1020     yes)
1021       :
1022       ;;
1023     no)
1024       :
1025       ;;
1026     *)
1027       enableval=$enable_shared
1028       { echo "configure: error: no argument expected for --enable-shared option" 1>&2; exit 1; }
1029       ;;
1030   esac # $enable_shared
1031 else
1032   enable_shared=yes
1033
1034 fi
1035
1036
1037 #
1038 # '-rpath'-like feature can be disabled
1039 #
1040 # Check whether --enable-rpath was given
1041 if test x"${enable_rpath+set}" = xset; then
1042   case $enable_rpath in
1043     yes)
1044       :
1045       ;;
1046     no)
1047       :
1048       ;;
1049     *)
1050       enableval=$enable_rpath
1051       { echo "configure: error: no argument expected for --enable-rpath option" 1>&2; exit 1; }
1052       ;;
1053   esac # $enable_rpath
1054 else
1055   enable_rpath=yes
1056
1057 fi
1058
1059
1060
1061 #
1062 # --enable-debug adds -g to compiler flags
1063 #
1064 # Check whether --enable-debug was given
1065 if test x"${enable_debug+set}" = xset; then
1066   case $enable_debug in
1067     yes)
1068       :
1069       ;;
1070     no)
1071       :
1072       ;;
1073     *)
1074       enableval=$enable_debug
1075       { echo "configure: error: no argument expected for --enable-debug option" 1>&2; exit 1; }
1076       ;;
1077   esac # $enable_debug
1078 else
1079   enable_debug=no
1080
1081 fi
1082
1083
1084 #
1085 # C compiler
1086 #
1087
1088 # For historical reasons you can also use --with-CC to specify the C compiler
1089 # to use, although the standard way to do this is to set the CC environment
1090 # variable.
1091 # Check whether --with-CC was given
1092 if test x"${with_CC+set}" = xset; then
1093   case $with_CC in
1094     yes)
1095       { echo "configure: error: argument required for --with-CC option" 1>&2; exit 1; }
1096       ;;
1097     no)
1098       { echo "configure: error: argument required for --with-CC option" 1>&2; exit 1; }
1099       ;;
1100     *)
1101       withval=$with_CC
1102       CC=$with_CC
1103       ;;
1104   esac # $with_CC
1105 fi
1106
1107 # On AIX, default compiler to xlc.
1108 if test "$template" = aix && test -z "$CC" ; then CC=xlc; fi
1109
1110 # Save CFLAGS from the environment
1111 has_environ_CFLAGS="${CFLAGS+yes}"
1112 save_CFLAGS=$CFLAGS
1113
1114 # Extract the first word of "gcc", so it can be a program name with args.
1115 set dummy gcc; ac_word=$2
1116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1117 echo "configure:1118: checking for $ac_word" >&5
1118 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1119   echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121   if test -n "$CC"; then
1122   ac_cv_prog_CC="$CC" # Let the user override the test.
1123 else
1124   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1125   ac_dummy="$PATH"
1126   for ac_dir in $ac_dummy; do
1127     test -z "$ac_dir" && ac_dir=.
1128     if test -f $ac_dir/$ac_word; then
1129       ac_cv_prog_CC="gcc"
1130       break
1131     fi
1132   done
1133   IFS="$ac_save_ifs"
1134 fi
1135 fi
1136 CC="$ac_cv_prog_CC"
1137 if test -n "$CC"; then
1138   echo "$ac_t""$CC" 1>&6
1139 else
1140   echo "$ac_t""no" 1>&6
1141 fi
1142
1143 if test -z "$CC"; then
1144   # Extract the first word of "cc", so it can be a program name with args.
1145 set dummy cc; ac_word=$2
1146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1147 echo "configure:1148: checking for $ac_word" >&5
1148 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   if test -n "$CC"; then
1152   ac_cv_prog_CC="$CC" # Let the user override the test.
1153 else
1154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1155   ac_prog_rejected=no
1156   ac_dummy="$PATH"
1157   for ac_dir in $ac_dummy; do
1158     test -z "$ac_dir" && ac_dir=.
1159     if test -f $ac_dir/$ac_word; then
1160       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1161         ac_prog_rejected=yes
1162         continue
1163       fi
1164       ac_cv_prog_CC="cc"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 if test $ac_prog_rejected = yes; then
1170   # We found a bogon in the path, so make sure we never use it.
1171   set dummy $ac_cv_prog_CC
1172   shift
1173   if test $# -gt 0; then
1174     # We chose a different compiler from the bogus one.
1175     # However, it has the same basename, so the bogon will be chosen
1176     # first if we set CC to just the basename; use the full file name.
1177     shift
1178     set dummy "$ac_dir/$ac_word" "$@"
1179     shift
1180     ac_cv_prog_CC="$@"
1181   fi
1182 fi
1183 fi
1184 fi
1185 CC="$ac_cv_prog_CC"
1186 if test -n "$CC"; then
1187   echo "$ac_t""$CC" 1>&6
1188 else
1189   echo "$ac_t""no" 1>&6
1190 fi
1191
1192   if test -z "$CC"; then
1193     case "`uname -s`" in
1194     *win32* | *WIN32*)
1195       # Extract the first word of "cl", so it can be a program name with args.
1196 set dummy cl; ac_word=$2
1197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1198 echo "configure:1199: checking for $ac_word" >&5
1199 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   if test -n "$CC"; then
1203   ac_cv_prog_CC="$CC" # Let the user override the test.
1204 else
1205   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1206   ac_dummy="$PATH"
1207   for ac_dir in $ac_dummy; do
1208     test -z "$ac_dir" && ac_dir=.
1209     if test -f $ac_dir/$ac_word; then
1210       ac_cv_prog_CC="cl"
1211       break
1212     fi
1213   done
1214   IFS="$ac_save_ifs"
1215 fi
1216 fi
1217 CC="$ac_cv_prog_CC"
1218 if test -n "$CC"; then
1219   echo "$ac_t""$CC" 1>&6
1220 else
1221   echo "$ac_t""no" 1>&6
1222 fi
1223  ;;
1224     esac
1225   fi
1226   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1227 fi
1228
1229 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1230 echo "configure:1231: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1231
1232 ac_ext=c
1233 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1234 ac_cpp='$CPP $CPPFLAGS'
1235 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1236 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1237 cross_compiling=$ac_cv_prog_cc_cross
1238
1239 cat > conftest.$ac_ext << EOF
1240
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243
1244 main(){return(0);}
1245 EOF
1246 if { (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1247   ac_cv_prog_cc_works=yes
1248   # If we can't run a trivial program, we are probably using a cross compiler.
1249   if (./conftest; exit) 2>/dev/null; then
1250     ac_cv_prog_cc_cross=no
1251   else
1252     ac_cv_prog_cc_cross=yes
1253   fi
1254 else
1255   echo "configure: failed program was:" >&5
1256   cat conftest.$ac_ext >&5
1257   ac_cv_prog_cc_works=no
1258 fi
1259 rm -fr conftest*
1260 ac_ext=c
1261 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1262 ac_cpp='$CPP $CPPFLAGS'
1263 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1264 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1265 cross_compiling=$ac_cv_prog_cc_cross
1266
1267 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1268 if test $ac_cv_prog_cc_works = no; then
1269   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1270 fi
1271 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1272 echo "configure:1273: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1273 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1274 cross_compiling=$ac_cv_prog_cc_cross
1275
1276 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1277 echo "configure:1278: checking whether we are using GNU C" >&5
1278 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1279   echo $ac_n "(cached) $ac_c" 1>&6
1280 else
1281   cat > conftest.c <<EOF
1282 #ifdef __GNUC__
1283   yes;
1284 #endif
1285 EOF
1286 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1287   ac_cv_prog_gcc=yes
1288 else
1289   ac_cv_prog_gcc=no
1290 fi
1291 fi
1292
1293 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1294
1295 if test $ac_cv_prog_gcc = yes; then
1296   GCC=yes
1297 else
1298   GCC=
1299 fi
1300
1301 ac_test_CFLAGS="${CFLAGS+set}"
1302 ac_save_CFLAGS="$CFLAGS"
1303 CFLAGS=
1304 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether ${CC-cc} accepts -g" >&5
1306 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   echo 'void f(){}' > conftest.c
1310 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1311   ac_cv_prog_cc_g=yes
1312 else
1313   ac_cv_prog_cc_g=no
1314 fi
1315 rm -f conftest*
1316
1317 fi
1318
1319 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1320 if test "$ac_test_CFLAGS" = set; then
1321   CFLAGS="$ac_save_CFLAGS"
1322 elif test $ac_cv_prog_cc_g = yes; then
1323   if test "$GCC" = yes; then
1324     CFLAGS="-g -O2"
1325   else
1326     CFLAGS="-g"
1327   fi
1328 else
1329   if test "$GCC" = yes; then
1330     CFLAGS="-O2"
1331   else
1332     CFLAGS=
1333   fi
1334 fi
1335
1336 # Read the template
1337 . "$srcdir/src/template/$template" || exit
1338
1339 if test "$has_environ_CFLAGS" = yes; then
1340   CFLAGS=$save_CFLAGS
1341 fi
1342 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
1343   CFLAGS="$CFLAGS -g"
1344 fi
1345 echo "using CFLAGS=$CFLAGS"
1346 # Check if the compiler still works with the template settings
1347 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1348 echo "configure:1349: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1349
1350 ac_ext=c
1351 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1352 ac_cpp='$CPP $CPPFLAGS'
1353 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1354 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1355 cross_compiling=$ac_cv_prog_cc_cross
1356
1357 cat > conftest.$ac_ext << EOF
1358
1359 #line 1360 "configure"
1360 #include "confdefs.h"
1361
1362 main(){return(0);}
1363 EOF
1364 if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1365   ac_cv_prog_cc_works=yes
1366   # If we can't run a trivial program, we are probably using a cross compiler.
1367   if (./conftest; exit) 2>/dev/null; then
1368     ac_cv_prog_cc_cross=no
1369   else
1370     ac_cv_prog_cc_cross=yes
1371   fi
1372 else
1373   echo "configure: failed program was:" >&5
1374   cat conftest.$ac_ext >&5
1375   ac_cv_prog_cc_works=no
1376 fi
1377 rm -fr conftest*
1378 ac_ext=c
1379 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1380 ac_cpp='$CPP $CPPFLAGS'
1381 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1382 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1383 cross_compiling=$ac_cv_prog_cc_cross
1384
1385 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1386 if test $ac_cv_prog_cc_works = no; then
1387   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1388 fi
1389 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1390 echo "configure:1391: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1391 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1392 cross_compiling=$ac_cv_prog_cc_cross
1393
1394 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1395 echo "configure:1396: checking for Cygwin environment" >&5
1396 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1397   echo $ac_n "(cached) $ac_c" 1>&6
1398 else
1399   cat > conftest.$ac_ext <<EOF
1400 #line 1401 "configure"
1401 #include "confdefs.h"
1402
1403 int main() {
1404
1405 #ifndef __CYGWIN__
1406 #define __CYGWIN__ __CYGWIN32__
1407 #endif
1408 return __CYGWIN__;
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1412   rm -rf conftest*
1413   ac_cv_cygwin=yes
1414 else
1415   echo "configure: failed program was:" >&5
1416   cat conftest.$ac_ext >&5
1417   rm -rf conftest*
1418   ac_cv_cygwin=no
1419 fi
1420 rm -f conftest*
1421 rm -f conftest*
1422 fi
1423
1424 echo "$ac_t""$ac_cv_cygwin" 1>&6
1425 CYGWIN=
1426 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1427 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1428 echo "configure:1429: checking for mingw32 environment" >&5
1429 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1430   echo $ac_n "(cached) $ac_c" 1>&6
1431 else
1432   cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1435
1436 int main() {
1437 return __MINGW32__;
1438 ; return 0; }
1439 EOF
1440 if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1441   rm -rf conftest*
1442   ac_cv_mingw32=yes
1443 else
1444   echo "configure: failed program was:" >&5
1445   cat conftest.$ac_ext >&5
1446   rm -rf conftest*
1447   ac_cv_mingw32=no
1448 fi
1449 rm -f conftest*
1450 rm -f conftest*
1451 fi
1452
1453 echo "$ac_t""$ac_cv_mingw32" 1>&6
1454 MINGW32=
1455 test "$ac_cv_mingw32" = yes && MINGW32=yes
1456
1457
1458 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1459 echo "configure:1460: checking for executable suffix" >&5
1460 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1464   ac_cv_exeext=.exe
1465 else
1466   rm -f conftest*
1467   echo 'int main () { return 0; }' > conftest.$ac_ext
1468   ac_cv_exeext=
1469   if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1470     for file in conftest.*; do
1471       case $file in
1472       *.c | *.o | *.obj) ;;
1473       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1474       esac
1475     done
1476   else
1477     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1478   fi
1479   rm -f conftest*
1480   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1481 fi
1482 fi
1483
1484 EXEEXT=""
1485 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1486 echo "$ac_t""${ac_cv_exeext}" 1>&6
1487 ac_exeext=$EXEEXT
1488
1489 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1490 echo "configure:1491: checking how to run the C preprocessor" >&5
1491 # On Suns, sometimes $CPP names a directory.
1492 if test -n "$CPP" && test -d "$CPP"; then
1493   CPP=
1494 fi
1495 if test -z "$CPP"; then
1496 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1497   echo $ac_n "(cached) $ac_c" 1>&6
1498 else
1499     # This must be in double quotes, not single quotes, because CPP may get
1500   # substituted into the Makefile and "${CC-cc}" will confuse make.
1501   CPP="${CC-cc} -E"
1502   # On the NeXT, cc -E runs the code through the compiler's parser,
1503   # not just through cpp.
1504   cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507 #include <assert.h>
1508 Syntax Error
1509 EOF
1510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1511 { (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1513 if test -z "$ac_err"; then
1514   :
1515 else
1516   echo "$ac_err" >&5
1517   echo "configure: failed program was:" >&5
1518   cat conftest.$ac_ext >&5
1519   rm -rf conftest*
1520   CPP="${CC-cc} -E -traditional-cpp"
1521   cat > conftest.$ac_ext <<EOF
1522 #line 1523 "configure"
1523 #include "confdefs.h"
1524 #include <assert.h>
1525 Syntax Error
1526 EOF
1527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1528 { (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1530 if test -z "$ac_err"; then
1531   :
1532 else
1533   echo "$ac_err" >&5
1534   echo "configure: failed program was:" >&5
1535   cat conftest.$ac_ext >&5
1536   rm -rf conftest*
1537   CPP="${CC-cc} -nologo -E"
1538   cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1541 #include <assert.h>
1542 Syntax Error
1543 EOF
1544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1545 { (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1547 if test -z "$ac_err"; then
1548   :
1549 else
1550   echo "$ac_err" >&5
1551   echo "configure: failed program was:" >&5
1552   cat conftest.$ac_ext >&5
1553   rm -rf conftest*
1554   CPP=/lib/cpp
1555 fi
1556 rm -f conftest*
1557 fi
1558 rm -f conftest*
1559 fi
1560 rm -f conftest*
1561   ac_cv_prog_CPP="$CPP"
1562 fi
1563   CPP="$ac_cv_prog_CPP"
1564 else
1565   ac_cv_prog_CPP="$CPP"
1566 fi
1567 echo "$ac_t""$CPP" 1>&6
1568
1569 if test $ac_cv_prog_gcc = yes; then
1570     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1571 echo "configure:1572: checking whether ${CC-cc} needs -traditional" >&5
1572 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1573   echo $ac_n "(cached) $ac_c" 1>&6
1574 else
1575     ac_pattern="Autoconf.*'x'"
1576   cat > conftest.$ac_ext <<EOF
1577 #line 1578 "configure"
1578 #include "confdefs.h"
1579 #include <sgtty.h>
1580 Autoconf TIOCGETP
1581 EOF
1582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1583   egrep "$ac_pattern" >/dev/null 2>&1; then
1584   rm -rf conftest*
1585   ac_cv_prog_gcc_traditional=yes
1586 else
1587   rm -rf conftest*
1588   ac_cv_prog_gcc_traditional=no
1589 fi
1590 rm -f conftest*
1591
1592
1593   if test $ac_cv_prog_gcc_traditional = no; then
1594     cat > conftest.$ac_ext <<EOF
1595 #line 1596 "configure"
1596 #include "confdefs.h"
1597 #include <termio.h>
1598 Autoconf TCGETA
1599 EOF
1600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1601   egrep "$ac_pattern" >/dev/null 2>&1; then
1602   rm -rf conftest*
1603   ac_cv_prog_gcc_traditional=yes
1604 fi
1605 rm -f conftest*
1606
1607   fi
1608 fi
1609
1610 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1611   if test $ac_cv_prog_gcc_traditional = yes; then
1612     CC="$CC -traditional"
1613   fi
1614 fi
1615
1616
1617
1618 # Create compiler version string
1619 if test x"$GCC" = x"yes" ; then
1620   cc_string="GCC `${CC} --version`"
1621 else
1622   cc_string=$CC
1623 fi
1624 cat >> confdefs.h <<EOF
1625 #define PG_VERSION_STR "PostgreSQL $VERSION on $host, compiled by $cc_string"
1626 EOF
1627
1628
1629
1630 #
1631 # Automatic dependency tracking
1632 #
1633 # Check whether --enable-depend was given
1634 if test x"${enable_depend+set}" = xset; then
1635   case $enable_depend in
1636     yes)
1637       autodepend=yes
1638       ;;
1639     no)
1640       :
1641       ;;
1642     *)
1643       enableval=$enable_depend
1644       { echo "configure: error: no argument expected for --enable-depend option" 1>&2; exit 1; }
1645       ;;
1646   esac # $enable_depend
1647 else
1648   enable_depend=no
1649
1650 fi
1651
1652
1653
1654 #
1655 # Enable assert checks
1656 #
1657 # Check whether --enable-cassert was given
1658 if test x"${enable_cassert+set}" = xset; then
1659   case $enable_cassert in
1660     yes)
1661       cat >> confdefs.h <<\EOF
1662 #define USE_ASSERT_CHECKING 1
1663 EOF
1664
1665       ;;
1666     no)
1667       :
1668       ;;
1669     *)
1670       enableval=$enable_cassert
1671       { echo "configure: error: no argument expected for --enable-cassert option" 1>&2; exit 1; }
1672       ;;
1673   esac # $enable_cassert
1674 else
1675   enable_cassert=no
1676
1677 fi
1678
1679
1680 #
1681 # Include directories
1682 #
1683 ac_save_IFS=$IFS
1684 IFS="${IFS}:"
1685 # SRCH_INC comes from the template file
1686 for dir in $with_includes $SRCH_INC; do
1687   if test -d "$dir"; then
1688     INCLUDES="$INCLUDES -I$dir"
1689   else
1690     echo "configure: warning: *** Include directory $dir does not exist." 1>&2
1691   fi
1692 done
1693 IFS=$ac_save_IFS
1694
1695
1696
1697 #
1698 # Library directories
1699 #
1700 ac_save_IFS=$IFS
1701 IFS="${IFS}:"
1702 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
1703 for dir in $LIBRARY_DIRS $SRCH_LIB; do
1704   if test -d "$dir"; then
1705     LIBDIRS="$LIBDIRS -L$dir"
1706   else
1707     echo "configure: warning: *** Library directory $dir does not exist." 1>&2
1708   fi
1709 done
1710 IFS=$ac_save_IFS
1711
1712
1713 #
1714 # Tcl/Tk
1715 #
1716 echo $ac_n "checking whether to build with Tcl""... $ac_c" 1>&6
1717 echo "configure:1718: checking whether to build with Tcl" >&5
1718 # Check whether --with-tcl was given
1719 if test x"${with_tcl+set}" = xset; then
1720   case $with_tcl in
1721     yes)
1722       :
1723       ;;
1724     no)
1725       :
1726       ;;
1727     *)
1728       withval=$with_tcl
1729       { echo "configure: error: no argument expected for --with-tcl option" 1>&2; exit 1; }
1730       ;;
1731   esac # $with_tcl
1732 else
1733   with_tcl=no
1734
1735 fi
1736 echo "$ac_t""$with_tcl" 1>&6
1737
1738
1739 # If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
1740 echo $ac_n "checking whether to build with Tk""... $ac_c" 1>&6
1741 echo "configure:1742: checking whether to build with Tk" >&5
1742 if test "$with_tcl" = yes; then
1743   # Check whether --with-tk was given
1744 if test x"${with_tk+set}" = xset; then
1745   case $with_tk in
1746     yes)
1747       :
1748       ;;
1749     no)
1750       :
1751       ;;
1752     *)
1753       withval=$with_tk
1754       { echo "configure: error: no argument expected for --with-tk option" 1>&2; exit 1; }
1755       ;;
1756   esac # $with_tk
1757 else
1758   with_tk=yes
1759
1760 fi
1761 else
1762   with_tk=no
1763 fi
1764 echo "$ac_t""$with_tk" 1>&6
1765
1766
1767
1768 # We see if the path to the TCL/TK configuration scripts is specified.
1769 # This will override the use of tclsh to find the paths to search.
1770
1771 # Check whether --with-tclconfig was given
1772 if test x"${with_tclconfig+set}" = xset; then
1773   case $with_tclconfig in
1774     yes)
1775       { echo "configure: error: argument required for --with-tclconfig option" 1>&2; exit 1; }
1776       ;;
1777     no)
1778       { echo "configure: error: argument required for --with-tclconfig option" 1>&2; exit 1; }
1779       ;;
1780   esac # $with_tclconfig
1781 fi
1782
1783 # We see if the path to the TK configuration scripts is specified.
1784 # This will override the use of tclsh to find the paths to search.
1785
1786 # Check whether --with-tkconfig was given
1787 if test x"${with_tkconfig+set}" = xset; then
1788   case $with_tkconfig in
1789     yes)
1790       { echo "configure: error: argument required for --with-tkconfig option" 1>&2; exit 1; }
1791       ;;
1792     no)
1793       { echo "configure: error: argument required for --with-tkconfig option" 1>&2; exit 1; }
1794       ;;
1795   esac # $with_tkconfig
1796 fi
1797
1798
1799 #
1800 # Optionally build Perl modules (Pg.pm and PL/Perl)
1801 #
1802 echo $ac_n "checking whether to build Perl modules""... $ac_c" 1>&6
1803 echo "configure:1804: checking whether to build Perl modules" >&5
1804 # Check whether --with-perl was given
1805 if test x"${with_perl+set}" = xset; then
1806   case $with_perl in
1807     yes)
1808       :
1809       ;;
1810     no)
1811       :
1812       ;;
1813     *)
1814       withval=$with_perl
1815       { echo "configure: error: no argument expected for --with-perl option" 1>&2; exit 1; }
1816       ;;
1817   esac # $with_perl
1818 else
1819   with_perl=no
1820
1821 fi
1822 echo "$ac_t""$with_perl" 1>&6
1823
1824
1825
1826 #
1827 # Optionally build Python interface module
1828 #
1829 echo $ac_n "checking whether to build Python modules""... $ac_c" 1>&6
1830 echo "configure:1831: checking whether to build Python modules" >&5
1831 # Check whether --with-python was given
1832 if test x"${with_python+set}" = xset; then
1833   case $with_python in
1834     yes)
1835       echo "$ac_t""yes" 1>&6
1836 # Extract the first word of "python", so it can be a program name with args.
1837 set dummy python; ac_word=$2
1838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1839 echo "configure:1840: checking for $ac_word" >&5
1840 if eval "test \"`echo '$''{'ac_cv_prog_PYTHON'+set}'`\" = set"; then
1841   echo $ac_n "(cached) $ac_c" 1>&6
1842 else
1843   if test -n "$PYTHON"; then
1844   ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
1845 else
1846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1847   ac_dummy="$PATH"
1848   for ac_dir in $ac_dummy; do
1849     test -z "$ac_dir" && ac_dir=.
1850     if test -f $ac_dir/$ac_word; then
1851       ac_cv_prog_PYTHON="python"
1852       break
1853     fi
1854   done
1855   IFS="$ac_save_ifs"
1856 fi
1857 fi
1858 PYTHON="$ac_cv_prog_PYTHON"
1859 if test -n "$PYTHON"; then
1860   echo "$ac_t""$PYTHON" 1>&6
1861 else
1862   echo "$ac_t""no" 1>&6
1863 fi
1864
1865
1866 if test "${PYTHON+set}" = set ; then
1867   python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
1868   python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
1869   python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
1870   python_configdir="${python_execprefix}/lib/python${python_version}/config"
1871   python_moduledir="${python_prefix}/lib/python${python_version}"
1872   python_extmakefile="${python_configdir}/Makefile.pre.in"
1873
1874   echo $ac_n "checking for Python extension makefile""... $ac_c" 1>&6
1875 echo "configure:1876: checking for Python extension makefile" >&5
1876   if test -f "${python_extmakefile}" ; then
1877     echo "$ac_t""found" 1>&6
1878   else
1879     echo "$ac_t""no" 1>&6
1880     { echo "configure: error: The Python extension makefile was expected at \`${python_extmakefile}\'
1881 but does not exist. This means the Python module cannot be built automatically." 1>&2; exit 1; }
1882   fi
1883
1884   
1885   
1886   
1887   
1888   
1889   
1890 else
1891   { echo "configure: error: Python not found" 1>&2; exit 1; }
1892 fi
1893       ;;
1894     no)
1895       echo "$ac_t""no" 1>&6
1896       ;;
1897     *)
1898       withval=$with_python
1899       { echo "configure: error: no argument expected for --with-python option" 1>&2; exit 1; }
1900       ;;
1901   esac # $with_python
1902 else
1903   with_python=no
1904 echo "$ac_t""no" 1>&6
1905 fi
1906
1907
1908 #
1909 # Optionally build the Java/JDBC tools
1910 #
1911 echo $ac_n "checking whether to build Java/JDBC tools""... $ac_c" 1>&6
1912 echo "configure:1913: checking whether to build Java/JDBC tools" >&5
1913 # Check whether --with-java was given
1914 if test x"${with_java+set}" = xset; then
1915   case $with_java in
1916     yes)
1917       echo "$ac_t""yes" 1>&6
1918 for ac_prog in ant ant.sh ant.bat
1919 do
1920 # Extract the first word of "$ac_prog", so it can be a program name with args.
1921 set dummy $ac_prog; ac_word=$2
1922 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1923 echo "configure:1924: checking for $ac_word" >&5
1924 if eval "test \"`echo '$''{'ac_cv_path_ANT'+set}'`\" = set"; then
1925   echo $ac_n "(cached) $ac_c" 1>&6
1926 else
1927   case "$ANT" in
1928   /*)
1929   ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
1930   ;;
1931   ?:/*)                  
1932   ac_cv_path_ANT="$ANT" # Let the user override the test with a dos path.
1933   ;;
1934   *)
1935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1936   ac_dummy="$PATH"
1937   for ac_dir in $ac_dummy; do 
1938     test -z "$ac_dir" && ac_dir=.
1939     if test -f $ac_dir/$ac_word; then
1940       ac_cv_path_ANT="$ac_dir/$ac_word"
1941       break
1942     fi
1943   done
1944   IFS="$ac_save_ifs"
1945   ;;
1946 esac
1947 fi
1948 ANT="$ac_cv_path_ANT"
1949 if test -n "$ANT"; then
1950   echo "$ac_t""$ANT" 1>&6
1951 else
1952   echo "$ac_t""no" 1>&6
1953 fi
1954
1955 test -n "$ANT" && break
1956 done
1957
1958 if test -z "$ANT"; then
1959   { echo "configure: error: Ant is required to build Java components" 1>&2; exit 1; }
1960 fi
1961       ;;
1962     no)
1963       echo "$ac_t""no" 1>&6
1964       ;;
1965     *)
1966       withval=$with_java
1967       { echo "configure: error: no argument expected for --with-java option" 1>&2; exit 1; }
1968       ;;
1969   esac # $with_java
1970 else
1971   with_java=no
1972 echo "$ac_t""no" 1>&6
1973 fi
1974
1975
1976
1977 #
1978 # Kerberos 4
1979 #
1980 # Check whether --with-krb4 was given
1981 if test x"${with_krb4+set}" = xset; then
1982   case $with_krb4 in
1983     yes)
1984       krb4_prefix=/usr/athena
1985       ;;
1986     no)
1987       :
1988       ;;
1989     *)
1990       withval=$with_krb4
1991       with_krb4=yes
1992 krb4_prefix=$withval
1993       ;;
1994   esac # $with_krb4
1995 else
1996   with_krb4=no
1997 fi
1998
1999 if test "$with_krb4" = yes; then
2000   
2001   echo "$ac_t""building with Kerberos 4 support" 1>&6
2002   cat >> confdefs.h <<\EOF
2003 #define KRB4 1
2004 EOF
2005
2006
2007   if test -d "$krb4_prefix/include"; then
2008     INCLUDES="$INCLUDES -I$krb4_prefix/include"
2009   fi
2010   if test -d "$krb4_prefix/lib"; then
2011     LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
2012   fi
2013
2014   krb_srvtab="/etc/srvtab"
2015
2016 fi
2017
2018
2019
2020
2021
2022 #
2023 # Kerberos 5
2024 #
2025 # Check whether --with-krb5 was given
2026 if test x"${with_krb5+set}" = xset; then
2027   case $with_krb5 in
2028     yes)
2029       krb5_prefix=/usr/athena
2030       ;;
2031     no)
2032       :
2033       ;;
2034     *)
2035       withval=$with_krb5
2036       with_krb5=yes
2037 krb5_prefix=$withval
2038       ;;
2039   esac # $with_krb5
2040 else
2041   with_krb5=no
2042 fi
2043
2044 if test "$with_krb5" = yes; then
2045   
2046   echo "$ac_t""building with Kerberos 5 support" 1>&6
2047   cat >> confdefs.h <<\EOF
2048 #define KRB5 1
2049 EOF
2050
2051
2052   if test -d "$krb5_prefix/include"; then
2053     INCLUDES="$INCLUDES -I$krb5_prefix/include"
2054   fi
2055   if test -d "$krb5_prefix/lib"; then
2056     LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
2057   fi
2058
2059   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
2060
2061 fi
2062
2063
2064
2065
2066
2067 # Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
2068 if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
2069   { echo "configure: error: Kerberos 4 and Kerberos 5 support cannot be combined" 1>&2; exit 1; }
2070 fi
2071
2072
2073
2074
2075 #
2076 # Kerberos configuration parameters
2077 #
2078 # Check whether --with-krb-srvnam was given
2079 if test x"${with_krb_srvnam+set}" = xset; then
2080   case $with_krb_srvnam in
2081     yes)
2082       { echo "configure: error: argument required for --with-krb-srvnam option" 1>&2; exit 1; }
2083       ;;
2084     no)
2085       { echo "configure: error: argument required for --with-krb-srvnam option" 1>&2; exit 1; }
2086       ;;
2087   esac # $with_krb_srvnam
2088 else
2089   with_krb_srvnam="postgres"
2090 fi
2091 cat >> confdefs.h <<EOF
2092 #define PG_KRB_SRVNAM "$with_krb_srvnam"
2093 EOF
2094
2095
2096
2097
2098 #
2099 # OpenSSL
2100 #
2101 # Check whether --with-openssl was given
2102 if test x"${with_openssl+set}" = xset; then
2103   case $with_openssl in
2104     yes)
2105       openssl_prefix=/usr/local/ssl
2106       ;;
2107     no)
2108       :
2109       ;;
2110     *)
2111       withval=$with_openssl
2112       with_openssl=yes
2113 openssl_prefix=$withval
2114       ;;
2115   esac # $with_openssl
2116 else
2117   with_openssl=no
2118 fi
2119
2120 if test "$with_openssl" = yes; then
2121   
2122   echo "$ac_t""building with OpenSSL support" 1>&6
2123   cat >> confdefs.h <<\EOF
2124 #define USE_SSL 1
2125 EOF
2126
2127
2128   if test -d "${openssl_prefix}/include" ; then
2129     INCLUDES="$INCLUDES -I${openssl_prefix}/include"
2130   fi
2131   if test -d "${openssl_prefix}/lib" ; then
2132     LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
2133   fi
2134
2135 fi
2136
2137
2138
2139
2140
2141
2142 #
2143 # Optionally enable the building of the ODBC driver
2144 #
2145  
2146 # Old option name
2147 if test "${with_odbc+set}" = set && test "${enable_odbc+set}" != set; then
2148   enable_odbc=$with_odbc
2149 fi
2150  
2151 echo $ac_n "checking whether to build the ODBC driver""... $ac_c" 1>&6
2152 echo "configure:2153: checking whether to build the ODBC driver" >&5
2153 # Check whether --enable-odbc was given
2154 if test x"${enable_odbc+set}" = xset; then
2155   case $enable_odbc in
2156     yes)
2157       :
2158       ;;
2159     no)
2160       :
2161       ;;
2162     *)
2163       enableval=$enable_odbc
2164       { echo "configure: error: no argument expected for --enable-odbc option" 1>&2; exit 1; }
2165       ;;
2166   esac # $enable_odbc
2167 else
2168   enable_odbc=no
2169
2170 fi
2171 echo "$ac_t""$enable_odbc" 1>&6
2172
2173
2174
2175 # Allow for overriding the default location of the odbcinst.ini
2176 # file which is normally ${sysconfdir} (i.e., ${prefix}/etc).
2177 # Check whether --with-odbcinst was given
2178 if test x"${with_odbcinst+set}" = xset; then
2179   case $with_odbcinst in
2180     yes)
2181       { echo "configure: error: argument required for --with-odbcinst option" 1>&2; exit 1; }
2182       ;;
2183     no)
2184       { echo "configure: error: argument required for --with-odbcinst option" 1>&2; exit 1; }
2185       ;;
2186     *)
2187       withval=$with_odbcinst
2188       odbcinst_ini_dir=$withval
2189       ;;
2190   esac # $with_odbcinst
2191 else
2192   odbcinst_ini_dir="\${sysconfdir}"
2193 fi
2194
2195
2196
2197
2198 # Assume system is ELF if it predefines __ELF__ as 1,
2199 # otherwise believe host_os based default.
2200 case $host_os in
2201   freebsd1*|freebsd2*) elf=yes;;
2202 esac
2203
2204 cat > conftest.$ac_ext <<EOF
2205 #line 2206 "configure"
2206 #include "confdefs.h"
2207 #if __ELF__
2208   yes
2209 #endif
2210
2211 EOF
2212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2213   egrep "yes" >/dev/null 2>&1; then
2214   rm -rf conftest*
2215   ELF_SYS=true
2216 else
2217   rm -rf conftest*
2218   if test "X$elf" = "Xyes" ; then
2219   ELF_SYS=true
2220 else
2221   ELF_SYS=
2222 fi
2223 fi
2224 rm -f conftest*
2225
2226
2227
2228
2229
2230 #
2231 # Optionally build C++ code (i.e., libpq++)
2232 #
2233 echo $ac_n "checking whether to build C++ modules""... $ac_c" 1>&6
2234 echo "configure:2235: checking whether to build C++ modules" >&5
2235 # Check whether --with-CXX was given
2236 if test x"${with_CXX+set}" = xset; then
2237   case $with_CXX in
2238     yes)
2239       :
2240       ;;
2241     no)
2242       :
2243       ;;
2244     *)
2245       withval=$with_CXX
2246       with_CXX=yes
2247 CXX=$withval
2248       ;;
2249   esac # $with_CXX
2250 else
2251   with_CXX=no
2252 fi
2253
2254 if test "$with_CXX" = yes; then
2255   
2256   echo "$ac_t""yes" 1>&6
2257
2258   # If the user has specified CXXFLAGS in the environment, leave it
2259   # alone, else use a default.
2260
2261   has_environ_CXXFLAGS="${CXXFLAGS+yes}"
2262   for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2263 do
2264 # Extract the first word of "$ac_prog", so it can be a program name with args.
2265 set dummy $ac_prog; ac_word=$2
2266 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2267 echo "configure:2268: checking for $ac_word" >&5
2268 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2269   echo $ac_n "(cached) $ac_c" 1>&6
2270 else
2271   if test -n "$CXX"; then
2272   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2273 else
2274   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2275   ac_dummy="$PATH"
2276   for ac_dir in $ac_dummy; do
2277     test -z "$ac_dir" && ac_dir=.
2278     if test -f $ac_dir/$ac_word; then
2279       ac_cv_prog_CXX="$ac_prog"
2280       break
2281     fi
2282   done
2283   IFS="$ac_save_ifs"
2284 fi
2285 fi
2286 CXX="$ac_cv_prog_CXX"
2287 if test -n "$CXX"; then
2288   echo "$ac_t""$CXX" 1>&6
2289 else
2290   echo "$ac_t""no" 1>&6
2291 fi
2292
2293 test -n "$CXX" && break
2294 done
2295 test -n "$CXX" || CXX="gcc"
2296
2297
2298 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2299 echo "configure:2300: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2300
2301 ac_ext=C
2302 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2303 ac_cpp='$CXXCPP $CPPFLAGS'
2304 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2305 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2306 cross_compiling=$ac_cv_prog_cxx_cross
2307
2308 cat > conftest.$ac_ext << EOF
2309
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312
2313 int main(){return(0);}
2314 EOF
2315 if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2316   ac_cv_prog_cxx_works=yes
2317   # If we can't run a trivial program, we are probably using a cross compiler.
2318   if (./conftest; exit) 2>/dev/null; then
2319     ac_cv_prog_cxx_cross=no
2320   else
2321     ac_cv_prog_cxx_cross=yes
2322   fi
2323 else
2324   echo "configure: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   ac_cv_prog_cxx_works=no
2327 fi
2328 rm -fr conftest*
2329 ac_ext=c
2330 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2331 ac_cpp='$CPP $CPPFLAGS'
2332 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2333 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2334 cross_compiling=$ac_cv_prog_cc_cross
2335
2336 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2337 if test $ac_cv_prog_cxx_works = no; then
2338   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2339 fi
2340 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2341 echo "configure:2342: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2342 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2343 cross_compiling=$ac_cv_prog_cxx_cross
2344
2345 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2346 echo "configure:2347: checking whether we are using GNU C++" >&5
2347 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2348   echo $ac_n "(cached) $ac_c" 1>&6
2349 else
2350   cat > conftest.C <<EOF
2351 #ifdef __GNUC__
2352   yes;
2353 #endif
2354 EOF
2355 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2356   ac_cv_prog_gxx=yes
2357 else
2358   ac_cv_prog_gxx=no
2359 fi
2360 fi
2361
2362 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2363
2364 if test $ac_cv_prog_gxx = yes; then
2365   GXX=yes
2366 else
2367   GXX=
2368 fi
2369
2370 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2371 ac_save_CXXFLAGS="$CXXFLAGS"
2372 CXXFLAGS=
2373 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2374 echo "configure:2375: checking whether ${CXX-g++} accepts -g" >&5
2375 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2376   echo $ac_n "(cached) $ac_c" 1>&6
2377 else
2378   echo 'void f(){}' > conftest.cc
2379 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2380   ac_cv_prog_cxx_g=yes
2381 else
2382   ac_cv_prog_cxx_g=no
2383 fi
2384 rm -f conftest*
2385
2386 fi
2387
2388 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2389 if test "$ac_test_CXXFLAGS" = set; then
2390   CXXFLAGS="$ac_save_CXXFLAGS"
2391 elif test $ac_cv_prog_cxx_g = yes; then
2392   if test "$GXX" = yes; then
2393     CXXFLAGS="-g -O2"
2394   else
2395     CXXFLAGS="-g"
2396   fi
2397 else
2398   if test "$GXX" = yes; then
2399     CXXFLAGS="-O2"
2400   else
2401     CXXFLAGS=
2402   fi
2403 fi
2404
2405   if test "$has_environ_CXXFLAGS" != yes; then
2406     if test "$GXX" = yes; then
2407       CXXFLAGS=-O2
2408     else
2409       case $template in
2410         osf)            CXXFLAGS='-O4 -Olimit 2000' ;;
2411         unixware)       CXXFLAGS='-O' ;;
2412         *)              CXXFLAGS= ;;
2413       esac
2414     fi
2415   fi
2416   if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
2417     CXXFLAGS="$CXXFLAGS -g"
2418   fi
2419   echo "using CXXFLAGS=$CXXFLAGS"
2420
2421   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2422 echo "configure:2423: checking how to run the C++ preprocessor" >&5
2423 if test -z "$CXXCPP"; then
2424 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2425   echo $ac_n "(cached) $ac_c" 1>&6
2426 else
2427   ac_ext=C
2428 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2429 ac_cpp='$CXXCPP $CPPFLAGS'
2430 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2431 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2432 cross_compiling=$ac_cv_prog_cxx_cross
2433   CXXCPP="${CXX-g++} -E"
2434   cat > conftest.$ac_ext <<EOF
2435 #line 2436 "configure"
2436 #include "confdefs.h"
2437 #include <stdlib.h>
2438 EOF
2439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2440 { (eval echo configure:2441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2442 if test -z "$ac_err"; then
2443   :
2444 else
2445   echo "$ac_err" >&5
2446   echo "configure: failed program was:" >&5
2447   cat conftest.$ac_ext >&5
2448   rm -rf conftest*
2449   CXXCPP=/lib/cpp
2450 fi
2451 rm -f conftest*
2452   ac_cv_prog_CXXCPP="$CXXCPP"
2453 ac_ext=c
2454 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2455 ac_cpp='$CPP $CPPFLAGS'
2456 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2457 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2458 cross_compiling=$ac_cv_prog_cc_cross
2459 fi
2460 fi
2461 CXXCPP="$ac_cv_prog_CXXCPP"
2462 echo "$ac_t""$CXXCPP" 1>&6
2463
2464   
2465   
2466 ac_ext=C
2467 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2468 ac_cpp='$CXXCPP $CPPFLAGS'
2469 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2470 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2471 cross_compiling=$ac_cv_prog_cxx_cross
2472
2473 ac_safe=`echo "string" | sed 'y%./+-%__p_%'`
2474 echo $ac_n "checking for string""... $ac_c" 1>&6
2475 echo "configure:2476: checking for string" >&5
2476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2477   echo $ac_n "(cached) $ac_c" 1>&6
2478 else
2479   cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 #include <string>
2483 EOF
2484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2485 { (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2487 if test -z "$ac_err"; then
2488   rm -rf conftest*
2489   eval "ac_cv_header_$ac_safe=yes"
2490 else
2491   echo "$ac_err" >&5
2492   echo "configure: failed program was:" >&5
2493   cat conftest.$ac_ext >&5
2494   rm -rf conftest*
2495   eval "ac_cv_header_$ac_safe=no"
2496 fi
2497 rm -f conftest*
2498 fi
2499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2500   echo "$ac_t""yes" 1>&6
2501   cat >> confdefs.h <<\EOF
2502 #define HAVE_CXX_STRING_HEADER 1
2503 EOF
2504
2505 else
2506   echo "$ac_t""no" 1>&6
2507 fi
2508
2509
2510 if test x"$ac_cv_header_string" != xyes ; then
2511   echo $ac_n "checking for class string in <string.h>""... $ac_c" 1>&6
2512 echo "configure:2513: checking for class string in <string.h>" >&5
2513 if eval "test \"`echo '$''{'pgac_cv_class_string_in_string_h'+set}'`\" = set"; then
2514   echo $ac_n "(cached) $ac_c" 1>&6
2515 else
2516   cat > conftest.$ac_ext <<EOF
2517 #line 2518 "configure"
2518 #include "confdefs.h"
2519 #include <stdio.h>
2520 #include <stdlib.h>
2521 #include <string.h>
2522
2523 int main() {
2524 string foo = "test"
2525 ; return 0; }
2526 EOF
2527 if { (eval echo configure:2528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2528   rm -rf conftest*
2529   pgac_cv_class_string_in_string_h=yes
2530 else
2531   echo "configure: failed program was:" >&5
2532   cat conftest.$ac_ext >&5
2533   rm -rf conftest*
2534   pgac_cv_class_string_in_string_h=no
2535 fi
2536 rm -f conftest*
2537 fi
2538
2539 echo "$ac_t""$pgac_cv_class_string_in_string_h" 1>&6
2540
2541   if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
2542     { echo "configure: error: neither <string> nor <string.h> seem to define the C++ class \`string\'" 1>&2; exit 1; }
2543   fi
2544 fi
2545 ac_ext=c
2546 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2547 ac_cpp='$CPP $CPPFLAGS'
2548 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2549 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2550 cross_compiling=$ac_cv_prog_cc_cross
2551
2552   
2553 echo $ac_n "checking for namespace std in C++""... $ac_c" 1>&6
2554 echo "configure:2555: checking for namespace std in C++" >&5
2555 if eval "test \"`echo '$''{'pgac_cv_cxx_namespace_std'+set}'`\" = set"; then
2556   echo $ac_n "(cached) $ac_c" 1>&6
2557 else
2558   
2559
2560 ac_ext=C
2561 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2562 ac_cpp='$CXXCPP $CPPFLAGS'
2563 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2564 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2565 cross_compiling=$ac_cv_prog_cxx_cross
2566
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2570 #include <stdio.h>
2571 #include <stdlib.h>
2572 #ifdef HAVE_CXX_STRING_HEADER
2573 #include <string>
2574 #endif
2575 using namespace std;
2576
2577 int main() {
2578
2579 ; return 0; }
2580 EOF
2581 if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2582   rm -rf conftest*
2583   pgac_cv_cxx_namespace_std=yes
2584 else
2585   echo "configure: failed program was:" >&5
2586   cat conftest.$ac_ext >&5
2587   rm -rf conftest*
2588   pgac_cv_cxx_namespace_std=no
2589 fi
2590 rm -f conftest*
2591 ac_ext=c
2592 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2593 ac_cpp='$CPP $CPPFLAGS'
2594 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2595 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2596 cross_compiling=$ac_cv_prog_cc_cross
2597
2598 fi
2599
2600 echo "$ac_t""$pgac_cv_cxx_namespace_std" 1>&6
2601
2602 if test $pgac_cv_cxx_namespace_std = yes ; then
2603     cat >> confdefs.h <<\EOF
2604 #define HAVE_NAMESPACE_STD 1
2605 EOF
2606
2607 fi
2608
2609 else
2610   echo "$ac_t""no" 1>&6
2611 fi
2612
2613
2614
2615 CPPFLAGS="$CPPFLAGS $INCLUDES"
2616 LDFLAGS="$LDFLAGS $LIBDIRS"
2617
2618 echo "using CPPFLAGS=$CPPFLAGS"
2619 echo "using LDFLAGS=$LDFLAGS"
2620
2621
2622 for ac_prog in mawk gawk nawk awk
2623 do
2624 # Extract the first word of "$ac_prog", so it can be a program name with args.
2625 set dummy $ac_prog; ac_word=$2
2626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2627 echo "configure:2628: checking for $ac_word" >&5
2628 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2629   echo $ac_n "(cached) $ac_c" 1>&6
2630 else
2631   if test -n "$AWK"; then
2632   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2633 else
2634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2635   ac_dummy="$PATH"
2636   for ac_dir in $ac_dummy; do
2637     test -z "$ac_dir" && ac_dir=.
2638     if test -f $ac_dir/$ac_word; then
2639       ac_cv_prog_AWK="$ac_prog"
2640       break
2641     fi
2642   done
2643   IFS="$ac_save_ifs"
2644 fi
2645 fi
2646 AWK="$ac_cv_prog_AWK"
2647 if test -n "$AWK"; then
2648   echo "$ac_t""$AWK" 1>&6
2649 else
2650   echo "$ac_t""no" 1>&6
2651 fi
2652
2653 test -n "$AWK" && break
2654 done
2655
2656 echo $ac_n "checking for flex""... $ac_c" 1>&6
2657 echo "configure:2658: checking for flex" >&5
2658 if eval "test \"`echo '$''{'pgac_cv_path_flex'+set}'`\" = set"; then
2659   echo $ac_n "(cached) $ac_c" 1>&6
2660 else
2661   # Let the user override the test
2662 if test -n "$FLEX"; then
2663   pgac_cv_path_flex=$FLEX
2664 else
2665   pgac_save_IFS=$IFS
2666   IFS=:
2667   for pgac_dir in $PATH; do
2668     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
2669       pgac_dir=`pwd`
2670     fi
2671     for pgac_prog in flex lex; do
2672       pgac_candidate="$pgac_dir/$pgac_prog"
2673       if test -f "$pgac_candidate" \
2674         && $pgac_candidate --version </dev/null >/dev/null 2>&1
2675       then
2676         echo '%%'  > conftest.l
2677         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
2678           if $pgac_candidate --version | grep '2\.5\.3' >/dev/null 2>&1; then
2679             pgac_broken_flex=$pgac_candidate
2680             continue
2681           fi
2682
2683           pgac_cv_path_flex=$pgac_candidate
2684           break 2
2685         fi
2686       fi
2687     done
2688   done
2689   IFS=$pgac_save_IFS
2690   rm -f conftest.l
2691   : ${pgac_cv_path_flex=no}
2692 fi
2693
2694 fi
2695
2696 echo "$ac_t""$pgac_cv_path_flex" 1>&6
2697 if test x"$pgac_cv_path_flex" = x"no"; then
2698   if test -n "$pgac_broken_flex"; then
2699     echo "configure: warning: 
2700 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
2701 *** should get version 2.5.4 or later." 1>&2
2702   fi
2703
2704   echo "configure: warning: 
2705 *** Without Flex you will not be able to build PostgreSQL from CVS or
2706 *** change any of the scanner definition files.  You can obtain Flex from
2707 *** a GNU mirror site.  (If you are using the official distribution of
2708 *** PostgreSQL then you do not need to worry about this because the Flex
2709 *** output is pre-generated.)" 1>&2
2710 fi
2711
2712 if test x"$pgac_cv_path_flex" = x"no"; then
2713   FLEX=
2714 else
2715   FLEX=$pgac_cv_path_flex
2716 fi
2717
2718
2719
2720
2721 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2722 echo "configure:2723: checking whether ln -s works" >&5
2723 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2724   echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726   rm -f conftestdata
2727 if ln -s X conftestdata 2>/dev/null
2728 then
2729   rm -f conftestdata
2730   ac_cv_prog_LN_S="ln -s"
2731 else
2732   ac_cv_prog_LN_S=ln
2733 fi
2734 fi
2735 LN_S="$ac_cv_prog_LN_S"
2736 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2737   echo "$ac_t""yes" 1>&6
2738 else
2739   echo "$ac_t""no" 1>&6
2740 fi
2741
2742 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2743 if test "${with_gnu_ld+set}" = set; then
2744   withval="$with_gnu_ld"
2745   test "$withval" = no || with_gnu_ld=yes
2746 else
2747   with_gnu_ld=no
2748 fi
2749
2750 ac_prog=ld
2751 if test "$ac_cv_prog_gcc" = yes; then
2752   # Check if gcc -print-prog-name=ld gives a path.
2753   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2754 echo "configure:2755: checking for ld used by GCC" >&5
2755   case $host in
2756   *-*-mingw*)
2757     # gcc leaves a trailing carriage return which upsets mingw
2758     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2759   *)
2760     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2761   esac
2762   case "$ac_prog" in
2763     # Accept absolute paths.
2764     [\\/]* | [A-Za-z]:[\\/]*)
2765       re_direlt='/[^/][^/]*/\.\./'
2766       # Canonicalize the path of ld
2767       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2768       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2769         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2770       done
2771       test -z "$LD" && LD="$ac_prog"
2772       ;;
2773   "")
2774     # If it fails, then pretend we aren't using GCC.
2775     ac_prog=ld
2776     ;;
2777   *)
2778     # If it is relative, then search for the first ld in PATH.
2779     with_gnu_ld=unknown
2780     ;;
2781   esac
2782 elif test "$with_gnu_ld" = yes; then
2783   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2784 echo "configure:2785: checking for GNU ld" >&5
2785 else
2786   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2787 echo "configure:2788: checking for non-GNU ld" >&5
2788 fi
2789 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2790   echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792   if test -z "$LD"; then
2793   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2794   for ac_dir in $PATH; do
2795     test -z "$ac_dir" && ac_dir=.
2796     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2797       ac_cv_path_LD="$ac_dir/$ac_prog"
2798       # Check to see if the program is GNU ld.  I'd rather use --version,
2799       # but apparently some GNU ld's only accept -v.
2800       # Break only if it was the GNU/non-GNU ld that we prefer.
2801       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2802         test "$with_gnu_ld" != no && break
2803       else
2804         test "$with_gnu_ld" != yes && break
2805       fi
2806     fi
2807   done
2808   IFS="$ac_save_ifs"
2809 else
2810   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2811 fi
2812 fi
2813
2814 LD="$ac_cv_path_LD"
2815 if test -n "$LD"; then
2816   echo "$ac_t""$LD" 1>&6
2817 else
2818   echo "$ac_t""no" 1>&6
2819 fi
2820 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2821 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2822 echo "configure:2823: checking if the linker ($LD) is GNU ld" >&5
2823 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2824   echo $ac_n "(cached) $ac_c" 1>&6
2825 else
2826   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2827 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2828   ac_cv_prog_gnu_ld=yes
2829 else
2830   ac_cv_prog_gnu_ld=no
2831 fi
2832 fi
2833
2834 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2835 with_gnu_ld=$ac_cv_prog_gnu_ld
2836
2837
2838
2839
2840 case $host_os in sysv5uw*)
2841   echo $ac_n "checking whether ld -R works""... $ac_c" 1>&6
2842 echo "configure:2843: checking whether ld -R works" >&5
2843 if eval "test \"`echo '$''{'pgac_cv_prog_ld_R'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   
2847     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
2848     cat > conftest.$ac_ext <<EOF
2849 #line 2850 "configure"
2850 #include "confdefs.h"
2851
2852 int main() {
2853
2854 ; return 0; }
2855 EOF
2856 if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2857   rm -rf conftest*
2858   pgac_cv_prog_ld_R=yes
2859 else
2860   echo "configure: failed program was:" >&5
2861   cat conftest.$ac_ext >&5
2862   rm -rf conftest*
2863   pgac_cv_prog_ld_R=no
2864 fi
2865 rm -f conftest*
2866     LDFLAGS=$pgac_save_LDFLAGS
2867   
2868 fi
2869
2870 echo "$ac_t""$pgac_cv_prog_ld_R" 1>&6
2871   ld_R_works=$pgac_cv_prog_ld_R
2872   
2873 esac
2874 # Extract the first word of "ranlib", so it can be a program name with args.
2875 set dummy ranlib; ac_word=$2
2876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2877 echo "configure:2878: checking for $ac_word" >&5
2878 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2879   echo $ac_n "(cached) $ac_c" 1>&6
2880 else
2881   if test -n "$RANLIB"; then
2882   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2883 else
2884   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2885   ac_dummy="$PATH"
2886   for ac_dir in $ac_dummy; do
2887     test -z "$ac_dir" && ac_dir=.
2888     if test -f $ac_dir/$ac_word; then
2889       ac_cv_prog_RANLIB="ranlib"
2890       break
2891     fi
2892   done
2893   IFS="$ac_save_ifs"
2894   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2895 fi
2896 fi
2897 RANLIB="$ac_cv_prog_RANLIB"
2898 if test -n "$RANLIB"; then
2899   echo "$ac_t""$RANLIB" 1>&6
2900 else
2901   echo "$ac_t""no" 1>&6
2902 fi
2903
2904 for ac_prog in lorder
2905 do
2906 # Extract the first word of "$ac_prog", so it can be a program name with args.
2907 set dummy $ac_prog; ac_word=$2
2908 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2909 echo "configure:2910: checking for $ac_word" >&5
2910 if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then
2911   echo $ac_n "(cached) $ac_c" 1>&6
2912 else
2913   if test -n "$LORDER"; then
2914   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
2915 else
2916   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2917   ac_dummy="$PATH"
2918   for ac_dir in $ac_dummy; do
2919     test -z "$ac_dir" && ac_dir=.
2920     if test -f $ac_dir/$ac_word; then
2921       ac_cv_prog_LORDER="$ac_prog"
2922       break
2923     fi
2924   done
2925   IFS="$ac_save_ifs"
2926 fi
2927 fi
2928 LORDER="$ac_cv_prog_LORDER"
2929 if test -n "$LORDER"; then
2930   echo "$ac_t""$LORDER" 1>&6
2931 else
2932   echo "$ac_t""no" 1>&6
2933 fi
2934
2935 test -n "$LORDER" && break
2936 done
2937
2938 # Extract the first word of "tar", so it can be a program name with args.
2939 set dummy tar; ac_word=$2
2940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2941 echo "configure:2942: checking for $ac_word" >&5
2942 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
2943   echo $ac_n "(cached) $ac_c" 1>&6
2944 else
2945   case "$TAR" in
2946   /*)
2947   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
2948   ;;
2949   ?:/*)                  
2950   ac_cv_path_TAR="$TAR" # Let the user override the test with a dos path.
2951   ;;
2952   *)
2953   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2954   ac_dummy="$PATH"
2955   for ac_dir in $ac_dummy; do 
2956     test -z "$ac_dir" && ac_dir=.
2957     if test -f $ac_dir/$ac_word; then
2958       ac_cv_path_TAR="$ac_dir/$ac_word"
2959       break
2960     fi
2961   done
2962   IFS="$ac_save_ifs"
2963   ;;
2964 esac
2965 fi
2966 TAR="$ac_cv_path_TAR"
2967 if test -n "$TAR"; then
2968   echo "$ac_t""$TAR" 1>&6
2969 else
2970   echo "$ac_t""no" 1>&6
2971 fi
2972
2973 for ac_prog in perl
2974 do
2975 # Extract the first word of "$ac_prog", so it can be a program name with args.
2976 set dummy $ac_prog; ac_word=$2
2977 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2978 echo "configure:2979: checking for $ac_word" >&5
2979 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
2980   echo $ac_n "(cached) $ac_c" 1>&6
2981 else
2982   if test -n "$PERL"; then
2983   ac_cv_prog_PERL="$PERL" # Let the user override the test.
2984 else
2985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2986   ac_dummy="$PATH"
2987   for ac_dir in $ac_dummy; do
2988     test -z "$ac_dir" && ac_dir=.
2989     if test -f $ac_dir/$ac_word; then
2990       ac_cv_prog_PERL="$ac_prog"
2991       break
2992     fi
2993   done
2994   IFS="$ac_save_ifs"
2995 fi
2996 fi
2997 PERL="$ac_cv_prog_PERL"
2998 if test -n "$PERL"; then
2999   echo "$ac_t""$PERL" 1>&6
3000 else
3001   echo "$ac_t""no" 1>&6
3002 fi
3003
3004 test -n "$PERL" && break
3005 done
3006
3007
3008 for ac_prog in 'bison -y'
3009 do
3010 # Extract the first word of "$ac_prog", so it can be a program name with args.
3011 set dummy $ac_prog; ac_word=$2
3012 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3013 echo "configure:3014: checking for $ac_word" >&5
3014 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3015   echo $ac_n "(cached) $ac_c" 1>&6
3016 else
3017   if test -n "$YACC"; then
3018   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3019 else
3020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3021   ac_dummy="$PATH"
3022   for ac_dir in $ac_dummy; do
3023     test -z "$ac_dir" && ac_dir=.
3024     if test -f $ac_dir/$ac_word; then
3025       ac_cv_prog_YACC="$ac_prog"
3026       break
3027     fi
3028   done
3029   IFS="$ac_save_ifs"
3030 fi
3031 fi
3032 YACC="$ac_cv_prog_YACC"
3033 if test -n "$YACC"; then
3034   echo "$ac_t""$YACC" 1>&6
3035 else
3036   echo "$ac_t""no" 1>&6
3037 fi
3038
3039 test -n "$YACC" && break
3040 done
3041
3042 if test -z "$YACC"; then
3043   echo "configure: warning: 
3044 *** Without Bison you will not be able to build PostgreSQL from CVS or
3045 *** change any of the parser definition files.  You can obtain Bison from
3046 *** a GNU mirror site.  (If you are using the official distribution of
3047 *** PostgreSQL then you do not need to worry about this because the Bison
3048 *** output is pre-generated.)  To use a different yacc program (possible,
3049 *** but not recommended), set the environment variable YACC before running
3050 *** 'configure'." 1>&2
3051 fi
3052
3053
3054 if test "$with_tk" = yes; then
3055     # Extract the first word of "wish", so it can be a program name with args.
3056 set dummy wish; ac_word=$2
3057 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058 echo "configure:3059: checking for $ac_word" >&5
3059 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   case "$WISH" in
3063   /*)
3064   ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
3065   ;;
3066   ?:/*)                  
3067   ac_cv_path_WISH="$WISH" # Let the user override the test with a dos path.
3068   ;;
3069   *)
3070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3071   ac_dummy="$PATH"
3072   for ac_dir in $ac_dummy; do 
3073     test -z "$ac_dir" && ac_dir=.
3074     if test -f $ac_dir/$ac_word; then
3075       ac_cv_path_WISH="$ac_dir/$ac_word"
3076       break
3077     fi
3078   done
3079   IFS="$ac_save_ifs"
3080   ;;
3081 esac
3082 fi
3083 WISH="$ac_cv_path_WISH"
3084 if test -n "$WISH"; then
3085   echo "$ac_t""$WISH" 1>&6
3086 else
3087   echo "$ac_t""no" 1>&6
3088 fi
3089
3090     test -z "$WISH" && { echo "configure: error: 'wish' is required for Tk support" 1>&2; exit 1; }
3091 fi
3092
3093
3094 ##
3095 ## Libraries
3096 ##
3097
3098 echo $ac_n "checking for main in -lsfio""... $ac_c" 1>&6
3099 echo "configure:3100: checking for main in -lsfio" >&5
3100 ac_lib_var=`echo sfio'_'main | sed 'y%./+-%__p_%'`
3101 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   ac_save_LIBS="$LIBS"
3105 LIBS="-lsfio  $LIBS"
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3108 "configure"
3108 #include "confdefs.h"
3109
3110 int main() {
3111 main()
3112 ; return 0; }
3113 EOF
3114 if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3115   rm -rf conftest*
3116   eval "ac_cv_lib_$ac_lib_var=yes"
3117 else
3118   echo "configure: failed program was:" >&5
3119   cat conftest.$ac_ext >&5
3120   rm -rf conftest*
3121   eval "ac_cv_lib_$ac_lib_var=no"
3122 fi
3123 rm -f conftest*
3124 LIBS="$ac_save_LIBS"
3125
3126 fi
3127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3128   echo "$ac_t""yes" 1>&6
3129     ac_tr_lib=HAVE_LIB`echo sfio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3131   cat >> confdefs.h <<EOF
3132 #define $ac_tr_lib 1
3133 EOF
3134
3135   LIBS="-lsfio $LIBS"
3136
3137 else
3138   echo "$ac_t""no" 1>&6
3139 fi
3140
3141 echo $ac_n "checking for readline""... $ac_c" 1>&6
3142 echo "configure:3143: checking for readline" >&5
3143
3144 if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   pgac_cv_check_readline=no
3148 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
3149   for pgac_rllib in -lreadline -ledit ; do
3150     pgac_save_LIBS=$LIBS
3151     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
3152     cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 /* Override any gcc2 internal prototype to avoid an error.  */
3156 /* We use char because int might match the return type of a gcc2
3157     builtin and then its argument prototype would still apply.  */
3158 char readline();
3159
3160 int main() {
3161 readline()
3162 ; return 0; }
3163 EOF
3164 if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3165   rm -rf conftest*
3166   pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2
3167 else
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170 fi
3171 rm -f conftest*
3172     LIBS=$pgac_save_LIBS
3173   done
3174 done
3175 LIBS=$pgac_save_LIBS
3176
3177 fi
3178
3179 if test "$pgac_cv_check_readline" != no ; then
3180   cat >> confdefs.h <<\EOF
3181 #define HAVE_LIBREADLINE 1
3182 EOF
3183
3184   LIBS="$pgac_cv_check_readline $LIBS"
3185   echo "$ac_t""yes ($pgac_cv_check_readline)" 1>&6
3186 else
3187   echo "$ac_t""no" 1>&6
3188 fi
3189
3190 echo $ac_n "checking for library containing using_history""... $ac_c" 1>&6
3191 echo "configure:3192: checking for library containing using_history" >&5
3192 if eval "test \"`echo '$''{'ac_cv_search_using_history'+set}'`\" = set"; then
3193   echo $ac_n "(cached) $ac_c" 1>&6
3194 else
3195   ac_func_search_save_LIBS="$LIBS"
3196 ac_cv_search_using_history="no"
3197 cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 /* Override any gcc2 internal prototype to avoid an error.  */
3201 /* We use char because int might match the return type of a gcc2
3202     builtin and then its argument prototype would still apply.  */
3203 char using_history();
3204
3205 int main() {
3206 using_history()
3207 ; return 0; }
3208 EOF
3209 if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3210   rm -rf conftest*
3211   ac_cv_search_using_history="none required"
3212 else
3213   echo "configure: failed program was:" >&5
3214   cat conftest.$ac_ext >&5
3215 fi
3216 rm -f conftest*
3217 test "$ac_cv_search_using_history" = "no" && for i in history; do
3218 LIBS="-l$i  $ac_func_search_save_LIBS"
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222 /* Override any gcc2 internal prototype to avoid an error.  */
3223 /* We use char because int might match the return type of a gcc2
3224     builtin and then its argument prototype would still apply.  */
3225 char using_history();
3226
3227 int main() {
3228 using_history()
3229 ; return 0; }
3230 EOF
3231 if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3232   rm -rf conftest*
3233   ac_cv_search_using_history="-l$i"
3234 break
3235 else
3236   echo "configure: failed program was:" >&5
3237   cat conftest.$ac_ext >&5
3238 fi
3239 rm -f conftest*
3240 done
3241 LIBS="$ac_func_search_save_LIBS"
3242 fi
3243
3244 echo "$ac_t""$ac_cv_search_using_history" 1>&6
3245 if test "$ac_cv_search_using_history" != "no"; then
3246   test "$ac_cv_search_using_history" = "none required" || LIBS="$ac_cv_search_using_history $LIBS"
3247   cat >> confdefs.h <<\EOF
3248 #define HAVE_HISTORY_FUNCTIONS 1
3249 EOF
3250
3251 else :
3252   
3253 fi
3254
3255 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
3256 then
3257         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
3258 echo "configure:3259: checking for main in -lbsd" >&5
3259 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
3260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   ac_save_LIBS="$LIBS"
3264 LIBS="-lbsd  $LIBS"
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268
3269 int main() {
3270 main()
3271 ; return 0; }
3272 EOF
3273 if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3274   rm -rf conftest*
3275   eval "ac_cv_lib_$ac_lib_var=yes"
3276 else
3277   echo "configure: failed program was:" >&5
3278   cat conftest.$ac_ext >&5
3279   rm -rf conftest*
3280   eval "ac_cv_lib_$ac_lib_var=no"
3281 fi
3282 rm -f conftest*
3283 LIBS="$ac_save_LIBS"
3284
3285 fi
3286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3287   echo "$ac_t""yes" 1>&6
3288     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3289     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3290   cat >> confdefs.h <<EOF
3291 #define $ac_tr_lib 1
3292 EOF
3293
3294   LIBS="-lbsd $LIBS"
3295
3296 else
3297   echo "$ac_t""no" 1>&6
3298 fi
3299
3300 fi
3301 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
3302 echo "configure:3303: checking for setproctitle in -lutil" >&5
3303 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
3304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3305   echo $ac_n "(cached) $ac_c" 1>&6
3306 else
3307   ac_save_LIBS="$LIBS"
3308 LIBS="-lutil  $LIBS"
3309 cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 /* Override any gcc2 internal prototype to avoid an error.  */
3313 /* We use char because int might match the return type of a gcc2
3314     builtin and then its argument prototype would still apply.  */
3315 char setproctitle();
3316
3317 int main() {
3318 setproctitle()
3319 ; return 0; }
3320 EOF
3321 if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3322   rm -rf conftest*
3323   eval "ac_cv_lib_$ac_lib_var=yes"
3324 else
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   eval "ac_cv_lib_$ac_lib_var=no"
3329 fi
3330 rm -f conftest*
3331 LIBS="$ac_save_LIBS"
3332
3333 fi
3334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3335   echo "$ac_t""yes" 1>&6
3336     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3337     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3338   cat >> confdefs.h <<EOF
3339 #define $ac_tr_lib 1
3340 EOF
3341
3342   LIBS="-lutil $LIBS"
3343
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3349 echo "configure:3350: checking for main in -lm" >&5
3350 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3351 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   ac_save_LIBS="$LIBS"
3355 LIBS="-lm  $LIBS"
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359
3360 int main() {
3361 main()
3362 ; return 0; }
3363 EOF
3364 if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3365   rm -rf conftest*
3366   eval "ac_cv_lib_$ac_lib_var=yes"
3367 else
3368   echo "configure: failed program was:" >&5
3369   cat conftest.$ac_ext >&5
3370   rm -rf conftest*
3371   eval "ac_cv_lib_$ac_lib_var=no"
3372 fi
3373 rm -f conftest*
3374 LIBS="$ac_save_LIBS"
3375
3376 fi
3377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3378   echo "$ac_t""yes" 1>&6
3379     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3380     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3381   cat >> confdefs.h <<EOF
3382 #define $ac_tr_lib 1
3383 EOF
3384
3385   LIBS="-lm $LIBS"
3386
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3392 echo "configure:3393: checking for main in -ldl" >&5
3393 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3395   echo $ac_n "(cached) $ac_c" 1>&6
3396 else
3397   ac_save_LIBS="$LIBS"
3398 LIBS="-ldl  $LIBS"
3399 cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402
3403 int main() {
3404 main()
3405 ; return 0; }
3406 EOF
3407 if { (eval echo configure:3408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3408   rm -rf conftest*
3409   eval "ac_cv_lib_$ac_lib_var=yes"
3410 else
3411   echo "configure: failed program was:" >&5
3412   cat conftest.$ac_ext >&5
3413   rm -rf conftest*
3414   eval "ac_cv_lib_$ac_lib_var=no"
3415 fi
3416 rm -f conftest*
3417 LIBS="$ac_save_LIBS"
3418
3419 fi
3420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3421   echo "$ac_t""yes" 1>&6
3422     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3423     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3424   cat >> confdefs.h <<EOF
3425 #define $ac_tr_lib 1
3426 EOF
3427
3428   LIBS="-ldl $LIBS"
3429
3430 else
3431   echo "$ac_t""no" 1>&6
3432 fi
3433
3434 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3435 echo "configure:3436: checking for main in -lsocket" >&5
3436 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3437 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3438   echo $ac_n "(cached) $ac_c" 1>&6
3439 else
3440   ac_save_LIBS="$LIBS"
3441 LIBS="-lsocket  $LIBS"
3442 cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445
3446 int main() {
3447 main()
3448 ; return 0; }
3449 EOF
3450 if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3451   rm -rf conftest*
3452   eval "ac_cv_lib_$ac_lib_var=yes"
3453 else
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   eval "ac_cv_lib_$ac_lib_var=no"
3458 fi
3459 rm -f conftest*
3460 LIBS="$ac_save_LIBS"
3461
3462 fi
3463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3464   echo "$ac_t""yes" 1>&6
3465     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3466     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3467   cat >> confdefs.h <<EOF
3468 #define $ac_tr_lib 1
3469 EOF
3470
3471   LIBS="-lsocket $LIBS"
3472
3473 else
3474   echo "$ac_t""no" 1>&6
3475 fi
3476
3477 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3478 echo "configure:3479: checking for main in -lnsl" >&5
3479 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3480 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3481   echo $ac_n "(cached) $ac_c" 1>&6
3482 else
3483   ac_save_LIBS="$LIBS"
3484 LIBS="-lnsl  $LIBS"
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488
3489 int main() {
3490 main()
3491 ; return 0; }
3492 EOF
3493 if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3494   rm -rf conftest*
3495   eval "ac_cv_lib_$ac_lib_var=yes"
3496 else
3497   echo "configure: failed program was:" >&5
3498   cat conftest.$ac_ext >&5
3499   rm -rf conftest*
3500   eval "ac_cv_lib_$ac_lib_var=no"
3501 fi
3502 rm -f conftest*
3503 LIBS="$ac_save_LIBS"
3504
3505 fi
3506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3507   echo "$ac_t""yes" 1>&6
3508     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3509     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3510   cat >> confdefs.h <<EOF
3511 #define $ac_tr_lib 1
3512 EOF
3513
3514   LIBS="-lnsl $LIBS"
3515
3516 else
3517   echo "$ac_t""no" 1>&6
3518 fi
3519
3520 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
3521 echo "configure:3522: checking for main in -lipc" >&5
3522 ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
3523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3524   echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526   ac_save_LIBS="$LIBS"
3527 LIBS="-lipc  $LIBS"
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531
3532 int main() {
3533 main()
3534 ; return 0; }
3535 EOF
3536 if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3537   rm -rf conftest*
3538   eval "ac_cv_lib_$ac_lib_var=yes"
3539 else
3540   echo "configure: failed program was:" >&5
3541   cat conftest.$ac_ext >&5
3542   rm -rf conftest*
3543   eval "ac_cv_lib_$ac_lib_var=no"
3544 fi
3545 rm -f conftest*
3546 LIBS="$ac_save_LIBS"
3547
3548 fi
3549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3550   echo "$ac_t""yes" 1>&6
3551     ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3552     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3553   cat >> confdefs.h <<EOF
3554 #define $ac_tr_lib 1
3555 EOF
3556
3557   LIBS="-lipc $LIBS"
3558
3559 else
3560   echo "$ac_t""no" 1>&6
3561 fi
3562
3563 echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
3564 echo "configure:3565: checking for main in -lIPC" >&5
3565 ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
3566 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3567   echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569   ac_save_LIBS="$LIBS"
3570 LIBS="-lIPC  $LIBS"
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574
3575 int main() {
3576 main()
3577 ; return 0; }
3578 EOF
3579 if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3580   rm -rf conftest*
3581   eval "ac_cv_lib_$ac_lib_var=yes"
3582 else
3583   echo "configure: failed program was:" >&5
3584   cat conftest.$ac_ext >&5
3585   rm -rf conftest*
3586   eval "ac_cv_lib_$ac_lib_var=no"
3587 fi
3588 rm -f conftest*
3589 LIBS="$ac_save_LIBS"
3590
3591 fi
3592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3593   echo "$ac_t""yes" 1>&6
3594     ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3595     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3596   cat >> confdefs.h <<EOF
3597 #define $ac_tr_lib 1
3598 EOF
3599
3600   LIBS="-lIPC $LIBS"
3601
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605
3606 echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
3607 echo "configure:3608: checking for main in -llc" >&5
3608 ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
3609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   ac_save_LIBS="$LIBS"
3613 LIBS="-llc  $LIBS"
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617
3618 int main() {
3619 main()
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623   rm -rf conftest*
3624   eval "ac_cv_lib_$ac_lib_var=yes"
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   rm -rf conftest*
3629   eval "ac_cv_lib_$ac_lib_var=no"
3630 fi
3631 rm -f conftest*
3632 LIBS="$ac_save_LIBS"
3633
3634 fi
3635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3636   echo "$ac_t""yes" 1>&6
3637     ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3638     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3639   cat >> confdefs.h <<EOF
3640 #define $ac_tr_lib 1
3641 EOF
3642
3643   LIBS="-llc $LIBS"
3644
3645 else
3646   echo "$ac_t""no" 1>&6
3647 fi
3648
3649 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
3650 echo "configure:3651: checking for main in -ldld" >&5
3651 ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
3652 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   ac_save_LIBS="$LIBS"
3656 LIBS="-ldld  $LIBS"
3657 cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660
3661 int main() {
3662 main()
3663 ; return 0; }
3664 EOF
3665 if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3666   rm -rf conftest*
3667   eval "ac_cv_lib_$ac_lib_var=yes"
3668 else
3669   echo "configure: failed program was:" >&5
3670   cat conftest.$ac_ext >&5
3671   rm -rf conftest*
3672   eval "ac_cv_lib_$ac_lib_var=no"
3673 fi
3674 rm -f conftest*
3675 LIBS="$ac_save_LIBS"
3676
3677 fi
3678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3679   echo "$ac_t""yes" 1>&6
3680     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3681     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3682   cat >> confdefs.h <<EOF
3683 #define $ac_tr_lib 1
3684 EOF
3685
3686   LIBS="-ldld $LIBS"
3687
3688 else
3689   echo "$ac_t""no" 1>&6
3690 fi
3691
3692 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
3693 echo "configure:3694: checking for main in -lld" >&5
3694 ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
3695 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   ac_save_LIBS="$LIBS"
3699 LIBS="-lld  $LIBS"
3700 cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703
3704 int main() {
3705 main()
3706 ; return 0; }
3707 EOF
3708 if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3709   rm -rf conftest*
3710   eval "ac_cv_lib_$ac_lib_var=yes"
3711 else
3712   echo "configure: failed program was:" >&5
3713   cat conftest.$ac_ext >&5
3714   rm -rf conftest*
3715   eval "ac_cv_lib_$ac_lib_var=no"
3716 fi
3717 rm -f conftest*
3718 LIBS="$ac_save_LIBS"
3719
3720 fi
3721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3722   echo "$ac_t""yes" 1>&6
3723     ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3724     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3725   cat >> confdefs.h <<EOF
3726 #define $ac_tr_lib 1
3727 EOF
3728
3729   LIBS="-lld $LIBS"
3730
3731 else
3732   echo "$ac_t""no" 1>&6
3733 fi
3734
3735 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
3736 echo "configure:3737: checking for main in -lcompat" >&5
3737 ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
3738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   ac_save_LIBS="$LIBS"
3742 LIBS="-lcompat  $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746
3747 int main() {
3748 main()
3749 ; return 0; }
3750 EOF
3751 if { (eval echo configure:3752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3752   rm -rf conftest*
3753   eval "ac_cv_lib_$ac_lib_var=yes"
3754 else
3755   echo "configure: failed program was:" >&5
3756   cat conftest.$ac_ext >&5
3757   rm -rf conftest*
3758   eval "ac_cv_lib_$ac_lib_var=no"
3759 fi
3760 rm -f conftest*
3761 LIBS="$ac_save_LIBS"
3762
3763 fi
3764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3765   echo "$ac_t""yes" 1>&6
3766     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3767     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3768   cat >> confdefs.h <<EOF
3769 #define $ac_tr_lib 1
3770 EOF
3771
3772   LIBS="-lcompat $LIBS"
3773
3774 else
3775   echo "$ac_t""no" 1>&6
3776 fi
3777
3778 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
3779 echo "configure:3780: checking for main in -lBSD" >&5
3780 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
3781 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3782   echo $ac_n "(cached) $ac_c" 1>&6
3783 else
3784   ac_save_LIBS="$LIBS"
3785 LIBS="-lBSD  $LIBS"
3786 cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789
3790 int main() {
3791 main()
3792 ; return 0; }
3793 EOF
3794 if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3795   rm -rf conftest*
3796   eval "ac_cv_lib_$ac_lib_var=yes"
3797 else
3798   echo "configure: failed program was:" >&5
3799   cat conftest.$ac_ext >&5
3800   rm -rf conftest*
3801   eval "ac_cv_lib_$ac_lib_var=no"
3802 fi
3803 rm -f conftest*
3804 LIBS="$ac_save_LIBS"
3805
3806 fi
3807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3808   echo "$ac_t""yes" 1>&6
3809     ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3810     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3811   cat >> confdefs.h <<EOF
3812 #define $ac_tr_lib 1
3813 EOF
3814
3815   LIBS="-lBSD $LIBS"
3816
3817 else
3818   echo "$ac_t""no" 1>&6
3819 fi
3820
3821 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3822 echo "configure:3823: checking for main in -lgen" >&5
3823 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3825   echo $ac_n "(cached) $ac_c" 1>&6
3826 else
3827   ac_save_LIBS="$LIBS"
3828 LIBS="-lgen  $LIBS"
3829 cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832
3833 int main() {
3834 main()
3835 ; return 0; }
3836 EOF
3837 if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3838   rm -rf conftest*
3839   eval "ac_cv_lib_$ac_lib_var=yes"
3840 else
3841   echo "configure: failed program was:" >&5
3842   cat conftest.$ac_ext >&5
3843   rm -rf conftest*
3844   eval "ac_cv_lib_$ac_lib_var=no"
3845 fi
3846 rm -f conftest*
3847 LIBS="$ac_save_LIBS"
3848
3849 fi
3850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3851   echo "$ac_t""yes" 1>&6
3852     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3853     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3854   cat >> confdefs.h <<EOF
3855 #define $ac_tr_lib 1
3856 EOF
3857
3858   LIBS="-lgen $LIBS"
3859
3860 else
3861   echo "$ac_t""no" 1>&6
3862 fi
3863
3864 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
3865 echo "configure:3866: checking for main in -lPW" >&5
3866 ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
3867 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3868   echo $ac_n "(cached) $ac_c" 1>&6
3869 else
3870   ac_save_LIBS="$LIBS"
3871 LIBS="-lPW  $LIBS"
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875
3876 int main() {
3877 main()
3878 ; return 0; }
3879 EOF
3880 if { (eval echo configure:3881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3881   rm -rf conftest*
3882   eval "ac_cv_lib_$ac_lib_var=yes"
3883 else
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   eval "ac_cv_lib_$ac_lib_var=no"
3888 fi
3889 rm -f conftest*
3890 LIBS="$ac_save_LIBS"
3891
3892 fi
3893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3894   echo "$ac_t""yes" 1>&6
3895     ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3896     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3897   cat >> confdefs.h <<EOF
3898 #define $ac_tr_lib 1
3899 EOF
3900
3901   LIBS="-lPW $LIBS"
3902
3903 else
3904   echo "$ac_t""no" 1>&6
3905 fi
3906
3907 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
3908 echo "configure:3909: checking for main in -lresolv" >&5
3909 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
3910 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   ac_save_LIBS="$LIBS"
3914 LIBS="-lresolv  $LIBS"
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 int main() {
3920 main()
3921 ; return 0; }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3924   rm -rf conftest*
3925   eval "ac_cv_lib_$ac_lib_var=yes"
3926 else
3927   echo "configure: failed program was:" >&5
3928   cat conftest.$ac_ext >&5
3929   rm -rf conftest*
3930   eval "ac_cv_lib_$ac_lib_var=no"
3931 fi
3932 rm -f conftest*
3933 LIBS="$ac_save_LIBS"
3934
3935 fi
3936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3937   echo "$ac_t""yes" 1>&6
3938     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3939     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3940   cat >> confdefs.h <<EOF
3941 #define $ac_tr_lib 1
3942 EOF
3943
3944   LIBS="-lresolv $LIBS"
3945
3946 else
3947   echo "$ac_t""no" 1>&6
3948 fi
3949
3950 echo $ac_n "checking for main in -lunix""... $ac_c" 1>&6
3951 echo "configure:3952: checking for main in -lunix" >&5
3952 ac_lib_var=`echo unix'_'main | sed 'y%./+-%__p_%'`
3953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   ac_save_LIBS="$LIBS"
3957 LIBS="-lunix  $LIBS"
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961
3962 int main() {
3963 main()
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967   rm -rf conftest*
3968   eval "ac_cv_lib_$ac_lib_var=yes"
3969 else
3970   echo "configure: failed program was:" >&5
3971   cat conftest.$ac_ext >&5
3972   rm -rf conftest*
3973   eval "ac_cv_lib_$ac_lib_var=no"
3974 fi
3975 rm -f conftest*
3976 LIBS="$ac_save_LIBS"
3977
3978 fi
3979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3980   echo "$ac_t""yes" 1>&6
3981     ac_tr_lib=HAVE_LIB`echo [unix] | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3982     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3983   cat >> confdefs.h <<EOF
3984 #define $ac_tr_lib 1
3985 EOF
3986
3987   LIBS="-lunix $LIBS"
3988
3989 else
3990   echo "$ac_t""no" 1>&6
3991 fi
3992
3993
3994 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
3995 echo "configure:3996: checking for library containing crypt" >&5
3996 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
3997   echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999   ac_func_search_save_LIBS="$LIBS"
4000 ac_cv_search_crypt="no"
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 /* Override any gcc2 internal prototype to avoid an error.  */
4005 /* We use char because int might match the return type of a gcc2
4006     builtin and then its argument prototype would still apply.  */
4007 char crypt();
4008
4009 int main() {
4010 crypt()
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4014   rm -rf conftest*
4015   ac_cv_search_crypt="none required"
4016 else
4017   echo "configure: failed program was:" >&5
4018   cat conftest.$ac_ext >&5
4019 fi
4020 rm -f conftest*
4021 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
4022 LIBS="-l$i  $ac_func_search_save_LIBS"
4023 cat > conftest.$ac_ext <<EOF
4024 #line 4025 "configure"
4025 #include "confdefs.h"
4026 /* Override any gcc2 internal prototype to avoid an error.  */
4027 /* We use char because int might match the return type of a gcc2
4028     builtin and then its argument prototype would still apply.  */
4029 char crypt();
4030
4031 int main() {
4032 crypt()
4033 ; return 0; }
4034 EOF
4035 if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4036   rm -rf conftest*
4037   ac_cv_search_crypt="-l$i"
4038 break
4039 else
4040   echo "configure: failed program was:" >&5
4041   cat conftest.$ac_ext >&5
4042 fi
4043 rm -f conftest*
4044 done
4045 LIBS="$ac_func_search_save_LIBS"
4046 fi
4047
4048 echo "$ac_t""$ac_cv_search_crypt" 1>&6
4049 if test "$ac_cv_search_crypt" != "no"; then
4050   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
4051   
4052 else :
4053   
4054 fi
4055 echo $ac_n "checking for __inet_ntoa in -lbind""... $ac_c" 1>&6
4056 echo "configure:4057: checking for __inet_ntoa in -lbind" >&5
4057 ac_lib_var=`echo bind'_'__inet_ntoa | sed 'y%./+-%__p_%'`
4058 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4059   echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061   ac_save_LIBS="$LIBS"
4062 LIBS="-lbind  $LIBS"
4063 cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 /* Override any gcc2 internal prototype to avoid an error.  */
4067 /* We use char because int might match the return type of a gcc2
4068     builtin and then its argument prototype would still apply.  */
4069 char __inet_ntoa();
4070
4071 int main() {
4072 __inet_ntoa()
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4076   rm -rf conftest*
4077   eval "ac_cv_lib_$ac_lib_var=yes"
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   eval "ac_cv_lib_$ac_lib_var=no"
4083 fi
4084 rm -f conftest*
4085 LIBS="$ac_save_LIBS"
4086
4087 fi
4088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4089   echo "$ac_t""yes" 1>&6
4090     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4092   cat >> confdefs.h <<EOF
4093 #define $ac_tr_lib 1
4094 EOF
4095
4096   LIBS="-lbind $LIBS"
4097
4098 else
4099   echo "$ac_t""no" 1>&6
4100 fi
4101
4102 ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
4103 echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
4104 echo "configure:4105: checking for zlib.h" >&5
4105 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4111 #include <zlib.h>
4112 EOF
4113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4114 { (eval echo configure:4115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4116 if test -z "$ac_err"; then
4117   rm -rf conftest*
4118   eval "ac_cv_header_$ac_safe=yes"
4119 else
4120   echo "$ac_err" >&5
4121   echo "configure: failed program was:" >&5
4122   cat conftest.$ac_ext >&5
4123   rm -rf conftest*
4124   eval "ac_cv_header_$ac_safe=no"
4125 fi
4126 rm -f conftest*
4127 fi
4128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4129   echo "$ac_t""yes" 1>&6
4130   
4131 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
4132 echo "configure:4133: checking for inflate in -lz" >&5
4133 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
4134 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4135   echo $ac_n "(cached) $ac_c" 1>&6
4136 else
4137   ac_save_LIBS="$LIBS"
4138 LIBS="-lz  $LIBS"
4139 cat > conftest.$ac_ext <<EOF
4140 #line 4141 "configure"
4141 #include "confdefs.h"
4142 /* Override any gcc2 internal prototype to avoid an error.  */
4143 /* We use char because int might match the return type of a gcc2
4144     builtin and then its argument prototype would still apply.  */
4145 char inflate();
4146
4147 int main() {
4148 inflate()
4149 ; return 0; }
4150 EOF
4151 if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4152   rm -rf conftest*
4153   eval "ac_cv_lib_$ac_lib_var=yes"
4154 else
4155   echo "configure: failed program was:" >&5
4156   cat conftest.$ac_ext >&5
4157   rm -rf conftest*
4158   eval "ac_cv_lib_$ac_lib_var=no"
4159 fi
4160 rm -f conftest*
4161 LIBS="$ac_save_LIBS"
4162
4163 fi
4164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4165   echo "$ac_t""yes" 1>&6
4166     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4167     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4168   cat >> confdefs.h <<EOF
4169 #define $ac_tr_lib 1
4170 EOF
4171
4172   LIBS="-lz $LIBS"
4173
4174 else
4175   echo "$ac_t""no" 1>&6
4176 fi
4177
4178
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182
4183
4184
4185 if test "$with_krb4" = yes ; then
4186   echo $ac_n "checking for des_encrypt in -ldes""... $ac_c" 1>&6
4187 echo "configure:4188: checking for des_encrypt in -ldes" >&5
4188 ac_lib_var=`echo des'_'des_encrypt | sed 'y%./+-%__p_%'`
4189 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4190   echo $ac_n "(cached) $ac_c" 1>&6
4191 else
4192   ac_save_LIBS="$LIBS"
4193 LIBS="-ldes  $LIBS"
4194 cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 /* Override any gcc2 internal prototype to avoid an error.  */
4198 /* We use char because int might match the return type of a gcc2
4199     builtin and then its argument prototype would still apply.  */
4200 char des_encrypt();
4201
4202 int main() {
4203 des_encrypt()
4204 ; return 0; }
4205 EOF
4206 if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4207   rm -rf conftest*
4208   eval "ac_cv_lib_$ac_lib_var=yes"
4209 else
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -rf conftest*
4213   eval "ac_cv_lib_$ac_lib_var=no"
4214 fi
4215 rm -f conftest*
4216 LIBS="$ac_save_LIBS"
4217
4218 fi
4219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4220   echo "$ac_t""yes" 1>&6
4221     ac_tr_lib=HAVE_LIB`echo des | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4222     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4223   cat >> confdefs.h <<EOF
4224 #define $ac_tr_lib 1
4225 EOF
4226
4227   LIBS="-ldes $LIBS"
4228
4229 else
4230   echo "$ac_t""no" 1>&6
4231 { echo "configure: error: library 'des' is required for Kerberos 4" 1>&2; exit 1; }
4232 fi
4233
4234   echo $ac_n "checking for krb_sendauth in -lkrb""... $ac_c" 1>&6
4235 echo "configure:4236: checking for krb_sendauth in -lkrb" >&5
4236 ac_lib_var=`echo krb'_'krb_sendauth | sed 'y%./+-%__p_%'`
4237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   ac_save_LIBS="$LIBS"
4241 LIBS="-lkrb  $LIBS"
4242 cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 /* Override any gcc2 internal prototype to avoid an error.  */
4246 /* We use char because int might match the return type of a gcc2
4247     builtin and then its argument prototype would still apply.  */
4248 char krb_sendauth();
4249
4250 int main() {
4251 krb_sendauth()
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4255   rm -rf conftest*
4256   eval "ac_cv_lib_$ac_lib_var=yes"
4257 else
4258   echo "configure: failed program was:" >&5
4259   cat conftest.$ac_ext >&5
4260   rm -rf conftest*
4261   eval "ac_cv_lib_$ac_lib_var=no"
4262 fi
4263 rm -f conftest*
4264 LIBS="$ac_save_LIBS"
4265
4266 fi
4267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4268   echo "$ac_t""yes" 1>&6
4269     ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4270     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4271   cat >> confdefs.h <<EOF
4272 #define $ac_tr_lib 1
4273 EOF
4274
4275   LIBS="-lkrb $LIBS"
4276
4277 else
4278   echo "$ac_t""no" 1>&6
4279 { echo "configure: error: library 'krb' is required for Kerberos 4" 1>&2; exit 1; }
4280 fi
4281
4282 fi
4283
4284 if test "$with_krb5" = yes ; then
4285   echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
4286 echo "configure:4287: checking for com_err in -lcom_err" >&5
4287 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
4288 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4289   echo $ac_n "(cached) $ac_c" 1>&6
4290 else
4291   ac_save_LIBS="$LIBS"
4292 LIBS="-lcom_err  $LIBS"
4293 cat > conftest.$ac_ext <<EOF
4294 #line 4295 "configure"
4295 #include "confdefs.h"
4296 /* Override any gcc2 internal prototype to avoid an error.  */
4297 /* We use char because int might match the return type of a gcc2
4298     builtin and then its argument prototype would still apply.  */
4299 char com_err();
4300
4301 int main() {
4302 com_err()
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4306   rm -rf conftest*
4307   eval "ac_cv_lib_$ac_lib_var=yes"
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   eval "ac_cv_lib_$ac_lib_var=no"
4313 fi
4314 rm -f conftest*
4315 LIBS="$ac_save_LIBS"
4316
4317 fi
4318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4319   echo "$ac_t""yes" 1>&6
4320     ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4321     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4322   cat >> confdefs.h <<EOF
4323 #define $ac_tr_lib 1
4324 EOF
4325
4326   LIBS="-lcom_err $LIBS"
4327
4328 else
4329   echo "$ac_t""no" 1>&6
4330 { echo "configure: error: library 'com_err' is required for Kerberos 5" 1>&2; exit 1; }
4331 fi
4332
4333   echo $ac_n "checking for krb5_encrypt in -lcrypto""... $ac_c" 1>&6
4334 echo "configure:4335: checking for krb5_encrypt in -lcrypto" >&5
4335 ac_lib_var=`echo crypto'_'krb5_encrypt | sed 'y%./+-%__p_%'`
4336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   ac_save_LIBS="$LIBS"
4340 LIBS="-lcrypto  $LIBS"
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 /* Override any gcc2 internal prototype to avoid an error.  */
4345 /* We use char because int might match the return type of a gcc2
4346     builtin and then its argument prototype would still apply.  */
4347 char krb5_encrypt();
4348
4349 int main() {
4350 krb5_encrypt()
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354   rm -rf conftest*
4355   eval "ac_cv_lib_$ac_lib_var=yes"
4356 else
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359   rm -rf conftest*
4360   eval "ac_cv_lib_$ac_lib_var=no"
4361 fi
4362 rm -f conftest*
4363 LIBS="$ac_save_LIBS"
4364
4365 fi
4366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4367   echo "$ac_t""yes" 1>&6
4368     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4369     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4370   cat >> confdefs.h <<EOF
4371 #define $ac_tr_lib 1
4372 EOF
4373
4374   LIBS="-lcrypto $LIBS"
4375
4376 else
4377   echo "$ac_t""no" 1>&6
4378 echo $ac_n "checking for krb5_encrypt in -lk5crypto""... $ac_c" 1>&6
4379 echo "configure:4380: checking for krb5_encrypt in -lk5crypto" >&5
4380 ac_lib_var=`echo k5crypto'_'krb5_encrypt | sed 'y%./+-%__p_%'`
4381 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   ac_save_LIBS="$LIBS"
4385 LIBS="-lk5crypto  $LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 /* Override any gcc2 internal prototype to avoid an error.  */
4390 /* We use char because int might match the return type of a gcc2
4391     builtin and then its argument prototype would still apply.  */
4392 char krb5_encrypt();
4393
4394 int main() {
4395 krb5_encrypt()
4396 ; return 0; }
4397 EOF
4398 if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4399   rm -rf conftest*
4400   eval "ac_cv_lib_$ac_lib_var=yes"
4401 else
4402   echo "configure: failed program was:" >&5
4403   cat conftest.$ac_ext >&5
4404   rm -rf conftest*
4405   eval "ac_cv_lib_$ac_lib_var=no"
4406 fi
4407 rm -f conftest*
4408 LIBS="$ac_save_LIBS"
4409
4410 fi
4411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4412   echo "$ac_t""yes" 1>&6
4413     ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4414     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4415   cat >> confdefs.h <<EOF
4416 #define $ac_tr_lib 1
4417 EOF
4418
4419   LIBS="-lk5crypto $LIBS"
4420
4421 else
4422   echo "$ac_t""no" 1>&6
4423 { echo "configure: error: library 'crypto' or 'k5crypto' is required for Kerberos 5" 1>&2; exit 1; }
4424 fi
4425
4426 fi
4427
4428   echo $ac_n "checking for krb5_sendauth in -lkrb5""... $ac_c" 1>&6
4429 echo "configure:4430: checking for krb5_sendauth in -lkrb5" >&5
4430 ac_lib_var=`echo krb5'_'krb5_sendauth | sed 'y%./+-%__p_%'`
4431 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4432   echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434   ac_save_LIBS="$LIBS"
4435 LIBS="-lkrb5  $LIBS"
4436 cat > conftest.$ac_ext <<EOF
4437 #line 4438 "configure"
4438 #include "confdefs.h"
4439 /* Override any gcc2 internal prototype to avoid an error.  */
4440 /* We use char because int might match the return type of a gcc2
4441     builtin and then its argument prototype would still apply.  */
4442 char krb5_sendauth();
4443
4444 int main() {
4445 krb5_sendauth()
4446 ; return 0; }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4449   rm -rf conftest*
4450   eval "ac_cv_lib_$ac_lib_var=yes"
4451 else
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454   rm -rf conftest*
4455   eval "ac_cv_lib_$ac_lib_var=no"
4456 fi
4457 rm -f conftest*
4458 LIBS="$ac_save_LIBS"
4459
4460 fi
4461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4462   echo "$ac_t""yes" 1>&6
4463     ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4464     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4465   cat >> confdefs.h <<EOF
4466 #define $ac_tr_lib 1
4467 EOF
4468
4469   LIBS="-lkrb5 $LIBS"
4470
4471 else
4472   echo "$ac_t""no" 1>&6
4473 { echo "configure: error: library 'krb5' is required for Kerberos 5" 1>&2; exit 1; }
4474 fi
4475
4476 fi
4477
4478 if test "$with_openssl" = yes ; then
4479     echo $ac_n "checking for CRYPTO_new_ex_data in -lcrypto""... $ac_c" 1>&6
4480 echo "configure:4481: checking for CRYPTO_new_ex_data in -lcrypto" >&5
4481 ac_lib_var=`echo crypto'_'CRYPTO_new_ex_data | sed 'y%./+-%__p_%'`
4482 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   ac_save_LIBS="$LIBS"
4486 LIBS="-lcrypto  $LIBS"
4487 cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 /* Override any gcc2 internal prototype to avoid an error.  */
4491 /* We use char because int might match the return type of a gcc2
4492     builtin and then its argument prototype would still apply.  */
4493 char CRYPTO_new_ex_data();
4494
4495 int main() {
4496 CRYPTO_new_ex_data()
4497 ; return 0; }
4498 EOF
4499 if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4500   rm -rf conftest*
4501   eval "ac_cv_lib_$ac_lib_var=yes"
4502 else
4503   echo "configure: failed program was:" >&5
4504   cat conftest.$ac_ext >&5
4505   rm -rf conftest*
4506   eval "ac_cv_lib_$ac_lib_var=no"
4507 fi
4508 rm -f conftest*
4509 LIBS="$ac_save_LIBS"
4510
4511 fi
4512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4513   echo "$ac_t""yes" 1>&6
4514     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4516   cat >> confdefs.h <<EOF
4517 #define $ac_tr_lib 1
4518 EOF
4519
4520   LIBS="-lcrypto $LIBS"
4521
4522 else
4523   echo "$ac_t""no" 1>&6
4524 { echo "configure: error: library 'crypto' is required for OpenSSL" 1>&2; exit 1; }
4525 fi
4526
4527   echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
4528 echo "configure:4529: checking for SSL_library_init in -lssl" >&5
4529 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
4530 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533   ac_save_LIBS="$LIBS"
4534 LIBS="-lssl  $LIBS"
4535 cat > conftest.$ac_ext <<EOF
4536 #line 4537 "configure"
4537 #include "confdefs.h"
4538 /* Override any gcc2 internal prototype to avoid an error.  */
4539 /* We use char because int might match the return type of a gcc2
4540     builtin and then its argument prototype would still apply.  */
4541 char SSL_library_init();
4542
4543 int main() {
4544 SSL_library_init()
4545 ; return 0; }
4546 EOF
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4548   rm -rf conftest*
4549   eval "ac_cv_lib_$ac_lib_var=yes"
4550 else
4551   echo "configure: failed program was:" >&5
4552   cat conftest.$ac_ext >&5
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=no"
4555 fi
4556 rm -f conftest*
4557 LIBS="$ac_save_LIBS"
4558
4559 fi
4560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4561   echo "$ac_t""yes" 1>&6
4562     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4563     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4564   cat >> confdefs.h <<EOF
4565 #define $ac_tr_lib 1
4566 EOF
4567
4568   LIBS="-lssl $LIBS"
4569
4570 else
4571   echo "$ac_t""no" 1>&6
4572 { echo "configure: error: library 'ssl' is required for OpenSSL" 1>&2; exit 1; }
4573 fi
4574
4575 fi
4576
4577
4578 ##
4579 ## Header files
4580 ##
4581 for ac_hdr 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/types.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h
4582 do
4583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4585 echo "configure:4586: checking for $ac_hdr" >&5
4586 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   cat > conftest.$ac_ext <<EOF
4590 #line 4591 "configure"
4591 #include "confdefs.h"
4592 #include <$ac_hdr>
4593 EOF
4594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4595 { (eval echo configure:4596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4597 if test -z "$ac_err"; then
4598   rm -rf conftest*
4599   eval "ac_cv_header_$ac_safe=yes"
4600 else
4601   echo "$ac_err" >&5
4602   echo "configure: failed program was:" >&5
4603   cat conftest.$ac_ext >&5
4604   rm -rf conftest*
4605   eval "ac_cv_header_$ac_safe=no"
4606 fi
4607 rm -f conftest*
4608 fi
4609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4610   echo "$ac_t""yes" 1>&6
4611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4612   cat >> confdefs.h <<EOF
4613 #define $ac_tr_hdr 1
4614 EOF
4615  
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619 done
4620
4621
4622 for ac_hdr in netinet/in.h
4623 do
4624 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4625 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4626 echo "configure:4627: checking for $ac_hdr" >&5
4627 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   cat > conftest.$ac_ext <<EOF
4631 #line 4632 "configure"
4632 #include "confdefs.h"
4633 #include <$ac_hdr>
4634 EOF
4635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4636 { (eval echo configure:4637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4638 if test -z "$ac_err"; then
4639   rm -rf conftest*
4640   eval "ac_cv_header_$ac_safe=yes"
4641 else
4642   echo "$ac_err" >&5
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   eval "ac_cv_header_$ac_safe=no"
4647 fi
4648 rm -f conftest*
4649 fi
4650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4651   echo "$ac_t""yes" 1>&6
4652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4653   cat >> confdefs.h <<EOF
4654 #define $ac_tr_hdr 1
4655 EOF
4656  
4657 else
4658   echo "$ac_t""no" 1>&6
4659 fi
4660 done
4661
4662 echo $ac_n "checking for netinet/tcp.h""... $ac_c" 1>&6
4663 echo "configure:4664: checking for netinet/tcp.h" >&5
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667
4668 #ifdef HAVE_NETINET_IN_H
4669 #include <netinet/in.h>
4670 #endif
4671 #include <netinet/tcp.h>
4672
4673 EOF
4674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4675 { (eval echo configure:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4677 if test -z "$ac_err"; then
4678   rm -rf conftest*
4679   cat >> confdefs.h <<\EOF
4680 #define HAVE_NETINET_TCP_H 1
4681 EOF
4682  echo "$ac_t""yes" 1>&6
4683 else
4684   echo "$ac_err" >&5
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   echo "$ac_t""no" 1>&6
4689 fi
4690 rm -f conftest*
4691
4692 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
4693 echo "configure:4694: checking whether string.h and strings.h may both be included" >&5
4694 if eval "test \"`echo '$''{'pgac_cv_header_strings_both'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <string.h>
4701 #include <strings.h>
4702
4703 EOF
4704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4705 { (eval echo configure:4706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4707 if test -z "$ac_err"; then
4708   rm -rf conftest*
4709   cat > conftest.$ac_ext <<EOF
4710 #line 4711 "configure"
4711 #include "confdefs.h"
4712 #include <string.h>
4713 #include <strings.h>
4714
4715 int main() {
4716 int n = strcasecmp("a", "b");
4717 ; return 0; }
4718 EOF
4719 if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4720   rm -rf conftest*
4721   pgac_cv_header_strings_both=yes
4722 else
4723   echo "configure: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   rm -rf conftest*
4726   pgac_cv_header_strings_both=no
4727 fi
4728 rm -f conftest*
4729 else
4730   echo "$ac_err" >&5
4731   echo "configure: failed program was:" >&5
4732   cat conftest.$ac_ext >&5
4733   rm -rf conftest*
4734   pgac_cv_header_strings_both=no
4735 fi
4736 rm -f conftest*
4737 fi
4738
4739 echo "$ac_t""$pgac_cv_header_strings_both" 1>&6
4740 if test x"$pgac_cv_header_strings_both" = x"yes"; then
4741   cat >> confdefs.h <<\EOF
4742 #define STRING_H_WITH_STRINGS_H 1
4743 EOF
4744
4745 fi
4746
4747 for ac_hdr in readline/readline.h readline.h
4748 do
4749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4751 echo "configure:4752: checking for $ac_hdr" >&5
4752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4753   echo $ac_n "(cached) $ac_c" 1>&6
4754 else
4755   cat > conftest.$ac_ext <<EOF
4756 #line 4757 "configure"
4757 #include "confdefs.h"
4758 #include <$ac_hdr>
4759 EOF
4760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4761 { (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4763 if test -z "$ac_err"; then
4764   rm -rf conftest*
4765   eval "ac_cv_header_$ac_safe=yes"
4766 else
4767   echo "$ac_err" >&5
4768   echo "configure: failed program was:" >&5
4769   cat conftest.$ac_ext >&5
4770   rm -rf conftest*
4771   eval "ac_cv_header_$ac_safe=no"
4772 fi
4773 rm -f conftest*
4774 fi
4775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4776   echo "$ac_t""yes" 1>&6
4777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4778   cat >> confdefs.h <<EOF
4779 #define $ac_tr_hdr 1
4780 EOF
4781  break
4782 else
4783   echo "$ac_t""no" 1>&6
4784 fi
4785 done
4786
4787 for ac_hdr in readline/history.h history.h
4788 do
4789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4791 echo "configure:4792: checking for $ac_hdr" >&5
4792 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798 #include <$ac_hdr>
4799 EOF
4800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4801 { (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4802 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4803 if test -z "$ac_err"; then
4804   rm -rf conftest*
4805   eval "ac_cv_header_$ac_safe=yes"
4806 else
4807   echo "$ac_err" >&5
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   eval "ac_cv_header_$ac_safe=no"
4812 fi
4813 rm -f conftest*
4814 fi
4815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4816   echo "$ac_t""yes" 1>&6
4817     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4818   cat >> confdefs.h <<EOF
4819 #define $ac_tr_hdr 1
4820 EOF
4821  break
4822 else
4823   echo "$ac_t""no" 1>&6
4824 fi
4825 done
4826
4827
4828 if test "$with_krb4" = yes ; then
4829   ac_safe=`echo "krb.h" | sed 'y%./+-%__p_%'`
4830 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
4831 echo "configure:4832: checking for krb.h" >&5
4832 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4833   echo $ac_n "(cached) $ac_c" 1>&6
4834 else
4835   cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4838 #include <krb.h>
4839 EOF
4840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4841 { (eval echo configure:4842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4843 if test -z "$ac_err"; then
4844   rm -rf conftest*
4845   eval "ac_cv_header_$ac_safe=yes"
4846 else
4847   echo "$ac_err" >&5
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850   rm -rf conftest*
4851   eval "ac_cv_header_$ac_safe=no"
4852 fi
4853 rm -f conftest*
4854 fi
4855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4856   echo "$ac_t""yes" 1>&6
4857   :
4858 else
4859   echo "$ac_t""no" 1>&6
4860 { echo "configure: error: header file <krb.h> is required for Kerberos 4" 1>&2; exit 1; }
4861 fi
4862
4863 fi
4864
4865 if test "$with_krb5" = yes ; then
4866   ac_safe=`echo "krb5.h" | sed 'y%./+-%__p_%'`
4867 echo $ac_n "checking for krb5.h""... $ac_c" 1>&6
4868 echo "configure:4869: checking for krb5.h" >&5
4869 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4870   echo $ac_n "(cached) $ac_c" 1>&6
4871 else
4872   cat > conftest.$ac_ext <<EOF
4873 #line 4874 "configure"
4874 #include "confdefs.h"
4875 #include <krb5.h>
4876 EOF
4877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4878 { (eval echo configure:4879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4880 if test -z "$ac_err"; then
4881   rm -rf conftest*
4882   eval "ac_cv_header_$ac_safe=yes"
4883 else
4884   echo "$ac_err" >&5
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   eval "ac_cv_header_$ac_safe=no"
4889 fi
4890 rm -f conftest*
4891 fi
4892 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4893   echo "$ac_t""yes" 1>&6
4894   :
4895 else
4896   echo "$ac_t""no" 1>&6
4897 { echo "configure: error: header file <krb5.h> is required for Kerberos 5" 1>&2; exit 1; }
4898 fi
4899
4900   ac_safe=`echo "com_err.h" | sed 'y%./+-%__p_%'`
4901 echo $ac_n "checking for com_err.h""... $ac_c" 1>&6
4902 echo "configure:4903: checking for com_err.h" >&5
4903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4909 #include <com_err.h>
4910 EOF
4911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4912 { (eval echo configure:4913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4914 if test -z "$ac_err"; then
4915   rm -rf conftest*
4916   eval "ac_cv_header_$ac_safe=yes"
4917 else
4918   echo "$ac_err" >&5
4919   echo "configure: failed program was:" >&5
4920   cat conftest.$ac_ext >&5
4921   rm -rf conftest*
4922   eval "ac_cv_header_$ac_safe=no"
4923 fi
4924 rm -f conftest*
4925 fi
4926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4927   echo "$ac_t""yes" 1>&6
4928   :
4929 else
4930   echo "$ac_t""no" 1>&6
4931 { echo "configure: error: header file <com_err.h> is required for Kerberos 5" 1>&2; exit 1; }
4932 fi
4933
4934 fi
4935
4936 if test "$with_openssl" = yes ; then
4937   ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__p_%'`
4938 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
4939 echo "configure:4940: checking for openssl/ssl.h" >&5
4940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 #include <openssl/ssl.h>
4947 EOF
4948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4949 { (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4951 if test -z "$ac_err"; then
4952   rm -rf conftest*
4953   eval "ac_cv_header_$ac_safe=yes"
4954 else
4955   echo "$ac_err" >&5
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_header_$ac_safe=no"
4960 fi
4961 rm -f conftest*
4962 fi
4963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4964   echo "$ac_t""yes" 1>&6
4965   :
4966 else
4967   echo "$ac_t""no" 1>&6
4968 { echo "configure: error: header file <openssl/ssl.h> is required for OpenSSL" 1>&2; exit 1; }
4969 fi
4970
4971   ac_safe=`echo "openssl/err.h" | sed 'y%./+-%__p_%'`
4972 echo $ac_n "checking for openssl/err.h""... $ac_c" 1>&6
4973 echo "configure:4974: checking for openssl/err.h" >&5
4974 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977   cat > conftest.$ac_ext <<EOF
4978 #line 4979 "configure"
4979 #include "confdefs.h"
4980 #include <openssl/err.h>
4981 EOF
4982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4983 { (eval echo configure:4984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4985 if test -z "$ac_err"; then
4986   rm -rf conftest*
4987   eval "ac_cv_header_$ac_safe=yes"
4988 else
4989   echo "$ac_err" >&5
4990   echo "configure: failed program was:" >&5
4991   cat conftest.$ac_ext >&5
4992   rm -rf conftest*
4993   eval "ac_cv_header_$ac_safe=no"
4994 fi
4995 rm -f conftest*
4996 fi
4997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4998   echo "$ac_t""yes" 1>&6
4999   :
5000 else
5001   echo "$ac_t""no" 1>&6
5002 { echo "configure: error: header file <openssl/err.h> is required for OpenSSL" 1>&2; exit 1; }
5003 fi
5004
5005 fi
5006
5007
5008 ##
5009 ## Types, structures, compiler characteristics
5010 ##
5011 echo $ac_n "checking for working const""... $ac_c" 1>&6
5012 echo "configure:5013: checking for working const" >&5
5013 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5014   echo $ac_n "(cached) $ac_c" 1>&6
5015 else
5016   cat > conftest.$ac_ext <<EOF
5017 #line 5018 "configure"
5018 #include "confdefs.h"
5019
5020 int main() {
5021
5022 /* Ultrix mips cc rejects this.  */
5023 typedef int charset[2]; const charset x;
5024 /* SunOS 4.1.1 cc rejects this.  */
5025 char const *const *ccp;
5026 char **p;
5027 /* NEC SVR4.0.2 mips cc rejects this.  */
5028 struct point {int x, y;};
5029 static struct point const zero = {0,0};
5030 /* AIX XL C 1.02.0.0 rejects this.
5031    It does not let you subtract one const X* pointer from another in an arm
5032    of an if-expression whose if-part is not a constant expression */
5033 const char *g = "string";
5034 ccp = &g + (g ? g-g : 0);
5035 /* HPUX 7.0 cc rejects these. */
5036 ++ccp;
5037 p = (char**) ccp;
5038 ccp = (char const *const *) p;
5039 { /* SCO 3.2v4 cc rejects this.  */
5040   char *t;
5041   char const *s = 0 ? (char *) 0 : (char const *) 0;
5042
5043   *t++ = 0;
5044 }
5045 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5046   int x[] = {25, 17};
5047   const int *foo = &x[0];
5048   ++foo;
5049 }
5050 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5051   typedef const int *iptr;
5052   iptr p = 0;
5053   ++p;
5054 }
5055 { /* AIX XL C 1.02.0.0 rejects this saying
5056      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5057   struct s { int j; const int *ap[3]; };
5058   struct s *b; b->j = 5;
5059 }
5060 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5061   const int foo = 10;
5062 }
5063
5064 ; return 0; }
5065 EOF
5066 if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5067   rm -rf conftest*
5068   ac_cv_c_const=yes
5069 else
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   ac_cv_c_const=no
5074 fi
5075 rm -f conftest*
5076 fi
5077
5078 echo "$ac_t""$ac_cv_c_const" 1>&6
5079 if test $ac_cv_c_const = no; then
5080   cat >> confdefs.h <<\EOF
5081 #define const 
5082 EOF
5083
5084 fi
5085
5086 echo $ac_n "checking for inline""... $ac_c" 1>&6
5087 echo "configure:5088: checking for inline" >&5
5088 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5089   echo $ac_n "(cached) $ac_c" 1>&6
5090 else
5091   ac_cv_c_inline=no
5092 for ac_kw in inline __inline__ __inline; do
5093   cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096
5097 int main() {
5098 } $ac_kw foo() {
5099 ; return 0; }
5100 EOF
5101 if { (eval echo configure:5102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5102   rm -rf conftest*
5103   ac_cv_c_inline=$ac_kw; break
5104 else
5105   echo "configure: failed program was:" >&5
5106   cat conftest.$ac_ext >&5
5107 fi
5108 rm -f conftest*
5109 done
5110
5111 fi
5112
5113 echo "$ac_t""$ac_cv_c_inline" 1>&6
5114 case "$ac_cv_c_inline" in
5115   inline | yes) ;;
5116   no) cat >> confdefs.h <<\EOF
5117 #define inline 
5118 EOF
5119  ;;
5120   *)  cat >> confdefs.h <<EOF
5121 #define inline $ac_cv_c_inline
5122 EOF
5123  ;;
5124 esac
5125
5126
5127
5128 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
5129 echo "configure:5130: checking for preprocessor stringizing operator" >&5
5130 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
5131   echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133   cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136
5137 #define x(y) #y
5138
5139 char *s = x(teststring);
5140
5141 EOF
5142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5143   egrep "#teststring" >/dev/null 2>&1; then
5144   rm -rf conftest*
5145   ac_cv_c_stringize=no
5146 else
5147   rm -rf conftest*
5148   ac_cv_c_stringize=yes
5149 fi
5150 rm -f conftest*
5151
5152 fi
5153
5154 if test "${ac_cv_c_stringize}" = yes
5155 then
5156         cat >> confdefs.h <<\EOF
5157 #define HAVE_STRINGIZE 1
5158 EOF
5159
5160 fi
5161 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
5162
5163 echo $ac_n "checking for signed types""... $ac_c" 1>&6
5164 echo "configure:5165: checking for signed types" >&5
5165 if eval "test \"`echo '$''{'pgac_cv_c_signed'+set}'`\" = set"; then
5166   echo $ac_n "(cached) $ac_c" 1>&6
5167 else
5168   cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171
5172 int main() {
5173 signed char c; signed short s; signed int i;
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5177   rm -rf conftest*
5178   pgac_cv_c_signed=yes
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   pgac_cv_c_signed=no
5184 fi
5185 rm -f conftest*
5186 fi
5187
5188 echo "$ac_t""$pgac_cv_c_signed" 1>&6
5189 if test x"$pgac_cv_c_signed" = xno ; then
5190   cat >> confdefs.h <<\EOF
5191 #define signed 
5192 EOF
5193
5194 fi
5195 echo $ac_n "checking for volatile""... $ac_c" 1>&6
5196 echo "configure:5197: checking for volatile" >&5
5197 if eval "test \"`echo '$''{'pgac_cv_c_volatile'+set}'`\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200   cat > conftest.$ac_ext <<EOF
5201 #line 5202 "configure"
5202 #include "confdefs.h"
5203
5204 int main() {
5205 extern volatile int i;
5206 ; return 0; }
5207 EOF
5208 if { (eval echo configure:5209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5209   rm -rf conftest*
5210   pgac_cv_c_volatile=yes
5211 else
5212   echo "configure: failed program was:" >&5
5213   cat conftest.$ac_ext >&5
5214   rm -rf conftest*
5215   pgac_cv_c_volatile=no
5216 fi
5217 rm -f conftest*
5218 fi
5219
5220 echo "$ac_t""$pgac_cv_c_volatile" 1>&6
5221 if test x"$pgac_cv_c_volatile" = xno ; then
5222   cat >> confdefs.h <<\EOF
5223 #define volatile 
5224 EOF
5225
5226 fi
5227 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5228 echo "configure:5229: checking whether struct tm is in sys/time.h or time.h" >&5
5229 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5230   echo $ac_n "(cached) $ac_c" 1>&6
5231 else
5232   cat > conftest.$ac_ext <<EOF
5233 #line 5234 "configure"
5234 #include "confdefs.h"
5235 #include <sys/types.h>
5236 #include <time.h>
5237 int main() {
5238 struct tm *tp; tp->tm_sec;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243   ac_cv_struct_tm=time.h
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248   ac_cv_struct_tm=sys/time.h
5249 fi
5250 rm -f conftest*
5251 fi
5252
5253 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5254 if test $ac_cv_struct_tm = sys/time.h; then
5255   cat >> confdefs.h <<\EOF
5256 #define TM_IN_SYS_TIME 1
5257 EOF
5258
5259 fi
5260
5261 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5262 echo "configure:5263: checking for tm_zone in struct tm" >&5
5263 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5264   echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266   cat > conftest.$ac_ext <<EOF
5267 #line 5268 "configure"
5268 #include "confdefs.h"
5269 #include <sys/types.h>
5270 #include <$ac_cv_struct_tm>
5271 int main() {
5272 struct tm tm; tm.tm_zone;
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5276   rm -rf conftest*
5277   ac_cv_struct_tm_zone=yes
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   ac_cv_struct_tm_zone=no
5283 fi
5284 rm -f conftest*
5285 fi
5286
5287 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5288 if test "$ac_cv_struct_tm_zone" = yes; then
5289   cat >> confdefs.h <<\EOF
5290 #define HAVE_TM_ZONE 1
5291 EOF
5292
5293 else
5294   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5295 echo "configure:5296: checking for tzname" >&5
5296 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5297   echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299   cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302 #include <time.h>
5303 #ifndef tzname /* For SGI.  */
5304 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5305 #endif
5306 int main() {
5307 atoi(*tzname);
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5311   rm -rf conftest*
5312   ac_cv_var_tzname=yes
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316   rm -rf conftest*
5317   ac_cv_var_tzname=no
5318 fi
5319 rm -f conftest*
5320 fi
5321
5322 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5323   if test $ac_cv_var_tzname = yes; then
5324     cat >> confdefs.h <<\EOF
5325 #define HAVE_TZNAME 1
5326 EOF
5327
5328   fi
5329 fi
5330
5331 echo $ac_n "checking for union semun""... $ac_c" 1>&6
5332 echo "configure:5333: checking for union semun" >&5
5333 if eval "test \"`echo '$''{'pgac_cv_union_semun'+set}'`\" = set"; then
5334   echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339 #include <sys/types.h>
5340 #include <sys/ipc.h>
5341 #include <sys/sem.h>
5342 int main() {
5343 union semun semun;
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5347   rm -rf conftest*
5348   pgac_cv_union_semun=yes
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   pgac_cv_union_semun=no
5354 fi
5355 rm -f conftest*
5356 fi
5357
5358 echo "$ac_t""$pgac_cv_union_semun" 1>&6
5359 if test x"$pgac_cv_union_semun" = xyes ; then
5360   cat >> confdefs.h <<\EOF
5361 #define HAVE_UNION_SEMUN 1
5362 EOF
5363
5364 fi
5365 echo $ac_n "checking for struct sockaddr_un""... $ac_c" 1>&6
5366 echo "configure:5367: checking for struct sockaddr_un" >&5
5367 if eval "test \"`echo '$''{'pgac_cv_struct_sockaddr_un'+set}'`\" = set"; then
5368   echo $ac_n "(cached) $ac_c" 1>&6
5369 else
5370   cat > conftest.$ac_ext <<EOF
5371 #line 5372 "configure"
5372 #include "confdefs.h"
5373 #include <sys/types.h>
5374 #ifdef HAVE_SYS_UN_H
5375 #include <sys/un.h>
5376 #endif
5377 int main() {
5378 struct sockaddr_un un;
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5382   rm -rf conftest*
5383   pgac_cv_struct_sockaddr_un=yes
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   pgac_cv_struct_sockaddr_un=no
5389 fi
5390 rm -f conftest*
5391 fi
5392
5393 echo "$ac_t""$pgac_cv_struct_sockaddr_un" 1>&6
5394 if test x"$pgac_cv_struct_sockaddr_un" = xyes; then
5395   cat >> confdefs.h <<\EOF
5396 #define HAVE_STRUCT_SOCKADDR_UN 1
5397 EOF
5398
5399 fi
5400
5401 ##
5402 ## Functions, global variables
5403 ##
5404 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
5405 echo "configure:5406: checking for int timezone" >&5
5406 if eval "test \"`echo '$''{'pgac_cv_var_int_timezone'+set}'`\" = set"; then
5407   echo $ac_n "(cached) $ac_c" 1>&6
5408 else
5409   cat > conftest.$ac_ext <<EOF
5410 #line 5411 "configure"
5411 #include "confdefs.h"
5412 #include <time.h>
5413 int res;
5414 int main() {
5415 res = timezone / 60;
5416 ; return 0; }
5417 EOF
5418 if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5419   rm -rf conftest*
5420   pgac_cv_var_int_timezone=yes
5421 else
5422   echo "configure: failed program was:" >&5
5423   cat conftest.$ac_ext >&5
5424   rm -rf conftest*
5425   pgac_cv_var_int_timezone=no
5426 fi
5427 rm -f conftest*
5428 fi
5429
5430 echo "$ac_t""$pgac_cv_var_int_timezone" 1>&6
5431 if test x"$pgac_cv_var_int_timezone" = xyes ; then
5432   cat >> confdefs.h <<\EOF
5433 #define HAVE_INT_TIMEZONE 
5434 EOF
5435
5436 fi
5437 echo $ac_n "checking types of arguments for accept()""... $ac_c" 1>&6
5438 echo "configure:5439: checking types of arguments for accept()" >&5
5439  if eval "test \"`echo '$''{'ac_cv_func_accept_arg1'+set}'`\" = set"; then
5440   echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442    if eval "test \"`echo '$''{'ac_cv_func_accept_arg2'+set}'`\" = set"; then
5443   echo $ac_n "(cached) $ac_c" 1>&6
5444 else
5445     if eval "test \"`echo '$''{'ac_cv_func_accept_arg3'+set}'`\" = set"; then
5446   echo $ac_n "(cached) $ac_c" 1>&6
5447 else
5448      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
5449      for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
5450       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
5451        cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454 #ifdef HAVE_SYS_TYPES_H
5455 #include <sys/types.h>
5456 #endif
5457 #ifdef HAVE_SYS_SOCKET_H
5458 #include <sys/socket.h>
5459 #endif
5460 extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
5461 int main() {
5462
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5466   rm -rf conftest*
5467   ac_not_found=no; break 3
5468 else
5469   echo "configure: failed program was:" >&5
5470   cat conftest.$ac_ext >&5
5471   rm -rf conftest*
5472   ac_not_found=yes
5473 fi
5474 rm -f conftest*
5475       done
5476      done
5477     done
5478     if test "$ac_not_found" = yes; then
5479       { echo "configure: error: could not determine argument types" 1>&2; exit 1; }
5480     fi
5481     if test "$ac_cv_func_accept_arg3" = "void"; then
5482       ac_cv_func_accept_arg3=int
5483     fi
5484    
5485 fi
5486   
5487 fi
5488  
5489 fi
5490  echo "$ac_t""$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" 1>&6
5491  cat >> confdefs.h <<EOF
5492 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
5493 EOF
5494
5495  cat >> confdefs.h <<EOF
5496 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
5497 EOF
5498
5499  cat >> confdefs.h <<EOF
5500 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
5501 EOF
5502
5503
5504 echo $ac_n "checking whether gettimeofday takes only one argument""... $ac_c" 1>&6
5505 echo "configure:5506: checking whether gettimeofday takes only one argument" >&5
5506 if eval "test \"`echo '$''{'pgac_cv_func_gettimeofday_1arg'+set}'`\" = set"; then
5507   echo $ac_n "(cached) $ac_c" 1>&6
5508 else
5509   cat > conftest.$ac_ext <<EOF
5510 #line 5511 "configure"
5511 #include "confdefs.h"
5512 #include <sys/time.h>
5513 int main() {
5514 struct timeval *tp;
5515 struct timezone *tzp;
5516 gettimeofday(tp,tzp);
5517 ; return 0; }
5518 EOF
5519 if { (eval echo configure:5520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5520   rm -rf conftest*
5521   pgac_cv_func_gettimeofday_1arg=no
5522 else
5523   echo "configure: failed program was:" >&5
5524   cat conftest.$ac_ext >&5
5525   rm -rf conftest*
5526   pgac_cv_func_gettimeofday_1arg=yes
5527 fi
5528 rm -f conftest*
5529 fi
5530
5531 echo "$ac_t""$pgac_cv_func_gettimeofday_1arg" 1>&6
5532 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
5533   cat >> confdefs.h <<\EOF
5534 #define GETTIMEOFDAY_1ARG 
5535 EOF
5536
5537 fi
5538
5539 for ac_func in fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
5540 do
5541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5542 echo "configure:5543: checking for $ac_func" >&5
5543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5544   echo $ac_n "(cached) $ac_c" 1>&6
5545 else
5546   cat > conftest.$ac_ext <<EOF
5547 #line 5548 "configure"
5548 #include "confdefs.h"
5549 /* System header to define __stub macros and hopefully few prototypes,
5550     which can conflict with char $ac_func(); below.  */
5551 #include <assert.h>
5552 /* Override any gcc2 internal prototype to avoid an error.  */
5553 /* We use char because int might match the return type of a gcc2
5554     builtin and then its argument prototype would still apply.  */
5555 char $ac_func();
5556
5557 int main() {
5558
5559 /* The GNU C library defines this for functions which it implements
5560     to always fail with ENOSYS.  Some functions are actually named
5561     something starting with __ and the normal name is an alias.  */
5562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5563 choke me
5564 #else
5565 $ac_func();
5566 #endif
5567
5568 ; return 0; }
5569 EOF
5570 if { (eval echo configure:5571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5571   rm -rf conftest*
5572   eval "ac_cv_func_$ac_func=yes"
5573 else
5574   echo "configure: failed program was:" >&5
5575   cat conftest.$ac_ext >&5
5576   rm -rf conftest*
5577   eval "ac_cv_func_$ac_func=no"
5578 fi
5579 rm -f conftest*
5580 fi
5581
5582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5583   echo "$ac_t""yes" 1>&6
5584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5585   cat >> confdefs.h <<EOF
5586 #define $ac_tr_func 1
5587 EOF
5588  
5589 else
5590   echo "$ac_t""no" 1>&6
5591 fi
5592 done
5593
5594
5595 cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 #include <unistd.h>
5599 EOF
5600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5601   egrep "fdatasync" >/dev/null 2>&1; then
5602   rm -rf conftest*
5603   cat >> confdefs.h <<\EOF
5604 #define HAVE_FDATASYNC_DECL 1
5605 EOF
5606
5607 fi
5608 rm -f conftest*
5609
5610
5611 echo $ac_n "checking for PS_STRINGS""... $ac_c" 1>&6
5612 echo "configure:5613: checking for PS_STRINGS" >&5
5613 if eval "test \"`echo '$''{'pgac_cv_var_PS_STRINGS'+set}'`\" = set"; then
5614   echo $ac_n "(cached) $ac_c" 1>&6
5615 else
5616   cat > conftest.$ac_ext <<EOF
5617 #line 5618 "configure"
5618 #include "confdefs.h"
5619 #include <machine/vmparam.h>
5620 #include <sys/exec.h>
5621
5622 int main() {
5623 PS_STRINGS->ps_nargvstr = 1;
5624 PS_STRINGS->ps_argvstr = "foo";
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5628   rm -rf conftest*
5629   pgac_cv_var_PS_STRINGS=yes
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   pgac_cv_var_PS_STRINGS=no
5635 fi
5636 rm -f conftest*
5637 fi
5638
5639 echo "$ac_t""$pgac_cv_var_PS_STRINGS" 1>&6
5640 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
5641   cat >> confdefs.h <<\EOF
5642 #define HAVE_PS_STRINGS 
5643 EOF
5644
5645 fi
5646
5647 SNPRINTF=''
5648 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
5649 echo "configure:5650: checking for snprintf" >&5
5650 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
5651   echo $ac_n "(cached) $ac_c" 1>&6
5652 else
5653   cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656 /* System header to define __stub macros and hopefully few prototypes,
5657     which can conflict with char snprintf(); below.  */
5658 #include <assert.h>
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 /* We use char because int might match the return type of a gcc2
5661     builtin and then its argument prototype would still apply.  */
5662 char snprintf();
5663
5664 int main() {
5665
5666 /* The GNU C library defines this for functions which it implements
5667     to always fail with ENOSYS.  Some functions are actually named
5668     something starting with __ and the normal name is an alias.  */
5669 #if defined (__stub_snprintf) || defined (__stub___snprintf)
5670 choke me
5671 #else
5672 snprintf();
5673 #endif
5674
5675 ; return 0; }
5676 EOF
5677 if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5678   rm -rf conftest*
5679   eval "ac_cv_func_snprintf=yes"
5680 else
5681   echo "configure: failed program was:" >&5
5682   cat conftest.$ac_ext >&5
5683   rm -rf conftest*
5684   eval "ac_cv_func_snprintf=no"
5685 fi
5686 rm -f conftest*
5687 fi
5688
5689 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
5690   echo "$ac_t""yes" 1>&6
5691   cat >> confdefs.h <<\EOF
5692 #define HAVE_SNPRINTF 1
5693 EOF
5694
5695 else
5696   echo "$ac_t""no" 1>&6
5697 SNPRINTF='snprintf.o'
5698 fi
5699
5700 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
5701 echo "configure:5702: checking for vsnprintf" >&5
5702 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708 /* System header to define __stub macros and hopefully few prototypes,
5709     which can conflict with char vsnprintf(); below.  */
5710 #include <assert.h>
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char vsnprintf();
5715
5716 int main() {
5717
5718 /* The GNU C library defines this for functions which it implements
5719     to always fail with ENOSYS.  Some functions are actually named
5720     something starting with __ and the normal name is an alias.  */
5721 #if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
5722 choke me
5723 #else
5724 vsnprintf();
5725 #endif
5726
5727 ; return 0; }
5728 EOF
5729 if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5730   rm -rf conftest*
5731   eval "ac_cv_func_vsnprintf=yes"
5732 else
5733   echo "configure: failed program was:" >&5
5734   cat conftest.$ac_ext >&5
5735   rm -rf conftest*
5736   eval "ac_cv_func_vsnprintf=no"
5737 fi
5738 rm -f conftest*
5739 fi
5740
5741 if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
5742   echo "$ac_t""yes" 1>&6
5743   cat >> confdefs.h <<\EOF
5744 #define HAVE_VSNPRINTF 1
5745 EOF
5746
5747 else
5748   echo "$ac_t""no" 1>&6
5749 SNPRINTF='snprintf.o'
5750 fi
5751
5752
5753 cat > conftest.$ac_ext <<EOF
5754 #line 5755 "configure"
5755 #include "confdefs.h"
5756 #include <stdio.h>
5757 EOF
5758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5759   egrep "snprintf" >/dev/null 2>&1; then
5760   rm -rf conftest*
5761   cat >> confdefs.h <<\EOF
5762 #define HAVE_SNPRINTF_DECL 1
5763 EOF
5764
5765 fi
5766 rm -f conftest*
5767
5768 cat > conftest.$ac_ext <<EOF
5769 #line 5770 "configure"
5770 #include "confdefs.h"
5771 #include <stdio.h>
5772 EOF
5773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5774   egrep "vsnprintf" >/dev/null 2>&1; then
5775   rm -rf conftest*
5776   cat >> confdefs.h <<\EOF
5777 #define HAVE_VSNPRINTF_DECL 1
5778 EOF
5779
5780 fi
5781 rm -f conftest*
5782
5783
5784 # do this one the hard way in case isinf() is a macro
5785 echo $ac_n "checking for isinf""... $ac_c" 1>&6
5786 echo "configure:5787: checking for isinf" >&5
5787 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
5788   echo $ac_n "(cached) $ac_c" 1>&6
5789 else
5790   cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5793 #include <math.h>
5794
5795 int main() {
5796 double x = 0.0; int res = isinf(x);
5797 ; return 0; }
5798 EOF
5799 if { (eval echo configure:5800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5800   rm -rf conftest*
5801   ac_cv_func_isinf=yes
5802 else
5803   echo "configure: failed program was:" >&5
5804   cat conftest.$ac_ext >&5
5805   rm -rf conftest*
5806   ac_cv_func_isinf=no
5807 fi
5808 rm -f conftest*
5809 fi
5810
5811 echo "$ac_t""$ac_cv_func_isinf" 1>&6
5812
5813 if test $ac_cv_func_isinf = yes ; then
5814   cat >> confdefs.h <<\EOF
5815 #define HAVE_ISINF 1
5816 EOF
5817
5818   ISINF=
5819 else
5820   ISINF='isinf.o'
5821   # Look for a way to implement a substitute for isinf()
5822   for ac_func in fpclass fp_class fp_class_d class
5823 do
5824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5825 echo "configure:5826: checking for $ac_func" >&5
5826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5827   echo $ac_n "(cached) $ac_c" 1>&6
5828 else
5829   cat > conftest.$ac_ext <<EOF
5830 #line 5831 "configure"
5831 #include "confdefs.h"
5832 /* System header to define __stub macros and hopefully few prototypes,
5833     which can conflict with char $ac_func(); below.  */
5834 #include <assert.h>
5835 /* Override any gcc2 internal prototype to avoid an error.  */
5836 /* We use char because int might match the return type of a gcc2
5837     builtin and then its argument prototype would still apply.  */
5838 char $ac_func();
5839
5840 int main() {
5841
5842 /* The GNU C library defines this for functions which it implements
5843     to always fail with ENOSYS.  Some functions are actually named
5844     something starting with __ and the normal name is an alias.  */
5845 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5846 choke me
5847 #else
5848 $ac_func();
5849 #endif
5850
5851 ; return 0; }
5852 EOF
5853 if { (eval echo configure:5854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5854   rm -rf conftest*
5855   eval "ac_cv_func_$ac_func=yes"
5856 else
5857   echo "configure: failed program was:" >&5
5858   cat conftest.$ac_ext >&5
5859   rm -rf conftest*
5860   eval "ac_cv_func_$ac_func=no"
5861 fi
5862 rm -f conftest*
5863 fi
5864
5865 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5866   echo "$ac_t""yes" 1>&6
5867     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5868   cat >> confdefs.h <<EOF
5869 #define $ac_tr_func 1
5870 EOF
5871  break
5872 else
5873   echo "$ac_t""no" 1>&6
5874 fi
5875 done
5876
5877 fi
5878
5879
5880 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
5881 echo "configure:5882: checking for getrusage" >&5
5882 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
5883   echo $ac_n "(cached) $ac_c" 1>&6
5884 else
5885   cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 /* System header to define __stub macros and hopefully few prototypes,
5889     which can conflict with char getrusage(); below.  */
5890 #include <assert.h>
5891 /* Override any gcc2 internal prototype to avoid an error.  */
5892 /* We use char because int might match the return type of a gcc2
5893     builtin and then its argument prototype would still apply.  */
5894 char getrusage();
5895
5896 int main() {
5897
5898 /* The GNU C library defines this for functions which it implements
5899     to always fail with ENOSYS.  Some functions are actually named
5900     something starting with __ and the normal name is an alias.  */
5901 #if defined (__stub_getrusage) || defined (__stub___getrusage)
5902 choke me
5903 #else
5904 getrusage();
5905 #endif
5906
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_func_getrusage=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_func_getrusage=no"
5917 fi
5918 rm -f conftest*
5919 fi
5920
5921 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
5922   echo "$ac_t""yes" 1>&6
5923   cat >> confdefs.h <<\EOF
5924 #define HAVE_GETRUSAGE 1
5925 EOF
5926
5927 else
5928   echo "$ac_t""no" 1>&6
5929 GETRUSAGE='getrusage.o'
5930 fi
5931
5932
5933 echo $ac_n "checking for srandom""... $ac_c" 1>&6
5934 echo "configure:5935: checking for srandom" >&5
5935 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
5936   echo $ac_n "(cached) $ac_c" 1>&6
5937 else
5938   cat > conftest.$ac_ext <<EOF
5939 #line 5940 "configure"
5940 #include "confdefs.h"
5941 /* System header to define __stub macros and hopefully few prototypes,
5942     which can conflict with char srandom(); below.  */
5943 #include <assert.h>
5944 /* Override any gcc2 internal prototype to avoid an error.  */
5945 /* We use char because int might match the return type of a gcc2
5946     builtin and then its argument prototype would still apply.  */
5947 char srandom();
5948
5949 int main() {
5950
5951 /* The GNU C library defines this for functions which it implements
5952     to always fail with ENOSYS.  Some functions are actually named
5953     something starting with __ and the normal name is an alias.  */
5954 #if defined (__stub_srandom) || defined (__stub___srandom)
5955 choke me
5956 #else
5957 srandom();
5958 #endif
5959
5960 ; return 0; }
5961 EOF
5962 if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5963   rm -rf conftest*
5964   eval "ac_cv_func_srandom=yes"
5965 else
5966   echo "configure: failed program was:" >&5
5967   cat conftest.$ac_ext >&5
5968   rm -rf conftest*
5969   eval "ac_cv_func_srandom=no"
5970 fi
5971 rm -f conftest*
5972 fi
5973
5974 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
5975   echo "$ac_t""yes" 1>&6
5976   cat >> confdefs.h <<\EOF
5977 #define HAVE_SRANDOM 1
5978 EOF
5979
5980 else
5981   echo "$ac_t""no" 1>&6
5982 SRANDOM='srandom.o'
5983 fi
5984
5985
5986 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
5987 echo "configure:5988: checking for gethostname" >&5
5988 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
5989   echo $ac_n "(cached) $ac_c" 1>&6
5990 else
5991   cat > conftest.$ac_ext <<EOF
5992 #line 5993 "configure"
5993 #include "confdefs.h"
5994 /* System header to define __stub macros and hopefully few prototypes,
5995     which can conflict with char gethostname(); below.  */
5996 #include <assert.h>
5997 /* Override any gcc2 internal prototype to avoid an error.  */
5998 /* We use char because int might match the return type of a gcc2
5999     builtin and then its argument prototype would still apply.  */
6000 char gethostname();
6001
6002 int main() {
6003
6004 /* The GNU C library defines this for functions which it implements
6005     to always fail with ENOSYS.  Some functions are actually named
6006     something starting with __ and the normal name is an alias.  */
6007 #if defined (__stub_gethostname) || defined (__stub___gethostname)
6008 choke me
6009 #else
6010 gethostname();
6011 #endif
6012
6013 ; return 0; }
6014 EOF
6015 if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6016   rm -rf conftest*
6017   eval "ac_cv_func_gethostname=yes"
6018 else
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_func_gethostname=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026
6027 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
6028   echo "$ac_t""yes" 1>&6
6029   cat >> confdefs.h <<\EOF
6030 #define HAVE_GETHOSTNAME 1
6031 EOF
6032
6033 else
6034   echo "$ac_t""no" 1>&6
6035 GETHOSTNAME='gethostname.o'
6036 fi
6037
6038
6039 echo $ac_n "checking for random""... $ac_c" 1>&6
6040 echo "configure:6041: checking for random" >&5
6041 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
6042   echo $ac_n "(cached) $ac_c" 1>&6
6043 else
6044   cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 /* System header to define __stub macros and hopefully few prototypes,
6048     which can conflict with char random(); below.  */
6049 #include <assert.h>
6050 /* Override any gcc2 internal prototype to avoid an error.  */
6051 /* We use char because int might match the return type of a gcc2
6052     builtin and then its argument prototype would still apply.  */
6053 char random();
6054
6055 int main() {
6056
6057 /* The GNU C library defines this for functions which it implements
6058     to always fail with ENOSYS.  Some functions are actually named
6059     something starting with __ and the normal name is an alias.  */
6060 #if defined (__stub_random) || defined (__stub___random)
6061 choke me
6062 #else
6063 random();
6064 #endif
6065
6066 ; return 0; }
6067 EOF
6068 if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6069   rm -rf conftest*
6070   eval "ac_cv_func_random=yes"
6071 else
6072   echo "configure: failed program was:" >&5
6073   cat conftest.$ac_ext >&5
6074   rm -rf conftest*
6075   eval "ac_cv_func_random=no"
6076 fi
6077 rm -f conftest*
6078 fi
6079
6080 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082   cat >> confdefs.h <<\EOF
6083 #define HAVE_RANDOM 1
6084 EOF
6085
6086 else
6087   echo "$ac_t""no" 1>&6
6088 MISSING_RANDOM='random.o'
6089 fi
6090
6091
6092 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
6093 echo "configure:6094: checking for inet_aton" >&5
6094 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
6095   echo $ac_n "(cached) $ac_c" 1>&6
6096 else
6097   cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 /* System header to define __stub macros and hopefully few prototypes,
6101     which can conflict with char inet_aton(); below.  */
6102 #include <assert.h>
6103 /* Override any gcc2 internal prototype to avoid an error.  */
6104 /* We use char because int might match the return type of a gcc2
6105     builtin and then its argument prototype would still apply.  */
6106 char inet_aton();
6107
6108 int main() {
6109
6110 /* The GNU C library defines this for functions which it implements
6111     to always fail with ENOSYS.  Some functions are actually named
6112     something starting with __ and the normal name is an alias.  */
6113 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
6114 choke me
6115 #else
6116 inet_aton();
6117 #endif
6118
6119 ; return 0; }
6120 EOF
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6122   rm -rf conftest*
6123   eval "ac_cv_func_inet_aton=yes"
6124 else
6125   echo "configure: failed program was:" >&5
6126   cat conftest.$ac_ext >&5
6127   rm -rf conftest*
6128   eval "ac_cv_func_inet_aton=no"
6129 fi
6130 rm -f conftest*
6131 fi
6132
6133 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
6134   echo "$ac_t""yes" 1>&6
6135   cat >> confdefs.h <<\EOF
6136 #define HAVE_INET_ATON 1
6137 EOF
6138
6139 else
6140   echo "$ac_t""no" 1>&6
6141 INET_ATON='inet_aton.o'
6142 fi
6143
6144
6145 echo $ac_n "checking for strerror""... $ac_c" 1>&6
6146 echo "configure:6147: checking for strerror" >&5
6147 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
6148   echo $ac_n "(cached) $ac_c" 1>&6
6149 else
6150   cat > conftest.$ac_ext <<EOF
6151 #line 6152 "configure"
6152 #include "confdefs.h"
6153 /* System header to define __stub macros and hopefully few prototypes,
6154     which can conflict with char strerror(); below.  */
6155 #include <assert.h>
6156 /* Override any gcc2 internal prototype to avoid an error.  */
6157 /* We use char because int might match the return type of a gcc2
6158     builtin and then its argument prototype would still apply.  */
6159 char strerror();
6160
6161 int main() {
6162
6163 /* The GNU C library defines this for functions which it implements
6164     to always fail with ENOSYS.  Some functions are actually named
6165     something starting with __ and the normal name is an alias.  */
6166 #if defined (__stub_strerror) || defined (__stub___strerror)
6167 choke me
6168 #else
6169 strerror();
6170 #endif
6171
6172 ; return 0; }
6173 EOF
6174 if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6175   rm -rf conftest*
6176   eval "ac_cv_func_strerror=yes"
6177 else
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   eval "ac_cv_func_strerror=no"
6182 fi
6183 rm -f conftest*
6184 fi
6185
6186 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
6187   echo "$ac_t""yes" 1>&6
6188   cat >> confdefs.h <<\EOF
6189 #define HAVE_STRERROR 1
6190 EOF
6191
6192 else
6193   echo "$ac_t""no" 1>&6
6194 STRERROR='strerror.o'
6195 fi
6196
6197
6198 echo $ac_n "checking for strdup""... $ac_c" 1>&6
6199 echo "configure:6200: checking for strdup" >&5
6200 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
6201   echo $ac_n "(cached) $ac_c" 1>&6
6202 else
6203   cat > conftest.$ac_ext <<EOF
6204 #line 6205 "configure"
6205 #include "confdefs.h"
6206 /* System header to define __stub macros and hopefully few prototypes,
6207     which can conflict with char strdup(); below.  */
6208 #include <assert.h>
6209 /* Override any gcc2 internal prototype to avoid an error.  */
6210 /* We use char because int might match the return type of a gcc2
6211     builtin and then its argument prototype would still apply.  */
6212 char strdup();
6213
6214 int main() {
6215
6216 /* The GNU C library defines this for functions which it implements
6217     to always fail with ENOSYS.  Some functions are actually named
6218     something starting with __ and the normal name is an alias.  */
6219 #if defined (__stub_strdup) || defined (__stub___strdup)
6220 choke me
6221 #else
6222 strdup();
6223 #endif
6224
6225 ; return 0; }
6226 EOF
6227 if { (eval echo configure:6228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6228   rm -rf conftest*
6229   eval "ac_cv_func_strdup=yes"
6230 else
6231   echo "configure: failed program was:" >&5
6232   cat conftest.$ac_ext >&5
6233   rm -rf conftest*
6234   eval "ac_cv_func_strdup=no"
6235 fi
6236 rm -f conftest*
6237 fi
6238
6239 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241   cat >> confdefs.h <<\EOF
6242 #define HAVE_STRDUP 1
6243 EOF
6244
6245 else
6246   echo "$ac_t""no" 1>&6
6247 STRDUP='../../utils/strdup.o'
6248 fi
6249
6250
6251 echo $ac_n "checking for strtol""... $ac_c" 1>&6
6252 echo "configure:6253: checking for strtol" >&5
6253 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
6254   echo $ac_n "(cached) $ac_c" 1>&6
6255 else
6256   cat > conftest.$ac_ext <<EOF
6257 #line 6258 "configure"
6258 #include "confdefs.h"
6259 /* System header to define __stub macros and hopefully few prototypes,
6260     which can conflict with char strtol(); below.  */
6261 #include <assert.h>
6262 /* Override any gcc2 internal prototype to avoid an error.  */
6263 /* We use char because int might match the return type of a gcc2
6264     builtin and then its argument prototype would still apply.  */
6265 char strtol();
6266
6267 int main() {
6268
6269 /* The GNU C library defines this for functions which it implements
6270     to always fail with ENOSYS.  Some functions are actually named
6271     something starting with __ and the normal name is an alias.  */
6272 #if defined (__stub_strtol) || defined (__stub___strtol)
6273 choke me
6274 #else
6275 strtol();
6276 #endif
6277
6278 ; return 0; }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6281   rm -rf conftest*
6282   eval "ac_cv_func_strtol=yes"
6283 else
6284   echo "configure: failed program was:" >&5
6285   cat conftest.$ac_ext >&5
6286   rm -rf conftest*
6287   eval "ac_cv_func_strtol=no"
6288 fi
6289 rm -f conftest*
6290 fi
6291
6292 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
6293   echo "$ac_t""yes" 1>&6
6294   cat >> confdefs.h <<\EOF
6295 #define HAVE_STRTOL 1
6296 EOF
6297
6298 else
6299   echo "$ac_t""no" 1>&6
6300 STRTOL='strtol.o'
6301 fi
6302
6303
6304 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
6305 echo "configure:6306: checking for strtoul" >&5
6306 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   cat > conftest.$ac_ext <<EOF
6310 #line 6311 "configure"
6311 #include "confdefs.h"
6312 /* System header to define __stub macros and hopefully few prototypes,
6313     which can conflict with char strtoul(); below.  */
6314 #include <assert.h>
6315 /* Override any gcc2 internal prototype to avoid an error.  */
6316 /* We use char because int might match the return type of a gcc2
6317     builtin and then its argument prototype would still apply.  */
6318 char strtoul();
6319
6320 int main() {
6321
6322 /* The GNU C library defines this for functions which it implements
6323     to always fail with ENOSYS.  Some functions are actually named
6324     something starting with __ and the normal name is an alias.  */
6325 #if defined (__stub_strtoul) || defined (__stub___strtoul)
6326 choke me
6327 #else
6328 strtoul();
6329 #endif
6330
6331 ; return 0; }
6332 EOF
6333 if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6334   rm -rf conftest*
6335   eval "ac_cv_func_strtoul=yes"
6336 else
6337   echo "configure: failed program was:" >&5
6338   cat conftest.$ac_ext >&5
6339   rm -rf conftest*
6340   eval "ac_cv_func_strtoul=no"
6341 fi
6342 rm -f conftest*
6343 fi
6344
6345 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
6346   echo "$ac_t""yes" 1>&6
6347   cat >> confdefs.h <<\EOF
6348 #define HAVE_STRTOUL 1
6349 EOF
6350
6351 else
6352   echo "$ac_t""no" 1>&6
6353 STRTOUL='strtoul.o'
6354 fi
6355
6356
6357 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
6358 echo "configure:6359: checking for strcasecmp" >&5
6359 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
6360   echo $ac_n "(cached) $ac_c" 1>&6
6361 else
6362   cat > conftest.$ac_ext <<EOF
6363 #line 6364 "configure"
6364 #include "confdefs.h"
6365 /* System header to define __stub macros and hopefully few prototypes,
6366     which can conflict with char strcasecmp(); below.  */
6367 #include <assert.h>
6368 /* Override any gcc2 internal prototype to avoid an error.  */
6369 /* We use char because int might match the return type of a gcc2
6370     builtin and then its argument prototype would still apply.  */
6371 char strcasecmp();
6372
6373 int main() {
6374
6375 /* The GNU C library defines this for functions which it implements
6376     to always fail with ENOSYS.  Some functions are actually named
6377     something starting with __ and the normal name is an alias.  */
6378 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
6379 choke me
6380 #else
6381 strcasecmp();
6382 #endif
6383
6384 ; return 0; }
6385 EOF
6386 if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6387   rm -rf conftest*
6388   eval "ac_cv_func_strcasecmp=yes"
6389 else
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -rf conftest*
6393   eval "ac_cv_func_strcasecmp=no"
6394 fi
6395 rm -f conftest*
6396 fi
6397
6398 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
6399   echo "$ac_t""yes" 1>&6
6400   cat >> confdefs.h <<\EOF
6401 #define HAVE_STRCASECMP 1
6402 EOF
6403
6404 else
6405   echo "$ac_t""no" 1>&6
6406 STRCASECMP='strcasecmp.o'
6407 fi
6408
6409
6410 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
6411 echo "configure:6412: checking for cbrt" >&5
6412 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
6413   echo $ac_n "(cached) $ac_c" 1>&6
6414 else
6415   cat > conftest.$ac_ext <<EOF
6416 #line 6417 "configure"
6417 #include "confdefs.h"
6418 /* System header to define __stub macros and hopefully few prototypes,
6419     which can conflict with char cbrt(); below.  */
6420 #include <assert.h>
6421 /* Override any gcc2 internal prototype to avoid an error.  */
6422 /* We use char because int might match the return type of a gcc2
6423     builtin and then its argument prototype would still apply.  */
6424 char cbrt();
6425
6426 int main() {
6427
6428 /* The GNU C library defines this for functions which it implements
6429     to always fail with ENOSYS.  Some functions are actually named
6430     something starting with __ and the normal name is an alias.  */
6431 #if defined (__stub_cbrt) || defined (__stub___cbrt)
6432 choke me
6433 #else
6434 cbrt();
6435 #endif
6436
6437 ; return 0; }
6438 EOF
6439 if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440   rm -rf conftest*
6441   eval "ac_cv_func_cbrt=yes"
6442 else
6443   echo "configure: failed program was:" >&5
6444   cat conftest.$ac_ext >&5
6445   rm -rf conftest*
6446   eval "ac_cv_func_cbrt=no"
6447 fi
6448 rm -f conftest*
6449 fi
6450
6451 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
6452   echo "$ac_t""yes" 1>&6
6453   cat >> confdefs.h <<\EOF
6454 #define HAVE_CBRT 1
6455 EOF
6456
6457 else
6458   echo "$ac_t""no" 1>&6
6459 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
6460 echo "configure:6461: checking for cbrt in -lm" >&5
6461 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
6462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6463   echo $ac_n "(cached) $ac_c" 1>&6
6464 else
6465   ac_save_LIBS="$LIBS"
6466 LIBS="-lm  $LIBS"
6467 cat > conftest.$ac_ext <<EOF
6468 #line 6469 "configure"
6469 #include "confdefs.h"
6470 /* Override any gcc2 internal prototype to avoid an error.  */
6471 /* We use char because int might match the return type of a gcc2
6472     builtin and then its argument prototype would still apply.  */
6473 char cbrt();
6474
6475 int main() {
6476 cbrt()
6477 ; return 0; }
6478 EOF
6479 if { (eval echo configure:6480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6480   rm -rf conftest*
6481   eval "ac_cv_lib_$ac_lib_var=yes"
6482 else
6483   echo "configure: failed program was:" >&5
6484   cat conftest.$ac_ext >&5
6485   rm -rf conftest*
6486   eval "ac_cv_lib_$ac_lib_var=no"
6487 fi
6488 rm -f conftest*
6489 LIBS="$ac_save_LIBS"
6490
6491 fi
6492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6493   echo "$ac_t""yes" 1>&6
6494   cat >> confdefs.h <<\EOF
6495 #define HAVE_CBRT 1
6496 EOF
6497
6498 else
6499   echo "$ac_t""no" 1>&6
6500 fi
6501
6502 fi
6503
6504
6505 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
6506 # this hackery with HPUXMATHLIB allows us to cope.
6507 HPUXMATHLIB=""
6508 case $host_cpu in
6509   hppa1.1) 
6510         if [ -r /lib/pa1.1/libm.a ] ; then
6511             HPUXMATHLIB="-L /lib/pa1.1 -lm"
6512         fi ;;
6513 esac
6514
6515
6516 echo $ac_n "checking for rint""... $ac_c" 1>&6
6517 echo "configure:6518: checking for rint" >&5
6518 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
6519   echo $ac_n "(cached) $ac_c" 1>&6
6520 else
6521   cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524 /* System header to define __stub macros and hopefully few prototypes,
6525     which can conflict with char rint(); below.  */
6526 #include <assert.h>
6527 /* Override any gcc2 internal prototype to avoid an error.  */
6528 /* We use char because int might match the return type of a gcc2
6529     builtin and then its argument prototype would still apply.  */
6530 char rint();
6531
6532 int main() {
6533
6534 /* The GNU C library defines this for functions which it implements
6535     to always fail with ENOSYS.  Some functions are actually named
6536     something starting with __ and the normal name is an alias.  */
6537 #if defined (__stub_rint) || defined (__stub___rint)
6538 choke me
6539 #else
6540 rint();
6541 #endif
6542
6543 ; return 0; }
6544 EOF
6545 if { (eval echo configure:6546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6546   rm -rf conftest*
6547   eval "ac_cv_func_rint=yes"
6548 else
6549   echo "configure: failed program was:" >&5
6550   cat conftest.$ac_ext >&5
6551   rm -rf conftest*
6552   eval "ac_cv_func_rint=no"
6553 fi
6554 rm -f conftest*
6555 fi
6556
6557 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
6558   echo "$ac_t""yes" 1>&6
6559   cat >> confdefs.h <<\EOF
6560 #define HAVE_RINT 1
6561 EOF
6562
6563 else
6564   echo "$ac_t""no" 1>&6
6565 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
6566 echo "configure:6567: checking for rint in -lm" >&5
6567 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
6568 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6569   echo $ac_n "(cached) $ac_c" 1>&6
6570 else
6571   ac_save_LIBS="$LIBS"
6572 LIBS="-lm $HPUXMATHLIB $LIBS"
6573 cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 /* We use char because int might match the return type of a gcc2
6578     builtin and then its argument prototype would still apply.  */
6579 char rint();
6580
6581 int main() {
6582 rint()
6583 ; return 0; }
6584 EOF
6585 if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6586   rm -rf conftest*
6587   eval "ac_cv_lib_$ac_lib_var=yes"
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   eval "ac_cv_lib_$ac_lib_var=no"
6593 fi
6594 rm -f conftest*
6595 LIBS="$ac_save_LIBS"
6596
6597 fi
6598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6599   echo "$ac_t""yes" 1>&6
6600   cat >> confdefs.h <<\EOF
6601 #define HAVE_RINT 1
6602 EOF
6603
6604 else
6605   echo "$ac_t""no" 1>&6
6606 fi
6607
6608 fi
6609
6610
6611
6612 # Readline versions < 2.1 don't have rl_completion_append_character
6613 echo $ac_n "checking for rl_completion_append_character""... $ac_c" 1>&6
6614 echo "configure:6615: checking for rl_completion_append_character" >&5
6615 cat > conftest.$ac_ext <<EOF
6616 #line 6617 "configure"
6617 #include "confdefs.h"
6618 #include <stdio.h>
6619 #ifdef HAVE_READLINE_H
6620 # include <readline.h>
6621 #endif
6622 #ifdef HAVE_READLINE_READLINE_H
6623 # include <readline/readline.h>
6624 #endif
6625 int main() {
6626 rl_completion_append_character = 'x';
6627 ; return 0; }
6628 EOF
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6630   rm -rf conftest*
6631   echo "$ac_t""yes" 1>&6
6632 cat >> confdefs.h <<\EOF
6633 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
6634 EOF
6635
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   echo "$ac_t""no" 1>&6
6641 fi
6642 rm -f conftest*
6643
6644
6645 # Check whether readline's filename_completion_function is declared.
6646 # Some prehistoric versions of readline, in particular those shipped
6647 # with earlier Cygwins don't have this declared, although it's in the
6648 # library.
6649 echo $ac_n "checking whether filename_completion_function is declared""... $ac_c" 1>&6
6650 echo "configure:6651: checking whether filename_completion_function is declared" >&5
6651 if test "$ac_cv_header_readline_h" = yes; then
6652     _readline_header='readline.h'
6653 elif test "$ac_cv_header_readline_readline_h" = yes; then
6654     _readline_header='readline/readline.h'
6655 else
6656     _readline_header='xxx'
6657 fi
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 #include <$_readline_header>
6662 EOF
6663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6664   egrep "filename_completion_function" >/dev/null 2>&1; then
6665   rm -rf conftest*
6666   cat >> confdefs.h <<\EOF
6667 #define HAVE_FILENAME_COMPLETION_FUNCTION_DECL 1
6668 EOF
6669
6670 echo "$ac_t""yes" 1>&6
6671 else
6672   rm -rf conftest*
6673   echo "$ac_t""no" 1>&6
6674 fi
6675 rm -f conftest*
6676
6677
6678
6679
6680 echo $ac_n "checking for finite""... $ac_c" 1>&6
6681 echo "configure:6682: checking for finite" >&5
6682 cat > conftest.$ac_ext <<EOF
6683 #line 6684 "configure"
6684 #include "confdefs.h"
6685 #include <math.h>
6686 int main() {
6687 int dummy=finite(1.0);
6688 ; return 0; }
6689 EOF
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6691   rm -rf conftest*
6692   cat >> confdefs.h <<\EOF
6693 #define HAVE_FINITE 1
6694 EOF
6695  echo "$ac_t""yes" 1>&6
6696 else
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -rf conftest*
6700   echo "$ac_t""no" 1>&6
6701 fi
6702 rm -f conftest*
6703
6704 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
6705 echo "configure:6706: checking for sigsetjmp" >&5
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 #include <setjmp.h>
6710 int main() {
6711 sigjmp_buf x; sigsetjmp(x, 1);
6712 ; return 0; }
6713 EOF
6714 if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6715   rm -rf conftest*
6716   cat >> confdefs.h <<\EOF
6717 #define HAVE_SIGSETJMP 1
6718 EOF
6719  echo "$ac_t""yes" 1>&6
6720 else
6721   echo "configure: failed program was:" >&5
6722   cat conftest.$ac_ext >&5
6723   rm -rf conftest*
6724   echo "$ac_t""no" 1>&6
6725 fi
6726 rm -f conftest*
6727
6728
6729 # Check whether --enable-syslog was given
6730 if test x"${enable_syslog+set}" = xset; then
6731   case $enable_syslog in
6732     yes)
6733       echo $ac_n "checking for syslog""... $ac_c" 1>&6
6734 echo "configure:6735: checking for syslog" >&5
6735 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then
6736   echo $ac_n "(cached) $ac_c" 1>&6
6737 else
6738   cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 /* System header to define __stub macros and hopefully few prototypes,
6742     which can conflict with char syslog(); below.  */
6743 #include <assert.h>
6744 /* Override any gcc2 internal prototype to avoid an error.  */
6745 /* We use char because int might match the return type of a gcc2
6746     builtin and then its argument prototype would still apply.  */
6747 char syslog();
6748
6749 int main() {
6750
6751 /* The GNU C library defines this for functions which it implements
6752     to always fail with ENOSYS.  Some functions are actually named
6753     something starting with __ and the normal name is an alias.  */
6754 #if defined (__stub_syslog) || defined (__stub___syslog)
6755 choke me
6756 #else
6757 syslog();
6758 #endif
6759
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_func_syslog=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_func_syslog=no"
6770 fi
6771 rm -f conftest*
6772 fi
6773
6774 if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then
6775   echo "$ac_t""yes" 1>&6
6776   cat >> confdefs.h <<\EOF
6777 #define ENABLE_SYSLOG 1
6778 EOF
6779
6780 else
6781   echo "$ac_t""no" 1>&6
6782 { echo "configure: error: no syslog interface found" 1>&2; exit 1; }
6783 fi
6784
6785       ;;
6786     no)
6787       :
6788       ;;
6789     *)
6790       enableval=$enable_syslog
6791       { echo "configure: error: no argument expected for --enable-syslog option" 1>&2; exit 1; }
6792       ;;
6793   esac # $enable_syslog
6794 else
6795   enable_syslog=no
6796
6797 fi
6798
6799
6800 echo $ac_n "checking for optreset""... $ac_c" 1>&6
6801 echo "configure:6802: checking for optreset" >&5
6802 if eval "test \"`echo '$''{'pgac_cv_var_int_optreset'+set}'`\" = set"; then
6803   echo $ac_n "(cached) $ac_c" 1>&6
6804 else
6805   cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808 #include <unistd.h>
6809 int main() {
6810 extern int optreset; optreset = 1;
6811 ; return 0; }
6812 EOF
6813 if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6814   rm -rf conftest*
6815   pgac_cv_var_int_optreset=yes
6816 else
6817   echo "configure: failed program was:" >&5
6818   cat conftest.$ac_ext >&5
6819   rm -rf conftest*
6820   pgac_cv_var_int_optreset=no
6821 fi
6822 rm -f conftest*
6823 fi
6824
6825 echo "$ac_t""$pgac_cv_var_int_optreset" 1>&6
6826 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
6827   cat >> confdefs.h <<\EOF
6828 #define HAVE_INT_OPTRESET 1
6829 EOF
6830
6831 fi
6832
6833
6834 # This test makes sure that run tests work at all.  Sometimes a shared
6835 # library is found by the linker, but the runtime linker can't find it.
6836 # This check should come after all modifications of compiler or linker
6837 # variables, and before any other run tests.
6838 echo $ac_n "checking test program""... $ac_c" 1>&6
6839 echo "configure:6840: checking test program" >&5
6840 if test "$cross_compiling" = yes; then
6841   echo "$ac_t""cross-compiling" 1>&6
6842 else
6843   cat > conftest.$ac_ext <<EOF
6844 #line 6845 "configure"
6845 #include "confdefs.h"
6846 int main() { return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6849 then
6850   echo "$ac_t""ok" 1>&6
6851 else
6852   echo "configure: failed program was:" >&5
6853   cat conftest.$ac_ext >&5
6854   rm -fr conftest*
6855   echo "$ac_t""failed" 1>&6
6856 { echo "configure: error: 
6857 *** Could not execute a simple test program.  This may be a problem
6858 *** related to locating shared libraries.  Check the file 'config.log'
6859 *** for the exact reason." 1>&2; exit 1; }
6860 fi
6861 rm -fr conftest*
6862 fi
6863
6864
6865
6866
6867 echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6
6868 echo "configure:6869: checking whether long int is 64 bits" >&5
6869 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872   if test "$cross_compiling" = yes; then
6873   pgac_cv_type_long_int_64=no
6874 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6875 else
6876   cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879 typedef long int int64;
6880
6881 /*
6882  * These are globals to discourage the compiler from folding all the
6883  * arithmetic tests down to compile-time constants.
6884  */
6885 int64 a = 20000001;
6886 int64 b = 40000005;
6887
6888 int does_int64_work()
6889 {
6890   int64 c,d;
6891
6892   if (sizeof(int64) != 8)
6893     return 0;                   /* definitely not the right size */
6894
6895   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6896   c = a * b;
6897   d = (c + b) / b;
6898   if (d != a+1)
6899     return 0;
6900   return 1;
6901 }
6902 main() {
6903   exit(! does_int64_work());
6904 }
6905 EOF
6906 if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6907 then
6908   pgac_cv_type_long_int_64=yes
6909 else
6910   echo "configure: failed program was:" >&5
6911   cat conftest.$ac_ext >&5
6912   rm -fr conftest*
6913   pgac_cv_type_long_int_64=no
6914 fi
6915 rm -fr conftest*
6916 fi
6917
6918 fi
6919
6920 echo "$ac_t""$pgac_cv_type_long_int_64" 1>&6
6921
6922 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
6923 if test x"$pgac_cv_type_long_int_64" = xyes ; then
6924   cat >> confdefs.h <<\EOF
6925 #define HAVE_LONG_INT_64 
6926 EOF
6927
6928 fi
6929
6930
6931 if test x"$HAVE_LONG_INT_64" = x"no" ; then
6932   echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6
6933 echo "configure:6934: checking whether long long int is 64 bits" >&5
6934 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then
6935   echo $ac_n "(cached) $ac_c" 1>&6
6936 else
6937   if test "$cross_compiling" = yes; then
6938   pgac_cv_type_long_long_int_64=no
6939 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6940 else
6941   cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 typedef long long int int64;
6945
6946 /*
6947  * These are globals to discourage the compiler from folding all the
6948  * arithmetic tests down to compile-time constants.
6949  */
6950 int64 a = 20000001;
6951 int64 b = 40000005;
6952
6953 int does_int64_work()
6954 {
6955   int64 c,d;
6956
6957   if (sizeof(int64) != 8)
6958     return 0;                   /* definitely not the right size */
6959
6960   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6961   c = a * b;
6962   d = (c + b) / b;
6963   if (d != a+1)
6964     return 0;
6965   return 1;
6966 }
6967 main() {
6968   exit(! does_int64_work());
6969 }
6970 EOF
6971 if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6972 then
6973   pgac_cv_type_long_long_int_64=yes
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977   rm -fr conftest*
6978   pgac_cv_type_long_long_int_64=no
6979 fi
6980 rm -fr conftest*
6981 fi
6982
6983 fi
6984
6985 echo "$ac_t""$pgac_cv_type_long_long_int_64" 1>&6
6986
6987 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
6988 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
6989   cat >> confdefs.h <<\EOF
6990 #define HAVE_LONG_LONG_INT_64 
6991 EOF
6992
6993 fi
6994
6995 fi
6996
6997
6998
6999 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7000   cat > conftest.$ac_ext <<EOF
7001 #line 7002 "configure"
7002 #include "confdefs.h"
7003
7004 #define INT64CONST(x)  x##LL
7005 long long int foo = INT64CONST(0x1234567890123456);
7006
7007 int main() {
7008
7009 ; return 0; }
7010 EOF
7011 if { (eval echo configure:7012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7012   rm -rf conftest*
7013   cat >> confdefs.h <<\EOF
7014 #define HAVE_LL_CONSTANTS 1
7015 EOF
7016
7017 else
7018   echo "configure: failed program was:" >&5
7019   cat conftest.$ac_ext >&5
7020 fi
7021 rm -f conftest*
7022 fi
7023
7024
7025
7026 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7027   if [ x$SNPRINTF = x ] ; then
7028     echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6
7029 echo "configure:7030: checking whether snprintf handles 'long long int' as %lld" >&5
7030     if test "$cross_compiling" = yes; then
7031    echo "$ac_t""assuming not on target machine" 1>&6
7032         # Force usage of our own snprintf, since we cannot test foreign snprintf
7033         SNPRINTF='snprintf.o'
7034         INT64_FORMAT='"%lld"'
7035   
7036 else
7037   cat > conftest.$ac_ext <<EOF
7038 #line 7039 "configure"
7039 #include "confdefs.h"
7040 #include <stdio.h>
7041 typedef long long int int64;
7042 #define INT64_FORMAT "%lld"
7043
7044 int64 a = 20000001;
7045 int64 b = 40000005;
7046
7047 int does_int64_snprintf_work()
7048 {
7049   int64 c;
7050   char buf[100];
7051
7052   if (sizeof(int64) != 8)
7053     return 0;                   /* doesn't look like the right size */
7054
7055   c = a * b;
7056   snprintf(buf, 100, INT64_FORMAT, c);
7057   if (strcmp(buf, "800000140000005") != 0)
7058     return 0;                   /* either multiply or snprintf is busted */
7059   return 1;
7060 }
7061 main() {
7062   exit(! does_int64_snprintf_work());
7063 }
7064 EOF
7065 if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7066 then
7067    echo "$ac_t""yes" 1>&6
7068           INT64_FORMAT='"%lld"'
7069         
7070 else
7071   echo "configure: failed program was:" >&5
7072   cat conftest.$ac_ext >&5
7073   rm -fr conftest*
7074    echo "$ac_t""no" 1>&6
7075     echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6
7076 echo "configure:7077: checking whether snprintf handles 'long long int' as %qd" >&5 
7077     if test "$cross_compiling" = yes; then
7078    echo "$ac_t""assuming not on target machine" 1>&6
7079         # Force usage of our own snprintf, since we cannot test foreign snprintf
7080         SNPRINTF='snprintf.o'
7081         INT64_FORMAT='"%lld"'
7082   
7083 else
7084   cat > conftest.$ac_ext <<EOF
7085 #line 7086 "configure"
7086 #include "confdefs.h"
7087 #include <stdio.h>
7088 typedef long long int int64;
7089 #define INT64_FORMAT "%qd"
7090    
7091 int64 a = 20000001;
7092 int64 b = 40000005;
7093    
7094 int does_int64_snprintf_work()
7095 {  
7096   int64 c;
7097   char buf[100];
7098
7099   if (sizeof(int64) != 8)
7100     return 0;     /* doesn't look like the right size */
7101
7102   c = a * b;
7103   snprintf(buf, 100, INT64_FORMAT, c);
7104   if (strcmp(buf, "800000140000005") != 0)
7105     return 0;     /* either multiply or snprintf is busted */
7106   return 1;
7107 }
7108 main() {
7109   exit(! does_int64_snprintf_work());
7110 }
7111 EOF
7112 if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7113 then
7114    echo "$ac_t""yes" 1>&6
7115     INT64_FORMAT='"%qd"'
7116   
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -fr conftest*
7121    echo "$ac_t""no" 1>&6
7122         # Force usage of our own snprintf, since system snprintf is broken
7123         SNPRINTF='snprintf.o'
7124         INT64_FORMAT='"%lld"'
7125   
7126 fi
7127 rm -fr conftest*
7128 fi
7129  
7130 fi
7131 rm -fr conftest*
7132 fi
7133
7134   else
7135     # here if we previously decided we needed to use our own snprintf
7136     INT64_FORMAT='"%lld"'
7137   fi
7138 else
7139   # Here if we are not using 'long long int' at all
7140   INT64_FORMAT='"%ld"'
7141 fi
7142
7143 cat >> confdefs.h <<EOF
7144 #define INT64_FORMAT $INT64_FORMAT
7145 EOF
7146
7147
7148
7149 for ac_func in strtoll strtoq
7150 do
7151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7152 echo "configure:7153: checking for $ac_func" >&5
7153 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7154   echo $ac_n "(cached) $ac_c" 1>&6
7155 else
7156   cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 /* System header to define __stub macros and hopefully few prototypes,
7160     which can conflict with char $ac_func(); below.  */
7161 #include <assert.h>
7162 /* Override any gcc2 internal prototype to avoid an error.  */
7163 /* We use char because int might match the return type of a gcc2
7164     builtin and then its argument prototype would still apply.  */
7165 char $ac_func();
7166
7167 int main() {
7168
7169 /* The GNU C library defines this for functions which it implements
7170     to always fail with ENOSYS.  Some functions are actually named
7171     something starting with __ and the normal name is an alias.  */
7172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7173 choke me
7174 #else
7175 $ac_func();
7176 #endif
7177
7178 ; return 0; }
7179 EOF
7180 if { (eval echo configure:7181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7181   rm -rf conftest*
7182   eval "ac_cv_func_$ac_func=yes"
7183 else
7184   echo "configure: failed program was:" >&5
7185   cat conftest.$ac_ext >&5
7186   rm -rf conftest*
7187   eval "ac_cv_func_$ac_func=no"
7188 fi
7189 rm -f conftest*
7190 fi
7191
7192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7193   echo "$ac_t""yes" 1>&6
7194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7195   cat >> confdefs.h <<EOF
7196 #define $ac_tr_func 1
7197 EOF
7198  break
7199 else
7200   echo "$ac_t""no" 1>&6
7201 fi
7202 done
7203
7204 for ac_func in strtoull strtouq
7205 do
7206 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7207 echo "configure:7208: checking for $ac_func" >&5
7208 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7209   echo $ac_n "(cached) $ac_c" 1>&6
7210 else
7211   cat > conftest.$ac_ext <<EOF
7212 #line 7213 "configure"
7213 #include "confdefs.h"
7214 /* System header to define __stub macros and hopefully few prototypes,
7215     which can conflict with char $ac_func(); below.  */
7216 #include <assert.h>
7217 /* Override any gcc2 internal prototype to avoid an error.  */
7218 /* We use char because int might match the return type of a gcc2
7219     builtin and then its argument prototype would still apply.  */
7220 char $ac_func();
7221
7222 int main() {
7223
7224 /* The GNU C library defines this for functions which it implements
7225     to always fail with ENOSYS.  Some functions are actually named
7226     something starting with __ and the normal name is an alias.  */
7227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7228 choke me
7229 #else
7230 $ac_func();
7231 #endif
7232
7233 ; return 0; }
7234 EOF
7235 if { (eval echo configure:7236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7236   rm -rf conftest*
7237   eval "ac_cv_func_$ac_func=yes"
7238 else
7239   echo "configure: failed program was:" >&5
7240   cat conftest.$ac_ext >&5
7241   rm -rf conftest*
7242   eval "ac_cv_func_$ac_func=no"
7243 fi
7244 rm -f conftest*
7245 fi
7246
7247 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7248   echo "$ac_t""yes" 1>&6
7249     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7250   cat >> confdefs.h <<EOF
7251 #define $ac_tr_func 1
7252 EOF
7253  break
7254 else
7255   echo "$ac_t""no" 1>&6
7256 fi
7257 done
7258
7259
7260 echo $ac_n "checking for atexit""... $ac_c" 1>&6
7261 echo "configure:7262: checking for atexit" >&5
7262 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
7263   echo $ac_n "(cached) $ac_c" 1>&6
7264 else
7265   cat > conftest.$ac_ext <<EOF
7266 #line 7267 "configure"
7267 #include "confdefs.h"
7268 /* System header to define __stub macros and hopefully few prototypes,
7269     which can conflict with char atexit(); below.  */
7270 #include <assert.h>
7271 /* Override any gcc2 internal prototype to avoid an error.  */
7272 /* We use char because int might match the return type of a gcc2
7273     builtin and then its argument prototype would still apply.  */
7274 char atexit();
7275
7276 int main() {
7277
7278 /* The GNU C library defines this for functions which it implements
7279     to always fail with ENOSYS.  Some functions are actually named
7280     something starting with __ and the normal name is an alias.  */
7281 #if defined (__stub_atexit) || defined (__stub___atexit)
7282 choke me
7283 #else
7284 atexit();
7285 #endif
7286
7287 ; return 0; }
7288 EOF
7289 if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7290   rm -rf conftest*
7291   eval "ac_cv_func_atexit=yes"
7292 else
7293   echo "configure: failed program was:" >&5
7294   cat conftest.$ac_ext >&5
7295   rm -rf conftest*
7296   eval "ac_cv_func_atexit=no"
7297 fi
7298 rm -f conftest*
7299 fi
7300
7301 if eval "test \"`echo '$ac_cv_func_'atexit`\" = yes"; then
7302   echo "$ac_t""yes" 1>&6
7303   cat >> confdefs.h <<\EOF
7304 #define HAVE_ATEXIT 1
7305 EOF
7306
7307 else
7308   echo "$ac_t""no" 1>&6
7309 for ac_func in on_exit
7310 do
7311 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7312 echo "configure:7313: checking for $ac_func" >&5
7313 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7314   echo $ac_n "(cached) $ac_c" 1>&6
7315 else
7316   cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 /* System header to define __stub macros and hopefully few prototypes,
7320     which can conflict with char $ac_func(); below.  */
7321 #include <assert.h>
7322 /* Override any gcc2 internal prototype to avoid an error.  */
7323 /* We use char because int might match the return type of a gcc2
7324     builtin and then its argument prototype would still apply.  */
7325 char $ac_func();
7326
7327 int main() {
7328
7329 /* The GNU C library defines this for functions which it implements
7330     to always fail with ENOSYS.  Some functions are actually named
7331     something starting with __ and the normal name is an alias.  */
7332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7333 choke me
7334 #else
7335 $ac_func();
7336 #endif
7337
7338 ; return 0; }
7339 EOF
7340 if { (eval echo configure:7341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7341   rm -rf conftest*
7342   eval "ac_cv_func_$ac_func=yes"
7343 else
7344   echo "configure: failed program was:" >&5
7345   cat conftest.$ac_ext >&5
7346   rm -rf conftest*
7347   eval "ac_cv_func_$ac_func=no"
7348 fi
7349 rm -f conftest*
7350 fi
7351
7352 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7353   echo "$ac_t""yes" 1>&6
7354     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7355   cat >> confdefs.h <<EOF
7356 #define $ac_tr_func 1
7357 EOF
7358  cat >> confdefs.h <<\EOF
7359 #define HAVE_ON_EXIT 1
7360 EOF
7361
7362 else
7363   echo "$ac_t""no" 1>&6
7364 { echo "configure: error: atexi() nor on_exit() found" 1>&2; exit 1; }
7365 fi
7366 done
7367
7368 fi
7369
7370
7371
7372 echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
7373 echo "configure:7374: checking size of unsigned long" >&5
7374 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
7375   echo $ac_n "(cached) $ac_c" 1>&6
7376 else
7377   if test "$cross_compiling" = yes; then
7378   ac_cv_sizeof_unsigned_long=4
7379 else
7380   cat > conftest.$ac_ext <<EOF
7381 #line 7382 "configure"
7382 #include "confdefs.h"
7383 #include <stdio.h>
7384 main()
7385 {
7386   FILE *f=fopen("conftestval", "w");
7387   if (!f) exit(1);
7388   fprintf(f, "%d\n", sizeof(unsigned long));
7389   exit(0);
7390 }
7391 EOF
7392 if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7393 then
7394   ac_cv_sizeof_unsigned_long=`cat conftestval`
7395 else
7396   echo "configure: failed program was:" >&5
7397   cat conftest.$ac_ext >&5
7398   rm -fr conftest*
7399   ac_cv_sizeof_unsigned_long=0
7400 fi
7401 rm -fr conftest*
7402 fi
7403
7404 fi
7405 echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
7406 cat >> confdefs.h <<EOF
7407 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7408 EOF
7409
7410
7411 cat >> confdefs.h <<EOF
7412 #define SIZEOF_DATUM $ac_cv_sizeof_unsigned_long
7413 EOF
7414
7415
7416
7417 echo $ac_n "checking alignment of short""... $ac_c" 1>&6
7418 echo "configure:7419: checking alignment of short" >&5
7419 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then
7420   echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422   if test "$cross_compiling" = yes; then
7423   pgac_cv_alignof_short='sizeof(short)'
7424 else
7425   cat > conftest.$ac_ext <<EOF
7426 #line 7427 "configure"
7427 #include "confdefs.h"
7428 #include <stdio.h>
7429 struct { char filler; short field; } mystruct;
7430 main()
7431 {
7432   FILE *f=fopen("conftestval", "w");
7433   if (!f) exit(1);
7434   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7435   exit(0);
7436 }
7437 EOF
7438 if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7439 then
7440   pgac_cv_alignof_short=`cat conftestval`
7441 else
7442   echo "configure: failed program was:" >&5
7443   cat conftest.$ac_ext >&5
7444   rm -fr conftest*
7445   pgac_cv_alignof_short='sizeof(short)'
7446 fi
7447 rm -fr conftest*
7448 fi
7449
7450 fi
7451 echo "$ac_t""$pgac_cv_alignof_short" 1>&6
7452 cat >> confdefs.h <<EOF
7453 #define ALIGNOF_SHORT $pgac_cv_alignof_short
7454 EOF
7455
7456
7457 echo $ac_n "checking alignment of int""... $ac_c" 1>&6
7458 echo "configure:7459: checking alignment of int" >&5
7459 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then
7460   echo $ac_n "(cached) $ac_c" 1>&6
7461 else
7462   if test "$cross_compiling" = yes; then
7463   pgac_cv_alignof_int='sizeof(int)'
7464 else
7465   cat > conftest.$ac_ext <<EOF
7466 #line 7467 "configure"
7467 #include "confdefs.h"
7468 #include <stdio.h>
7469 struct { char filler; int field; } mystruct;
7470 main()
7471 {
7472   FILE *f=fopen("conftestval", "w");
7473   if (!f) exit(1);
7474   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7475   exit(0);
7476 }
7477 EOF
7478 if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7479 then
7480   pgac_cv_alignof_int=`cat conftestval`
7481 else
7482   echo "configure: failed program was:" >&5
7483   cat conftest.$ac_ext >&5
7484   rm -fr conftest*
7485   pgac_cv_alignof_int='sizeof(int)'
7486 fi
7487 rm -fr conftest*
7488 fi
7489
7490 fi
7491 echo "$ac_t""$pgac_cv_alignof_int" 1>&6
7492 cat >> confdefs.h <<EOF
7493 #define ALIGNOF_INT $pgac_cv_alignof_int
7494 EOF
7495
7496
7497 echo $ac_n "checking alignment of long""... $ac_c" 1>&6
7498 echo "configure:7499: checking alignment of long" >&5
7499 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   if test "$cross_compiling" = yes; then
7503   pgac_cv_alignof_long='sizeof(long)'
7504 else
7505   cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 #include <stdio.h>
7509 struct { char filler; long field; } mystruct;
7510 main()
7511 {
7512   FILE *f=fopen("conftestval", "w");
7513   if (!f) exit(1);
7514   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7515   exit(0);
7516 }
7517 EOF
7518 if { (eval echo configure:7519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7519 then
7520   pgac_cv_alignof_long=`cat conftestval`
7521 else
7522   echo "configure: failed program was:" >&5
7523   cat conftest.$ac_ext >&5
7524   rm -fr conftest*
7525   pgac_cv_alignof_long='sizeof(long)'
7526 fi
7527 rm -fr conftest*
7528 fi
7529
7530 fi
7531 echo "$ac_t""$pgac_cv_alignof_long" 1>&6
7532 cat >> confdefs.h <<EOF
7533 #define ALIGNOF_LONG $pgac_cv_alignof_long
7534 EOF
7535
7536
7537 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7538   echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6
7539 echo "configure:7540: checking alignment of long long int" >&5
7540 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then
7541   echo $ac_n "(cached) $ac_c" 1>&6
7542 else
7543   if test "$cross_compiling" = yes; then
7544   pgac_cv_alignof_long_long_int='sizeof(long long int)'
7545 else
7546   cat > conftest.$ac_ext <<EOF
7547 #line 7548 "configure"
7548 #include "confdefs.h"
7549 #include <stdio.h>
7550 struct { char filler; long long int field; } mystruct;
7551 main()
7552 {
7553   FILE *f=fopen("conftestval", "w");
7554   if (!f) exit(1);
7555   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7556   exit(0);
7557 }
7558 EOF
7559 if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7560 then
7561   pgac_cv_alignof_long_long_int=`cat conftestval`
7562 else
7563   echo "configure: failed program was:" >&5
7564   cat conftest.$ac_ext >&5
7565   rm -fr conftest*
7566   pgac_cv_alignof_long_long_int='sizeof(long long int)'
7567 fi
7568 rm -fr conftest*
7569 fi
7570
7571 fi
7572 echo "$ac_t""$pgac_cv_alignof_long_long_int" 1>&6
7573 cat >> confdefs.h <<EOF
7574 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
7575 EOF
7576
7577
7578 fi
7579 echo $ac_n "checking alignment of double""... $ac_c" 1>&6
7580 echo "configure:7581: checking alignment of double" >&5
7581 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then
7582   echo $ac_n "(cached) $ac_c" 1>&6
7583 else
7584   if test "$cross_compiling" = yes; then
7585   pgac_cv_alignof_double='sizeof(double)'
7586 else
7587   cat > conftest.$ac_ext <<EOF
7588 #line 7589 "configure"
7589 #include "confdefs.h"
7590 #include <stdio.h>
7591 struct { char filler; double field; } mystruct;
7592 main()
7593 {
7594   FILE *f=fopen("conftestval", "w");
7595   if (!f) exit(1);
7596   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7597   exit(0);
7598 }
7599 EOF
7600 if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7601 then
7602   pgac_cv_alignof_double=`cat conftestval`
7603 else
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -fr conftest*
7607   pgac_cv_alignof_double='sizeof(double)'
7608 fi
7609 rm -fr conftest*
7610 fi
7611
7612 fi
7613 echo "$ac_t""$pgac_cv_alignof_double" 1>&6
7614 cat >> confdefs.h <<EOF
7615 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
7616 EOF
7617
7618
7619
7620
7621 if test $pgac_cv_alignof_double != 'sizeof(double)' ; then
7622   MAX_ALIGNOF=$pgac_cv_alignof_long
7623   if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
7624     MAX_ALIGNOF=$pgac_cv_alignof_double
7625   fi
7626   if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
7627     MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
7628   fi
7629 else
7630     MAX_ALIGNOF="$pgac_cv_alignof_double"
7631 fi
7632 cat >> confdefs.h <<EOF
7633 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
7634 EOF
7635
7636
7637 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
7638 echo "configure:7639: checking for POSIX signal interface" >&5
7639 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
7640   echo $ac_n "(cached) $ac_c" 1>&6
7641 else
7642   cat > conftest.$ac_ext <<EOF
7643 #line 7644 "configure"
7644 #include "confdefs.h"
7645 #include <signal.h>
7646
7647 int main() {
7648 struct sigaction act, oact;
7649 sigemptyset(&act.sa_mask);
7650 act.sa_flags = SA_RESTART;
7651 sigaction(0, &act, &oact);
7652 ; return 0; }
7653 EOF
7654 if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7655   rm -rf conftest*
7656   pgac_cv_func_posix_signals=yes
7657 else
7658   echo "configure: failed program was:" >&5
7659   cat conftest.$ac_ext >&5
7660   rm -rf conftest*
7661   pgac_cv_func_posix_signals=no
7662 fi
7663 rm -f conftest*
7664 fi
7665
7666 echo "$ac_t""$pgac_cv_func_posix_signals" 1>&6
7667 if test x"$pgac_cv_func_posix_signals" = xyes ; then
7668   cat >> confdefs.h <<\EOF
7669 #define HAVE_POSIX_SIGNALS 
7670 EOF
7671
7672 fi
7673 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
7674
7675
7676
7677 # Check for Tcl configuration script tclConfig.sh
7678 if test "$with_tcl" = yes; then
7679     for ac_prog in tclsh tcl
7680 do
7681 # Extract the first word of "$ac_prog", so it can be a program name with args.
7682 set dummy $ac_prog; ac_word=$2
7683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7684 echo "configure:7685: checking for $ac_word" >&5
7685 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   case "$TCLSH" in
7689   /*)
7690   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
7691   ;;
7692   ?:/*)                  
7693   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
7694   ;;
7695   *)
7696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7697   ac_dummy="$PATH"
7698   for ac_dir in $ac_dummy; do 
7699     test -z "$ac_dir" && ac_dir=.
7700     if test -f $ac_dir/$ac_word; then
7701       ac_cv_path_TCLSH="$ac_dir/$ac_word"
7702       break
7703     fi
7704   done
7705   IFS="$ac_save_ifs"
7706   ;;
7707 esac
7708 fi
7709 TCLSH="$ac_cv_path_TCLSH"
7710 if test -n "$TCLSH"; then
7711   echo "$ac_t""$TCLSH" 1>&6
7712 else
7713   echo "$ac_t""no" 1>&6
7714 fi
7715
7716 test -n "$TCLSH" && break
7717 done
7718
7719 echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
7720 echo "configure:7721: checking for tclConfig.sh" >&5
7721 # Let user override test
7722 if test -z "$TCL_CONFIG_SH"; then
7723     pgac_test_dirs="$with_tclconfig"
7724
7725     set X $pgac_test_dirs; shift
7726     if test $# -eq 0; then
7727         test -z "$TCLSH" && { echo "configure: error: unable to locate tclConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
7728         set X `echo 'puts $auto_path' | $TCLSH`; shift
7729     fi
7730
7731     for pgac_dir do
7732         if test -r "$pgac_dir/tclConfig.sh"; then
7733             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
7734             break
7735         fi
7736     done
7737 fi
7738
7739 if test -z "$TCL_CONFIG_SH"; then
7740     echo "$ac_t""no" 1>&6
7741     { echo "configure: error: file \`tclConfig.sh' is required for Tcl" 1>&2; exit 1; }
7742 else
7743     echo "$ac_t""$TCL_CONFIG_SH" 1>&6
7744 fi
7745
7746
7747
7748 fi
7749
7750 # Check for Tk configuration script tkConfig.sh
7751 if test "$with_tk" = yes; then
7752     echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
7753 echo "configure:7754: checking for tkConfig.sh" >&5
7754 # Let user override test
7755 if test -z "$TK_CONFIG_SH"; then
7756     pgac_test_dirs="$with_tkconfig $with_tclconfig"
7757
7758     set X $pgac_test_dirs; shift
7759     if test $# -eq 0; then
7760         test -z "$TCLSH" && { echo "configure: error: unable to locate tkConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
7761         set X `echo 'puts $auto_path' | $TCLSH`; shift
7762     fi
7763
7764     for pgac_dir do
7765         if test -r "$pgac_dir/tkConfig.sh"; then
7766             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
7767             break
7768         fi
7769     done
7770 fi
7771
7772 if test -z "$TK_CONFIG_SH"; then
7773     echo "$ac_t""no" 1>&6
7774     { echo "configure: error: file \`tkConfig.sh' is required for Tk" 1>&2; exit 1; }
7775 else
7776     echo "$ac_t""$TK_CONFIG_SH" 1>&6
7777 fi
7778
7779
7780
7781 fi
7782
7783
7784 #
7785 # Check for DocBook and tools
7786 #
7787 for ac_prog in onsgmls nsgmls
7788 do
7789 # Extract the first word of "$ac_prog", so it can be a program name with args.
7790 set dummy $ac_prog; ac_word=$2
7791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7792 echo "configure:7793: checking for $ac_word" >&5
7793 if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   if test -n "$NSGMLS"; then
7797   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
7798 else
7799   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7800   ac_dummy="$PATH"
7801   for ac_dir in $ac_dummy; do
7802     test -z "$ac_dir" && ac_dir=.
7803     if test -f $ac_dir/$ac_word; then
7804       ac_cv_prog_NSGMLS="$ac_prog"
7805       break
7806     fi
7807   done
7808   IFS="$ac_save_ifs"
7809 fi
7810 fi
7811 NSGMLS="$ac_cv_prog_NSGMLS"
7812 if test -n "$NSGMLS"; then
7813   echo "$ac_t""$NSGMLS" 1>&6
7814 else
7815   echo "$ac_t""no" 1>&6
7816 fi
7817
7818 test -n "$NSGMLS" && break
7819 done
7820
7821 # If you don't have nsgmls you won't get very far, so save the cycles.
7822 if test -n "$NSGMLS"; then
7823   for ac_prog in openjade jade
7824 do
7825 # Extract the first word of "$ac_prog", so it can be a program name with args.
7826 set dummy $ac_prog; ac_word=$2
7827 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7828 echo "configure:7829: checking for $ac_word" >&5
7829 if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
7830   echo $ac_n "(cached) $ac_c" 1>&6
7831 else
7832   if test -n "$JADE"; then
7833   ac_cv_prog_JADE="$JADE" # Let the user override the test.
7834 else
7835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7836   ac_dummy="$PATH"
7837   for ac_dir in $ac_dummy; do
7838     test -z "$ac_dir" && ac_dir=.
7839     if test -f $ac_dir/$ac_word; then
7840       ac_cv_prog_JADE="$ac_prog"
7841       break
7842     fi
7843   done
7844   IFS="$ac_save_ifs"
7845 fi
7846 fi
7847 JADE="$ac_cv_prog_JADE"
7848 if test -n "$JADE"; then
7849   echo "$ac_t""$JADE" 1>&6
7850 else
7851   echo "$ac_t""no" 1>&6
7852 fi
7853
7854 test -n "$JADE" && break
7855 done
7856
7857   
7858 echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
7859 echo "configure:7860: checking for DocBook V3.1" >&5
7860 if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
7861   echo $ac_n "(cached) $ac_c" 1>&6
7862 else
7863   cat >conftest.sgml <<EOF
7864 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
7865 <book>
7866  <title>test</title>
7867  <chapter>
7868   <title>random</title>
7869    <sect1>
7870     <title>testsect</title>
7871     <para>text</para>
7872   </sect1>
7873  </chapter>
7874 </book>
7875 EOF
7876
7877 ${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
7878 if test $? -eq 0; then
7879   pgac_cv_check_docbook=yes
7880 else
7881   pgac_cv_check_docbook=no
7882 fi
7883 rm -f conftest.sgml
7884 fi
7885
7886 echo "$ac_t""$pgac_cv_check_docbook" 1>&6
7887
7888 have_docbook=$pgac_cv_check_docbook
7889
7890
7891   echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
7892 echo "configure:7893: checking for DocBook stylesheets" >&5
7893 if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
7894   echo $ac_n "(cached) $ac_c" 1>&6
7895 else
7896   if test -n "$DOCBOOKSTYLE"; then
7897   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
7898 else
7899   for pgac_prefix in /usr /usr/local /opt; do
7900     for pgac_infix in share lib; do
7901       for pgac_postfix in \
7902         sgml/stylesheets/nwalsh-modular \
7903         sgml/stylesheets/docbook \
7904         sgml/docbook/dsssl/modular
7905       do
7906         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
7907         if test -r "$pgac_candidate/html/docbook.dsl" \
7908            && test -r "$pgac_candidate/print/docbook.dsl"
7909         then
7910           pgac_cv_path_stylesheets=$pgac_candidate
7911           break 3
7912         fi
7913       done
7914     done
7915   done
7916 fi
7917 fi
7918
7919 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
7920
7921 if test -n "$DOCBOOKSTYLE"; then
7922   echo "$ac_t""$DOCBOOKSTYLE" 1>&6
7923 else
7924   echo "$ac_t""no" 1>&6
7925 fi
7926   for ac_prog in sgmlspl
7927 do
7928 # Extract the first word of "$ac_prog", so it can be a program name with args.
7929 set dummy $ac_prog; ac_word=$2
7930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7931 echo "configure:7932: checking for $ac_word" >&5
7932 if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
7933   echo $ac_n "(cached) $ac_c" 1>&6
7934 else
7935   if test -n "$SGMLSPL"; then
7936   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
7937 else
7938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7939   ac_dummy="$PATH"
7940   for ac_dir in $ac_dummy; do
7941     test -z "$ac_dir" && ac_dir=.
7942     if test -f $ac_dir/$ac_word; then
7943       ac_cv_prog_SGMLSPL="$ac_prog"
7944       break
7945     fi
7946   done
7947   IFS="$ac_save_ifs"
7948 fi
7949 fi
7950 SGMLSPL="$ac_cv_prog_SGMLSPL"
7951 if test -n "$SGMLSPL"; then
7952   echo "$ac_t""$SGMLSPL" 1>&6
7953 else
7954   echo "$ac_t""no" 1>&6
7955 fi
7956
7957 test -n "$SGMLSPL" && break
7958 done
7959
7960 fi
7961
7962 # check whether 'test -ef' works
7963 if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
7964   test_ef_works=yes
7965 else
7966   test_ef_works=no
7967 fi
7968
7969 abs_top_srcdir=
7970
7971
7972 if test "$test_ef_works" = yes ; then
7973 # prepare build tree if outside source tree
7974   if test "$srcdir" -ef . ; then : ; else
7975     abs_top_srcdir=`cd $srcdir && pwd`
7976     echo $ac_n "preparing build tree... $ac_c" 1>&6
7977     /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
7978       || { echo "configure: error: failed" 1>&2; exit 1; }
7979     echo "$ac_t""done" 1>&6
7980   fi
7981 fi
7982
7983 trap '' 1 2 15
7984 cat > confcache <<\EOF
7985 # This file is a shell script that caches the results of configure
7986 # tests run on this system so they can be shared between configure
7987 # scripts and configure runs.  It is not useful on other systems.
7988 # If it contains results you don't want to keep, you may remove or edit it.
7989 #
7990 # By default, configure uses ./config.cache as the cache file,
7991 # creating it if it does not exist already.  You can give configure
7992 # the --cache-file=FILE option to use a different cache file; that is
7993 # what configure does when it calls configure scripts in
7994 # subdirectories, so they share the cache.
7995 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7996 # config.status only pays attention to the cache file if you give it the
7997 # --recheck option to rerun configure.
7998 #
7999 EOF
8000 # The following way of writing the cache mishandles newlines in values,
8001 # but we know of no workaround that is simple, portable, and efficient.
8002 # So, don't put newlines in cache variables' values.
8003 # Ultrix sh set writes to stderr and can't be redirected directly,
8004 # and sets the high bit in the cache file unless we assign to the vars.
8005 (set) 2>&1 |
8006   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8007   *ac_space=\ *)
8008     # `set' does not quote correctly, so add quotes (double-quote substitution
8009     # turns \\\\ into \\, and sed turns \\ into \).
8010     sed -n \
8011       -e "s/'/'\\\\''/g" \
8012       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8013     ;;
8014   *)
8015     # `set' quotes correctly as required by POSIX, so do not add quotes.
8016     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8017     ;;
8018   esac >> confcache
8019 if cmp -s $cache_file confcache; then
8020   :
8021 else
8022   if test -w $cache_file; then
8023     echo "updating cache $cache_file"
8024     cat confcache > $cache_file
8025   else
8026     echo "not updating unwritable cache $cache_file"
8027   fi
8028 fi
8029 rm -f confcache
8030
8031 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8032
8033 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8034 # Let make expand exec_prefix.
8035 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8036
8037 # Any assignment to VPATH causes Sun make to only execute
8038 # the first set of double-colon rules, so remove it if not needed.
8039 # If there is a colon in the path, we need to keep it.
8040 if test "x$srcdir" = x.; then
8041   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8042 fi
8043
8044 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8045
8046 DEFS=-DHAVE_CONFIG_H
8047
8048 # Without the "./", some shells look in PATH for config.status.
8049 : ${CONFIG_STATUS=./config.status}
8050
8051 echo creating $CONFIG_STATUS
8052 rm -f $CONFIG_STATUS
8053 cat > $CONFIG_STATUS <<EOF
8054 #! /bin/sh
8055 # Generated automatically by configure.
8056 # Run this file to recreate the current configuration.
8057 # This directory was configured as follows,
8058 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8059 #
8060 # $0 $ac_configure_args
8061 #
8062 # Compiler output produced by configure, useful for debugging
8063 # configure, is in ./config.log if it exists.
8064
8065 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8066 for ac_option
8067 do
8068   case "\$ac_option" in
8069   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8070     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8071     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8072   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8073     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8074     exit 0 ;;
8075   -help | --help | --hel | --he | --h)
8076     echo "\$ac_cs_usage"; exit 0 ;;
8077   *) echo "\$ac_cs_usage"; exit 1 ;;
8078   esac
8079 done
8080
8081 ac_given_srcdir=$srcdir
8082
8083 trap 'rm -fr `echo "
8084   GNUmakefile
8085   src/GNUmakefile
8086   src/Makefile.global
8087   src/backend/port/Makefile
8088  src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8089 EOF
8090 cat >> $CONFIG_STATUS <<EOF
8091
8092 # Protect against being on the right side of a sed subst in config.status.
8093 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8094  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8095 $ac_vpsub
8096 $extrasub
8097 s%@SHELL@%$SHELL%g
8098 s%@CFLAGS@%$CFLAGS%g
8099 s%@CPPFLAGS@%$CPPFLAGS%g
8100 s%@CXXFLAGS@%$CXXFLAGS%g
8101 s%@FFLAGS@%$FFLAGS%g
8102 s%@DEFS@%$DEFS%g
8103 s%@LDFLAGS@%$LDFLAGS%g
8104 s%@LIBS@%$LIBS%g
8105 s%@exec_prefix@%$exec_prefix%g
8106 s%@prefix@%$prefix%g
8107 s%@program_transform_name@%$program_transform_name%g
8108 s%@bindir@%$bindir%g
8109 s%@sbindir@%$sbindir%g
8110 s%@libexecdir@%$libexecdir%g
8111 s%@datadir@%$datadir%g
8112 s%@sysconfdir@%$sysconfdir%g
8113 s%@sharedstatedir@%$sharedstatedir%g
8114 s%@localstatedir@%$localstatedir%g
8115 s%@libdir@%$libdir%g
8116 s%@includedir@%$includedir%g
8117 s%@oldincludedir@%$oldincludedir%g
8118 s%@docdir@%$docdir%g
8119 s%@mandir@%$mandir%g
8120 s%@VERSION@%$VERSION%g
8121 s%@host@%$host%g
8122 s%@host_alias@%$host_alias%g
8123 s%@host_cpu@%$host_cpu%g
8124 s%@host_vendor@%$host_vendor%g
8125 s%@host_os@%$host_os%g
8126 s%@PORTNAME@%$PORTNAME%g
8127 s%@TAS@%$TAS%g
8128 s%@MULTIBYTE@%$MULTIBYTE%g
8129 s%@default_port@%$default_port%g
8130 s%@enable_shared@%$enable_shared%g
8131 s%@enable_rpath@%$enable_rpath%g
8132 s%@CC@%$CC%g
8133 s%@EXEEXT@%$EXEEXT%g
8134 s%@CPP@%$CPP%g
8135 s%@GCC@%$GCC%g
8136 s%@autodepend@%$autodepend%g
8137 s%@INCLUDES@%$INCLUDES%g
8138 s%@with_tcl@%$with_tcl%g
8139 s%@with_tk@%$with_tk%g
8140 s%@with_perl@%$with_perl%g
8141 s%@PYTHON@%$PYTHON%g
8142 s%@python_version@%$python_version%g
8143 s%@python_prefix@%$python_prefix%g
8144 s%@python_execprefix@%$python_execprefix%g
8145 s%@python_configdir@%$python_configdir%g
8146 s%@python_moduledir@%$python_moduledir%g
8147 s%@python_extmakefile@%$python_extmakefile%g
8148 s%@with_python@%$with_python%g
8149 s%@ANT@%$ANT%g
8150 s%@with_java@%$with_java%g
8151 s%@with_krb4@%$with_krb4%g
8152 s%@with_krb5@%$with_krb5%g
8153 s%@krb_srvtab@%$krb_srvtab%g
8154 s%@with_openssl@%$with_openssl%g
8155 s%@enable_odbc@%$enable_odbc%g
8156 s%@odbcinst_ini_dir@%$odbcinst_ini_dir%g
8157 s%@ELF_SYS@%$ELF_SYS%g
8158 s%@CXX@%$CXX%g
8159 s%@CXXCPP@%$CXXCPP%g
8160 s%@GXX@%$GXX%g
8161 s%@with_CXX@%$with_CXX%g
8162 s%@AWK@%$AWK%g
8163 s%@FLEX@%$FLEX%g
8164 s%@FLEXFLAGS@%$FLEXFLAGS%g
8165 s%@LN_S@%$LN_S%g
8166 s%@LD@%$LD%g
8167 s%@with_gnu_ld@%$with_gnu_ld%g
8168 s%@ld_R_works@%$ld_R_works%g
8169 s%@RANLIB@%$RANLIB%g
8170 s%@LORDER@%$LORDER%g
8171 s%@TAR@%$TAR%g
8172 s%@PERL@%$PERL%g
8173 s%@YACC@%$YACC%g
8174 s%@YFLAGS@%$YFLAGS%g
8175 s%@WISH@%$WISH%g
8176 s%@SNPRINTF@%$SNPRINTF%g
8177 s%@ISINF@%$ISINF%g
8178 s%@GETRUSAGE@%$GETRUSAGE%g
8179 s%@SRANDOM@%$SRANDOM%g
8180 s%@GETHOSTNAME@%$GETHOSTNAME%g
8181 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
8182 s%@INET_ATON@%$INET_ATON%g
8183 s%@STRERROR@%$STRERROR%g
8184 s%@STRDUP@%$STRDUP%g
8185 s%@STRTOL@%$STRTOL%g
8186 s%@STRTOUL@%$STRTOUL%g
8187 s%@STRCASECMP@%$STRCASECMP%g
8188 s%@HPUXMATHLIB@%$HPUXMATHLIB%g
8189 s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
8190 s%@TCLSH@%$TCLSH%g
8191 s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
8192 s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
8193 s%@NSGMLS@%$NSGMLS%g
8194 s%@JADE@%$JADE%g
8195 s%@have_docbook@%$have_docbook%g
8196 s%@DOCBOOKSTYLE@%$DOCBOOKSTYLE%g
8197 s%@SGMLSPL@%$SGMLSPL%g
8198 s%@abs_top_srcdir@%$abs_top_srcdir%g
8199
8200 CEOF
8201 EOF
8202
8203 cat >> $CONFIG_STATUS <<\EOF
8204
8205 # Split the substitutions into bite-sized pieces for seds with
8206 # small command number limits, like on Digital OSF/1 and HP-UX.
8207 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8208 ac_file=1 # Number of current file.
8209 ac_beg=1 # First line for current file.
8210 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8211 ac_more_lines=:
8212 ac_sed_cmds=""
8213 while $ac_more_lines; do
8214   if test $ac_beg -gt 1; then
8215     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8216   else
8217     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8218   fi
8219   if test ! -s conftest.s$ac_file; then
8220     ac_more_lines=false
8221     rm -f conftest.s$ac_file
8222   else
8223     if test -z "$ac_sed_cmds"; then
8224       ac_sed_cmds="sed -f conftest.s$ac_file"
8225     else
8226       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8227     fi
8228     ac_file=`expr $ac_file + 1`
8229     ac_beg=$ac_end
8230     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8231   fi
8232 done
8233 if test -z "$ac_sed_cmds"; then
8234   ac_sed_cmds=cat
8235 fi
8236 EOF
8237
8238 cat >> $CONFIG_STATUS <<EOF
8239
8240 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
8241   src/GNUmakefile
8242   src/Makefile.global
8243   src/backend/port/Makefile
8244 "}
8245 EOF
8246 cat >> $CONFIG_STATUS <<\EOF
8247 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8248   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8249   case "$ac_file" in
8250   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8251        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8252   *) ac_file_in="${ac_file}.in" ;;
8253   esac
8254
8255   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8256
8257   # Remove last slash and all that follows it.  Not all systems have dirname.
8258   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8259   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8260     # The file is in a subdirectory.
8261     test ! -d "$ac_dir" && mkdir "$ac_dir"
8262     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8263     # A "../" for each directory in $ac_dir_suffix.
8264     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8265   else
8266     ac_dir_suffix= ac_dots=
8267   fi
8268
8269   case "$ac_given_srcdir" in
8270   .)  srcdir=.
8271       if test -z "$ac_dots"; then top_srcdir=.
8272       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8273   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8274   *) # Relative path.
8275     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8276     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8277   esac
8278
8279
8280   echo creating "$ac_file"
8281   rm -f "$ac_file"
8282   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8283   case "$ac_file" in
8284   *Makefile*) ac_comsub="1i\\
8285 # $configure_input" ;;
8286   *) ac_comsub= ;;
8287   esac
8288
8289   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8290   sed -e "$ac_comsub
8291 s%@configure_input@%$configure_input%g
8292 s%@srcdir@%$srcdir%g
8293 s%@top_srcdir@%$top_srcdir%g
8294 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8295 fi; done
8296 rm -f conftest.s*
8297
8298 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8299 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8300 #
8301 # ac_d sets the value in "#define NAME VALUE" lines.
8302 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8303 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8304 ac_dC='\3'
8305 ac_dD='%g'
8306 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8307 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8308 ac_uB='\([      ]\)%\1#\2define\3'
8309 ac_uC=' '
8310 ac_uD='\4%g'
8311 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8312 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8313 ac_eB='$%\1#\2define\3'
8314 ac_eC=' '
8315 ac_eD='%g'
8316
8317 if test "${CONFIG_HEADERS+set}" != set; then
8318 EOF
8319 cat >> $CONFIG_STATUS <<EOF
8320   CONFIG_HEADERS="src/include/config.h"
8321 EOF
8322 cat >> $CONFIG_STATUS <<\EOF
8323 fi
8324 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8325   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8326   case "$ac_file" in
8327   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8328        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8329   *) ac_file_in="${ac_file}.in" ;;
8330   esac
8331
8332   echo creating $ac_file
8333
8334   rm -f conftest.frag conftest.in conftest.out
8335   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8336   cat $ac_file_inputs > conftest.in
8337
8338 EOF
8339
8340 # Transform confdefs.h into a sed script conftest.vals that substitutes
8341 # the proper values into config.h.in to produce config.h.  And first:
8342 # Protect against being on the right side of a sed subst in config.status.
8343 # Protect against being in an unquoted here document in config.status.
8344 rm -f conftest.vals
8345 cat > conftest.hdr <<\EOF
8346 s/[\\&%]/\\&/g
8347 s%[\\$`]%\\&%g
8348 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8349 s%ac_d%ac_u%gp
8350 s%ac_u%ac_e%gp
8351 EOF
8352 sed -n -f conftest.hdr confdefs.h > conftest.vals
8353 rm -f conftest.hdr
8354
8355 # This sed command replaces #undef with comments.  This is necessary, for
8356 # example, in the case of _POSIX_SOURCE, which is predefined and required
8357 # on some systems where configure will not decide to define it.
8358 cat >> conftest.vals <<\EOF
8359 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8360 EOF
8361
8362 # Break up conftest.vals because some shells have a limit on
8363 # the size of here documents, and old seds have small limits too.
8364
8365 rm -f conftest.tail
8366 while :
8367 do
8368   ac_lines=`grep -c . conftest.vals`
8369   # grep -c gives empty output for an empty file on some AIX systems.
8370   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8371   # Write a limited-size here document to conftest.frag.
8372   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8373   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8374   echo 'CEOF
8375   sed -f conftest.frag conftest.in > conftest.out
8376   rm -f conftest.in
8377   mv conftest.out conftest.in
8378 ' >> $CONFIG_STATUS
8379   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8380   rm -f conftest.vals
8381   mv conftest.tail conftest.vals
8382 done
8383 rm -f conftest.vals
8384
8385 cat >> $CONFIG_STATUS <<\EOF
8386   rm -f conftest.frag conftest.h
8387   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8388   cat conftest.in >> conftest.h
8389   rm -f conftest.in
8390   if cmp -s $ac_file conftest.h 2>/dev/null; then
8391     echo "$ac_file is unchanged"
8392     rm -f conftest.h
8393   else
8394     # Remove last slash and all that follows it.  Not all systems have dirname.
8395       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8396       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8397       # The file is in a subdirectory.
8398       test ! -d "$ac_dir" && mkdir "$ac_dir"
8399     fi
8400     rm -f $ac_file
8401     mv conftest.h $ac_file
8402   fi
8403 fi; done
8404
8405 EOF
8406
8407 cat >> $CONFIG_STATUS <<EOF
8408 ac_sources="src/backend/port/dynloader/${template}.c src/backend/port/dynloader/${template}.h src/include/port/${template}.h src/makefiles/Makefile.${template} src/backend/port/tas/${tas_file}"
8409 ac_dests="src/backend/port/dynloader.c src/include/dynloader.h src/include/os.h src/Makefile.port src/backend/port/tas.s"
8410 EOF
8411
8412 cat >> $CONFIG_STATUS <<\EOF
8413 srcdir=$ac_given_srcdir
8414 while test -n "$ac_sources"; do
8415   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
8416   set $ac_sources; ac_source=$1; shift; ac_sources=$*
8417
8418   echo "linking $srcdir/$ac_source to $ac_dest"
8419
8420   if test ! -r $srcdir/$ac_source; then
8421     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
8422   fi
8423   rm -f $ac_dest
8424
8425   # Make relative symlinks.
8426   # Remove last slash and all that follows it.  Not all systems have dirname.
8427   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
8428   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
8429     # The dest file is in a subdirectory.
8430     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
8431     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
8432     # A "../" for each directory in $ac_dest_dir_suffix.
8433     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
8434   else
8435     ac_dest_dir_suffix= ac_dots=
8436   fi
8437
8438   case "$srcdir" in
8439   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
8440   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
8441   esac
8442
8443   # Make a symlink if possible; otherwise try a hard link.
8444   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
8445     ln $srcdir/$ac_source $ac_dest; then :
8446   else
8447     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
8448   fi
8449 done
8450 EOF
8451 cat >> $CONFIG_STATUS <<EOF
8452
8453 EOF
8454 cat >> $CONFIG_STATUS <<\EOF
8455
8456 # Update timestamp for config.h (see Makefile.global)
8457 test x"$CONFIG_HEADERS" != x"" && echo >src/include/stamp-h
8458
8459 exit 0
8460 EOF
8461 chmod +x $CONFIG_STATUS
8462 rm -fr confdefs* $ac_clean_files
8463 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8464