OSDN Git Service

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