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