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