OSDN Git Service

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