OSDN Git Service

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