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