OSDN Git Service

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