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