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