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