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