OSDN Git Service

Defend against ancient versions of zlib by checking that zlib.h
[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.1'
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 readline""... $ac_c" 1>&6
3099 echo "configure:3100: checking for readline" >&5
3100
3101 if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
3102   echo $ac_n "(cached) $ac_c" 1>&6
3103 else
3104   pgac_cv_check_readline=no
3105 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
3106   for pgac_rllib in -lreadline -ledit ; do
3107     pgac_save_LIBS=$LIBS
3108     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
3109     cat > conftest.$ac_ext <<EOF
3110 #line 3111 "configure"
3111 #include "confdefs.h"
3112 /* Override any gcc2 internal prototype to avoid an error.  */
3113 /* We use char because int might match the return type of a gcc2
3114     builtin and then its argument prototype would still apply.  */
3115 char readline();
3116
3117 int main() {
3118 readline()
3119 ; return 0; }
3120 EOF
3121 if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122   rm -rf conftest*
3123   pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2
3124 else
3125   echo "configure: failed program was:" >&5
3126   cat conftest.$ac_ext >&5
3127 fi
3128 rm -f conftest*
3129     LIBS=$pgac_save_LIBS
3130   done
3131 done
3132 LIBS=$pgac_save_LIBS
3133
3134 fi
3135
3136 if test "$pgac_cv_check_readline" != no ; then
3137   cat >> confdefs.h <<\EOF
3138 #define HAVE_LIBREADLINE 1
3139 EOF
3140
3141   LIBS="$pgac_cv_check_readline $LIBS"
3142   echo "$ac_t""yes ($pgac_cv_check_readline)" 1>&6
3143 else
3144   echo "$ac_t""no" 1>&6
3145 fi
3146
3147 echo $ac_n "checking for library containing using_history""... $ac_c" 1>&6
3148 echo "configure:3149: checking for library containing using_history" >&5
3149 if eval "test \"`echo '$''{'ac_cv_search_using_history'+set}'`\" = set"; then
3150   echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152   ac_func_search_save_LIBS="$LIBS"
3153 ac_cv_search_using_history="no"
3154 cat > conftest.$ac_ext <<EOF
3155 #line 3156 "configure"
3156 #include "confdefs.h"
3157 /* Override any gcc2 internal prototype to avoid an error.  */
3158 /* We use char because int might match the return type of a gcc2
3159     builtin and then its argument prototype would still apply.  */
3160 char using_history();
3161
3162 int main() {
3163 using_history()
3164 ; return 0; }
3165 EOF
3166 if { (eval echo configure:3167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3167   rm -rf conftest*
3168   ac_cv_search_using_history="none required"
3169 else
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172 fi
3173 rm -f conftest*
3174 test "$ac_cv_search_using_history" = "no" && for i in history; do
3175 LIBS="-l$i  $ac_func_search_save_LIBS"
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 /* Override any gcc2 internal prototype to avoid an error.  */
3180 /* We use char because int might match the return type of a gcc2
3181     builtin and then its argument prototype would still apply.  */
3182 char using_history();
3183
3184 int main() {
3185 using_history()
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3189   rm -rf conftest*
3190   ac_cv_search_using_history="-l$i"
3191 break
3192 else
3193   echo "configure: failed program was:" >&5
3194   cat conftest.$ac_ext >&5
3195 fi
3196 rm -f conftest*
3197 done
3198 LIBS="$ac_func_search_save_LIBS"
3199 fi
3200
3201 echo "$ac_t""$ac_cv_search_using_history" 1>&6
3202 if test "$ac_cv_search_using_history" != "no"; then
3203   test "$ac_cv_search_using_history" = "none required" || LIBS="$ac_cv_search_using_history $LIBS"
3204   cat >> confdefs.h <<\EOF
3205 #define HAVE_HISTORY_FUNCTIONS 1
3206 EOF
3207
3208 else :
3209   
3210 fi
3211
3212 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
3213 then
3214         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
3215 echo "configure:3216: checking for main in -lbsd" >&5
3216 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
3217 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3218   echo $ac_n "(cached) $ac_c" 1>&6
3219 else
3220   ac_save_LIBS="$LIBS"
3221 LIBS="-lbsd  $LIBS"
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225
3226 int main() {
3227 main()
3228 ; return 0; }
3229 EOF
3230 if { (eval echo configure:3231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3231   rm -rf conftest*
3232   eval "ac_cv_lib_$ac_lib_var=yes"
3233 else
3234   echo "configure: failed program was:" >&5
3235   cat conftest.$ac_ext >&5
3236   rm -rf conftest*
3237   eval "ac_cv_lib_$ac_lib_var=no"
3238 fi
3239 rm -f conftest*
3240 LIBS="$ac_save_LIBS"
3241
3242 fi
3243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3244   echo "$ac_t""yes" 1>&6
3245     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3247   cat >> confdefs.h <<EOF
3248 #define $ac_tr_lib 1
3249 EOF
3250
3251   LIBS="-lbsd $LIBS"
3252
3253 else
3254   echo "$ac_t""no" 1>&6
3255 fi
3256
3257 fi
3258 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
3259 echo "configure:3260: checking for setproctitle in -lutil" >&5
3260 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
3261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   ac_save_LIBS="$LIBS"
3265 LIBS="-lutil  $LIBS"
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 /* Override any gcc2 internal prototype to avoid an error.  */
3270 /* We use char because int might match the return type of a gcc2
3271     builtin and then its argument prototype would still apply.  */
3272 char setproctitle();
3273
3274 int main() {
3275 setproctitle()
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279   rm -rf conftest*
3280   eval "ac_cv_lib_$ac_lib_var=yes"
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   eval "ac_cv_lib_$ac_lib_var=no"
3286 fi
3287 rm -f conftest*
3288 LIBS="$ac_save_LIBS"
3289
3290 fi
3291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3292   echo "$ac_t""yes" 1>&6
3293     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3294     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3295   cat >> confdefs.h <<EOF
3296 #define $ac_tr_lib 1
3297 EOF
3298
3299   LIBS="-lutil $LIBS"
3300
3301 else
3302   echo "$ac_t""no" 1>&6
3303 fi
3304
3305 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3306 echo "configure:3307: checking for main in -lm" >&5
3307 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   ac_save_LIBS="$LIBS"
3312 LIBS="-lm  $LIBS"
3313 cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316
3317 int main() {
3318 main()
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 m | 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="-lm $LIBS"
3343
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3349 echo "configure:3350: checking for main in -ldl" >&5
3350 ac_lib_var=`echo dl'_'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="-ldl  $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 dl | 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="-ldl $LIBS"
3386
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3392 echo "configure:3393: checking for main in -lsocket" >&5
3393 ac_lib_var=`echo socket'_'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="-lsocket  $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 socket | 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="-lsocket $LIBS"
3429
3430 else
3431   echo "$ac_t""no" 1>&6
3432 fi
3433
3434 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3435 echo "configure:3436: checking for main in -lnsl" >&5
3436 ac_lib_var=`echo nsl'_'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="-lnsl  $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 nsl | 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="-lnsl $LIBS"
3472
3473 else
3474   echo "$ac_t""no" 1>&6
3475 fi
3476
3477 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
3478 echo "configure:3479: checking for main in -lipc" >&5
3479 ac_lib_var=`echo ipc'_'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="-lipc  $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 ipc | 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="-lipc $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 -llc""... $ac_c" 1>&6
3564 echo "configure:3565: checking for main in -llc" >&5
3565 ac_lib_var=`echo lc'_'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="-llc  $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 lc | 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="-llc $LIBS"
3601
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605
3606 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
3607 echo "configure:3608: checking for main in -ldld" >&5
3608 ac_lib_var=`echo dld'_'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="-ldld  $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 dld | 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="-ldld $LIBS"
3644
3645 else
3646   echo "$ac_t""no" 1>&6
3647 fi
3648
3649 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
3650 echo "configure:3651: checking for main in -lld" >&5
3651 ac_lib_var=`echo ld'_'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="-lld  $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 ld | 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="-lld $LIBS"
3687
3688 else
3689   echo "$ac_t""no" 1>&6
3690 fi
3691
3692 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
3693 echo "configure:3694: checking for main in -lcompat" >&5
3694 ac_lib_var=`echo compat'_'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="-lcompat  $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 compat | 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="-lcompat $LIBS"
3730
3731 else
3732   echo "$ac_t""no" 1>&6
3733 fi
3734
3735 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
3736 echo "configure:3737: checking for main in -lBSD" >&5
3737 ac_lib_var=`echo BSD'_'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="-lBSD  $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 BSD | 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="-lBSD $LIBS"
3773
3774 else
3775   echo "$ac_t""no" 1>&6
3776 fi
3777
3778 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3779 echo "configure:3780: checking for main in -lgen" >&5
3780 ac_lib_var=`echo gen'_'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="-lgen  $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 gen | 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="-lgen $LIBS"
3816
3817 else
3818   echo "$ac_t""no" 1>&6
3819 fi
3820
3821 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
3822 echo "configure:3823: checking for main in -lPW" >&5
3823 ac_lib_var=`echo PW'_'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="-lPW  $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 PW | 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="-lPW $LIBS"
3859
3860 else
3861   echo "$ac_t""no" 1>&6
3862 fi
3863
3864 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
3865 echo "configure:3866: checking for main in -lresolv" >&5
3866 ac_lib_var=`echo resolv'_'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="-lresolv  $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 resolv | 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="-lresolv $LIBS"
3902
3903 else
3904   echo "$ac_t""no" 1>&6
3905 fi
3906
3907 echo $ac_n "checking for main in -lunix""... $ac_c" 1>&6
3908 echo "configure:3909: checking for main in -lunix" >&5
3909 ac_lib_var=`echo unix'_'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="-lunix  $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 [unix] | 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="-lunix $LIBS"
3945
3946 else
3947   echo "$ac_t""no" 1>&6
3948 fi
3949
3950
3951 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
3952 echo "configure:3953: checking for library containing crypt" >&5
3953 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
3954   echo $ac_n "(cached) $ac_c" 1>&6
3955 else
3956   ac_func_search_save_LIBS="$LIBS"
3957 ac_cv_search_crypt="no"
3958 cat > conftest.$ac_ext <<EOF
3959 #line 3960 "configure"
3960 #include "confdefs.h"
3961 /* Override any gcc2 internal prototype to avoid an error.  */
3962 /* We use char because int might match the return type of a gcc2
3963     builtin and then its argument prototype would still apply.  */
3964 char crypt();
3965
3966 int main() {
3967 crypt()
3968 ; return 0; }
3969 EOF
3970 if { (eval echo configure:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3971   rm -rf conftest*
3972   ac_cv_search_crypt="none required"
3973 else
3974   echo "configure: failed program was:" >&5
3975   cat conftest.$ac_ext >&5
3976 fi
3977 rm -f conftest*
3978 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
3979 LIBS="-l$i  $ac_func_search_save_LIBS"
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 /* Override any gcc2 internal prototype to avoid an error.  */
3984 /* We use char because int might match the return type of a gcc2
3985     builtin and then its argument prototype would still apply.  */
3986 char crypt();
3987
3988 int main() {
3989 crypt()
3990 ; return 0; }
3991 EOF
3992 if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3993   rm -rf conftest*
3994   ac_cv_search_crypt="-l$i"
3995 break
3996 else
3997   echo "configure: failed program was:" >&5
3998   cat conftest.$ac_ext >&5
3999 fi
4000 rm -f conftest*
4001 done
4002 LIBS="$ac_func_search_save_LIBS"
4003 fi
4004
4005 echo "$ac_t""$ac_cv_search_crypt" 1>&6
4006 if test "$ac_cv_search_crypt" != "no"; then
4007   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
4008   
4009 else :
4010   
4011 fi
4012 echo $ac_n "checking for __inet_ntoa in -lbind""... $ac_c" 1>&6
4013 echo "configure:4014: checking for __inet_ntoa in -lbind" >&5
4014 ac_lib_var=`echo bind'_'__inet_ntoa | sed 'y%./+-%__p_%'`
4015 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   ac_save_LIBS="$LIBS"
4019 LIBS="-lbind  $LIBS"
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 /* Override any gcc2 internal prototype to avoid an error.  */
4024 /* We use char because int might match the return type of a gcc2
4025     builtin and then its argument prototype would still apply.  */
4026 char __inet_ntoa();
4027
4028 int main() {
4029 __inet_ntoa()
4030 ; return 0; }
4031 EOF
4032 if { (eval echo configure:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4033   rm -rf conftest*
4034   eval "ac_cv_lib_$ac_lib_var=yes"
4035 else
4036   echo "configure: failed program was:" >&5
4037   cat conftest.$ac_ext >&5
4038   rm -rf conftest*
4039   eval "ac_cv_lib_$ac_lib_var=no"
4040 fi
4041 rm -f conftest*
4042 LIBS="$ac_save_LIBS"
4043
4044 fi
4045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4046   echo "$ac_t""yes" 1>&6
4047     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4048     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4049   cat >> confdefs.h <<EOF
4050 #define $ac_tr_lib 1
4051 EOF
4052
4053   LIBS="-lbind $LIBS"
4054
4055 else
4056   echo "$ac_t""no" 1>&6
4057 fi
4058
4059 cat > conftest.$ac_ext <<EOF
4060 #line 4061 "configure"
4061 #include "confdefs.h"
4062 #include <zlib.h>
4063 EOF
4064 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4065   egrep "z_streamp" >/dev/null 2>&1; then
4066   rm -rf conftest*
4067   
4068 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
4069 echo "configure:4070: checking for inflate in -lz" >&5
4070 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
4071 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4072   echo $ac_n "(cached) $ac_c" 1>&6
4073 else
4074   ac_save_LIBS="$LIBS"
4075 LIBS="-lz  $LIBS"
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 /* Override any gcc2 internal prototype to avoid an error.  */
4080 /* We use char because int might match the return type of a gcc2
4081     builtin and then its argument prototype would still apply.  */
4082 char inflate();
4083
4084 int main() {
4085 inflate()
4086 ; return 0; }
4087 EOF
4088 if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4089   rm -rf conftest*
4090   eval "ac_cv_lib_$ac_lib_var=yes"
4091 else
4092   echo "configure: failed program was:" >&5
4093   cat conftest.$ac_ext >&5
4094   rm -rf conftest*
4095   eval "ac_cv_lib_$ac_lib_var=no"
4096 fi
4097 rm -f conftest*
4098 LIBS="$ac_save_LIBS"
4099
4100 fi
4101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4102   echo "$ac_t""yes" 1>&6
4103     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4104     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4105   cat >> confdefs.h <<EOF
4106 #define $ac_tr_lib 1
4107 EOF
4108
4109   LIBS="-lz $LIBS"
4110
4111 else
4112   echo "$ac_t""no" 1>&6
4113 fi
4114
4115
4116 fi
4117 rm -f conftest*
4118
4119
4120
4121 if test "$with_krb4" = yes ; then
4122   echo $ac_n "checking for des_encrypt in -ldes""... $ac_c" 1>&6
4123 echo "configure:4124: checking for des_encrypt in -ldes" >&5
4124 ac_lib_var=`echo des'_'des_encrypt | sed 'y%./+-%__p_%'`
4125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4126   echo $ac_n "(cached) $ac_c" 1>&6
4127 else
4128   ac_save_LIBS="$LIBS"
4129 LIBS="-ldes  $LIBS"
4130 cat > conftest.$ac_ext <<EOF
4131 #line 4132 "configure"
4132 #include "confdefs.h"
4133 /* Override any gcc2 internal prototype to avoid an error.  */
4134 /* We use char because int might match the return type of a gcc2
4135     builtin and then its argument prototype would still apply.  */
4136 char des_encrypt();
4137
4138 int main() {
4139 des_encrypt()
4140 ; return 0; }
4141 EOF
4142 if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4143   rm -rf conftest*
4144   eval "ac_cv_lib_$ac_lib_var=yes"
4145 else
4146   echo "configure: failed program was:" >&5
4147   cat conftest.$ac_ext >&5
4148   rm -rf conftest*
4149   eval "ac_cv_lib_$ac_lib_var=no"
4150 fi
4151 rm -f conftest*
4152 LIBS="$ac_save_LIBS"
4153
4154 fi
4155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4156   echo "$ac_t""yes" 1>&6
4157     ac_tr_lib=HAVE_LIB`echo des | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4158     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4159   cat >> confdefs.h <<EOF
4160 #define $ac_tr_lib 1
4161 EOF
4162
4163   LIBS="-ldes $LIBS"
4164
4165 else
4166   echo "$ac_t""no" 1>&6
4167 { echo "configure: error: library 'des' is required for Kerberos 4" 1>&2; exit 1; }
4168 fi
4169
4170   echo $ac_n "checking for krb_sendauth in -lkrb""... $ac_c" 1>&6
4171 echo "configure:4172: checking for krb_sendauth in -lkrb" >&5
4172 ac_lib_var=`echo krb'_'krb_sendauth | sed 'y%./+-%__p_%'`
4173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4174   echo $ac_n "(cached) $ac_c" 1>&6
4175 else
4176   ac_save_LIBS="$LIBS"
4177 LIBS="-lkrb  $LIBS"
4178 cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 /* Override any gcc2 internal prototype to avoid an error.  */
4182 /* We use char because int might match the return type of a gcc2
4183     builtin and then its argument prototype would still apply.  */
4184 char krb_sendauth();
4185
4186 int main() {
4187 krb_sendauth()
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4191   rm -rf conftest*
4192   eval "ac_cv_lib_$ac_lib_var=yes"
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   eval "ac_cv_lib_$ac_lib_var=no"
4198 fi
4199 rm -f conftest*
4200 LIBS="$ac_save_LIBS"
4201
4202 fi
4203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4204   echo "$ac_t""yes" 1>&6
4205     ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4206     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4207   cat >> confdefs.h <<EOF
4208 #define $ac_tr_lib 1
4209 EOF
4210
4211   LIBS="-lkrb $LIBS"
4212
4213 else
4214   echo "$ac_t""no" 1>&6
4215 { echo "configure: error: library 'krb' is required for Kerberos 4" 1>&2; exit 1; }
4216 fi
4217
4218 fi
4219
4220 if test "$with_krb5" = yes ; then
4221   echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
4222 echo "configure:4223: checking for com_err in -lcom_err" >&5
4223 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
4224 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4225   echo $ac_n "(cached) $ac_c" 1>&6
4226 else
4227   ac_save_LIBS="$LIBS"
4228 LIBS="-lcom_err  $LIBS"
4229 cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4232 /* Override any gcc2 internal prototype to avoid an error.  */
4233 /* We use char because int might match the return type of a gcc2
4234     builtin and then its argument prototype would still apply.  */
4235 char com_err();
4236
4237 int main() {
4238 com_err()
4239 ; return 0; }
4240 EOF
4241 if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4242   rm -rf conftest*
4243   eval "ac_cv_lib_$ac_lib_var=yes"
4244 else
4245   echo "configure: failed program was:" >&5
4246   cat conftest.$ac_ext >&5
4247   rm -rf conftest*
4248   eval "ac_cv_lib_$ac_lib_var=no"
4249 fi
4250 rm -f conftest*
4251 LIBS="$ac_save_LIBS"
4252
4253 fi
4254 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4255   echo "$ac_t""yes" 1>&6
4256     ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4257     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4258   cat >> confdefs.h <<EOF
4259 #define $ac_tr_lib 1
4260 EOF
4261
4262   LIBS="-lcom_err $LIBS"
4263
4264 else
4265   echo "$ac_t""no" 1>&6
4266 { echo "configure: error: library 'com_err' is required for Kerberos 5" 1>&2; exit 1; }
4267 fi
4268
4269   echo $ac_n "checking for krb5_encrypt in -lcrypto""... $ac_c" 1>&6
4270 echo "configure:4271: checking for krb5_encrypt in -lcrypto" >&5
4271 ac_lib_var=`echo crypto'_'krb5_encrypt | sed 'y%./+-%__p_%'`
4272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4273   echo $ac_n "(cached) $ac_c" 1>&6
4274 else
4275   ac_save_LIBS="$LIBS"
4276 LIBS="-lcrypto  $LIBS"
4277 cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 /* Override any gcc2 internal prototype to avoid an error.  */
4281 /* We use char because int might match the return type of a gcc2
4282     builtin and then its argument prototype would still apply.  */
4283 char krb5_encrypt();
4284
4285 int main() {
4286 krb5_encrypt()
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4290   rm -rf conftest*
4291   eval "ac_cv_lib_$ac_lib_var=yes"
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_lib_$ac_lib_var=no"
4297 fi
4298 rm -f conftest*
4299 LIBS="$ac_save_LIBS"
4300
4301 fi
4302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4303   echo "$ac_t""yes" 1>&6
4304     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4306   cat >> confdefs.h <<EOF
4307 #define $ac_tr_lib 1
4308 EOF
4309
4310   LIBS="-lcrypto $LIBS"
4311
4312 else
4313   echo "$ac_t""no" 1>&6
4314 echo $ac_n "checking for krb5_encrypt in -lk5crypto""... $ac_c" 1>&6
4315 echo "configure:4316: checking for krb5_encrypt in -lk5crypto" >&5
4316 ac_lib_var=`echo k5crypto'_'krb5_encrypt | sed 'y%./+-%__p_%'`
4317 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   ac_save_LIBS="$LIBS"
4321 LIBS="-lk5crypto  $LIBS"
4322 cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325 /* Override any gcc2 internal prototype to avoid an error.  */
4326 /* We use char because int might match the return type of a gcc2
4327     builtin and then its argument prototype would still apply.  */
4328 char krb5_encrypt();
4329
4330 int main() {
4331 krb5_encrypt()
4332 ; return 0; }
4333 EOF
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4335   rm -rf conftest*
4336   eval "ac_cv_lib_$ac_lib_var=yes"
4337 else
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -rf conftest*
4341   eval "ac_cv_lib_$ac_lib_var=no"
4342 fi
4343 rm -f conftest*
4344 LIBS="$ac_save_LIBS"
4345
4346 fi
4347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4348   echo "$ac_t""yes" 1>&6
4349     ac_tr_lib=HAVE_LIB`echo k5crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4351   cat >> confdefs.h <<EOF
4352 #define $ac_tr_lib 1
4353 EOF
4354
4355   LIBS="-lk5crypto $LIBS"
4356
4357 else
4358   echo "$ac_t""no" 1>&6
4359 { echo "configure: error: library 'crypto' or 'k5crypto' is required for Kerberos 5" 1>&2; exit 1; }
4360 fi
4361
4362 fi
4363
4364   echo $ac_n "checking for krb5_sendauth in -lkrb5""... $ac_c" 1>&6
4365 echo "configure:4366: checking for krb5_sendauth in -lkrb5" >&5
4366 ac_lib_var=`echo krb5'_'krb5_sendauth | sed 'y%./+-%__p_%'`
4367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4368   echo $ac_n "(cached) $ac_c" 1>&6
4369 else
4370   ac_save_LIBS="$LIBS"
4371 LIBS="-lkrb5  $LIBS"
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 /* Override any gcc2 internal prototype to avoid an error.  */
4376 /* We use char because int might match the return type of a gcc2
4377     builtin and then its argument prototype would still apply.  */
4378 char krb5_sendauth();
4379
4380 int main() {
4381 krb5_sendauth()
4382 ; return 0; }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4385   rm -rf conftest*
4386   eval "ac_cv_lib_$ac_lib_var=yes"
4387 else
4388   echo "configure: failed program was:" >&5
4389   cat conftest.$ac_ext >&5
4390   rm -rf conftest*
4391   eval "ac_cv_lib_$ac_lib_var=no"
4392 fi
4393 rm -f conftest*
4394 LIBS="$ac_save_LIBS"
4395
4396 fi
4397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4398   echo "$ac_t""yes" 1>&6
4399     ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4401   cat >> confdefs.h <<EOF
4402 #define $ac_tr_lib 1
4403 EOF
4404
4405   LIBS="-lkrb5 $LIBS"
4406
4407 else
4408   echo "$ac_t""no" 1>&6
4409 { echo "configure: error: library 'krb5' is required for Kerberos 5" 1>&2; exit 1; }
4410 fi
4411
4412 fi
4413
4414 if test "$with_openssl" = yes ; then
4415     echo $ac_n "checking for CRYPTO_new_ex_data in -lcrypto""... $ac_c" 1>&6
4416 echo "configure:4417: checking for CRYPTO_new_ex_data in -lcrypto" >&5
4417 ac_lib_var=`echo crypto'_'CRYPTO_new_ex_data | sed 'y%./+-%__p_%'`
4418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4419   echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421   ac_save_LIBS="$LIBS"
4422 LIBS="-lcrypto  $LIBS"
4423 cat > conftest.$ac_ext <<EOF
4424 #line 4425 "configure"
4425 #include "confdefs.h"
4426 /* Override any gcc2 internal prototype to avoid an error.  */
4427 /* We use char because int might match the return type of a gcc2
4428     builtin and then its argument prototype would still apply.  */
4429 char CRYPTO_new_ex_data();
4430
4431 int main() {
4432 CRYPTO_new_ex_data()
4433 ; return 0; }
4434 EOF
4435 if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4436   rm -rf conftest*
4437   eval "ac_cv_lib_$ac_lib_var=yes"
4438 else
4439   echo "configure: failed program was:" >&5
4440   cat conftest.$ac_ext >&5
4441   rm -rf conftest*
4442   eval "ac_cv_lib_$ac_lib_var=no"
4443 fi
4444 rm -f conftest*
4445 LIBS="$ac_save_LIBS"
4446
4447 fi
4448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4449   echo "$ac_t""yes" 1>&6
4450     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4452   cat >> confdefs.h <<EOF
4453 #define $ac_tr_lib 1
4454 EOF
4455
4456   LIBS="-lcrypto $LIBS"
4457
4458 else
4459   echo "$ac_t""no" 1>&6
4460 { echo "configure: error: library 'crypto' is required for OpenSSL" 1>&2; exit 1; }
4461 fi
4462
4463   echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
4464 echo "configure:4465: checking for SSL_library_init in -lssl" >&5
4465 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
4466 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   ac_save_LIBS="$LIBS"
4470 LIBS="-lssl  $LIBS"
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4474 /* Override any gcc2 internal prototype to avoid an error.  */
4475 /* We use char because int might match the return type of a gcc2
4476     builtin and then its argument prototype would still apply.  */
4477 char SSL_library_init();
4478
4479 int main() {
4480 SSL_library_init()
4481 ; return 0; }
4482 EOF
4483 if { (eval echo configure:4484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4484   rm -rf conftest*
4485   eval "ac_cv_lib_$ac_lib_var=yes"
4486 else
4487   echo "configure: failed program was:" >&5
4488   cat conftest.$ac_ext >&5
4489   rm -rf conftest*
4490   eval "ac_cv_lib_$ac_lib_var=no"
4491 fi
4492 rm -f conftest*
4493 LIBS="$ac_save_LIBS"
4494
4495 fi
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500   cat >> confdefs.h <<EOF
4501 #define $ac_tr_lib 1
4502 EOF
4503
4504   LIBS="-lssl $LIBS"
4505
4506 else
4507   echo "$ac_t""no" 1>&6
4508 { echo "configure: error: library 'ssl' is required for OpenSSL" 1>&2; exit 1; }
4509 fi
4510
4511 fi
4512
4513
4514 ##
4515 ## Header files
4516 ##
4517 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
4518 do
4519 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4520 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4521 echo "configure:4522: checking for $ac_hdr" >&5
4522 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4523   echo $ac_n "(cached) $ac_c" 1>&6
4524 else
4525   cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 #include <$ac_hdr>
4529 EOF
4530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4531 { (eval echo configure:4532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4533 if test -z "$ac_err"; then
4534   rm -rf conftest*
4535   eval "ac_cv_header_$ac_safe=yes"
4536 else
4537   echo "$ac_err" >&5
4538   echo "configure: failed program was:" >&5
4539   cat conftest.$ac_ext >&5
4540   rm -rf conftest*
4541   eval "ac_cv_header_$ac_safe=no"
4542 fi
4543 rm -f conftest*
4544 fi
4545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4546   echo "$ac_t""yes" 1>&6
4547     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4548   cat >> confdefs.h <<EOF
4549 #define $ac_tr_hdr 1
4550 EOF
4551  
4552 else
4553   echo "$ac_t""no" 1>&6
4554 fi
4555 done
4556
4557
4558 for ac_hdr in netinet/in.h
4559 do
4560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4562 echo "configure:4563: checking for $ac_hdr" >&5
4563 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4564   echo $ac_n "(cached) $ac_c" 1>&6
4565 else
4566   cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 #include <$ac_hdr>
4570 EOF
4571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4572 { (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4574 if test -z "$ac_err"; then
4575   rm -rf conftest*
4576   eval "ac_cv_header_$ac_safe=yes"
4577 else
4578   echo "$ac_err" >&5
4579   echo "configure: failed program was:" >&5
4580   cat conftest.$ac_ext >&5
4581   rm -rf conftest*
4582   eval "ac_cv_header_$ac_safe=no"
4583 fi
4584 rm -f conftest*
4585 fi
4586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4587   echo "$ac_t""yes" 1>&6
4588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4589   cat >> confdefs.h <<EOF
4590 #define $ac_tr_hdr 1
4591 EOF
4592  
4593 else
4594   echo "$ac_t""no" 1>&6
4595 fi
4596 done
4597
4598 echo $ac_n "checking for netinet/tcp.h""... $ac_c" 1>&6
4599 echo "configure:4600: checking for netinet/tcp.h" >&5
4600 cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4603
4604 #ifdef HAVE_NETINET_IN_H
4605 #include <netinet/in.h>
4606 #endif
4607 #include <netinet/tcp.h>
4608
4609 EOF
4610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4611 { (eval echo configure:4612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4613 if test -z "$ac_err"; then
4614   rm -rf conftest*
4615   cat >> confdefs.h <<\EOF
4616 #define HAVE_NETINET_TCP_H 1
4617 EOF
4618  echo "$ac_t""yes" 1>&6
4619 else
4620   echo "$ac_err" >&5
4621   echo "configure: failed program was:" >&5
4622   cat conftest.$ac_ext >&5
4623   rm -rf conftest*
4624   echo "$ac_t""no" 1>&6
4625 fi
4626 rm -f conftest*
4627
4628 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether string.h and strings.h may both be included" >&5
4630 if eval "test \"`echo '$''{'pgac_cv_header_strings_both'+set}'`\" = set"; then
4631   echo $ac_n "(cached) $ac_c" 1>&6
4632 else
4633   cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <string.h>
4637 #include <strings.h>
4638
4639 EOF
4640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4641 { (eval echo configure:4642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4643 if test -z "$ac_err"; then
4644   rm -rf conftest*
4645   cat > conftest.$ac_ext <<EOF
4646 #line 4647 "configure"
4647 #include "confdefs.h"
4648 #include <string.h>
4649 #include <strings.h>
4650
4651 int main() {
4652 int n = strcasecmp("a", "b");
4653 ; return 0; }
4654 EOF
4655 if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4656   rm -rf conftest*
4657   pgac_cv_header_strings_both=yes
4658 else
4659   echo "configure: failed program was:" >&5
4660   cat conftest.$ac_ext >&5
4661   rm -rf conftest*
4662   pgac_cv_header_strings_both=no
4663 fi
4664 rm -f conftest*
4665 else
4666   echo "$ac_err" >&5
4667   echo "configure: failed program was:" >&5
4668   cat conftest.$ac_ext >&5
4669   rm -rf conftest*
4670   pgac_cv_header_strings_both=no
4671 fi
4672 rm -f conftest*
4673 fi
4674
4675 echo "$ac_t""$pgac_cv_header_strings_both" 1>&6
4676 if test x"$pgac_cv_header_strings_both" = x"yes"; then
4677   cat >> confdefs.h <<\EOF
4678 #define STRING_H_WITH_STRINGS_H 1
4679 EOF
4680
4681 fi
4682
4683 for ac_hdr in readline/readline.h readline.h
4684 do
4685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_hdr" >&5
4688 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   cat > conftest.$ac_ext <<EOF
4692 #line 4693 "configure"
4693 #include "confdefs.h"
4694 #include <$ac_hdr>
4695 EOF
4696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4697 { (eval echo configure:4698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4699 if test -z "$ac_err"; then
4700   rm -rf conftest*
4701   eval "ac_cv_header_$ac_safe=yes"
4702 else
4703   echo "$ac_err" >&5
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   eval "ac_cv_header_$ac_safe=no"
4708 fi
4709 rm -f conftest*
4710 fi
4711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4712   echo "$ac_t""yes" 1>&6
4713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4714   cat >> confdefs.h <<EOF
4715 #define $ac_tr_hdr 1
4716 EOF
4717  break
4718 else
4719   echo "$ac_t""no" 1>&6
4720 fi
4721 done
4722
4723 for ac_hdr in readline/history.h history.h
4724 do
4725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4727 echo "configure:4728: checking for $ac_hdr" >&5
4728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 #include <$ac_hdr>
4735 EOF
4736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4737 { (eval echo configure:4738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4739 if test -z "$ac_err"; then
4740   rm -rf conftest*
4741   eval "ac_cv_header_$ac_safe=yes"
4742 else
4743   echo "$ac_err" >&5
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_header_$ac_safe=no"
4748 fi
4749 rm -f conftest*
4750 fi
4751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4752   echo "$ac_t""yes" 1>&6
4753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4754   cat >> confdefs.h <<EOF
4755 #define $ac_tr_hdr 1
4756 EOF
4757  break
4758 else
4759   echo "$ac_t""no" 1>&6
4760 fi
4761 done
4762
4763
4764 if test "$with_krb4" = yes ; then
4765   ac_safe=`echo "krb.h" | sed 'y%./+-%__p_%'`
4766 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
4767 echo "configure:4768: checking for krb.h" >&5
4768 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 #include <krb.h>
4775 EOF
4776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4777 { (eval echo configure:4778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4779 if test -z "$ac_err"; then
4780   rm -rf conftest*
4781   eval "ac_cv_header_$ac_safe=yes"
4782 else
4783   echo "$ac_err" >&5
4784   echo "configure: failed program was:" >&5
4785   cat conftest.$ac_ext >&5
4786   rm -rf conftest*
4787   eval "ac_cv_header_$ac_safe=no"
4788 fi
4789 rm -f conftest*
4790 fi
4791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4792   echo "$ac_t""yes" 1>&6
4793   :
4794 else
4795   echo "$ac_t""no" 1>&6
4796 { echo "configure: error: header file <krb.h> is required for Kerberos 4" 1>&2; exit 1; }
4797 fi
4798
4799 fi
4800
4801 if test "$with_krb5" = yes ; then
4802   ac_safe=`echo "krb5.h" | sed 'y%./+-%__p_%'`
4803 echo $ac_n "checking for krb5.h""... $ac_c" 1>&6
4804 echo "configure:4805: checking for krb5.h" >&5
4805 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808   cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811 #include <krb5.h>
4812 EOF
4813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4814 { (eval echo configure:4815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4816 if test -z "$ac_err"; then
4817   rm -rf conftest*
4818   eval "ac_cv_header_$ac_safe=yes"
4819 else
4820   echo "$ac_err" >&5
4821   echo "configure: failed program was:" >&5
4822   cat conftest.$ac_ext >&5
4823   rm -rf conftest*
4824   eval "ac_cv_header_$ac_safe=no"
4825 fi
4826 rm -f conftest*
4827 fi
4828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4829   echo "$ac_t""yes" 1>&6
4830   :
4831 else
4832   echo "$ac_t""no" 1>&6
4833 { echo "configure: error: header file <krb5.h> is required for Kerberos 5" 1>&2; exit 1; }
4834 fi
4835
4836   ac_safe=`echo "com_err.h" | sed 'y%./+-%__p_%'`
4837 echo $ac_n "checking for com_err.h""... $ac_c" 1>&6
4838 echo "configure:4839: checking for com_err.h" >&5
4839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4840   echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842   cat > conftest.$ac_ext <<EOF
4843 #line 4844 "configure"
4844 #include "confdefs.h"
4845 #include <com_err.h>
4846 EOF
4847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4848 { (eval echo configure:4849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4850 if test -z "$ac_err"; then
4851   rm -rf conftest*
4852   eval "ac_cv_header_$ac_safe=yes"
4853 else
4854   echo "$ac_err" >&5
4855   echo "configure: failed program was:" >&5
4856   cat conftest.$ac_ext >&5
4857   rm -rf conftest*
4858   eval "ac_cv_header_$ac_safe=no"
4859 fi
4860 rm -f conftest*
4861 fi
4862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4863   echo "$ac_t""yes" 1>&6
4864   :
4865 else
4866   echo "$ac_t""no" 1>&6
4867 { echo "configure: error: header file <com_err.h> is required for Kerberos 5" 1>&2; exit 1; }
4868 fi
4869
4870 fi
4871
4872 if test "$with_openssl" = yes ; then
4873   ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__p_%'`
4874 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
4875 echo "configure:4876: checking for openssl/ssl.h" >&5
4876 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   cat > conftest.$ac_ext <<EOF
4880 #line 4881 "configure"
4881 #include "confdefs.h"
4882 #include <openssl/ssl.h>
4883 EOF
4884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4885 { (eval echo configure:4886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4887 if test -z "$ac_err"; then
4888   rm -rf conftest*
4889   eval "ac_cv_header_$ac_safe=yes"
4890 else
4891   echo "$ac_err" >&5
4892   echo "configure: failed program was:" >&5
4893   cat conftest.$ac_ext >&5
4894   rm -rf conftest*
4895   eval "ac_cv_header_$ac_safe=no"
4896 fi
4897 rm -f conftest*
4898 fi
4899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4900   echo "$ac_t""yes" 1>&6
4901   :
4902 else
4903   echo "$ac_t""no" 1>&6
4904 { echo "configure: error: header file <openssl/ssl.h> is required for OpenSSL" 1>&2; exit 1; }
4905 fi
4906
4907   ac_safe=`echo "openssl/err.h" | sed 'y%./+-%__p_%'`
4908 echo $ac_n "checking for openssl/err.h""... $ac_c" 1>&6
4909 echo "configure:4910: checking for openssl/err.h" >&5
4910 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4911   echo $ac_n "(cached) $ac_c" 1>&6
4912 else
4913   cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 #include <openssl/err.h>
4917 EOF
4918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4919 { (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4921 if test -z "$ac_err"; then
4922   rm -rf conftest*
4923   eval "ac_cv_header_$ac_safe=yes"
4924 else
4925   echo "$ac_err" >&5
4926   echo "configure: failed program was:" >&5
4927   cat conftest.$ac_ext >&5
4928   rm -rf conftest*
4929   eval "ac_cv_header_$ac_safe=no"
4930 fi
4931 rm -f conftest*
4932 fi
4933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4934   echo "$ac_t""yes" 1>&6
4935   :
4936 else
4937   echo "$ac_t""no" 1>&6
4938 { echo "configure: error: header file <openssl/err.h> is required for OpenSSL" 1>&2; exit 1; }
4939 fi
4940
4941 fi
4942
4943
4944 ##
4945 ## Types, structures, compiler characteristics
4946 ##
4947 echo $ac_n "checking for working const""... $ac_c" 1>&6
4948 echo "configure:4949: checking for working const" >&5
4949 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4950   echo $ac_n "(cached) $ac_c" 1>&6
4951 else
4952   cat > conftest.$ac_ext <<EOF
4953 #line 4954 "configure"
4954 #include "confdefs.h"
4955
4956 int main() {
4957
4958 /* Ultrix mips cc rejects this.  */
4959 typedef int charset[2]; const charset x;
4960 /* SunOS 4.1.1 cc rejects this.  */
4961 char const *const *ccp;
4962 char **p;
4963 /* NEC SVR4.0.2 mips cc rejects this.  */
4964 struct point {int x, y;};
4965 static struct point const zero = {0,0};
4966 /* AIX XL C 1.02.0.0 rejects this.
4967    It does not let you subtract one const X* pointer from another in an arm
4968    of an if-expression whose if-part is not a constant expression */
4969 const char *g = "string";
4970 ccp = &g + (g ? g-g : 0);
4971 /* HPUX 7.0 cc rejects these. */
4972 ++ccp;
4973 p = (char**) ccp;
4974 ccp = (char const *const *) p;
4975 { /* SCO 3.2v4 cc rejects this.  */
4976   char *t;
4977   char const *s = 0 ? (char *) 0 : (char const *) 0;
4978
4979   *t++ = 0;
4980 }
4981 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4982   int x[] = {25, 17};
4983   const int *foo = &x[0];
4984   ++foo;
4985 }
4986 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4987   typedef const int *iptr;
4988   iptr p = 0;
4989   ++p;
4990 }
4991 { /* AIX XL C 1.02.0.0 rejects this saying
4992      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4993   struct s { int j; const int *ap[3]; };
4994   struct s *b; b->j = 5;
4995 }
4996 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4997   const int foo = 10;
4998 }
4999
5000 ; return 0; }
5001 EOF
5002 if { (eval echo configure:5003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5003   rm -rf conftest*
5004   ac_cv_c_const=yes
5005 else
5006   echo "configure: failed program was:" >&5
5007   cat conftest.$ac_ext >&5
5008   rm -rf conftest*
5009   ac_cv_c_const=no
5010 fi
5011 rm -f conftest*
5012 fi
5013
5014 echo "$ac_t""$ac_cv_c_const" 1>&6
5015 if test $ac_cv_c_const = no; then
5016   cat >> confdefs.h <<\EOF
5017 #define const 
5018 EOF
5019
5020 fi
5021
5022 echo $ac_n "checking for inline""... $ac_c" 1>&6
5023 echo "configure:5024: checking for inline" >&5
5024 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5025   echo $ac_n "(cached) $ac_c" 1>&6
5026 else
5027   ac_cv_c_inline=no
5028 for ac_kw in inline __inline__ __inline; do
5029   cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032
5033 int main() {
5034 } $ac_kw foo() {
5035 ; return 0; }
5036 EOF
5037 if { (eval echo configure:5038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5038   rm -rf conftest*
5039   ac_cv_c_inline=$ac_kw; break
5040 else
5041   echo "configure: failed program was:" >&5
5042   cat conftest.$ac_ext >&5
5043 fi
5044 rm -f conftest*
5045 done
5046
5047 fi
5048
5049 echo "$ac_t""$ac_cv_c_inline" 1>&6
5050 case "$ac_cv_c_inline" in
5051   inline | yes) ;;
5052   no) cat >> confdefs.h <<\EOF
5053 #define inline 
5054 EOF
5055  ;;
5056   *)  cat >> confdefs.h <<EOF
5057 #define inline $ac_cv_c_inline
5058 EOF
5059  ;;
5060 esac
5061
5062
5063
5064 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
5065 echo "configure:5066: checking for preprocessor stringizing operator" >&5
5066 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069   cat > conftest.$ac_ext <<EOF
5070 #line 5071 "configure"
5071 #include "confdefs.h"
5072
5073 #define x(y) #y
5074
5075 char *s = x(teststring);
5076
5077 EOF
5078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5079   egrep "#teststring" >/dev/null 2>&1; then
5080   rm -rf conftest*
5081   ac_cv_c_stringize=no
5082 else
5083   rm -rf conftest*
5084   ac_cv_c_stringize=yes
5085 fi
5086 rm -f conftest*
5087
5088 fi
5089
5090 if test "${ac_cv_c_stringize}" = yes
5091 then
5092         cat >> confdefs.h <<\EOF
5093 #define HAVE_STRINGIZE 1
5094 EOF
5095
5096 fi
5097 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
5098
5099 echo $ac_n "checking for signed types""... $ac_c" 1>&6
5100 echo "configure:5101: checking for signed types" >&5
5101 if eval "test \"`echo '$''{'pgac_cv_c_signed'+set}'`\" = set"; then
5102   echo $ac_n "(cached) $ac_c" 1>&6
5103 else
5104   cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107
5108 int main() {
5109 signed char c; signed short s; signed int i;
5110 ; return 0; }
5111 EOF
5112 if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5113   rm -rf conftest*
5114   pgac_cv_c_signed=yes
5115 else
5116   echo "configure: failed program was:" >&5
5117   cat conftest.$ac_ext >&5
5118   rm -rf conftest*
5119   pgac_cv_c_signed=no
5120 fi
5121 rm -f conftest*
5122 fi
5123
5124 echo "$ac_t""$pgac_cv_c_signed" 1>&6
5125 if test x"$pgac_cv_c_signed" = xno ; then
5126   cat >> confdefs.h <<\EOF
5127 #define signed 
5128 EOF
5129
5130 fi
5131 echo $ac_n "checking for volatile""... $ac_c" 1>&6
5132 echo "configure:5133: checking for volatile" >&5
5133 if eval "test \"`echo '$''{'pgac_cv_c_volatile'+set}'`\" = set"; then
5134   echo $ac_n "(cached) $ac_c" 1>&6
5135 else
5136   cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139
5140 int main() {
5141 extern volatile int i;
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5145   rm -rf conftest*
5146   pgac_cv_c_volatile=yes
5147 else
5148   echo "configure: failed program was:" >&5
5149   cat conftest.$ac_ext >&5
5150   rm -rf conftest*
5151   pgac_cv_c_volatile=no
5152 fi
5153 rm -f conftest*
5154 fi
5155
5156 echo "$ac_t""$pgac_cv_c_volatile" 1>&6
5157 if test x"$pgac_cv_c_volatile" = xno ; then
5158   cat >> confdefs.h <<\EOF
5159 #define volatile 
5160 EOF
5161
5162 fi
5163 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5164 echo "configure:5165: checking whether struct tm is in sys/time.h or time.h" >&5
5165 if eval "test \"`echo '$''{'ac_cv_struct_tm'+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 #include <sys/types.h>
5172 #include <time.h>
5173 int main() {
5174 struct tm *tp; tp->tm_sec;
5175 ; return 0; }
5176 EOF
5177 if { (eval echo configure:5178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5178   rm -rf conftest*
5179   ac_cv_struct_tm=time.h
5180 else
5181   echo "configure: failed program was:" >&5
5182   cat conftest.$ac_ext >&5
5183   rm -rf conftest*
5184   ac_cv_struct_tm=sys/time.h
5185 fi
5186 rm -f conftest*
5187 fi
5188
5189 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5190 if test $ac_cv_struct_tm = sys/time.h; then
5191   cat >> confdefs.h <<\EOF
5192 #define TM_IN_SYS_TIME 1
5193 EOF
5194
5195 fi
5196
5197 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5198 echo "configure:5199: checking for tm_zone in struct tm" >&5
5199 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5200   echo $ac_n "(cached) $ac_c" 1>&6
5201 else
5202   cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 #include <sys/types.h>
5206 #include <$ac_cv_struct_tm>
5207 int main() {
5208 struct tm tm; tm.tm_zone;
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5212   rm -rf conftest*
5213   ac_cv_struct_tm_zone=yes
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217   rm -rf conftest*
5218   ac_cv_struct_tm_zone=no
5219 fi
5220 rm -f conftest*
5221 fi
5222
5223 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5224 if test "$ac_cv_struct_tm_zone" = yes; then
5225   cat >> confdefs.h <<\EOF
5226 #define HAVE_TM_ZONE 1
5227 EOF
5228
5229 else
5230   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5231 echo "configure:5232: checking for tzname" >&5
5232 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5233   echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235   cat > conftest.$ac_ext <<EOF
5236 #line 5237 "configure"
5237 #include "confdefs.h"
5238 #include <time.h>
5239 #ifndef tzname /* For SGI.  */
5240 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5241 #endif
5242 int main() {
5243 atoi(*tzname);
5244 ; return 0; }
5245 EOF
5246 if { (eval echo configure:5247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5247   rm -rf conftest*
5248   ac_cv_var_tzname=yes
5249 else
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   ac_cv_var_tzname=no
5254 fi
5255 rm -f conftest*
5256 fi
5257
5258 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5259   if test $ac_cv_var_tzname = yes; then
5260     cat >> confdefs.h <<\EOF
5261 #define HAVE_TZNAME 1
5262 EOF
5263
5264   fi
5265 fi
5266
5267 echo $ac_n "checking for union semun""... $ac_c" 1>&6
5268 echo "configure:5269: checking for union semun" >&5
5269 if eval "test \"`echo '$''{'pgac_cv_union_semun'+set}'`\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272   cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5275 #include <sys/types.h>
5276 #include <sys/ipc.h>
5277 #include <sys/sem.h>
5278 int main() {
5279 union semun semun;
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5283   rm -rf conftest*
5284   pgac_cv_union_semun=yes
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   pgac_cv_union_semun=no
5290 fi
5291 rm -f conftest*
5292 fi
5293
5294 echo "$ac_t""$pgac_cv_union_semun" 1>&6
5295 if test x"$pgac_cv_union_semun" = xyes ; then
5296   cat >> confdefs.h <<\EOF
5297 #define HAVE_UNION_SEMUN 1
5298 EOF
5299
5300 fi
5301 echo $ac_n "checking for struct sockaddr_un""... $ac_c" 1>&6
5302 echo "configure:5303: checking for struct sockaddr_un" >&5
5303 if eval "test \"`echo '$''{'pgac_cv_struct_sockaddr_un'+set}'`\" = set"; then
5304   echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306   cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 #include <sys/types.h>
5310 #ifdef HAVE_SYS_UN_H
5311 #include <sys/un.h>
5312 #endif
5313 int main() {
5314 struct sockaddr_un un;
5315 ; return 0; }
5316 EOF
5317 if { (eval echo configure:5318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5318   rm -rf conftest*
5319   pgac_cv_struct_sockaddr_un=yes
5320 else
5321   echo "configure: failed program was:" >&5
5322   cat conftest.$ac_ext >&5
5323   rm -rf conftest*
5324   pgac_cv_struct_sockaddr_un=no
5325 fi
5326 rm -f conftest*
5327 fi
5328
5329 echo "$ac_t""$pgac_cv_struct_sockaddr_un" 1>&6
5330 if test x"$pgac_cv_struct_sockaddr_un" = xyes; then
5331   cat >> confdefs.h <<\EOF
5332 #define HAVE_STRUCT_SOCKADDR_UN 1
5333 EOF
5334
5335 fi
5336
5337 ##
5338 ## Functions, global variables
5339 ##
5340 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
5341 echo "configure:5342: checking for int timezone" >&5
5342 if eval "test \"`echo '$''{'pgac_cv_var_int_timezone'+set}'`\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 #include <time.h>
5349 int res;
5350 int main() {
5351 res = timezone / 60;
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   pgac_cv_var_int_timezone=yes
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   pgac_cv_var_int_timezone=no
5362 fi
5363 rm -f conftest*
5364 fi
5365
5366 echo "$ac_t""$pgac_cv_var_int_timezone" 1>&6
5367 if test x"$pgac_cv_var_int_timezone" = xyes ; then
5368   cat >> confdefs.h <<\EOF
5369 #define HAVE_INT_TIMEZONE 
5370 EOF
5371
5372 fi
5373 echo $ac_n "checking types of arguments for accept()""... $ac_c" 1>&6
5374 echo "configure:5375: checking types of arguments for accept()" >&5
5375  if eval "test \"`echo '$''{'ac_cv_func_accept_arg1'+set}'`\" = set"; then
5376   echo $ac_n "(cached) $ac_c" 1>&6
5377 else
5378    if eval "test \"`echo '$''{'ac_cv_func_accept_arg2'+set}'`\" = set"; then
5379   echo $ac_n "(cached) $ac_c" 1>&6
5380 else
5381     if eval "test \"`echo '$''{'ac_cv_func_accept_arg3'+set}'`\" = set"; then
5382   echo $ac_n "(cached) $ac_c" 1>&6
5383 else
5384      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
5385      for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
5386       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
5387        cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 #ifdef HAVE_SYS_TYPES_H
5391 #include <sys/types.h>
5392 #endif
5393 #ifdef HAVE_SYS_SOCKET_H
5394 #include <sys/socket.h>
5395 #endif
5396 extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
5397 int main() {
5398
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5402   rm -rf conftest*
5403   ac_not_found=no; break 3
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   ac_not_found=yes
5409 fi
5410 rm -f conftest*
5411       done
5412      done
5413     done
5414     if test "$ac_not_found" = yes; then
5415       { echo "configure: error: could not determine argument types" 1>&2; exit 1; }
5416     fi
5417     if test "$ac_cv_func_accept_arg3" = "void"; then
5418       ac_cv_func_accept_arg3=int
5419     fi
5420    
5421 fi
5422   
5423 fi
5424  
5425 fi
5426  echo "$ac_t""$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" 1>&6
5427  cat >> confdefs.h <<EOF
5428 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
5429 EOF
5430
5431  cat >> confdefs.h <<EOF
5432 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
5433 EOF
5434
5435  cat >> confdefs.h <<EOF
5436 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
5437 EOF
5438
5439
5440 echo $ac_n "checking whether gettimeofday takes only one argument""... $ac_c" 1>&6
5441 echo "configure:5442: checking whether gettimeofday takes only one argument" >&5
5442 if eval "test \"`echo '$''{'pgac_cv_func_gettimeofday_1arg'+set}'`\" = set"; then
5443   echo $ac_n "(cached) $ac_c" 1>&6
5444 else
5445   cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 #include <sys/time.h>
5449 int main() {
5450 struct timeval *tp;
5451 struct timezone *tzp;
5452 gettimeofday(tp,tzp);
5453 ; return 0; }
5454 EOF
5455 if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5456   rm -rf conftest*
5457   pgac_cv_func_gettimeofday_1arg=no
5458 else
5459   echo "configure: failed program was:" >&5
5460   cat conftest.$ac_ext >&5
5461   rm -rf conftest*
5462   pgac_cv_func_gettimeofday_1arg=yes
5463 fi
5464 rm -f conftest*
5465 fi
5466
5467 echo "$ac_t""$pgac_cv_func_gettimeofday_1arg" 1>&6
5468 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
5469   cat >> confdefs.h <<\EOF
5470 #define GETTIMEOFDAY_1ARG 
5471 EOF
5472
5473 fi
5474
5475 for ac_func in fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
5476 do
5477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5478 echo "configure:5479: checking for $ac_func" >&5
5479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5480   echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482   cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* System header to define __stub macros and hopefully few prototypes,
5486     which can conflict with char $ac_func(); below.  */
5487 #include <assert.h>
5488 /* Override any gcc2 internal prototype to avoid an error.  */
5489 /* We use char because int might match the return type of a gcc2
5490     builtin and then its argument prototype would still apply.  */
5491 char $ac_func();
5492
5493 int main() {
5494
5495 /* The GNU C library defines this for functions which it implements
5496     to always fail with ENOSYS.  Some functions are actually named
5497     something starting with __ and the normal name is an alias.  */
5498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5499 choke me
5500 #else
5501 $ac_func();
5502 #endif
5503
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5507   rm -rf conftest*
5508   eval "ac_cv_func_$ac_func=yes"
5509 else
5510   echo "configure: failed program was:" >&5
5511   cat conftest.$ac_ext >&5
5512   rm -rf conftest*
5513   eval "ac_cv_func_$ac_func=no"
5514 fi
5515 rm -f conftest*
5516 fi
5517
5518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5519   echo "$ac_t""yes" 1>&6
5520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5521   cat >> confdefs.h <<EOF
5522 #define $ac_tr_func 1
5523 EOF
5524  
5525 else
5526   echo "$ac_t""no" 1>&6
5527 fi
5528 done
5529
5530
5531 cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534 #include <unistd.h>
5535 EOF
5536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5537   egrep "fdatasync" >/dev/null 2>&1; then
5538   rm -rf conftest*
5539   cat >> confdefs.h <<\EOF
5540 #define HAVE_FDATASYNC_DECL 1
5541 EOF
5542
5543 fi
5544 rm -f conftest*
5545
5546
5547 echo $ac_n "checking for PS_STRINGS""... $ac_c" 1>&6
5548 echo "configure:5549: checking for PS_STRINGS" >&5
5549 if eval "test \"`echo '$''{'pgac_cv_var_PS_STRINGS'+set}'`\" = set"; then
5550   echo $ac_n "(cached) $ac_c" 1>&6
5551 else
5552   cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 #include <machine/vmparam.h>
5556 #include <sys/exec.h>
5557
5558 int main() {
5559 PS_STRINGS->ps_nargvstr = 1;
5560 PS_STRINGS->ps_argvstr = "foo";
5561 ; return 0; }
5562 EOF
5563 if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5564   rm -rf conftest*
5565   pgac_cv_var_PS_STRINGS=yes
5566 else
5567   echo "configure: failed program was:" >&5
5568   cat conftest.$ac_ext >&5
5569   rm -rf conftest*
5570   pgac_cv_var_PS_STRINGS=no
5571 fi
5572 rm -f conftest*
5573 fi
5574
5575 echo "$ac_t""$pgac_cv_var_PS_STRINGS" 1>&6
5576 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
5577   cat >> confdefs.h <<\EOF
5578 #define HAVE_PS_STRINGS 
5579 EOF
5580
5581 fi
5582
5583 SNPRINTF=''
5584 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
5585 echo "configure:5586: checking for snprintf" >&5
5586 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
5587   echo $ac_n "(cached) $ac_c" 1>&6
5588 else
5589   cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5592 /* System header to define __stub macros and hopefully few prototypes,
5593     which can conflict with char snprintf(); below.  */
5594 #include <assert.h>
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 /* We use char because int might match the return type of a gcc2
5597     builtin and then its argument prototype would still apply.  */
5598 char snprintf();
5599
5600 int main() {
5601
5602 /* The GNU C library defines this for functions which it implements
5603     to always fail with ENOSYS.  Some functions are actually named
5604     something starting with __ and the normal name is an alias.  */
5605 #if defined (__stub_snprintf) || defined (__stub___snprintf)
5606 choke me
5607 #else
5608 snprintf();
5609 #endif
5610
5611 ; return 0; }
5612 EOF
5613 if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5614   rm -rf conftest*
5615   eval "ac_cv_func_snprintf=yes"
5616 else
5617   echo "configure: failed program was:" >&5
5618   cat conftest.$ac_ext >&5
5619   rm -rf conftest*
5620   eval "ac_cv_func_snprintf=no"
5621 fi
5622 rm -f conftest*
5623 fi
5624
5625 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
5626   echo "$ac_t""yes" 1>&6
5627   cat >> confdefs.h <<\EOF
5628 #define HAVE_SNPRINTF 1
5629 EOF
5630
5631 else
5632   echo "$ac_t""no" 1>&6
5633 SNPRINTF='snprintf.o'
5634 fi
5635
5636 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
5637 echo "configure:5638: checking for vsnprintf" >&5
5638 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
5639   echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641   cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 /* System header to define __stub macros and hopefully few prototypes,
5645     which can conflict with char vsnprintf(); below.  */
5646 #include <assert.h>
5647 /* Override any gcc2 internal prototype to avoid an error.  */
5648 /* We use char because int might match the return type of a gcc2
5649     builtin and then its argument prototype would still apply.  */
5650 char vsnprintf();
5651
5652 int main() {
5653
5654 /* The GNU C library defines this for functions which it implements
5655     to always fail with ENOSYS.  Some functions are actually named
5656     something starting with __ and the normal name is an alias.  */
5657 #if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
5658 choke me
5659 #else
5660 vsnprintf();
5661 #endif
5662
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5666   rm -rf conftest*
5667   eval "ac_cv_func_vsnprintf=yes"
5668 else
5669   echo "configure: failed program was:" >&5
5670   cat conftest.$ac_ext >&5
5671   rm -rf conftest*
5672   eval "ac_cv_func_vsnprintf=no"
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
5678   echo "$ac_t""yes" 1>&6
5679   cat >> confdefs.h <<\EOF
5680 #define HAVE_VSNPRINTF 1
5681 EOF
5682
5683 else
5684   echo "$ac_t""no" 1>&6
5685 SNPRINTF='snprintf.o'
5686 fi
5687
5688
5689 cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692 #include <stdio.h>
5693 EOF
5694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5695   egrep "snprintf" >/dev/null 2>&1; then
5696   rm -rf conftest*
5697   cat >> confdefs.h <<\EOF
5698 #define HAVE_SNPRINTF_DECL 1
5699 EOF
5700
5701 fi
5702 rm -f conftest*
5703
5704 cat > conftest.$ac_ext <<EOF
5705 #line 5706 "configure"
5706 #include "confdefs.h"
5707 #include <stdio.h>
5708 EOF
5709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5710   egrep "vsnprintf" >/dev/null 2>&1; then
5711   rm -rf conftest*
5712   cat >> confdefs.h <<\EOF
5713 #define HAVE_VSNPRINTF_DECL 1
5714 EOF
5715
5716 fi
5717 rm -f conftest*
5718
5719
5720 # do this one the hard way in case isinf() is a macro
5721 echo $ac_n "checking for isinf""... $ac_c" 1>&6
5722 echo "configure:5723: checking for isinf" >&5
5723 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
5724   echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726   cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729 #include <math.h>
5730
5731 int main() {
5732 double x = 0.0; int res = isinf(x);
5733 ; return 0; }
5734 EOF
5735 if { (eval echo configure:5736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5736   rm -rf conftest*
5737   ac_cv_func_isinf=yes
5738 else
5739   echo "configure: failed program was:" >&5
5740   cat conftest.$ac_ext >&5
5741   rm -rf conftest*
5742   ac_cv_func_isinf=no
5743 fi
5744 rm -f conftest*
5745 fi
5746
5747 echo "$ac_t""$ac_cv_func_isinf" 1>&6
5748
5749 if test $ac_cv_func_isinf = yes ; then
5750   cat >> confdefs.h <<\EOF
5751 #define HAVE_ISINF 1
5752 EOF
5753
5754   ISINF=
5755 else
5756   ISINF='isinf.o'
5757   # Look for a way to implement a substitute for isinf()
5758   for ac_func in fpclass fp_class fp_class_d class
5759 do
5760 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5761 echo "configure:5762: checking for $ac_func" >&5
5762 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5763   echo $ac_n "(cached) $ac_c" 1>&6
5764 else
5765   cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* System header to define __stub macros and hopefully few prototypes,
5769     which can conflict with char $ac_func(); below.  */
5770 #include <assert.h>
5771 /* Override any gcc2 internal prototype to avoid an error.  */
5772 /* We use char because int might match the return type of a gcc2
5773     builtin and then its argument prototype would still apply.  */
5774 char $ac_func();
5775
5776 int main() {
5777
5778 /* The GNU C library defines this for functions which it implements
5779     to always fail with ENOSYS.  Some functions are actually named
5780     something starting with __ and the normal name is an alias.  */
5781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5782 choke me
5783 #else
5784 $ac_func();
5785 #endif
5786
5787 ; return 0; }
5788 EOF
5789 if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5790   rm -rf conftest*
5791   eval "ac_cv_func_$ac_func=yes"
5792 else
5793   echo "configure: failed program was:" >&5
5794   cat conftest.$ac_ext >&5
5795   rm -rf conftest*
5796   eval "ac_cv_func_$ac_func=no"
5797 fi
5798 rm -f conftest*
5799 fi
5800
5801 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5802   echo "$ac_t""yes" 1>&6
5803     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5804   cat >> confdefs.h <<EOF
5805 #define $ac_tr_func 1
5806 EOF
5807  break
5808 else
5809   echo "$ac_t""no" 1>&6
5810 fi
5811 done
5812
5813 fi
5814
5815
5816 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
5817 echo "configure:5818: checking for getrusage" >&5
5818 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
5819   echo $ac_n "(cached) $ac_c" 1>&6
5820 else
5821   cat > conftest.$ac_ext <<EOF
5822 #line 5823 "configure"
5823 #include "confdefs.h"
5824 /* System header to define __stub macros and hopefully few prototypes,
5825     which can conflict with char getrusage(); below.  */
5826 #include <assert.h>
5827 /* Override any gcc2 internal prototype to avoid an error.  */
5828 /* We use char because int might match the return type of a gcc2
5829     builtin and then its argument prototype would still apply.  */
5830 char getrusage();
5831
5832 int main() {
5833
5834 /* The GNU C library defines this for functions which it implements
5835     to always fail with ENOSYS.  Some functions are actually named
5836     something starting with __ and the normal name is an alias.  */
5837 #if defined (__stub_getrusage) || defined (__stub___getrusage)
5838 choke me
5839 #else
5840 getrusage();
5841 #endif
5842
5843 ; return 0; }
5844 EOF
5845 if { (eval echo configure:5846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5846   rm -rf conftest*
5847   eval "ac_cv_func_getrusage=yes"
5848 else
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_func_getrusage=no"
5853 fi
5854 rm -f conftest*
5855 fi
5856
5857 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
5858   echo "$ac_t""yes" 1>&6
5859   cat >> confdefs.h <<\EOF
5860 #define HAVE_GETRUSAGE 1
5861 EOF
5862
5863 else
5864   echo "$ac_t""no" 1>&6
5865 GETRUSAGE='getrusage.o'
5866 fi
5867
5868
5869 echo $ac_n "checking for srandom""... $ac_c" 1>&6
5870 echo "configure:5871: checking for srandom" >&5
5871 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
5872   echo $ac_n "(cached) $ac_c" 1>&6
5873 else
5874   cat > conftest.$ac_ext <<EOF
5875 #line 5876 "configure"
5876 #include "confdefs.h"
5877 /* System header to define __stub macros and hopefully few prototypes,
5878     which can conflict with char srandom(); below.  */
5879 #include <assert.h>
5880 /* Override any gcc2 internal prototype to avoid an error.  */
5881 /* We use char because int might match the return type of a gcc2
5882     builtin and then its argument prototype would still apply.  */
5883 char srandom();
5884
5885 int main() {
5886
5887 /* The GNU C library defines this for functions which it implements
5888     to always fail with ENOSYS.  Some functions are actually named
5889     something starting with __ and the normal name is an alias.  */
5890 #if defined (__stub_srandom) || defined (__stub___srandom)
5891 choke me
5892 #else
5893 srandom();
5894 #endif
5895
5896 ; return 0; }
5897 EOF
5898 if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5899   rm -rf conftest*
5900   eval "ac_cv_func_srandom=yes"
5901 else
5902   echo "configure: failed program was:" >&5
5903   cat conftest.$ac_ext >&5
5904   rm -rf conftest*
5905   eval "ac_cv_func_srandom=no"
5906 fi
5907 rm -f conftest*
5908 fi
5909
5910 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
5911   echo "$ac_t""yes" 1>&6
5912   cat >> confdefs.h <<\EOF
5913 #define HAVE_SRANDOM 1
5914 EOF
5915
5916 else
5917   echo "$ac_t""no" 1>&6
5918 SRANDOM='srandom.o'
5919 fi
5920
5921
5922 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
5923 echo "configure:5924: checking for gethostname" >&5
5924 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
5925   echo $ac_n "(cached) $ac_c" 1>&6
5926 else
5927   cat > conftest.$ac_ext <<EOF
5928 #line 5929 "configure"
5929 #include "confdefs.h"
5930 /* System header to define __stub macros and hopefully few prototypes,
5931     which can conflict with char gethostname(); below.  */
5932 #include <assert.h>
5933 /* Override any gcc2 internal prototype to avoid an error.  */
5934 /* We use char because int might match the return type of a gcc2
5935     builtin and then its argument prototype would still apply.  */
5936 char gethostname();
5937
5938 int main() {
5939
5940 /* The GNU C library defines this for functions which it implements
5941     to always fail with ENOSYS.  Some functions are actually named
5942     something starting with __ and the normal name is an alias.  */
5943 #if defined (__stub_gethostname) || defined (__stub___gethostname)
5944 choke me
5945 #else
5946 gethostname();
5947 #endif
5948
5949 ; return 0; }
5950 EOF
5951 if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5952   rm -rf conftest*
5953   eval "ac_cv_func_gethostname=yes"
5954 else
5955   echo "configure: failed program was:" >&5
5956   cat conftest.$ac_ext >&5
5957   rm -rf conftest*
5958   eval "ac_cv_func_gethostname=no"
5959 fi
5960 rm -f conftest*
5961 fi
5962
5963 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
5964   echo "$ac_t""yes" 1>&6
5965   cat >> confdefs.h <<\EOF
5966 #define HAVE_GETHOSTNAME 1
5967 EOF
5968
5969 else
5970   echo "$ac_t""no" 1>&6
5971 GETHOSTNAME='gethostname.o'
5972 fi
5973
5974
5975 echo $ac_n "checking for random""... $ac_c" 1>&6
5976 echo "configure:5977: checking for random" >&5
5977 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
5978   echo $ac_n "(cached) $ac_c" 1>&6
5979 else
5980   cat > conftest.$ac_ext <<EOF
5981 #line 5982 "configure"
5982 #include "confdefs.h"
5983 /* System header to define __stub macros and hopefully few prototypes,
5984     which can conflict with char random(); below.  */
5985 #include <assert.h>
5986 /* Override any gcc2 internal prototype to avoid an error.  */
5987 /* We use char because int might match the return type of a gcc2
5988     builtin and then its argument prototype would still apply.  */
5989 char random();
5990
5991 int main() {
5992
5993 /* The GNU C library defines this for functions which it implements
5994     to always fail with ENOSYS.  Some functions are actually named
5995     something starting with __ and the normal name is an alias.  */
5996 #if defined (__stub_random) || defined (__stub___random)
5997 choke me
5998 #else
5999 random();
6000 #endif
6001
6002 ; return 0; }
6003 EOF
6004 if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6005   rm -rf conftest*
6006   eval "ac_cv_func_random=yes"
6007 else
6008   echo "configure: failed program was:" >&5
6009   cat conftest.$ac_ext >&5
6010   rm -rf conftest*
6011   eval "ac_cv_func_random=no"
6012 fi
6013 rm -f conftest*
6014 fi
6015
6016 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
6017   echo "$ac_t""yes" 1>&6
6018   cat >> confdefs.h <<\EOF
6019 #define HAVE_RANDOM 1
6020 EOF
6021
6022 else
6023   echo "$ac_t""no" 1>&6
6024 MISSING_RANDOM='random.o'
6025 fi
6026
6027
6028 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
6029 echo "configure:6030: checking for inet_aton" >&5
6030 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
6031   echo $ac_n "(cached) $ac_c" 1>&6
6032 else
6033   cat > conftest.$ac_ext <<EOF
6034 #line 6035 "configure"
6035 #include "confdefs.h"
6036 /* System header to define __stub macros and hopefully few prototypes,
6037     which can conflict with char inet_aton(); below.  */
6038 #include <assert.h>
6039 /* Override any gcc2 internal prototype to avoid an error.  */
6040 /* We use char because int might match the return type of a gcc2
6041     builtin and then its argument prototype would still apply.  */
6042 char inet_aton();
6043
6044 int main() {
6045
6046 /* The GNU C library defines this for functions which it implements
6047     to always fail with ENOSYS.  Some functions are actually named
6048     something starting with __ and the normal name is an alias.  */
6049 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
6050 choke me
6051 #else
6052 inet_aton();
6053 #endif
6054
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_func_inet_aton=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_func_inet_aton=no"
6065 fi
6066 rm -f conftest*
6067 fi
6068
6069 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
6070   echo "$ac_t""yes" 1>&6
6071   cat >> confdefs.h <<\EOF
6072 #define HAVE_INET_ATON 1
6073 EOF
6074
6075 else
6076   echo "$ac_t""no" 1>&6
6077 INET_ATON='inet_aton.o'
6078 fi
6079
6080
6081 echo $ac_n "checking for strerror""... $ac_c" 1>&6
6082 echo "configure:6083: checking for strerror" >&5
6083 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
6084   echo $ac_n "(cached) $ac_c" 1>&6
6085 else
6086   cat > conftest.$ac_ext <<EOF
6087 #line 6088 "configure"
6088 #include "confdefs.h"
6089 /* System header to define __stub macros and hopefully few prototypes,
6090     which can conflict with char strerror(); below.  */
6091 #include <assert.h>
6092 /* Override any gcc2 internal prototype to avoid an error.  */
6093 /* We use char because int might match the return type of a gcc2
6094     builtin and then its argument prototype would still apply.  */
6095 char strerror();
6096
6097 int main() {
6098
6099 /* The GNU C library defines this for functions which it implements
6100     to always fail with ENOSYS.  Some functions are actually named
6101     something starting with __ and the normal name is an alias.  */
6102 #if defined (__stub_strerror) || defined (__stub___strerror)
6103 choke me
6104 #else
6105 strerror();
6106 #endif
6107
6108 ; return 0; }
6109 EOF
6110 if { (eval echo configure:6111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6111   rm -rf conftest*
6112   eval "ac_cv_func_strerror=yes"
6113 else
6114   echo "configure: failed program was:" >&5
6115   cat conftest.$ac_ext >&5
6116   rm -rf conftest*
6117   eval "ac_cv_func_strerror=no"
6118 fi
6119 rm -f conftest*
6120 fi
6121
6122 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
6123   echo "$ac_t""yes" 1>&6
6124   cat >> confdefs.h <<\EOF
6125 #define HAVE_STRERROR 1
6126 EOF
6127
6128 else
6129   echo "$ac_t""no" 1>&6
6130 STRERROR='strerror.o'
6131 fi
6132
6133
6134 echo $ac_n "checking for strdup""... $ac_c" 1>&6
6135 echo "configure:6136: checking for strdup" >&5
6136 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
6137   echo $ac_n "(cached) $ac_c" 1>&6
6138 else
6139   cat > conftest.$ac_ext <<EOF
6140 #line 6141 "configure"
6141 #include "confdefs.h"
6142 /* System header to define __stub macros and hopefully few prototypes,
6143     which can conflict with char strdup(); below.  */
6144 #include <assert.h>
6145 /* Override any gcc2 internal prototype to avoid an error.  */
6146 /* We use char because int might match the return type of a gcc2
6147     builtin and then its argument prototype would still apply.  */
6148 char strdup();
6149
6150 int main() {
6151
6152 /* The GNU C library defines this for functions which it implements
6153     to always fail with ENOSYS.  Some functions are actually named
6154     something starting with __ and the normal name is an alias.  */
6155 #if defined (__stub_strdup) || defined (__stub___strdup)
6156 choke me
6157 #else
6158 strdup();
6159 #endif
6160
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164   rm -rf conftest*
6165   eval "ac_cv_func_strdup=yes"
6166 else
6167   echo "configure: failed program was:" >&5
6168   cat conftest.$ac_ext >&5
6169   rm -rf conftest*
6170   eval "ac_cv_func_strdup=no"
6171 fi
6172 rm -f conftest*
6173 fi
6174
6175 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
6176   echo "$ac_t""yes" 1>&6
6177   cat >> confdefs.h <<\EOF
6178 #define HAVE_STRDUP 1
6179 EOF
6180
6181 else
6182   echo "$ac_t""no" 1>&6
6183 STRDUP='../../utils/strdup.o'
6184 fi
6185
6186
6187 echo $ac_n "checking for strtol""... $ac_c" 1>&6
6188 echo "configure:6189: checking for strtol" >&5
6189 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
6190   echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192   cat > conftest.$ac_ext <<EOF
6193 #line 6194 "configure"
6194 #include "confdefs.h"
6195 /* System header to define __stub macros and hopefully few prototypes,
6196     which can conflict with char strtol(); below.  */
6197 #include <assert.h>
6198 /* Override any gcc2 internal prototype to avoid an error.  */
6199 /* We use char because int might match the return type of a gcc2
6200     builtin and then its argument prototype would still apply.  */
6201 char strtol();
6202
6203 int main() {
6204
6205 /* The GNU C library defines this for functions which it implements
6206     to always fail with ENOSYS.  Some functions are actually named
6207     something starting with __ and the normal name is an alias.  */
6208 #if defined (__stub_strtol) || defined (__stub___strtol)
6209 choke me
6210 #else
6211 strtol();
6212 #endif
6213
6214 ; return 0; }
6215 EOF
6216 if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6217   rm -rf conftest*
6218   eval "ac_cv_func_strtol=yes"
6219 else
6220   echo "configure: failed program was:" >&5
6221   cat conftest.$ac_ext >&5
6222   rm -rf conftest*
6223   eval "ac_cv_func_strtol=no"
6224 fi
6225 rm -f conftest*
6226 fi
6227
6228 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
6229   echo "$ac_t""yes" 1>&6
6230   cat >> confdefs.h <<\EOF
6231 #define HAVE_STRTOL 1
6232 EOF
6233
6234 else
6235   echo "$ac_t""no" 1>&6
6236 STRTOL='strtol.o'
6237 fi
6238
6239
6240 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
6241 echo "configure:6242: checking for strtoul" >&5
6242 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
6243   echo $ac_n "(cached) $ac_c" 1>&6
6244 else
6245   cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* System header to define __stub macros and hopefully few prototypes,
6249     which can conflict with char strtoul(); below.  */
6250 #include <assert.h>
6251 /* Override any gcc2 internal prototype to avoid an error.  */
6252 /* We use char because int might match the return type of a gcc2
6253     builtin and then its argument prototype would still apply.  */
6254 char strtoul();
6255
6256 int main() {
6257
6258 /* The GNU C library defines this for functions which it implements
6259     to always fail with ENOSYS.  Some functions are actually named
6260     something starting with __ and the normal name is an alias.  */
6261 #if defined (__stub_strtoul) || defined (__stub___strtoul)
6262 choke me
6263 #else
6264 strtoul();
6265 #endif
6266
6267 ; return 0; }
6268 EOF
6269 if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6270   rm -rf conftest*
6271   eval "ac_cv_func_strtoul=yes"
6272 else
6273   echo "configure: failed program was:" >&5
6274   cat conftest.$ac_ext >&5
6275   rm -rf conftest*
6276   eval "ac_cv_func_strtoul=no"
6277 fi
6278 rm -f conftest*
6279 fi
6280
6281 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
6282   echo "$ac_t""yes" 1>&6
6283   cat >> confdefs.h <<\EOF
6284 #define HAVE_STRTOUL 1
6285 EOF
6286
6287 else
6288   echo "$ac_t""no" 1>&6
6289 STRTOUL='strtoul.o'
6290 fi
6291
6292
6293 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
6294 echo "configure:6295: checking for strcasecmp" >&5
6295 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
6296   echo $ac_n "(cached) $ac_c" 1>&6
6297 else
6298   cat > conftest.$ac_ext <<EOF
6299 #line 6300 "configure"
6300 #include "confdefs.h"
6301 /* System header to define __stub macros and hopefully few prototypes,
6302     which can conflict with char strcasecmp(); below.  */
6303 #include <assert.h>
6304 /* Override any gcc2 internal prototype to avoid an error.  */
6305 /* We use char because int might match the return type of a gcc2
6306     builtin and then its argument prototype would still apply.  */
6307 char strcasecmp();
6308
6309 int main() {
6310
6311 /* The GNU C library defines this for functions which it implements
6312     to always fail with ENOSYS.  Some functions are actually named
6313     something starting with __ and the normal name is an alias.  */
6314 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
6315 choke me
6316 #else
6317 strcasecmp();
6318 #endif
6319
6320 ; return 0; }
6321 EOF
6322 if { (eval echo configure:6323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6323   rm -rf conftest*
6324   eval "ac_cv_func_strcasecmp=yes"
6325 else
6326   echo "configure: failed program was:" >&5
6327   cat conftest.$ac_ext >&5
6328   rm -rf conftest*
6329   eval "ac_cv_func_strcasecmp=no"
6330 fi
6331 rm -f conftest*
6332 fi
6333
6334 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
6335   echo "$ac_t""yes" 1>&6
6336   cat >> confdefs.h <<\EOF
6337 #define HAVE_STRCASECMP 1
6338 EOF
6339
6340 else
6341   echo "$ac_t""no" 1>&6
6342 STRCASECMP='strcasecmp.o'
6343 fi
6344
6345
6346 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
6347 echo "configure:6348: checking for cbrt" >&5
6348 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
6349   echo $ac_n "(cached) $ac_c" 1>&6
6350 else
6351   cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6354 /* System header to define __stub macros and hopefully few prototypes,
6355     which can conflict with char cbrt(); below.  */
6356 #include <assert.h>
6357 /* Override any gcc2 internal prototype to avoid an error.  */
6358 /* We use char because int might match the return type of a gcc2
6359     builtin and then its argument prototype would still apply.  */
6360 char cbrt();
6361
6362 int main() {
6363
6364 /* The GNU C library defines this for functions which it implements
6365     to always fail with ENOSYS.  Some functions are actually named
6366     something starting with __ and the normal name is an alias.  */
6367 #if defined (__stub_cbrt) || defined (__stub___cbrt)
6368 choke me
6369 #else
6370 cbrt();
6371 #endif
6372
6373 ; return 0; }
6374 EOF
6375 if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6376   rm -rf conftest*
6377   eval "ac_cv_func_cbrt=yes"
6378 else
6379   echo "configure: failed program was:" >&5
6380   cat conftest.$ac_ext >&5
6381   rm -rf conftest*
6382   eval "ac_cv_func_cbrt=no"
6383 fi
6384 rm -f conftest*
6385 fi
6386
6387 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
6388   echo "$ac_t""yes" 1>&6
6389   cat >> confdefs.h <<\EOF
6390 #define HAVE_CBRT 1
6391 EOF
6392
6393 else
6394   echo "$ac_t""no" 1>&6
6395 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
6396 echo "configure:6397: checking for cbrt in -lm" >&5
6397 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
6398 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6399   echo $ac_n "(cached) $ac_c" 1>&6
6400 else
6401   ac_save_LIBS="$LIBS"
6402 LIBS="-lm  $LIBS"
6403 cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 /* Override any gcc2 internal prototype to avoid an error.  */
6407 /* We use char because int might match the return type of a gcc2
6408     builtin and then its argument prototype would still apply.  */
6409 char cbrt();
6410
6411 int main() {
6412 cbrt()
6413 ; return 0; }
6414 EOF
6415 if { (eval echo configure:6416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6416   rm -rf conftest*
6417   eval "ac_cv_lib_$ac_lib_var=yes"
6418 else
6419   echo "configure: failed program was:" >&5
6420   cat conftest.$ac_ext >&5
6421   rm -rf conftest*
6422   eval "ac_cv_lib_$ac_lib_var=no"
6423 fi
6424 rm -f conftest*
6425 LIBS="$ac_save_LIBS"
6426
6427 fi
6428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6429   echo "$ac_t""yes" 1>&6
6430   cat >> confdefs.h <<\EOF
6431 #define HAVE_CBRT 1
6432 EOF
6433
6434 else
6435   echo "$ac_t""no" 1>&6
6436 fi
6437
6438 fi
6439
6440
6441 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
6442 # this hackery with HPUXMATHLIB allows us to cope.
6443 HPUXMATHLIB=""
6444 case $host_cpu in
6445   hppa1.1) 
6446         if [ -r /lib/pa1.1/libm.a ] ; then
6447             HPUXMATHLIB="-L /lib/pa1.1 -lm"
6448         fi ;;
6449 esac
6450
6451
6452 echo $ac_n "checking for rint""... $ac_c" 1>&6
6453 echo "configure:6454: checking for rint" >&5
6454 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
6455   echo $ac_n "(cached) $ac_c" 1>&6
6456 else
6457   cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 /* System header to define __stub macros and hopefully few prototypes,
6461     which can conflict with char rint(); below.  */
6462 #include <assert.h>
6463 /* Override any gcc2 internal prototype to avoid an error.  */
6464 /* We use char because int might match the return type of a gcc2
6465     builtin and then its argument prototype would still apply.  */
6466 char rint();
6467
6468 int main() {
6469
6470 /* The GNU C library defines this for functions which it implements
6471     to always fail with ENOSYS.  Some functions are actually named
6472     something starting with __ and the normal name is an alias.  */
6473 #if defined (__stub_rint) || defined (__stub___rint)
6474 choke me
6475 #else
6476 rint();
6477 #endif
6478
6479 ; return 0; }
6480 EOF
6481 if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6482   rm -rf conftest*
6483   eval "ac_cv_func_rint=yes"
6484 else
6485   echo "configure: failed program was:" >&5
6486   cat conftest.$ac_ext >&5
6487   rm -rf conftest*
6488   eval "ac_cv_func_rint=no"
6489 fi
6490 rm -f conftest*
6491 fi
6492
6493 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
6494   echo "$ac_t""yes" 1>&6
6495   cat >> confdefs.h <<\EOF
6496 #define HAVE_RINT 1
6497 EOF
6498
6499 else
6500   echo "$ac_t""no" 1>&6
6501 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
6502 echo "configure:6503: checking for rint in -lm" >&5
6503 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
6504 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6505   echo $ac_n "(cached) $ac_c" 1>&6
6506 else
6507   ac_save_LIBS="$LIBS"
6508 LIBS="-lm $HPUXMATHLIB $LIBS"
6509 cat > conftest.$ac_ext <<EOF
6510 #line 6511 "configure"
6511 #include "confdefs.h"
6512 /* Override any gcc2 internal prototype to avoid an error.  */
6513 /* We use char because int might match the return type of a gcc2
6514     builtin and then its argument prototype would still apply.  */
6515 char rint();
6516
6517 int main() {
6518 rint()
6519 ; return 0; }
6520 EOF
6521 if { (eval echo configure:6522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6522   rm -rf conftest*
6523   eval "ac_cv_lib_$ac_lib_var=yes"
6524 else
6525   echo "configure: failed program was:" >&5
6526   cat conftest.$ac_ext >&5
6527   rm -rf conftest*
6528   eval "ac_cv_lib_$ac_lib_var=no"
6529 fi
6530 rm -f conftest*
6531 LIBS="$ac_save_LIBS"
6532
6533 fi
6534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6535   echo "$ac_t""yes" 1>&6
6536   cat >> confdefs.h <<\EOF
6537 #define HAVE_RINT 1
6538 EOF
6539
6540 else
6541   echo "$ac_t""no" 1>&6
6542 fi
6543
6544 fi
6545
6546
6547
6548 # Readline versions < 2.1 don't have rl_completion_append_character
6549 echo $ac_n "checking for rl_completion_append_character""... $ac_c" 1>&6
6550 echo "configure:6551: checking for rl_completion_append_character" >&5
6551 cat > conftest.$ac_ext <<EOF
6552 #line 6553 "configure"
6553 #include "confdefs.h"
6554 #include <stdio.h>
6555 #ifdef HAVE_READLINE_READLINE_H
6556 # include <readline/readline.h>
6557 #elif defined(HAVE_READLINE_H)
6558 # include <readline.h>
6559 #endif
6560
6561 int main() {
6562 rl_completion_append_character = 'x';
6563 ; return 0; }
6564 EOF
6565 if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6566   rm -rf conftest*
6567   echo "$ac_t""yes" 1>&6
6568 cat >> confdefs.h <<\EOF
6569 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
6570 EOF
6571
6572 else
6573   echo "configure: failed program was:" >&5
6574   cat conftest.$ac_ext >&5
6575   rm -rf conftest*
6576   echo "$ac_t""no" 1>&6
6577 fi
6578 rm -f conftest*
6579
6580 for ac_func in rl_completion_matches
6581 do
6582 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6583 echo "configure:6584: checking for $ac_func" >&5
6584 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6585   echo $ac_n "(cached) $ac_c" 1>&6
6586 else
6587   cat > conftest.$ac_ext <<EOF
6588 #line 6589 "configure"
6589 #include "confdefs.h"
6590 /* System header to define __stub macros and hopefully few prototypes,
6591     which can conflict with char $ac_func(); below.  */
6592 #include <assert.h>
6593 /* Override any gcc2 internal prototype to avoid an error.  */
6594 /* We use char because int might match the return type of a gcc2
6595     builtin and then its argument prototype would still apply.  */
6596 char $ac_func();
6597
6598 int main() {
6599
6600 /* The GNU C library defines this for functions which it implements
6601     to always fail with ENOSYS.  Some functions are actually named
6602     something starting with __ and the normal name is an alias.  */
6603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6604 choke me
6605 #else
6606 $ac_func();
6607 #endif
6608
6609 ; return 0; }
6610 EOF
6611 if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6612   rm -rf conftest*
6613   eval "ac_cv_func_$ac_func=yes"
6614 else
6615   echo "configure: failed program was:" >&5
6616   cat conftest.$ac_ext >&5
6617   rm -rf conftest*
6618   eval "ac_cv_func_$ac_func=no"
6619 fi
6620 rm -f conftest*
6621 fi
6622
6623 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6624   echo "$ac_t""yes" 1>&6
6625     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6626   cat >> confdefs.h <<EOF
6627 #define $ac_tr_func 1
6628 EOF
6629  
6630 else
6631   echo "$ac_t""no" 1>&6
6632 fi
6633 done
6634
6635
6636
6637 echo $ac_n "checking for finite""... $ac_c" 1>&6
6638 echo "configure:6639: checking for finite" >&5
6639 cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642 #include <math.h>
6643 int main() {
6644 int dummy=finite(1.0);
6645 ; return 0; }
6646 EOF
6647 if { (eval echo configure:6648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6648   rm -rf conftest*
6649   cat >> confdefs.h <<\EOF
6650 #define HAVE_FINITE 1
6651 EOF
6652  echo "$ac_t""yes" 1>&6
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   echo "$ac_t""no" 1>&6
6658 fi
6659 rm -f conftest*
6660
6661 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
6662 echo "configure:6663: checking for sigsetjmp" >&5
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 #include <setjmp.h>
6667 int main() {
6668 sigjmp_buf x; sigsetjmp(x, 1);
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6672   rm -rf conftest*
6673   cat >> confdefs.h <<\EOF
6674 #define HAVE_SIGSETJMP 1
6675 EOF
6676  echo "$ac_t""yes" 1>&6
6677 else
6678   echo "configure: failed program was:" >&5
6679   cat conftest.$ac_ext >&5
6680   rm -rf conftest*
6681   echo "$ac_t""no" 1>&6
6682 fi
6683 rm -f conftest*
6684
6685
6686 # Check whether --enable-syslog was given
6687 if test x"${enable_syslog+set}" = xset; then
6688   case $enable_syslog in
6689     yes)
6690       echo $ac_n "checking for syslog""... $ac_c" 1>&6
6691 echo "configure:6692: checking for syslog" >&5
6692 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then
6693   echo $ac_n "(cached) $ac_c" 1>&6
6694 else
6695   cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* System header to define __stub macros and hopefully few prototypes,
6699     which can conflict with char syslog(); below.  */
6700 #include <assert.h>
6701 /* Override any gcc2 internal prototype to avoid an error.  */
6702 /* We use char because int might match the return type of a gcc2
6703     builtin and then its argument prototype would still apply.  */
6704 char syslog();
6705
6706 int main() {
6707
6708 /* The GNU C library defines this for functions which it implements
6709     to always fail with ENOSYS.  Some functions are actually named
6710     something starting with __ and the normal name is an alias.  */
6711 #if defined (__stub_syslog) || defined (__stub___syslog)
6712 choke me
6713 #else
6714 syslog();
6715 #endif
6716
6717 ; return 0; }
6718 EOF
6719 if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6720   rm -rf conftest*
6721   eval "ac_cv_func_syslog=yes"
6722 else
6723   echo "configure: failed program was:" >&5
6724   cat conftest.$ac_ext >&5
6725   rm -rf conftest*
6726   eval "ac_cv_func_syslog=no"
6727 fi
6728 rm -f conftest*
6729 fi
6730
6731 if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733   cat >> confdefs.h <<\EOF
6734 #define ENABLE_SYSLOG 1
6735 EOF
6736
6737 else
6738   echo "$ac_t""no" 1>&6
6739 { echo "configure: error: no syslog interface found" 1>&2; exit 1; }
6740 fi
6741
6742       ;;
6743     no)
6744       :
6745       ;;
6746     *)
6747       enableval=$enable_syslog
6748       { echo "configure: error: no argument expected for --enable-syslog option" 1>&2; exit 1; }
6749       ;;
6750   esac # $enable_syslog
6751 else
6752   enable_syslog=no
6753
6754 fi
6755
6756
6757 echo $ac_n "checking for optreset""... $ac_c" 1>&6
6758 echo "configure:6759: checking for optreset" >&5
6759 if eval "test \"`echo '$''{'pgac_cv_var_int_optreset'+set}'`\" = set"; then
6760   echo $ac_n "(cached) $ac_c" 1>&6
6761 else
6762   cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 #include <unistd.h>
6766 int main() {
6767 extern int optreset; optreset = 1;
6768 ; return 0; }
6769 EOF
6770 if { (eval echo configure:6771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771   rm -rf conftest*
6772   pgac_cv_var_int_optreset=yes
6773 else
6774   echo "configure: failed program was:" >&5
6775   cat conftest.$ac_ext >&5
6776   rm -rf conftest*
6777   pgac_cv_var_int_optreset=no
6778 fi
6779 rm -f conftest*
6780 fi
6781
6782 echo "$ac_t""$pgac_cv_var_int_optreset" 1>&6
6783 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
6784   cat >> confdefs.h <<\EOF
6785 #define HAVE_INT_OPTRESET 1
6786 EOF
6787
6788 fi
6789
6790
6791 # This test makes sure that run tests work at all.  Sometimes a shared
6792 # library is found by the linker, but the runtime linker can't find it.
6793 # This check should come after all modifications of compiler or linker
6794 # variables, and before any other run tests.
6795 echo $ac_n "checking test program""... $ac_c" 1>&6
6796 echo "configure:6797: checking test program" >&5
6797 if test "$cross_compiling" = yes; then
6798   echo "$ac_t""cross-compiling" 1>&6
6799 else
6800   cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 int main() { return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6806 then
6807   echo "$ac_t""ok" 1>&6
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -fr conftest*
6812   echo "$ac_t""failed" 1>&6
6813 { echo "configure: error: 
6814 *** Could not execute a simple test program.  This may be a problem
6815 *** related to locating shared libraries.  Check the file 'config.log'
6816 *** for the exact reason." 1>&2; exit 1; }
6817 fi
6818 rm -fr conftest*
6819 fi
6820
6821
6822
6823
6824 echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6
6825 echo "configure:6826: checking whether long int is 64 bits" >&5
6826 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   if test "$cross_compiling" = yes; then
6830   pgac_cv_type_long_int_64=no
6831 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6832 else
6833   cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836 typedef long int int64;
6837
6838 /*
6839  * These are globals to discourage the compiler from folding all the
6840  * arithmetic tests down to compile-time constants.
6841  */
6842 int64 a = 20000001;
6843 int64 b = 40000005;
6844
6845 int does_int64_work()
6846 {
6847   int64 c,d;
6848
6849   if (sizeof(int64) != 8)
6850     return 0;                   /* definitely not the right size */
6851
6852   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6853   c = a * b;
6854   d = (c + b) / b;
6855   if (d != a+1)
6856     return 0;
6857   return 1;
6858 }
6859 main() {
6860   exit(! does_int64_work());
6861 }
6862 EOF
6863 if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6864 then
6865   pgac_cv_type_long_int_64=yes
6866 else
6867   echo "configure: failed program was:" >&5
6868   cat conftest.$ac_ext >&5
6869   rm -fr conftest*
6870   pgac_cv_type_long_int_64=no
6871 fi
6872 rm -fr conftest*
6873 fi
6874
6875 fi
6876
6877 echo "$ac_t""$pgac_cv_type_long_int_64" 1>&6
6878
6879 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
6880 if test x"$pgac_cv_type_long_int_64" = xyes ; then
6881   cat >> confdefs.h <<\EOF
6882 #define HAVE_LONG_INT_64 
6883 EOF
6884
6885 fi
6886
6887
6888 if test x"$HAVE_LONG_INT_64" = x"no" ; then
6889   echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6
6890 echo "configure:6891: checking whether long long int is 64 bits" >&5
6891 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then
6892   echo $ac_n "(cached) $ac_c" 1>&6
6893 else
6894   if test "$cross_compiling" = yes; then
6895   pgac_cv_type_long_long_int_64=no
6896 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6897 else
6898   cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 typedef long long int int64;
6902
6903 /*
6904  * These are globals to discourage the compiler from folding all the
6905  * arithmetic tests down to compile-time constants.
6906  */
6907 int64 a = 20000001;
6908 int64 b = 40000005;
6909
6910 int does_int64_work()
6911 {
6912   int64 c,d;
6913
6914   if (sizeof(int64) != 8)
6915     return 0;                   /* definitely not the right size */
6916
6917   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6918   c = a * b;
6919   d = (c + b) / b;
6920   if (d != a+1)
6921     return 0;
6922   return 1;
6923 }
6924 main() {
6925   exit(! does_int64_work());
6926 }
6927 EOF
6928 if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6929 then
6930   pgac_cv_type_long_long_int_64=yes
6931 else
6932   echo "configure: failed program was:" >&5
6933   cat conftest.$ac_ext >&5
6934   rm -fr conftest*
6935   pgac_cv_type_long_long_int_64=no
6936 fi
6937 rm -fr conftest*
6938 fi
6939
6940 fi
6941
6942 echo "$ac_t""$pgac_cv_type_long_long_int_64" 1>&6
6943
6944 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
6945 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
6946   cat >> confdefs.h <<\EOF
6947 #define HAVE_LONG_LONG_INT_64 
6948 EOF
6949
6950 fi
6951
6952 fi
6953
6954
6955
6956 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
6957   cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960
6961 #define INT64CONST(x)  x##LL
6962 long long int foo = INT64CONST(0x1234567890123456);
6963
6964 int main() {
6965
6966 ; return 0; }
6967 EOF
6968 if { (eval echo configure:6969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6969   rm -rf conftest*
6970   cat >> confdefs.h <<\EOF
6971 #define HAVE_LL_CONSTANTS 1
6972 EOF
6973
6974 else
6975   echo "configure: failed program was:" >&5
6976   cat conftest.$ac_ext >&5
6977 fi
6978 rm -f conftest*
6979 fi
6980
6981
6982
6983 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
6984   if [ x$SNPRINTF = x ] ; then
6985     echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6
6986 echo "configure:6987: checking whether snprintf handles 'long long int' as %lld" >&5
6987     if test "$cross_compiling" = yes; then
6988    echo "$ac_t""assuming not on target machine" 1>&6
6989         # Force usage of our own snprintf, since we cannot test foreign snprintf
6990         SNPRINTF='snprintf.o'
6991         INT64_FORMAT='"%lld"'
6992   
6993 else
6994   cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997 #include <stdio.h>
6998 typedef long long int int64;
6999 #define INT64_FORMAT "%lld"
7000
7001 int64 a = 20000001;
7002 int64 b = 40000005;
7003
7004 int does_int64_snprintf_work()
7005 {
7006   int64 c;
7007   char buf[100];
7008
7009   if (sizeof(int64) != 8)
7010     return 0;                   /* doesn't look like the right size */
7011
7012   c = a * b;
7013   snprintf(buf, 100, INT64_FORMAT, c);
7014   if (strcmp(buf, "800000140000005") != 0)
7015     return 0;                   /* either multiply or snprintf is busted */
7016   return 1;
7017 }
7018 main() {
7019   exit(! does_int64_snprintf_work());
7020 }
7021 EOF
7022 if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7023 then
7024    echo "$ac_t""yes" 1>&6
7025           INT64_FORMAT='"%lld"'
7026         
7027 else
7028   echo "configure: failed program was:" >&5
7029   cat conftest.$ac_ext >&5
7030   rm -fr conftest*
7031    echo "$ac_t""no" 1>&6
7032     echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6
7033 echo "configure:7034: checking whether snprintf handles 'long long int' as %qd" >&5 
7034     if test "$cross_compiling" = yes; then
7035    echo "$ac_t""assuming not on target machine" 1>&6
7036         # Force usage of our own snprintf, since we cannot test foreign snprintf
7037         SNPRINTF='snprintf.o'
7038         INT64_FORMAT='"%lld"'
7039   
7040 else
7041   cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044 #include <stdio.h>
7045 typedef long long int int64;
7046 #define INT64_FORMAT "%qd"
7047    
7048 int64 a = 20000001;
7049 int64 b = 40000005;
7050    
7051 int does_int64_snprintf_work()
7052 {  
7053   int64 c;
7054   char buf[100];
7055
7056   if (sizeof(int64) != 8)
7057     return 0;     /* doesn't look like the right size */
7058
7059   c = a * b;
7060   snprintf(buf, 100, INT64_FORMAT, c);
7061   if (strcmp(buf, "800000140000005") != 0)
7062     return 0;     /* either multiply or snprintf is busted */
7063   return 1;
7064 }
7065 main() {
7066   exit(! does_int64_snprintf_work());
7067 }
7068 EOF
7069 if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7070 then
7071    echo "$ac_t""yes" 1>&6
7072     INT64_FORMAT='"%qd"'
7073   
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -fr conftest*
7078    echo "$ac_t""no" 1>&6
7079         # Force usage of our own snprintf, since system snprintf is broken
7080         SNPRINTF='snprintf.o'
7081         INT64_FORMAT='"%lld"'
7082   
7083 fi
7084 rm -fr conftest*
7085 fi
7086  
7087 fi
7088 rm -fr conftest*
7089 fi
7090
7091   else
7092     # here if we previously decided we needed to use our own snprintf
7093     INT64_FORMAT='"%lld"'
7094   fi
7095 else
7096   # Here if we are not using 'long long int' at all
7097   INT64_FORMAT='"%ld"'
7098 fi
7099
7100 cat >> confdefs.h <<EOF
7101 #define INT64_FORMAT $INT64_FORMAT
7102 EOF
7103
7104
7105
7106 for ac_func in strtoll strtoq
7107 do
7108 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7109 echo "configure:7110: checking for $ac_func" >&5
7110 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7111   echo $ac_n "(cached) $ac_c" 1>&6
7112 else
7113   cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 /* System header to define __stub macros and hopefully few prototypes,
7117     which can conflict with char $ac_func(); below.  */
7118 #include <assert.h>
7119 /* Override any gcc2 internal prototype to avoid an error.  */
7120 /* We use char because int might match the return type of a gcc2
7121     builtin and then its argument prototype would still apply.  */
7122 char $ac_func();
7123
7124 int main() {
7125
7126 /* The GNU C library defines this for functions which it implements
7127     to always fail with ENOSYS.  Some functions are actually named
7128     something starting with __ and the normal name is an alias.  */
7129 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7130 choke me
7131 #else
7132 $ac_func();
7133 #endif
7134
7135 ; return 0; }
7136 EOF
7137 if { (eval echo configure:7138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7138   rm -rf conftest*
7139   eval "ac_cv_func_$ac_func=yes"
7140 else
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -rf conftest*
7144   eval "ac_cv_func_$ac_func=no"
7145 fi
7146 rm -f conftest*
7147 fi
7148
7149 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7150   echo "$ac_t""yes" 1>&6
7151     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7152   cat >> confdefs.h <<EOF
7153 #define $ac_tr_func 1
7154 EOF
7155  break
7156 else
7157   echo "$ac_t""no" 1>&6
7158 fi
7159 done
7160
7161 for ac_func in strtoull strtouq
7162 do
7163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7164 echo "configure:7165: checking for $ac_func" >&5
7165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7166   echo $ac_n "(cached) $ac_c" 1>&6
7167 else
7168   cat > conftest.$ac_ext <<EOF
7169 #line 7170 "configure"
7170 #include "confdefs.h"
7171 /* System header to define __stub macros and hopefully few prototypes,
7172     which can conflict with char $ac_func(); below.  */
7173 #include <assert.h>
7174 /* Override any gcc2 internal prototype to avoid an error.  */
7175 /* We use char because int might match the return type of a gcc2
7176     builtin and then its argument prototype would still apply.  */
7177 char $ac_func();
7178
7179 int main() {
7180
7181 /* The GNU C library defines this for functions which it implements
7182     to always fail with ENOSYS.  Some functions are actually named
7183     something starting with __ and the normal name is an alias.  */
7184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7185 choke me
7186 #else
7187 $ac_func();
7188 #endif
7189
7190 ; return 0; }
7191 EOF
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193   rm -rf conftest*
7194   eval "ac_cv_func_$ac_func=yes"
7195 else
7196   echo "configure: failed program was:" >&5
7197   cat conftest.$ac_ext >&5
7198   rm -rf conftest*
7199   eval "ac_cv_func_$ac_func=no"
7200 fi
7201 rm -f conftest*
7202 fi
7203
7204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7205   echo "$ac_t""yes" 1>&6
7206     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7207   cat >> confdefs.h <<EOF
7208 #define $ac_tr_func 1
7209 EOF
7210  break
7211 else
7212   echo "$ac_t""no" 1>&6
7213 fi
7214 done
7215
7216
7217 echo $ac_n "checking for atexit""... $ac_c" 1>&6
7218 echo "configure:7219: checking for atexit" >&5
7219 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
7220   echo $ac_n "(cached) $ac_c" 1>&6
7221 else
7222   cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7225 /* System header to define __stub macros and hopefully few prototypes,
7226     which can conflict with char atexit(); below.  */
7227 #include <assert.h>
7228 /* Override any gcc2 internal prototype to avoid an error.  */
7229 /* We use char because int might match the return type of a gcc2
7230     builtin and then its argument prototype would still apply.  */
7231 char atexit();
7232
7233 int main() {
7234
7235 /* The GNU C library defines this for functions which it implements
7236     to always fail with ENOSYS.  Some functions are actually named
7237     something starting with __ and the normal name is an alias.  */
7238 #if defined (__stub_atexit) || defined (__stub___atexit)
7239 choke me
7240 #else
7241 atexit();
7242 #endif
7243
7244 ; return 0; }
7245 EOF
7246 if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247   rm -rf conftest*
7248   eval "ac_cv_func_atexit=yes"
7249 else
7250   echo "configure: failed program was:" >&5
7251   cat conftest.$ac_ext >&5
7252   rm -rf conftest*
7253   eval "ac_cv_func_atexit=no"
7254 fi
7255 rm -f conftest*
7256 fi
7257
7258 if eval "test \"`echo '$ac_cv_func_'atexit`\" = yes"; then
7259   echo "$ac_t""yes" 1>&6
7260   cat >> confdefs.h <<\EOF
7261 #define HAVE_ATEXIT 1
7262 EOF
7263
7264 else
7265   echo "$ac_t""no" 1>&6
7266 for ac_func in on_exit
7267 do
7268 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7269 echo "configure:7270: checking for $ac_func" >&5
7270 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7271   echo $ac_n "(cached) $ac_c" 1>&6
7272 else
7273   cat > conftest.$ac_ext <<EOF
7274 #line 7275 "configure"
7275 #include "confdefs.h"
7276 /* System header to define __stub macros and hopefully few prototypes,
7277     which can conflict with char $ac_func(); below.  */
7278 #include <assert.h>
7279 /* Override any gcc2 internal prototype to avoid an error.  */
7280 /* We use char because int might match the return type of a gcc2
7281     builtin and then its argument prototype would still apply.  */
7282 char $ac_func();
7283
7284 int main() {
7285
7286 /* The GNU C library defines this for functions which it implements
7287     to always fail with ENOSYS.  Some functions are actually named
7288     something starting with __ and the normal name is an alias.  */
7289 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7290 choke me
7291 #else
7292 $ac_func();
7293 #endif
7294
7295 ; return 0; }
7296 EOF
7297 if { (eval echo configure:7298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7298   rm -rf conftest*
7299   eval "ac_cv_func_$ac_func=yes"
7300 else
7301   echo "configure: failed program was:" >&5
7302   cat conftest.$ac_ext >&5
7303   rm -rf conftest*
7304   eval "ac_cv_func_$ac_func=no"
7305 fi
7306 rm -f conftest*
7307 fi
7308
7309 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7310   echo "$ac_t""yes" 1>&6
7311     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7312   cat >> confdefs.h <<EOF
7313 #define $ac_tr_func 1
7314 EOF
7315  cat >> confdefs.h <<\EOF
7316 #define HAVE_ON_EXIT 1
7317 EOF
7318
7319 else
7320   echo "$ac_t""no" 1>&6
7321 { echo "configure: error: atexi() nor on_exit() found" 1>&2; exit 1; }
7322 fi
7323 done
7324
7325 fi
7326
7327
7328
7329 echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
7330 echo "configure:7331: checking size of unsigned long" >&5
7331 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
7332   echo $ac_n "(cached) $ac_c" 1>&6
7333 else
7334   if test "$cross_compiling" = yes; then
7335   ac_cv_sizeof_unsigned_long=4
7336 else
7337   cat > conftest.$ac_ext <<EOF
7338 #line 7339 "configure"
7339 #include "confdefs.h"
7340 #include <stdio.h>
7341 main()
7342 {
7343   FILE *f=fopen("conftestval", "w");
7344   if (!f) exit(1);
7345   fprintf(f, "%d\n", sizeof(unsigned long));
7346   exit(0);
7347 }
7348 EOF
7349 if { (eval echo configure:7350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7350 then
7351   ac_cv_sizeof_unsigned_long=`cat conftestval`
7352 else
7353   echo "configure: failed program was:" >&5
7354   cat conftest.$ac_ext >&5
7355   rm -fr conftest*
7356   ac_cv_sizeof_unsigned_long=0
7357 fi
7358 rm -fr conftest*
7359 fi
7360
7361 fi
7362 echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
7363 cat >> confdefs.h <<EOF
7364 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
7365 EOF
7366
7367
7368 cat >> confdefs.h <<EOF
7369 #define SIZEOF_DATUM $ac_cv_sizeof_unsigned_long
7370 EOF
7371
7372
7373
7374 echo $ac_n "checking alignment of short""... $ac_c" 1>&6
7375 echo "configure:7376: checking alignment of short" >&5
7376 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then
7377   echo $ac_n "(cached) $ac_c" 1>&6
7378 else
7379   if test "$cross_compiling" = yes; then
7380   pgac_cv_alignof_short='sizeof(short)'
7381 else
7382   cat > conftest.$ac_ext <<EOF
7383 #line 7384 "configure"
7384 #include "confdefs.h"
7385 #include <stdio.h>
7386 struct { char filler; short field; } mystruct;
7387 main()
7388 {
7389   FILE *f=fopen("conftestval", "w");
7390   if (!f) exit(1);
7391   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7392   exit(0);
7393 }
7394 EOF
7395 if { (eval echo configure:7396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7396 then
7397   pgac_cv_alignof_short=`cat conftestval`
7398 else
7399   echo "configure: failed program was:" >&5
7400   cat conftest.$ac_ext >&5
7401   rm -fr conftest*
7402   pgac_cv_alignof_short='sizeof(short)'
7403 fi
7404 rm -fr conftest*
7405 fi
7406
7407 fi
7408 echo "$ac_t""$pgac_cv_alignof_short" 1>&6
7409 cat >> confdefs.h <<EOF
7410 #define ALIGNOF_SHORT $pgac_cv_alignof_short
7411 EOF
7412
7413
7414 echo $ac_n "checking alignment of int""... $ac_c" 1>&6
7415 echo "configure:7416: checking alignment of int" >&5
7416 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then
7417   echo $ac_n "(cached) $ac_c" 1>&6
7418 else
7419   if test "$cross_compiling" = yes; then
7420   pgac_cv_alignof_int='sizeof(int)'
7421 else
7422   cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 #include <stdio.h>
7426 struct { char filler; int field; } mystruct;
7427 main()
7428 {
7429   FILE *f=fopen("conftestval", "w");
7430   if (!f) exit(1);
7431   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7432   exit(0);
7433 }
7434 EOF
7435 if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7436 then
7437   pgac_cv_alignof_int=`cat conftestval`
7438 else
7439   echo "configure: failed program was:" >&5
7440   cat conftest.$ac_ext >&5
7441   rm -fr conftest*
7442   pgac_cv_alignof_int='sizeof(int)'
7443 fi
7444 rm -fr conftest*
7445 fi
7446
7447 fi
7448 echo "$ac_t""$pgac_cv_alignof_int" 1>&6
7449 cat >> confdefs.h <<EOF
7450 #define ALIGNOF_INT $pgac_cv_alignof_int
7451 EOF
7452
7453
7454 echo $ac_n "checking alignment of long""... $ac_c" 1>&6
7455 echo "configure:7456: checking alignment of long" >&5
7456 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then
7457   echo $ac_n "(cached) $ac_c" 1>&6
7458 else
7459   if test "$cross_compiling" = yes; then
7460   pgac_cv_alignof_long='sizeof(long)'
7461 else
7462   cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465 #include <stdio.h>
7466 struct { char filler; long field; } mystruct;
7467 main()
7468 {
7469   FILE *f=fopen("conftestval", "w");
7470   if (!f) exit(1);
7471   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7472   exit(0);
7473 }
7474 EOF
7475 if { (eval echo configure:7476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7476 then
7477   pgac_cv_alignof_long=`cat conftestval`
7478 else
7479   echo "configure: failed program was:" >&5
7480   cat conftest.$ac_ext >&5
7481   rm -fr conftest*
7482   pgac_cv_alignof_long='sizeof(long)'
7483 fi
7484 rm -fr conftest*
7485 fi
7486
7487 fi
7488 echo "$ac_t""$pgac_cv_alignof_long" 1>&6
7489 cat >> confdefs.h <<EOF
7490 #define ALIGNOF_LONG $pgac_cv_alignof_long
7491 EOF
7492
7493
7494 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7495   echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6
7496 echo "configure:7497: checking alignment of long long int" >&5
7497 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then
7498   echo $ac_n "(cached) $ac_c" 1>&6
7499 else
7500   if test "$cross_compiling" = yes; then
7501   pgac_cv_alignof_long_long_int='sizeof(long long int)'
7502 else
7503   cat > conftest.$ac_ext <<EOF
7504 #line 7505 "configure"
7505 #include "confdefs.h"
7506 #include <stdio.h>
7507 struct { char filler; long long int field; } mystruct;
7508 main()
7509 {
7510   FILE *f=fopen("conftestval", "w");
7511   if (!f) exit(1);
7512   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7513   exit(0);
7514 }
7515 EOF
7516 if { (eval echo configure:7517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7517 then
7518   pgac_cv_alignof_long_long_int=`cat conftestval`
7519 else
7520   echo "configure: failed program was:" >&5
7521   cat conftest.$ac_ext >&5
7522   rm -fr conftest*
7523   pgac_cv_alignof_long_long_int='sizeof(long long int)'
7524 fi
7525 rm -fr conftest*
7526 fi
7527
7528 fi
7529 echo "$ac_t""$pgac_cv_alignof_long_long_int" 1>&6
7530 cat >> confdefs.h <<EOF
7531 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
7532 EOF
7533
7534
7535 fi
7536 echo $ac_n "checking alignment of double""... $ac_c" 1>&6
7537 echo "configure:7538: checking alignment of double" >&5
7538 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then
7539   echo $ac_n "(cached) $ac_c" 1>&6
7540 else
7541   if test "$cross_compiling" = yes; then
7542   pgac_cv_alignof_double='sizeof(double)'
7543 else
7544   cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 #include <stdio.h>
7548 struct { char filler; double field; } mystruct;
7549 main()
7550 {
7551   FILE *f=fopen("conftestval", "w");
7552   if (!f) exit(1);
7553   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
7554   exit(0);
7555 }
7556 EOF
7557 if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7558 then
7559   pgac_cv_alignof_double=`cat conftestval`
7560 else
7561   echo "configure: failed program was:" >&5
7562   cat conftest.$ac_ext >&5
7563   rm -fr conftest*
7564   pgac_cv_alignof_double='sizeof(double)'
7565 fi
7566 rm -fr conftest*
7567 fi
7568
7569 fi
7570 echo "$ac_t""$pgac_cv_alignof_double" 1>&6
7571 cat >> confdefs.h <<EOF
7572 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
7573 EOF
7574
7575
7576
7577
7578 if test $pgac_cv_alignof_double != 'sizeof(double)' ; then
7579   MAX_ALIGNOF=$pgac_cv_alignof_long
7580   if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
7581     MAX_ALIGNOF=$pgac_cv_alignof_double
7582   fi
7583   if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
7584     MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
7585   fi
7586 else
7587     MAX_ALIGNOF="$pgac_cv_alignof_double"
7588 fi
7589 cat >> confdefs.h <<EOF
7590 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
7591 EOF
7592
7593
7594 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
7595 echo "configure:7596: checking for POSIX signal interface" >&5
7596 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
7597   echo $ac_n "(cached) $ac_c" 1>&6
7598 else
7599   cat > conftest.$ac_ext <<EOF
7600 #line 7601 "configure"
7601 #include "confdefs.h"
7602 #include <signal.h>
7603
7604 int main() {
7605 struct sigaction act, oact;
7606 sigemptyset(&act.sa_mask);
7607 act.sa_flags = SA_RESTART;
7608 sigaction(0, &act, &oact);
7609 ; return 0; }
7610 EOF
7611 if { (eval echo configure:7612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7612   rm -rf conftest*
7613   pgac_cv_func_posix_signals=yes
7614 else
7615   echo "configure: failed program was:" >&5
7616   cat conftest.$ac_ext >&5
7617   rm -rf conftest*
7618   pgac_cv_func_posix_signals=no
7619 fi
7620 rm -f conftest*
7621 fi
7622
7623 echo "$ac_t""$pgac_cv_func_posix_signals" 1>&6
7624 if test x"$pgac_cv_func_posix_signals" = xyes ; then
7625   cat >> confdefs.h <<\EOF
7626 #define HAVE_POSIX_SIGNALS 
7627 EOF
7628
7629 fi
7630 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
7631
7632
7633
7634 # Check for Tcl configuration script tclConfig.sh
7635 if test "$with_tcl" = yes; then
7636     for ac_prog in tclsh tcl
7637 do
7638 # Extract the first word of "$ac_prog", so it can be a program name with args.
7639 set dummy $ac_prog; ac_word=$2
7640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7641 echo "configure:7642: checking for $ac_word" >&5
7642 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
7643   echo $ac_n "(cached) $ac_c" 1>&6
7644 else
7645   case "$TCLSH" in
7646   /*)
7647   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
7648   ;;
7649   ?:/*)                  
7650   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
7651   ;;
7652   *)
7653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7654   ac_dummy="$PATH"
7655   for ac_dir in $ac_dummy; do 
7656     test -z "$ac_dir" && ac_dir=.
7657     if test -f $ac_dir/$ac_word; then
7658       ac_cv_path_TCLSH="$ac_dir/$ac_word"
7659       break
7660     fi
7661   done
7662   IFS="$ac_save_ifs"
7663   ;;
7664 esac
7665 fi
7666 TCLSH="$ac_cv_path_TCLSH"
7667 if test -n "$TCLSH"; then
7668   echo "$ac_t""$TCLSH" 1>&6
7669 else
7670   echo "$ac_t""no" 1>&6
7671 fi
7672
7673 test -n "$TCLSH" && break
7674 done
7675
7676 echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
7677 echo "configure:7678: checking for tclConfig.sh" >&5
7678 # Let user override test
7679 if test -z "$TCL_CONFIG_SH"; then
7680     pgac_test_dirs="$with_tclconfig"
7681
7682     set X $pgac_test_dirs; shift
7683     if test $# -eq 0; then
7684         test -z "$TCLSH" && { echo "configure: error: unable to locate tclConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
7685         set X `echo 'puts $auto_path' | $TCLSH`; shift
7686     fi
7687
7688     for pgac_dir do
7689         if test -r "$pgac_dir/tclConfig.sh"; then
7690             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
7691             break
7692         fi
7693     done
7694 fi
7695
7696 if test -z "$TCL_CONFIG_SH"; then
7697     echo "$ac_t""no" 1>&6
7698     { echo "configure: error: file \`tclConfig.sh' is required for Tcl" 1>&2; exit 1; }
7699 else
7700     echo "$ac_t""$TCL_CONFIG_SH" 1>&6
7701 fi
7702
7703
7704
7705 fi
7706
7707 # Check for Tk configuration script tkConfig.sh
7708 if test "$with_tk" = yes; then
7709     echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
7710 echo "configure:7711: checking for tkConfig.sh" >&5
7711 # Let user override test
7712 if test -z "$TK_CONFIG_SH"; then
7713     pgac_test_dirs="$with_tkconfig $with_tclconfig"
7714
7715     set X $pgac_test_dirs; shift
7716     if test $# -eq 0; then
7717         test -z "$TCLSH" && { echo "configure: error: unable to locate tkConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
7718         set X `echo 'puts $auto_path' | $TCLSH`; shift
7719     fi
7720
7721     for pgac_dir do
7722         if test -r "$pgac_dir/tkConfig.sh"; then
7723             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
7724             break
7725         fi
7726     done
7727 fi
7728
7729 if test -z "$TK_CONFIG_SH"; then
7730     echo "$ac_t""no" 1>&6
7731     { echo "configure: error: file \`tkConfig.sh' is required for Tk" 1>&2; exit 1; }
7732 else
7733     echo "$ac_t""$TK_CONFIG_SH" 1>&6
7734 fi
7735
7736
7737
7738 fi
7739
7740
7741 #
7742 # Check for DocBook and tools
7743 #
7744 for ac_prog in onsgmls nsgmls
7745 do
7746 # Extract the first word of "$ac_prog", so it can be a program name with args.
7747 set dummy $ac_prog; ac_word=$2
7748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7749 echo "configure:7750: checking for $ac_word" >&5
7750 if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
7751   echo $ac_n "(cached) $ac_c" 1>&6
7752 else
7753   if test -n "$NSGMLS"; then
7754   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
7755 else
7756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7757   ac_dummy="$PATH"
7758   for ac_dir in $ac_dummy; do
7759     test -z "$ac_dir" && ac_dir=.
7760     if test -f $ac_dir/$ac_word; then
7761       ac_cv_prog_NSGMLS="$ac_prog"
7762       break
7763     fi
7764   done
7765   IFS="$ac_save_ifs"
7766 fi
7767 fi
7768 NSGMLS="$ac_cv_prog_NSGMLS"
7769 if test -n "$NSGMLS"; then
7770   echo "$ac_t""$NSGMLS" 1>&6
7771 else
7772   echo "$ac_t""no" 1>&6
7773 fi
7774
7775 test -n "$NSGMLS" && break
7776 done
7777
7778 # If you don't have nsgmls you won't get very far, so save the cycles.
7779 if test -n "$NSGMLS"; then
7780   for ac_prog in openjade jade
7781 do
7782 # Extract the first word of "$ac_prog", so it can be a program name with args.
7783 set dummy $ac_prog; ac_word=$2
7784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7785 echo "configure:7786: checking for $ac_word" >&5
7786 if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789   if test -n "$JADE"; then
7790   ac_cv_prog_JADE="$JADE" # Let the user override the test.
7791 else
7792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7793   ac_dummy="$PATH"
7794   for ac_dir in $ac_dummy; do
7795     test -z "$ac_dir" && ac_dir=.
7796     if test -f $ac_dir/$ac_word; then
7797       ac_cv_prog_JADE="$ac_prog"
7798       break
7799     fi
7800   done
7801   IFS="$ac_save_ifs"
7802 fi
7803 fi
7804 JADE="$ac_cv_prog_JADE"
7805 if test -n "$JADE"; then
7806   echo "$ac_t""$JADE" 1>&6
7807 else
7808   echo "$ac_t""no" 1>&6
7809 fi
7810
7811 test -n "$JADE" && break
7812 done
7813
7814   
7815 echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
7816 echo "configure:7817: checking for DocBook V3.1" >&5
7817 if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
7818   echo $ac_n "(cached) $ac_c" 1>&6
7819 else
7820   cat >conftest.sgml <<EOF
7821 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
7822 <book>
7823  <title>test</title>
7824  <chapter>
7825   <title>random</title>
7826    <sect1>
7827     <title>testsect</title>
7828     <para>text</para>
7829   </sect1>
7830  </chapter>
7831 </book>
7832 EOF
7833
7834 ${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
7835 if test $? -eq 0; then
7836   pgac_cv_check_docbook=yes
7837 else
7838   pgac_cv_check_docbook=no
7839 fi
7840 rm -f conftest.sgml
7841 fi
7842
7843 echo "$ac_t""$pgac_cv_check_docbook" 1>&6
7844
7845 have_docbook=$pgac_cv_check_docbook
7846
7847
7848   echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
7849 echo "configure:7850: checking for DocBook stylesheets" >&5
7850 if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
7851   echo $ac_n "(cached) $ac_c" 1>&6
7852 else
7853   if test -n "$DOCBOOKSTYLE"; then
7854   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
7855 else
7856   for pgac_prefix in /usr /usr/local /opt; do
7857     for pgac_infix in share lib; do
7858       for pgac_postfix in \
7859         sgml/stylesheets/nwalsh-modular \
7860         sgml/stylesheets/docbook \
7861         sgml/docbook/dsssl/modular
7862       do
7863         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
7864         if test -r "$pgac_candidate/html/docbook.dsl" \
7865            && test -r "$pgac_candidate/print/docbook.dsl"
7866         then
7867           pgac_cv_path_stylesheets=$pgac_candidate
7868           break 3
7869         fi
7870       done
7871     done
7872   done
7873 fi
7874 fi
7875
7876 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
7877
7878 if test -n "$DOCBOOKSTYLE"; then
7879   echo "$ac_t""$DOCBOOKSTYLE" 1>&6
7880 else
7881   echo "$ac_t""no" 1>&6
7882 fi
7883   for ac_prog in sgmlspl
7884 do
7885 # Extract the first word of "$ac_prog", so it can be a program name with args.
7886 set dummy $ac_prog; ac_word=$2
7887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7888 echo "configure:7889: checking for $ac_word" >&5
7889 if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
7890   echo $ac_n "(cached) $ac_c" 1>&6
7891 else
7892   if test -n "$SGMLSPL"; then
7893   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
7894 else
7895   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7896   ac_dummy="$PATH"
7897   for ac_dir in $ac_dummy; do
7898     test -z "$ac_dir" && ac_dir=.
7899     if test -f $ac_dir/$ac_word; then
7900       ac_cv_prog_SGMLSPL="$ac_prog"
7901       break
7902     fi
7903   done
7904   IFS="$ac_save_ifs"
7905 fi
7906 fi
7907 SGMLSPL="$ac_cv_prog_SGMLSPL"
7908 if test -n "$SGMLSPL"; then
7909   echo "$ac_t""$SGMLSPL" 1>&6
7910 else
7911   echo "$ac_t""no" 1>&6
7912 fi
7913
7914 test -n "$SGMLSPL" && break
7915 done
7916
7917 fi
7918
7919 # check whether 'test -ef' works
7920 if (test "$srcdir" -ef "$srcdir") >/dev/null 2>&1 ; then
7921   test_ef_works=yes
7922 else
7923   test_ef_works=no
7924 fi
7925
7926 abs_top_srcdir=
7927
7928
7929 if test "$test_ef_works" = yes ; then
7930 # prepare build tree if outside source tree
7931   if test "$srcdir" -ef . ; then : ; else
7932     abs_top_srcdir=`cd $srcdir && pwd`
7933     echo $ac_n "preparing build tree... $ac_c" 1>&6
7934     /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
7935       || { echo "configure: error: failed" 1>&2; exit 1; }
7936     echo "$ac_t""done" 1>&6
7937   fi
7938 fi
7939
7940 trap '' 1 2 15
7941 cat > confcache <<\EOF
7942 # This file is a shell script that caches the results of configure
7943 # tests run on this system so they can be shared between configure
7944 # scripts and configure runs.  It is not useful on other systems.
7945 # If it contains results you don't want to keep, you may remove or edit it.
7946 #
7947 # By default, configure uses ./config.cache as the cache file,
7948 # creating it if it does not exist already.  You can give configure
7949 # the --cache-file=FILE option to use a different cache file; that is
7950 # what configure does when it calls configure scripts in
7951 # subdirectories, so they share the cache.
7952 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7953 # config.status only pays attention to the cache file if you give it the
7954 # --recheck option to rerun configure.
7955 #
7956 EOF
7957 # The following way of writing the cache mishandles newlines in values,
7958 # but we know of no workaround that is simple, portable, and efficient.
7959 # So, don't put newlines in cache variables' values.
7960 # Ultrix sh set writes to stderr and can't be redirected directly,
7961 # and sets the high bit in the cache file unless we assign to the vars.
7962 (set) 2>&1 |
7963   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7964   *ac_space=\ *)
7965     # `set' does not quote correctly, so add quotes (double-quote substitution
7966     # turns \\\\ into \\, and sed turns \\ into \).
7967     sed -n \
7968       -e "s/'/'\\\\''/g" \
7969       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7970     ;;
7971   *)
7972     # `set' quotes correctly as required by POSIX, so do not add quotes.
7973     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7974     ;;
7975   esac >> confcache
7976 if cmp -s $cache_file confcache; then
7977   :
7978 else
7979   if test -w $cache_file; then
7980     echo "updating cache $cache_file"
7981     cat confcache > $cache_file
7982   else
7983     echo "not updating unwritable cache $cache_file"
7984   fi
7985 fi
7986 rm -f confcache
7987
7988 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7989
7990 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7991 # Let make expand exec_prefix.
7992 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7993
7994 # Any assignment to VPATH causes Sun make to only execute
7995 # the first set of double-colon rules, so remove it if not needed.
7996 # If there is a colon in the path, we need to keep it.
7997 if test "x$srcdir" = x.; then
7998   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7999 fi
8000
8001 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8002
8003 DEFS=-DHAVE_CONFIG_H
8004
8005 # Without the "./", some shells look in PATH for config.status.
8006 : ${CONFIG_STATUS=./config.status}
8007
8008 echo creating $CONFIG_STATUS
8009 rm -f $CONFIG_STATUS
8010 cat > $CONFIG_STATUS <<EOF
8011 #! /bin/sh
8012 # Generated automatically by configure.
8013 # Run this file to recreate the current configuration.
8014 # This directory was configured as follows,
8015 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8016 #
8017 # $0 $ac_configure_args
8018 #
8019 # Compiler output produced by configure, useful for debugging
8020 # configure, is in ./config.log if it exists.
8021
8022 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8023 for ac_option
8024 do
8025   case "\$ac_option" in
8026   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8027     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8028     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8029   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8030     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8031     exit 0 ;;
8032   -help | --help | --hel | --he | --h)
8033     echo "\$ac_cs_usage"; exit 0 ;;
8034   *) echo "\$ac_cs_usage"; exit 1 ;;
8035   esac
8036 done
8037
8038 ac_given_srcdir=$srcdir
8039
8040 trap 'rm -fr `echo "
8041   GNUmakefile
8042   src/GNUmakefile
8043   src/Makefile.global
8044   src/backend/port/Makefile
8045  src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8046 EOF
8047 cat >> $CONFIG_STATUS <<EOF
8048
8049 # Protect against being on the right side of a sed subst in config.status.
8050 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8051  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8052 $ac_vpsub
8053 $extrasub
8054 s%@SHELL@%$SHELL%g
8055 s%@CFLAGS@%$CFLAGS%g
8056 s%@CPPFLAGS@%$CPPFLAGS%g
8057 s%@CXXFLAGS@%$CXXFLAGS%g
8058 s%@FFLAGS@%$FFLAGS%g
8059 s%@DEFS@%$DEFS%g
8060 s%@LDFLAGS@%$LDFLAGS%g
8061 s%@LIBS@%$LIBS%g
8062 s%@exec_prefix@%$exec_prefix%g
8063 s%@prefix@%$prefix%g
8064 s%@program_transform_name@%$program_transform_name%g
8065 s%@bindir@%$bindir%g
8066 s%@sbindir@%$sbindir%g
8067 s%@libexecdir@%$libexecdir%g
8068 s%@datadir@%$datadir%g
8069 s%@sysconfdir@%$sysconfdir%g
8070 s%@sharedstatedir@%$sharedstatedir%g
8071 s%@localstatedir@%$localstatedir%g
8072 s%@libdir@%$libdir%g
8073 s%@includedir@%$includedir%g
8074 s%@oldincludedir@%$oldincludedir%g
8075 s%@docdir@%$docdir%g
8076 s%@mandir@%$mandir%g
8077 s%@VERSION@%$VERSION%g
8078 s%@host@%$host%g
8079 s%@host_alias@%$host_alias%g
8080 s%@host_cpu@%$host_cpu%g
8081 s%@host_vendor@%$host_vendor%g
8082 s%@host_os@%$host_os%g
8083 s%@PORTNAME@%$PORTNAME%g
8084 s%@TAS@%$TAS%g
8085 s%@MULTIBYTE@%$MULTIBYTE%g
8086 s%@default_port@%$default_port%g
8087 s%@enable_shared@%$enable_shared%g
8088 s%@enable_rpath@%$enable_rpath%g
8089 s%@CC@%$CC%g
8090 s%@EXEEXT@%$EXEEXT%g
8091 s%@CPP@%$CPP%g
8092 s%@GCC@%$GCC%g
8093 s%@autodepend@%$autodepend%g
8094 s%@INCLUDES@%$INCLUDES%g
8095 s%@with_tcl@%$with_tcl%g
8096 s%@with_tk@%$with_tk%g
8097 s%@with_perl@%$with_perl%g
8098 s%@PYTHON@%$PYTHON%g
8099 s%@python_version@%$python_version%g
8100 s%@python_prefix@%$python_prefix%g
8101 s%@python_execprefix@%$python_execprefix%g
8102 s%@python_configdir@%$python_configdir%g
8103 s%@python_moduledir@%$python_moduledir%g
8104 s%@python_extmakefile@%$python_extmakefile%g
8105 s%@with_python@%$with_python%g
8106 s%@ANT@%$ANT%g
8107 s%@with_java@%$with_java%g
8108 s%@with_krb4@%$with_krb4%g
8109 s%@with_krb5@%$with_krb5%g
8110 s%@krb_srvtab@%$krb_srvtab%g
8111 s%@with_openssl@%$with_openssl%g
8112 s%@enable_odbc@%$enable_odbc%g
8113 s%@odbcinst_ini_dir@%$odbcinst_ini_dir%g
8114 s%@ELF_SYS@%$ELF_SYS%g
8115 s%@CXX@%$CXX%g
8116 s%@CXXCPP@%$CXXCPP%g
8117 s%@GXX@%$GXX%g
8118 s%@with_CXX@%$with_CXX%g
8119 s%@AWK@%$AWK%g
8120 s%@FLEX@%$FLEX%g
8121 s%@FLEXFLAGS@%$FLEXFLAGS%g
8122 s%@LN_S@%$LN_S%g
8123 s%@LD@%$LD%g
8124 s%@with_gnu_ld@%$with_gnu_ld%g
8125 s%@ld_R_works@%$ld_R_works%g
8126 s%@RANLIB@%$RANLIB%g
8127 s%@LORDER@%$LORDER%g
8128 s%@TAR@%$TAR%g
8129 s%@PERL@%$PERL%g
8130 s%@YACC@%$YACC%g
8131 s%@YFLAGS@%$YFLAGS%g
8132 s%@WISH@%$WISH%g
8133 s%@SNPRINTF@%$SNPRINTF%g
8134 s%@ISINF@%$ISINF%g
8135 s%@GETRUSAGE@%$GETRUSAGE%g
8136 s%@SRANDOM@%$SRANDOM%g
8137 s%@GETHOSTNAME@%$GETHOSTNAME%g
8138 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
8139 s%@INET_ATON@%$INET_ATON%g
8140 s%@STRERROR@%$STRERROR%g
8141 s%@STRDUP@%$STRDUP%g
8142 s%@STRTOL@%$STRTOL%g
8143 s%@STRTOUL@%$STRTOUL%g
8144 s%@STRCASECMP@%$STRCASECMP%g
8145 s%@HPUXMATHLIB@%$HPUXMATHLIB%g
8146 s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
8147 s%@TCLSH@%$TCLSH%g
8148 s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
8149 s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
8150 s%@NSGMLS@%$NSGMLS%g
8151 s%@JADE@%$JADE%g
8152 s%@have_docbook@%$have_docbook%g
8153 s%@DOCBOOKSTYLE@%$DOCBOOKSTYLE%g
8154 s%@SGMLSPL@%$SGMLSPL%g
8155 s%@abs_top_srcdir@%$abs_top_srcdir%g
8156
8157 CEOF
8158 EOF
8159
8160 cat >> $CONFIG_STATUS <<\EOF
8161
8162 # Split the substitutions into bite-sized pieces for seds with
8163 # small command number limits, like on Digital OSF/1 and HP-UX.
8164 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8165 ac_file=1 # Number of current file.
8166 ac_beg=1 # First line for current file.
8167 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8168 ac_more_lines=:
8169 ac_sed_cmds=""
8170 while $ac_more_lines; do
8171   if test $ac_beg -gt 1; then
8172     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8173   else
8174     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8175   fi
8176   if test ! -s conftest.s$ac_file; then
8177     ac_more_lines=false
8178     rm -f conftest.s$ac_file
8179   else
8180     if test -z "$ac_sed_cmds"; then
8181       ac_sed_cmds="sed -f conftest.s$ac_file"
8182     else
8183       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8184     fi
8185     ac_file=`expr $ac_file + 1`
8186     ac_beg=$ac_end
8187     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8188   fi
8189 done
8190 if test -z "$ac_sed_cmds"; then
8191   ac_sed_cmds=cat
8192 fi
8193 EOF
8194
8195 cat >> $CONFIG_STATUS <<EOF
8196
8197 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
8198   src/GNUmakefile
8199   src/Makefile.global
8200   src/backend/port/Makefile
8201 "}
8202 EOF
8203 cat >> $CONFIG_STATUS <<\EOF
8204 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8205   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8206   case "$ac_file" in
8207   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8208        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8209   *) ac_file_in="${ac_file}.in" ;;
8210   esac
8211
8212   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8213
8214   # Remove last slash and all that follows it.  Not all systems have dirname.
8215   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8216   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8217     # The file is in a subdirectory.
8218     test ! -d "$ac_dir" && mkdir "$ac_dir"
8219     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8220     # A "../" for each directory in $ac_dir_suffix.
8221     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8222   else
8223     ac_dir_suffix= ac_dots=
8224   fi
8225
8226   case "$ac_given_srcdir" in
8227   .)  srcdir=.
8228       if test -z "$ac_dots"; then top_srcdir=.
8229       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8230   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8231   *) # Relative path.
8232     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8233     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8234   esac
8235
8236
8237   echo creating "$ac_file"
8238   rm -f "$ac_file"
8239   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8240   case "$ac_file" in
8241   *Makefile*) ac_comsub="1i\\
8242 # $configure_input" ;;
8243   *) ac_comsub= ;;
8244   esac
8245
8246   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8247   sed -e "$ac_comsub
8248 s%@configure_input@%$configure_input%g
8249 s%@srcdir@%$srcdir%g
8250 s%@top_srcdir@%$top_srcdir%g
8251 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8252 fi; done
8253 rm -f conftest.s*
8254
8255 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8256 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8257 #
8258 # ac_d sets the value in "#define NAME VALUE" lines.
8259 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8260 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8261 ac_dC='\3'
8262 ac_dD='%g'
8263 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8264 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8265 ac_uB='\([      ]\)%\1#\2define\3'
8266 ac_uC=' '
8267 ac_uD='\4%g'
8268 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8269 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8270 ac_eB='$%\1#\2define\3'
8271 ac_eC=' '
8272 ac_eD='%g'
8273
8274 if test "${CONFIG_HEADERS+set}" != set; then
8275 EOF
8276 cat >> $CONFIG_STATUS <<EOF
8277   CONFIG_HEADERS="src/include/config.h"
8278 EOF
8279 cat >> $CONFIG_STATUS <<\EOF
8280 fi
8281 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8282   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8283   case "$ac_file" in
8284   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8285        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8286   *) ac_file_in="${ac_file}.in" ;;
8287   esac
8288
8289   echo creating $ac_file
8290
8291   rm -f conftest.frag conftest.in conftest.out
8292   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8293   cat $ac_file_inputs > conftest.in
8294
8295 EOF
8296
8297 # Transform confdefs.h into a sed script conftest.vals that substitutes
8298 # the proper values into config.h.in to produce config.h.  And first:
8299 # Protect against being on the right side of a sed subst in config.status.
8300 # Protect against being in an unquoted here document in config.status.
8301 rm -f conftest.vals
8302 cat > conftest.hdr <<\EOF
8303 s/[\\&%]/\\&/g
8304 s%[\\$`]%\\&%g
8305 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8306 s%ac_d%ac_u%gp
8307 s%ac_u%ac_e%gp
8308 EOF
8309 sed -n -f conftest.hdr confdefs.h > conftest.vals
8310 rm -f conftest.hdr
8311
8312 # This sed command replaces #undef with comments.  This is necessary, for
8313 # example, in the case of _POSIX_SOURCE, which is predefined and required
8314 # on some systems where configure will not decide to define it.
8315 cat >> conftest.vals <<\EOF
8316 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8317 EOF
8318
8319 # Break up conftest.vals because some shells have a limit on
8320 # the size of here documents, and old seds have small limits too.
8321
8322 rm -f conftest.tail
8323 while :
8324 do
8325   ac_lines=`grep -c . conftest.vals`
8326   # grep -c gives empty output for an empty file on some AIX systems.
8327   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8328   # Write a limited-size here document to conftest.frag.
8329   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8330   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8331   echo 'CEOF
8332   sed -f conftest.frag conftest.in > conftest.out
8333   rm -f conftest.in
8334   mv conftest.out conftest.in
8335 ' >> $CONFIG_STATUS
8336   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8337   rm -f conftest.vals
8338   mv conftest.tail conftest.vals
8339 done
8340 rm -f conftest.vals
8341
8342 cat >> $CONFIG_STATUS <<\EOF
8343   rm -f conftest.frag conftest.h
8344   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8345   cat conftest.in >> conftest.h
8346   rm -f conftest.in
8347   if cmp -s $ac_file conftest.h 2>/dev/null; then
8348     echo "$ac_file is unchanged"
8349     rm -f conftest.h
8350   else
8351     # Remove last slash and all that follows it.  Not all systems have dirname.
8352       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8353       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8354       # The file is in a subdirectory.
8355       test ! -d "$ac_dir" && mkdir "$ac_dir"
8356     fi
8357     rm -f $ac_file
8358     mv conftest.h $ac_file
8359   fi
8360 fi; done
8361
8362 EOF
8363
8364 cat >> $CONFIG_STATUS <<EOF
8365 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}"
8366 ac_dests="src/backend/port/dynloader.c src/include/dynloader.h src/include/os.h src/Makefile.port src/backend/port/tas.s"
8367 EOF
8368
8369 cat >> $CONFIG_STATUS <<\EOF
8370 srcdir=$ac_given_srcdir
8371 while test -n "$ac_sources"; do
8372   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
8373   set $ac_sources; ac_source=$1; shift; ac_sources=$*
8374
8375   echo "linking $srcdir/$ac_source to $ac_dest"
8376
8377   if test ! -r $srcdir/$ac_source; then
8378     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
8379   fi
8380   rm -f $ac_dest
8381
8382   # Make relative symlinks.
8383   # Remove last slash and all that follows it.  Not all systems have dirname.
8384   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
8385   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
8386     # The dest file is in a subdirectory.
8387     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
8388     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
8389     # A "../" for each directory in $ac_dest_dir_suffix.
8390     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
8391   else
8392     ac_dest_dir_suffix= ac_dots=
8393   fi
8394
8395   case "$srcdir" in
8396   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
8397   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
8398   esac
8399
8400   # Make a symlink if possible; otherwise try a hard link.
8401   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
8402     ln $srcdir/$ac_source $ac_dest; then :
8403   else
8404     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
8405   fi
8406 done
8407 EOF
8408 cat >> $CONFIG_STATUS <<EOF
8409
8410 EOF
8411 cat >> $CONFIG_STATUS <<\EOF
8412
8413 # Update timestamp for config.h (see Makefile.global)
8414 test x"$CONFIG_HEADERS" != x"" && echo >src/include/stamp-h
8415
8416 exit 0
8417 EOF
8418 chmod +x $CONFIG_STATUS
8419 rm -fr confdefs* $ac_clean_files
8420 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8421