]> granicus.if.org Git - postgresql/blob - configure
Add regression tests for date, time, and time with time zone types.
[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   else
1727     openssl_libdir="${openssl_prefix}"
1728     LIBS="$LIBS -L${openssl_prefix}"
1729   fi
1730 fi
1731
1732
1733 # OpenSSL and Kerberos 5 both have a `crypto' library, so if you want to
1734 # use both of them you'll have to figure it out yourself.
1735 if test "$with_openssl" = yes && test "$with_krb5" = yes ; then
1736   { echo "configure: error: OpenSSL and Kerberos 5 support cannot be combined" 1>&2; exit 1; }
1737 fi
1738
1739
1740  
1741 if test "x${with_odbc+set}" = xset && test "x${enable_odbc+set}" != xset; then
1742   enable_odbc=$with_odbc
1743 fi
1744  
1745 echo $ac_n "checking whether to build the ODBC driver""... $ac_c" 1>&6
1746 echo "configure:1747: checking whether to build the ODBC driver" >&5
1747 # Check whether --enable-odbc or --disable-odbc was given.
1748 if test "${enable_odbc+set}" = set; then
1749   enableval="$enable_odbc"
1750   if test x"$enableval" = x"yes" ; then
1751   echo "$ac_t""yes" 1>&6
1752 else
1753   echo "$ac_t""no" 1>&6
1754 fi
1755 else
1756   echo "$ac_t""no" 1>&6
1757 fi
1758
1759
1760
1761
1762 if test x"$enable_odbc" = x"yes" ; then
1763 # Check whether --with-odbcinst or --without-odbcinst was given.
1764 if test "${with_odbcinst+set}" = set; then
1765   withval="$with_odbcinst"
1766   if test x"$with_odbcinst" = x"yes" || test x"$with_odbcinst" = x"no" ; then
1767   { echo "configure: error: You must supply an argument to the --with-odbcinst option." 1>&2; exit 1; }
1768 fi
1769 odbcinst_ini_dir=$withval
1770 else
1771   odbcinst_ini_dir='${sysconfdir}'
1772 fi
1773
1774 else
1775   odbcinst_ini_dir='${sysconfdir}'
1776 fi
1777
1778
1779
1780
1781 echo $ac_n "checking setting ASSERT CHECKING""... $ac_c" 1>&6
1782 echo "configure:1783: checking setting ASSERT CHECKING" >&5
1783 # Check whether --enable-cassert or --disable-cassert was given.
1784 if test "${enable_cassert+set}" = set; then
1785   enableval="$enable_cassert"
1786   cat >> confdefs.h <<\EOF
1787 #define USE_ASSERT_CHECKING 1
1788 EOF
1789  echo "$ac_t""enabled" 1>&6
1790 else
1791   echo "$ac_t""disabled" 1>&6
1792
1793 fi
1794
1795
1796
1797 # Assume system is ELF if it predefines __ELF__ as 1,
1798 # otherwise believe host_os based default.
1799 case $host_os in
1800   freebsd1*|freebsd2*) elf=yes;;
1801 esac
1802
1803 cat > conftest.$ac_ext <<EOF
1804 #line 1805 "configure"
1805 #include "confdefs.h"
1806 #if __ELF__
1807   yes
1808 #endif
1809
1810 EOF
1811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1812   egrep "yes" >/dev/null 2>&1; then
1813   rm -rf conftest*
1814   ELF_SYS=true
1815 else
1816   rm -rf conftest*
1817   if test "X$elf" = "Xyes" ; then
1818   ELF_SYS=true
1819 else
1820   ELF_SYS=
1821 fi
1822 fi
1823 rm -f conftest*
1824
1825
1826
1827
1828
1829 echo $ac_n "checking whether to build C++ modules""... $ac_c" 1>&6
1830 echo "configure:1831: checking whether to build C++ modules" >&5
1831 # Check whether --with-CXX or --without-CXX was given.
1832 if test "${with_CXX+set}" = set; then
1833   withval="$with_CXX"
1834   if test x"$withval" != x"no"; then
1835   if test x"$withval" != x"yes" ; then
1836     CXX=$withval
1837   fi
1838   with_CXX=yes
1839 fi
1840 else
1841   with_CXX=no
1842 fi
1843
1844
1845 echo "$ac_t""$with_CXX" 1>&6
1846
1847
1848 if test $with_CXX = yes; then
1849   for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1850 do
1851 # Extract the first word of "$ac_prog", so it can be a program name with args.
1852 set dummy $ac_prog; ac_word=$2
1853 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1854 echo "configure:1855: checking for $ac_word" >&5
1855 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1856   echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858   if test -n "$CXX"; then
1859   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1860 else
1861   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1862   ac_dummy="$PATH"
1863   for ac_dir in $ac_dummy; do
1864     test -z "$ac_dir" && ac_dir=.
1865     if test -f $ac_dir/$ac_word; then
1866       ac_cv_prog_CXX="$ac_prog"
1867       break
1868     fi
1869   done
1870   IFS="$ac_save_ifs"
1871 fi
1872 fi
1873 CXX="$ac_cv_prog_CXX"
1874 if test -n "$CXX"; then
1875   echo "$ac_t""$CXX" 1>&6
1876 else
1877   echo "$ac_t""no" 1>&6
1878 fi
1879
1880 test -n "$CXX" && break
1881 done
1882 test -n "$CXX" || CXX="gcc"
1883
1884
1885 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1886 echo "configure:1887: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1887
1888 ac_ext=C
1889 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1890 ac_cpp='$CXXCPP $CPPFLAGS'
1891 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1892 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1893 cross_compiling=$ac_cv_prog_cxx_cross
1894
1895 cat > conftest.$ac_ext << EOF
1896
1897 #line 1898 "configure"
1898 #include "confdefs.h"
1899
1900 int main(){return(0);}
1901 EOF
1902 if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1903   ac_cv_prog_cxx_works=yes
1904   # If we can't run a trivial program, we are probably using a cross compiler.
1905   if (./conftest; exit) 2>/dev/null; then
1906     ac_cv_prog_cxx_cross=no
1907   else
1908     ac_cv_prog_cxx_cross=yes
1909   fi
1910 else
1911   echo "configure: failed program was:" >&5
1912   cat conftest.$ac_ext >&5
1913   ac_cv_prog_cxx_works=no
1914 fi
1915 rm -fr conftest*
1916 ac_ext=c
1917 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1918 ac_cpp='$CPP $CPPFLAGS'
1919 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1920 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1921 cross_compiling=$ac_cv_prog_cc_cross
1922
1923 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1924 if test $ac_cv_prog_cxx_works = no; then
1925   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1926 fi
1927 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1928 echo "configure:1929: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1929 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1930 cross_compiling=$ac_cv_prog_cxx_cross
1931
1932 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1933 echo "configure:1934: checking whether we are using GNU C++" >&5
1934 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1935   echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937   cat > conftest.C <<EOF
1938 #ifdef __GNUC__
1939   yes;
1940 #endif
1941 EOF
1942 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1943   ac_cv_prog_gxx=yes
1944 else
1945   ac_cv_prog_gxx=no
1946 fi
1947 fi
1948
1949 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1950
1951 if test $ac_cv_prog_gxx = yes; then
1952   GXX=yes
1953 else
1954   GXX=
1955 fi
1956
1957 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1958 ac_save_CXXFLAGS="$CXXFLAGS"
1959 CXXFLAGS=
1960 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether ${CXX-g++} accepts -g" >&5
1962 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1963   echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965   echo 'void f(){}' > conftest.cc
1966 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1967   ac_cv_prog_cxx_g=yes
1968 else
1969   ac_cv_prog_cxx_g=no
1970 fi
1971 rm -f conftest*
1972
1973 fi
1974
1975 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1976 if test "$ac_test_CXXFLAGS" = set; then
1977   CXXFLAGS="$ac_save_CXXFLAGS"
1978 elif test $ac_cv_prog_cxx_g = yes; then
1979   if test "$GXX" = yes; then
1980     CXXFLAGS="-g -O2"
1981   else
1982     CXXFLAGS="-g"
1983   fi
1984 else
1985   if test "$GXX" = yes; then
1986     CXXFLAGS="-O2"
1987   else
1988     CXXFLAGS=
1989   fi
1990 fi
1991
1992   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1993 echo "configure:1994: checking how to run the C++ preprocessor" >&5
1994 if test -z "$CXXCPP"; then
1995 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1996   echo $ac_n "(cached) $ac_c" 1>&6
1997 else
1998   ac_ext=C
1999 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2000 ac_cpp='$CXXCPP $CPPFLAGS'
2001 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2002 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2003 cross_compiling=$ac_cv_prog_cxx_cross
2004   CXXCPP="${CXX-g++} -E"
2005   cat > conftest.$ac_ext <<EOF
2006 #line 2007 "configure"
2007 #include "confdefs.h"
2008 #include <stdlib.h>
2009 EOF
2010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011 { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013 if test -z "$ac_err"; then
2014   :
2015 else
2016   echo "$ac_err" >&5
2017   echo "configure: failed program was:" >&5
2018   cat conftest.$ac_ext >&5
2019   rm -rf conftest*
2020   CXXCPP=/lib/cpp
2021 fi
2022 rm -f conftest*
2023   ac_cv_prog_CXXCPP="$CXXCPP"
2024 ac_ext=c
2025 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2026 ac_cpp='$CPP $CPPFLAGS'
2027 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2028 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2029 cross_compiling=$ac_cv_prog_cc_cross
2030 fi
2031 fi
2032 CXXCPP="$ac_cv_prog_CXXCPP"
2033 echo "$ac_t""$CXXCPP" 1>&6
2034
2035   
2036 ac_ext=C
2037 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2038 ac_cpp='$CXXCPP $CPPFLAGS'
2039 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2040 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2041 cross_compiling=$ac_cv_prog_cxx_cross
2042
2043 ac_safe=`echo "string" | sed 'y%./+-%__p_%'`
2044 echo $ac_n "checking for string""... $ac_c" 1>&6
2045 echo "configure:2046: checking for string" >&5
2046 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2047   echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2049   cat > conftest.$ac_ext <<EOF
2050 #line 2051 "configure"
2051 #include "confdefs.h"
2052 #include <string>
2053 EOF
2054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2055 { (eval echo configure:2056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2057 if test -z "$ac_err"; then
2058   rm -rf conftest*
2059   eval "ac_cv_header_$ac_safe=yes"
2060 else
2061   echo "$ac_err" >&5
2062   echo "configure: failed program was:" >&5
2063   cat conftest.$ac_ext >&5
2064   rm -rf conftest*
2065   eval "ac_cv_header_$ac_safe=no"
2066 fi
2067 rm -f conftest*
2068 fi
2069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2070   echo "$ac_t""yes" 1>&6
2071   cat >> confdefs.h <<\EOF
2072 #define HAVE_CXX_STRING_HEADER 1
2073 EOF
2074
2075 else
2076   echo "$ac_t""no" 1>&6
2077 fi
2078
2079
2080 if test x"$ac_cv_header_string" != xyes ; then
2081   echo $ac_n "checking for class string in <string.h>""... $ac_c" 1>&6
2082 echo "configure:2083: checking for class string in <string.h>" >&5
2083 if eval "test \"`echo '$''{'pgac_cv_class_string_in_string_h'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   cat > conftest.$ac_ext <<EOF
2087 #line 2088 "configure"
2088 #include "confdefs.h"
2089 #include <stdio.h>
2090 #include <stdlib.h>
2091 #include <string.h>
2092
2093 int main() {
2094 string foo = "test"
2095 ; return 0; }
2096 EOF
2097 if { (eval echo configure:2098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2098   rm -rf conftest*
2099   pgac_cv_class_string_in_string_h=yes
2100 else
2101   echo "configure: failed program was:" >&5
2102   cat conftest.$ac_ext >&5
2103   rm -rf conftest*
2104   pgac_cv_class_string_in_string_h=no
2105 fi
2106 rm -f conftest*
2107 fi
2108
2109 echo "$ac_t""$pgac_cv_class_string_in_string_h" 1>&6
2110
2111   if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
2112     { echo "configure: error: neither <string> nor <string.h> seem to define the C++ class \`string\'" 1>&2; exit 1; }
2113   fi
2114 fi
2115 ac_ext=c
2116 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2117 ac_cpp='$CPP $CPPFLAGS'
2118 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2119 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2120 cross_compiling=$ac_cv_prog_cc_cross
2121
2122   
2123 echo $ac_n "checking for namespace std in C++""... $ac_c" 1>&6
2124 echo "configure:2125: checking for namespace std in C++" >&5
2125 if eval "test \"`echo '$''{'pgac_cv_cxx_namespace_std'+set}'`\" = set"; then
2126   echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128   
2129
2130 ac_ext=C
2131 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2132 ac_cpp='$CXXCPP $CPPFLAGS'
2133 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2134 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2135 cross_compiling=$ac_cv_prog_cxx_cross
2136
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <stdio.h>
2141 #include <stdlib.h>
2142 #ifdef HAVE_CXX_STRING_HEADER
2143 #include <string>
2144 #endif
2145 using namespace std;
2146
2147 int main() {
2148
2149 ; return 0; }
2150 EOF
2151 if { (eval echo configure:2152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2152   rm -rf conftest*
2153   pgac_cv_cxx_namespace_std=yes
2154 else
2155   echo "configure: failed program was:" >&5
2156   cat conftest.$ac_ext >&5
2157   rm -rf conftest*
2158   pgac_cv_cxx_namespace_std=no
2159 fi
2160 rm -f conftest*
2161 ac_ext=c
2162 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2163 ac_cpp='$CPP $CPPFLAGS'
2164 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2165 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2166 cross_compiling=$ac_cv_prog_cc_cross
2167
2168 fi
2169
2170 echo "$ac_t""$pgac_cv_cxx_namespace_std" 1>&6
2171
2172 if test $pgac_cv_cxx_namespace_std = yes ; then
2173     cat >> confdefs.h <<\EOF
2174 #define HAVE_NAMESPACE_STD 1
2175 EOF
2176
2177 fi
2178 fi
2179
2180
2181 CPPFLAGS="$CPPFLAGS $INCLUDES"
2182 LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
2183
2184 echo "using CPPFLAGS=$CPPFLAGS"
2185 echo "using LDFLAGS=$LDFLAGS"
2186
2187
2188 # Figure out how to invoke "install" and what install options to use.
2189
2190 # Find a good install program.  We prefer a C program (faster),
2191 # so one script is as good as another.  But avoid the broken or
2192 # incompatible versions:
2193 # SysV /etc/install, /usr/sbin/install
2194 # SunOS /usr/etc/install
2195 # IRIX /sbin/install
2196 # AIX /bin/install
2197 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2198 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2199 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2200 # ./install, which can be erroneously created by make from ./install.sh.
2201 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2202 echo "configure:2203: checking for a BSD compatible install" >&5
2203 if test -z "$INSTALL"; then
2204 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2205   echo $ac_n "(cached) $ac_c" 1>&6
2206 else
2207     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2208   for ac_dir in $PATH; do
2209     # Account for people who put trailing slashes in PATH elements.
2210     case "$ac_dir/" in
2211     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2212     *)
2213       # OSF1 and SCO ODT 3.0 have their own names for install.
2214       # Don't use installbsd from OSF since it installs stuff as root
2215       # by default.
2216       for ac_prog in ginstall scoinst install; do
2217         if test -f $ac_dir/$ac_prog; then
2218           if test $ac_prog = install &&
2219             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2220             # AIX install.  It has an incompatible calling convention.
2221             :
2222           else
2223             ac_cv_path_install="$ac_dir/$ac_prog -c"
2224             break 2
2225           fi
2226         fi
2227       done
2228       ;;
2229     esac
2230   done
2231   IFS="$ac_save_IFS"
2232
2233 fi
2234   if test "${ac_cv_path_install+set}" = set; then
2235     INSTALL="$ac_cv_path_install"
2236   else
2237     # As a last resort, use the slow shell script.  We don't cache a
2238     # path for INSTALL within a source directory, because that will
2239     # break other packages using the cache if that directory is
2240     # removed, or if the path is relative.
2241     INSTALL="$ac_install_sh"
2242   fi
2243 fi
2244 echo "$ac_t""$INSTALL" 1>&6
2245
2246 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2247 # It thinks the first close brace ends the variable substitution.
2248 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2249
2250 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2251
2252 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2253
2254 # When Autoconf chooses install-sh as install program it tries to generate
2255 # a relative path to it in each makefile where it subsitutes it. This clashes
2256 # with our Makefile.global concept. This workaround helps.
2257 case $INSTALL in
2258   *install-sh*) INSTALL='\${SHELL} \${top_srcdir}/config/install-sh -c';;
2259 esac
2260
2261 # Fix Autoconf's brain-dead defaults for script installs.
2262 INSTALL_SCRIPT="\${INSTALL} -m 755"
2263
2264 # HPUX wants shared libs to be mode 555. Add your platform's special
2265 # needs here if necessary.
2266 case $host_os in
2267     hpux*)      INSTL_SHLIB_OPTS="-m 555" ;;
2268     *)          INSTL_SHLIB_OPTS="-m 644" ;;
2269 esac
2270
2271 INSTALL_SHLIB="\${INSTALL} $INSTL_SHLIB_OPTS"
2272
2273
2274
2275 mkinstalldirs="\$(SHELL) \$(top_srcdir)/config/mkinstalldirs"
2276
2277
2278
2279 for ac_prog in mawk gawk nawk awk
2280 do
2281 # Extract the first word of "$ac_prog", so it can be a program name with args.
2282 set dummy $ac_prog; ac_word=$2
2283 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2284 echo "configure:2285: checking for $ac_word" >&5
2285 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2286   echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288   if test -n "$AWK"; then
2289   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2290 else
2291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2292   ac_dummy="$PATH"
2293   for ac_dir in $ac_dummy; do
2294     test -z "$ac_dir" && ac_dir=.
2295     if test -f $ac_dir/$ac_word; then
2296       ac_cv_prog_AWK="$ac_prog"
2297       break
2298     fi
2299   done
2300   IFS="$ac_save_ifs"
2301 fi
2302 fi
2303 AWK="$ac_cv_prog_AWK"
2304 if test -n "$AWK"; then
2305   echo "$ac_t""$AWK" 1>&6
2306 else
2307   echo "$ac_t""no" 1>&6
2308 fi
2309
2310 test -n "$AWK" && break
2311 done
2312
2313 echo $ac_n "checking for flex""... $ac_c" 1>&6
2314 echo "configure:2315: checking for flex" >&5
2315 if eval "test \"`echo '$''{'pgac_cv_path_flex'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   # Let the user override the test
2319 if test -n "$FLEX"; then
2320   pgac_cv_path_flex=$FLEX
2321 else
2322   pgac_save_IFS=$IFS
2323   IFS=:
2324   for pgac_dir in $PATH; do
2325     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
2326       pgac_dir=`pwd`
2327     fi
2328     for pgac_prog in flex lex; do
2329       pgac_candidate="$pgac_dir/$pgac_prog"
2330       if test -f "$pgac_candidate" \
2331         && $pgac_candidate --version >/dev/null 2>&1
2332       then
2333         echo '%%'  > conftest.l
2334         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
2335           if $pgac_candidate --version | grep '2\.5\.3' >/dev/null 2>&1; then
2336             pgac_broken_flex=$pgac_candidate
2337             continue
2338           fi
2339
2340           pgac_cv_path_flex=$pgac_candidate
2341           break 2
2342         fi
2343       fi
2344     done
2345   done
2346   IFS=$pgac_save_IFS
2347   rm -f conftest.l
2348   : ${pgac_cv_path_flex=no}
2349 fi
2350
2351 fi
2352
2353 echo "$ac_t""$pgac_cv_path_flex" 1>&6
2354 if test x"$pgac_cv_path_flex" = x"no"; then
2355   if test -n "$pgac_broken_flex"; then
2356     echo "configure: warning: 
2357 ***
2358 The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
2359 should get version 2.5.4 or later.
2360 ###" 1>&2
2361   fi
2362
2363   echo "configure: warning: 
2364 ***
2365 Without Flex you won't be able to build PostgreSQL from scratch, or change
2366 any of the scanner definition files. You can obtain Flex from a GNU mirror
2367 site. (If you are using the official distribution of PostgreSQL then you
2368 do not need to worry about this because the lexer files are pre-generated.)
2369 ***" 1>&2
2370 fi
2371
2372 if test x"$pgac_cv_path_flex" = x"no"; then
2373   FLEX=
2374 else
2375   FLEX=$pgac_cv_path_flex
2376 fi
2377
2378
2379
2380
2381 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2382 echo "configure:2383: checking whether ln -s works" >&5
2383 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2384   echo $ac_n "(cached) $ac_c" 1>&6
2385 else
2386   rm -f conftestdata
2387 if ln -s X conftestdata 2>/dev/null
2388 then
2389   rm -f conftestdata
2390   ac_cv_prog_LN_S="ln -s"
2391 else
2392   ac_cv_prog_LN_S=ln
2393 fi
2394 fi
2395 LN_S="$ac_cv_prog_LN_S"
2396 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2397   echo "$ac_t""yes" 1>&6
2398 else
2399   echo "$ac_t""no" 1>&6
2400 fi
2401
2402 # Extract the first word of "ranlib", so it can be a program name with args.
2403 set dummy ranlib; ac_word=$2
2404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2405 echo "configure:2406: checking for $ac_word" >&5
2406 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   if test -n "$RANLIB"; then
2410   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2411 else
2412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2413   ac_dummy="$PATH"
2414   for ac_dir in $ac_dummy; do
2415     test -z "$ac_dir" && ac_dir=.
2416     if test -f $ac_dir/$ac_word; then
2417       ac_cv_prog_RANLIB="ranlib"
2418       break
2419     fi
2420   done
2421   IFS="$ac_save_ifs"
2422   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2423 fi
2424 fi
2425 RANLIB="$ac_cv_prog_RANLIB"
2426 if test -n "$RANLIB"; then
2427   echo "$ac_t""$RANLIB" 1>&6
2428 else
2429   echo "$ac_t""no" 1>&6
2430 fi
2431
2432 # Extract the first word of "tar", so it can be a program name with args.
2433 set dummy tar; ac_word=$2
2434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2435 echo "configure:2436: checking for $ac_word" >&5
2436 if eval "test \"`echo '$''{'ac_cv_path_tar'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   case "$tar" in
2440   /*)
2441   ac_cv_path_tar="$tar" # Let the user override the test with a path.
2442   ;;
2443   ?:/*)                  
2444   ac_cv_path_tar="$tar" # Let the user override the test with a dos path.
2445   ;;
2446   *)
2447   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2448   ac_dummy="$PATH"
2449   for ac_dir in $ac_dummy; do 
2450     test -z "$ac_dir" && ac_dir=.
2451     if test -f $ac_dir/$ac_word; then
2452       ac_cv_path_tar="$ac_dir/$ac_word"
2453       break
2454     fi
2455   done
2456   IFS="$ac_save_ifs"
2457   ;;
2458 esac
2459 fi
2460 tar="$ac_cv_path_tar"
2461 if test -n "$tar"; then
2462   echo "$ac_t""$tar" 1>&6
2463 else
2464   echo "$ac_t""no" 1>&6
2465 fi
2466
2467 for ac_prog in perl
2468 do
2469 # Extract the first word of "$ac_prog", so it can be a program name with args.
2470 set dummy $ac_prog; ac_word=$2
2471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2472 echo "configure:2473: checking for $ac_word" >&5
2473 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   if test -n "$PERL"; then
2477   ac_cv_prog_PERL="$PERL" # Let the user override the test.
2478 else
2479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2480   ac_dummy="$PATH"
2481   for ac_dir in $ac_dummy; do
2482     test -z "$ac_dir" && ac_dir=.
2483     if test -f $ac_dir/$ac_word; then
2484       ac_cv_prog_PERL="$ac_prog"
2485       break
2486     fi
2487   done
2488   IFS="$ac_save_ifs"
2489 fi
2490 fi
2491 PERL="$ac_cv_prog_PERL"
2492 if test -n "$PERL"; then
2493   echo "$ac_t""$PERL" 1>&6
2494 else
2495   echo "$ac_t""no" 1>&6
2496 fi
2497
2498 test -n "$PERL" && break
2499 done
2500
2501 for ac_prog in 'bison -y' byacc
2502 do
2503 # Extract the first word of "$ac_prog", so it can be a program name with args.
2504 set dummy $ac_prog; ac_word=$2
2505 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2506 echo "configure:2507: checking for $ac_word" >&5
2507 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   if test -n "$YACC"; then
2511   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2512 else
2513   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2514   ac_dummy="$PATH"
2515   for ac_dir in $ac_dummy; do
2516     test -z "$ac_dir" && ac_dir=.
2517     if test -f $ac_dir/$ac_word; then
2518       ac_cv_prog_YACC="$ac_prog"
2519       break
2520     fi
2521   done
2522   IFS="$ac_save_ifs"
2523 fi
2524 fi
2525 YACC="$ac_cv_prog_YACC"
2526 if test -n "$YACC"; then
2527   echo "$ac_t""$YACC" 1>&6
2528 else
2529   echo "$ac_t""no" 1>&6
2530 fi
2531
2532 test -n "$YACC" && break
2533 done
2534 test -n "$YACC" || YACC="yacc"
2535
2536
2537
2538
2539 ##
2540 ## Libraries
2541 ##
2542
2543 echo $ac_n "checking for main in -lsfio""... $ac_c" 1>&6
2544 echo "configure:2545: checking for main in -lsfio" >&5
2545 ac_lib_var=`echo sfio'_'main | sed 'y%./+-%__p_%'`
2546 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2547   echo $ac_n "(cached) $ac_c" 1>&6
2548 else
2549   ac_save_LIBS="$LIBS"
2550 LIBS="-lsfio  $LIBS"
2551 cat > conftest.$ac_ext <<EOF
2552 #line 2553 "configure"
2553 #include "confdefs.h"
2554
2555 int main() {
2556 main()
2557 ; return 0; }
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2560   rm -rf conftest*
2561   eval "ac_cv_lib_$ac_lib_var=yes"
2562 else
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -rf conftest*
2566   eval "ac_cv_lib_$ac_lib_var=no"
2567 fi
2568 rm -f conftest*
2569 LIBS="$ac_save_LIBS"
2570
2571 fi
2572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2573   echo "$ac_t""yes" 1>&6
2574     ac_tr_lib=HAVE_LIB`echo sfio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2575     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2576   cat >> confdefs.h <<EOF
2577 #define $ac_tr_lib 1
2578 EOF
2579
2580   LIBS="-lsfio $LIBS"
2581
2582 else
2583   echo "$ac_t""no" 1>&6
2584 fi
2585
2586 echo $ac_n "checking for main in -lncurses""... $ac_c" 1>&6
2587 echo "configure:2588: checking for main in -lncurses" >&5
2588 ac_lib_var=`echo ncurses'_'main | sed 'y%./+-%__p_%'`
2589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2590   echo $ac_n "(cached) $ac_c" 1>&6
2591 else
2592   ac_save_LIBS="$LIBS"
2593 LIBS="-lncurses  $LIBS"
2594 cat > conftest.$ac_ext <<EOF
2595 #line 2596 "configure"
2596 #include "confdefs.h"
2597
2598 int main() {
2599 main()
2600 ; return 0; }
2601 EOF
2602 if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2603   rm -rf conftest*
2604   eval "ac_cv_lib_$ac_lib_var=yes"
2605 else
2606   echo "configure: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   rm -rf conftest*
2609   eval "ac_cv_lib_$ac_lib_var=no"
2610 fi
2611 rm -f conftest*
2612 LIBS="$ac_save_LIBS"
2613
2614 fi
2615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2616   echo "$ac_t""yes" 1>&6
2617     ac_tr_lib=HAVE_LIB`echo ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2618     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2619   cat >> confdefs.h <<EOF
2620 #define $ac_tr_lib 1
2621 EOF
2622
2623   LIBS="-lncurses $LIBS"
2624
2625 else
2626   echo "$ac_t""no" 1>&6
2627 echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
2628 echo "configure:2629: checking for main in -lcurses" >&5
2629 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
2630 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2631   echo $ac_n "(cached) $ac_c" 1>&6
2632 else
2633   ac_save_LIBS="$LIBS"
2634 LIBS="-lcurses  $LIBS"
2635 cat > conftest.$ac_ext <<EOF
2636 #line 2637 "configure"
2637 #include "confdefs.h"
2638
2639 int main() {
2640 main()
2641 ; return 0; }
2642 EOF
2643 if { (eval echo configure:2644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2644   rm -rf conftest*
2645   eval "ac_cv_lib_$ac_lib_var=yes"
2646 else
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -rf conftest*
2650   eval "ac_cv_lib_$ac_lib_var=no"
2651 fi
2652 rm -f conftest*
2653 LIBS="$ac_save_LIBS"
2654
2655 fi
2656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2657   echo "$ac_t""yes" 1>&6
2658     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2659     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2660   cat >> confdefs.h <<EOF
2661 #define $ac_tr_lib 1
2662 EOF
2663
2664   LIBS="-lcurses $LIBS"
2665
2666 else
2667   echo "$ac_t""no" 1>&6
2668 fi
2669
2670 fi
2671
2672 echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
2673 echo "configure:2674: checking for main in -ltermcap" >&5
2674 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
2675 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2676   echo $ac_n "(cached) $ac_c" 1>&6
2677 else
2678   ac_save_LIBS="$LIBS"
2679 LIBS="-ltermcap  $LIBS"
2680 cat > conftest.$ac_ext <<EOF
2681 #line 2682 "configure"
2682 #include "confdefs.h"
2683
2684 int main() {
2685 main()
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2689   rm -rf conftest*
2690   eval "ac_cv_lib_$ac_lib_var=yes"
2691 else
2692   echo "configure: failed program was:" >&5
2693   cat conftest.$ac_ext >&5
2694   rm -rf conftest*
2695   eval "ac_cv_lib_$ac_lib_var=no"
2696 fi
2697 rm -f conftest*
2698 LIBS="$ac_save_LIBS"
2699
2700 fi
2701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2702   echo "$ac_t""yes" 1>&6
2703     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2704     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2705   cat >> confdefs.h <<EOF
2706 #define $ac_tr_lib 1
2707 EOF
2708
2709   LIBS="-ltermcap $LIBS"
2710
2711 else
2712   echo "$ac_t""no" 1>&6
2713 fi
2714
2715 echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
2716 echo "configure:2717: checking for main in -lreadline" >&5
2717 ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
2718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2719   echo $ac_n "(cached) $ac_c" 1>&6
2720 else
2721   ac_save_LIBS="$LIBS"
2722 LIBS="-lreadline  $LIBS"
2723 cat > conftest.$ac_ext <<EOF
2724 #line 2725 "configure"
2725 #include "confdefs.h"
2726
2727 int main() {
2728 main()
2729 ; return 0; }
2730 EOF
2731 if { (eval echo configure:2732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2732   rm -rf conftest*
2733   eval "ac_cv_lib_$ac_lib_var=yes"
2734 else
2735   echo "configure: failed program was:" >&5
2736   cat conftest.$ac_ext >&5
2737   rm -rf conftest*
2738   eval "ac_cv_lib_$ac_lib_var=no"
2739 fi
2740 rm -f conftest*
2741 LIBS="$ac_save_LIBS"
2742
2743 fi
2744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2745   echo "$ac_t""yes" 1>&6
2746     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2747     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2748   cat >> confdefs.h <<EOF
2749 #define $ac_tr_lib 1
2750 EOF
2751
2752   LIBS="-lreadline $LIBS"
2753
2754 else
2755   echo "$ac_t""no" 1>&6
2756 fi
2757
2758 echo $ac_n "checking for using_history in -lreadline""... $ac_c" 1>&6
2759 echo "configure:2760: checking for using_history in -lreadline" >&5
2760 ac_lib_var=`echo readline'_'using_history | sed 'y%./+-%__p_%'`
2761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2762   echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764   ac_save_LIBS="$LIBS"
2765 LIBS="-lreadline  $LIBS"
2766 cat > conftest.$ac_ext <<EOF
2767 #line 2768 "configure"
2768 #include "confdefs.h"
2769 /* Override any gcc2 internal prototype to avoid an error.  */
2770 /* We use char because int might match the return type of a gcc2
2771     builtin and then its argument prototype would still apply.  */
2772 char using_history();
2773
2774 int main() {
2775 using_history()
2776 ; return 0; }
2777 EOF
2778 if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2779   rm -rf conftest*
2780   eval "ac_cv_lib_$ac_lib_var=yes"
2781 else
2782   echo "configure: failed program was:" >&5
2783   cat conftest.$ac_ext >&5
2784   rm -rf conftest*
2785   eval "ac_cv_lib_$ac_lib_var=no"
2786 fi
2787 rm -f conftest*
2788 LIBS="$ac_save_LIBS"
2789
2790 fi
2791 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2792   echo "$ac_t""yes" 1>&6
2793   cat >> confdefs.h <<\EOF
2794 #define HAVE_HISTORY_IN_READLINE 1
2795 EOF
2796
2797 else
2798   echo "$ac_t""no" 1>&6
2799 echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
2800 echo "configure:2801: checking for main in -lhistory" >&5
2801 ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
2802 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   ac_save_LIBS="$LIBS"
2806 LIBS="-lhistory  $LIBS"
2807 cat > conftest.$ac_ext <<EOF
2808 #line 2809 "configure"
2809 #include "confdefs.h"
2810
2811 int main() {
2812 main()
2813 ; return 0; }
2814 EOF
2815 if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2816   rm -rf conftest*
2817   eval "ac_cv_lib_$ac_lib_var=yes"
2818 else
2819   echo "configure: failed program was:" >&5
2820   cat conftest.$ac_ext >&5
2821   rm -rf conftest*
2822   eval "ac_cv_lib_$ac_lib_var=no"
2823 fi
2824 rm -f conftest*
2825 LIBS="$ac_save_LIBS"
2826
2827 fi
2828 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2829   echo "$ac_t""yes" 1>&6
2830     ac_tr_lib=HAVE_LIB`echo history | sed -e 's/^a-zA-Z0-9_/_/g' \
2831     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2832   cat >> confdefs.h <<EOF
2833 #define $ac_tr_lib 1
2834 EOF
2835
2836   LIBS="-lhistory $LIBS"
2837
2838 else
2839   echo "$ac_t""no" 1>&6
2840 fi
2841  
2842 fi
2843
2844
2845 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
2846 then
2847         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
2848 echo "configure:2849: checking for main in -lbsd" >&5
2849 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
2850 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2851   echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853   ac_save_LIBS="$LIBS"
2854 LIBS="-lbsd  $LIBS"
2855 cat > conftest.$ac_ext <<EOF
2856 #line 2857 "configure"
2857 #include "confdefs.h"
2858
2859 int main() {
2860 main()
2861 ; return 0; }
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2864   rm -rf conftest*
2865   eval "ac_cv_lib_$ac_lib_var=yes"
2866 else
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -rf conftest*
2870   eval "ac_cv_lib_$ac_lib_var=no"
2871 fi
2872 rm -f conftest*
2873 LIBS="$ac_save_LIBS"
2874
2875 fi
2876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2877   echo "$ac_t""yes" 1>&6
2878     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2879     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2880   cat >> confdefs.h <<EOF
2881 #define $ac_tr_lib 1
2882 EOF
2883
2884   LIBS="-lbsd $LIBS"
2885
2886 else
2887   echo "$ac_t""no" 1>&6
2888 fi
2889
2890 fi
2891 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
2892 echo "configure:2893: checking for setproctitle in -lutil" >&5
2893 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
2894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2895   echo $ac_n "(cached) $ac_c" 1>&6
2896 else
2897   ac_save_LIBS="$LIBS"
2898 LIBS="-lutil  $LIBS"
2899 cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2902 /* Override any gcc2 internal prototype to avoid an error.  */
2903 /* We use char because int might match the return type of a gcc2
2904     builtin and then its argument prototype would still apply.  */
2905 char setproctitle();
2906
2907 int main() {
2908 setproctitle()
2909 ; return 0; }
2910 EOF
2911 if { (eval echo configure:2912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2912   rm -rf conftest*
2913   eval "ac_cv_lib_$ac_lib_var=yes"
2914 else
2915   echo "configure: failed program was:" >&5
2916   cat conftest.$ac_ext >&5
2917   rm -rf conftest*
2918   eval "ac_cv_lib_$ac_lib_var=no"
2919 fi
2920 rm -f conftest*
2921 LIBS="$ac_save_LIBS"
2922
2923 fi
2924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2925   echo "$ac_t""yes" 1>&6
2926     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2927     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2928   cat >> confdefs.h <<EOF
2929 #define $ac_tr_lib 1
2930 EOF
2931
2932   LIBS="-lutil $LIBS"
2933
2934 else
2935   echo "$ac_t""no" 1>&6
2936 fi
2937
2938 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
2939 echo "configure:2940: checking for main in -lm" >&5
2940 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
2941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2942   echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944   ac_save_LIBS="$LIBS"
2945 LIBS="-lm  $LIBS"
2946 cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949
2950 int main() {
2951 main()
2952 ; return 0; }
2953 EOF
2954 if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2955   rm -rf conftest*
2956   eval "ac_cv_lib_$ac_lib_var=yes"
2957 else
2958   echo "configure: failed program was:" >&5
2959   cat conftest.$ac_ext >&5
2960   rm -rf conftest*
2961   eval "ac_cv_lib_$ac_lib_var=no"
2962 fi
2963 rm -f conftest*
2964 LIBS="$ac_save_LIBS"
2965
2966 fi
2967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2968   echo "$ac_t""yes" 1>&6
2969     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2970     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2971   cat >> confdefs.h <<EOF
2972 #define $ac_tr_lib 1
2973 EOF
2974
2975   LIBS="-lm $LIBS"
2976
2977 else
2978   echo "$ac_t""no" 1>&6
2979 fi
2980
2981 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2982 echo "configure:2983: checking for main in -ldl" >&5
2983 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2984 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   ac_save_LIBS="$LIBS"
2988 LIBS="-ldl  $LIBS"
2989 cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992
2993 int main() {
2994 main()
2995 ; return 0; }
2996 EOF
2997 if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2998   rm -rf conftest*
2999   eval "ac_cv_lib_$ac_lib_var=yes"
3000 else
3001   echo "configure: failed program was:" >&5
3002   cat conftest.$ac_ext >&5
3003   rm -rf conftest*
3004   eval "ac_cv_lib_$ac_lib_var=no"
3005 fi
3006 rm -f conftest*
3007 LIBS="$ac_save_LIBS"
3008
3009 fi
3010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3011   echo "$ac_t""yes" 1>&6
3012     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3014   cat >> confdefs.h <<EOF
3015 #define $ac_tr_lib 1
3016 EOF
3017
3018   LIBS="-ldl $LIBS"
3019
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3025 echo "configure:3026: checking for main in -lsocket" >&5
3026 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3027 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   ac_save_LIBS="$LIBS"
3031 LIBS="-lsocket  $LIBS"
3032 cat > conftest.$ac_ext <<EOF
3033 #line 3034 "configure"
3034 #include "confdefs.h"
3035
3036 int main() {
3037 main()
3038 ; return 0; }
3039 EOF
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041   rm -rf conftest*
3042   eval "ac_cv_lib_$ac_lib_var=yes"
3043 else
3044   echo "configure: failed program was:" >&5
3045   cat conftest.$ac_ext >&5
3046   rm -rf conftest*
3047   eval "ac_cv_lib_$ac_lib_var=no"
3048 fi
3049 rm -f conftest*
3050 LIBS="$ac_save_LIBS"
3051
3052 fi
3053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3054   echo "$ac_t""yes" 1>&6
3055     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3057   cat >> confdefs.h <<EOF
3058 #define $ac_tr_lib 1
3059 EOF
3060
3061   LIBS="-lsocket $LIBS"
3062
3063 else
3064   echo "$ac_t""no" 1>&6
3065 fi
3066
3067 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3068 echo "configure:3069: checking for main in -lnsl" >&5
3069 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   ac_save_LIBS="$LIBS"
3074 LIBS="-lnsl  $LIBS"
3075 cat > conftest.$ac_ext <<EOF
3076 #line 3077 "configure"
3077 #include "confdefs.h"
3078
3079 int main() {
3080 main()
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3084   rm -rf conftest*
3085   eval "ac_cv_lib_$ac_lib_var=yes"
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   rm -rf conftest*
3090   eval "ac_cv_lib_$ac_lib_var=no"
3091 fi
3092 rm -f conftest*
3093 LIBS="$ac_save_LIBS"
3094
3095 fi
3096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3097   echo "$ac_t""yes" 1>&6
3098     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3099     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3100   cat >> confdefs.h <<EOF
3101 #define $ac_tr_lib 1
3102 EOF
3103
3104   LIBS="-lnsl $LIBS"
3105
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
3111 echo "configure:3112: checking for main in -lipc" >&5
3112 ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
3113 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116   ac_save_LIBS="$LIBS"
3117 LIBS="-lipc  $LIBS"
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121
3122 int main() {
3123 main()
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3127   rm -rf conftest*
3128   eval "ac_cv_lib_$ac_lib_var=yes"
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   eval "ac_cv_lib_$ac_lib_var=no"
3134 fi
3135 rm -f conftest*
3136 LIBS="$ac_save_LIBS"
3137
3138 fi
3139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140   echo "$ac_t""yes" 1>&6
3141     ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3143   cat >> confdefs.h <<EOF
3144 #define $ac_tr_lib 1
3145 EOF
3146
3147   LIBS="-lipc $LIBS"
3148
3149 else
3150   echo "$ac_t""no" 1>&6
3151 fi
3152
3153 echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
3154 echo "configure:3155: checking for main in -lIPC" >&5
3155 ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
3156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   ac_save_LIBS="$LIBS"
3160 LIBS="-lIPC  $LIBS"
3161 cat > conftest.$ac_ext <<EOF
3162 #line 3163 "configure"
3163 #include "confdefs.h"
3164
3165 int main() {
3166 main()
3167 ; return 0; }
3168 EOF
3169 if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3170   rm -rf conftest*
3171   eval "ac_cv_lib_$ac_lib_var=yes"
3172 else
3173   echo "configure: failed program was:" >&5
3174   cat conftest.$ac_ext >&5
3175   rm -rf conftest*
3176   eval "ac_cv_lib_$ac_lib_var=no"
3177 fi
3178 rm -f conftest*
3179 LIBS="$ac_save_LIBS"
3180
3181 fi
3182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3183   echo "$ac_t""yes" 1>&6
3184     ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3185     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3186   cat >> confdefs.h <<EOF
3187 #define $ac_tr_lib 1
3188 EOF
3189
3190   LIBS="-lIPC $LIBS"
3191
3192 else
3193   echo "$ac_t""no" 1>&6
3194 fi
3195
3196 echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
3197 echo "configure:3198: checking for main in -llc" >&5
3198 ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
3199 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   ac_save_LIBS="$LIBS"
3203 LIBS="-llc  $LIBS"
3204 cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207
3208 int main() {
3209 main()
3210 ; return 0; }
3211 EOF
3212 if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3213   rm -rf conftest*
3214   eval "ac_cv_lib_$ac_lib_var=yes"
3215 else
3216   echo "configure: failed program was:" >&5
3217   cat conftest.$ac_ext >&5
3218   rm -rf conftest*
3219   eval "ac_cv_lib_$ac_lib_var=no"
3220 fi
3221 rm -f conftest*
3222 LIBS="$ac_save_LIBS"
3223
3224 fi
3225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3226   echo "$ac_t""yes" 1>&6
3227     ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3228     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3229   cat >> confdefs.h <<EOF
3230 #define $ac_tr_lib 1
3231 EOF
3232
3233   LIBS="-llc $LIBS"
3234
3235 else
3236   echo "$ac_t""no" 1>&6
3237 fi
3238
3239 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
3240 echo "configure:3241: checking for main in -ldld" >&5
3241 ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
3242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3243   echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245   ac_save_LIBS="$LIBS"
3246 LIBS="-ldld  $LIBS"
3247 cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250
3251 int main() {
3252 main()
3253 ; return 0; }
3254 EOF
3255 if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3256   rm -rf conftest*
3257   eval "ac_cv_lib_$ac_lib_var=yes"
3258 else
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   eval "ac_cv_lib_$ac_lib_var=no"
3263 fi
3264 rm -f conftest*
3265 LIBS="$ac_save_LIBS"
3266
3267 fi
3268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3269   echo "$ac_t""yes" 1>&6
3270     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3272   cat >> confdefs.h <<EOF
3273 #define $ac_tr_lib 1
3274 EOF
3275
3276   LIBS="-ldld $LIBS"
3277
3278 else
3279   echo "$ac_t""no" 1>&6
3280 fi
3281
3282 echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
3283 echo "configure:3284: checking for main in -lln" >&5
3284 ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
3285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3286   echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288   ac_save_LIBS="$LIBS"
3289 LIBS="-lln  $LIBS"
3290 cat > conftest.$ac_ext <<EOF
3291 #line 3292 "configure"
3292 #include "confdefs.h"
3293
3294 int main() {
3295 main()
3296 ; return 0; }
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3299   rm -rf conftest*
3300   eval "ac_cv_lib_$ac_lib_var=yes"
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   eval "ac_cv_lib_$ac_lib_var=no"
3306 fi
3307 rm -f conftest*
3308 LIBS="$ac_save_LIBS"
3309
3310 fi
3311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3312   echo "$ac_t""yes" 1>&6
3313     ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3315   cat >> confdefs.h <<EOF
3316 #define $ac_tr_lib 1
3317 EOF
3318
3319   LIBS="-lln $LIBS"
3320
3321 else
3322   echo "$ac_t""no" 1>&6
3323 fi
3324
3325 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
3326 echo "configure:3327: checking for main in -lld" >&5
3327 ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
3328 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3329   echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331   ac_save_LIBS="$LIBS"
3332 LIBS="-lld  $LIBS"
3333 cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336
3337 int main() {
3338 main()
3339 ; return 0; }
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342   rm -rf conftest*
3343   eval "ac_cv_lib_$ac_lib_var=yes"
3344 else
3345   echo "configure: failed program was:" >&5
3346   cat conftest.$ac_ext >&5
3347   rm -rf conftest*
3348   eval "ac_cv_lib_$ac_lib_var=no"
3349 fi
3350 rm -f conftest*
3351 LIBS="$ac_save_LIBS"
3352
3353 fi
3354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3355   echo "$ac_t""yes" 1>&6
3356     ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3357     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3358   cat >> confdefs.h <<EOF
3359 #define $ac_tr_lib 1
3360 EOF
3361
3362   LIBS="-lld $LIBS"
3363
3364 else
3365   echo "$ac_t""no" 1>&6
3366 fi
3367
3368 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
3369 echo "configure:3370: checking for main in -lcompat" >&5
3370 ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
3371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3372   echo $ac_n "(cached) $ac_c" 1>&6
3373 else
3374   ac_save_LIBS="$LIBS"
3375 LIBS="-lcompat  $LIBS"
3376 cat > conftest.$ac_ext <<EOF
3377 #line 3378 "configure"
3378 #include "confdefs.h"
3379
3380 int main() {
3381 main()
3382 ; return 0; }
3383 EOF
3384 if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3385   rm -rf conftest*
3386   eval "ac_cv_lib_$ac_lib_var=yes"
3387 else
3388   echo "configure: failed program was:" >&5
3389   cat conftest.$ac_ext >&5
3390   rm -rf conftest*
3391   eval "ac_cv_lib_$ac_lib_var=no"
3392 fi
3393 rm -f conftest*
3394 LIBS="$ac_save_LIBS"
3395
3396 fi
3397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3398   echo "$ac_t""yes" 1>&6
3399     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3401   cat >> confdefs.h <<EOF
3402 #define $ac_tr_lib 1
3403 EOF
3404
3405   LIBS="-lcompat $LIBS"
3406
3407 else
3408   echo "$ac_t""no" 1>&6
3409 fi
3410
3411 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
3412 echo "configure:3413: checking for main in -lBSD" >&5
3413 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
3414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3415   echo $ac_n "(cached) $ac_c" 1>&6
3416 else
3417   ac_save_LIBS="$LIBS"
3418 LIBS="-lBSD  $LIBS"
3419 cat > conftest.$ac_ext <<EOF
3420 #line 3421 "configure"
3421 #include "confdefs.h"
3422
3423 int main() {
3424 main()
3425 ; return 0; }
3426 EOF
3427 if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3428   rm -rf conftest*
3429   eval "ac_cv_lib_$ac_lib_var=yes"
3430 else
3431   echo "configure: failed program was:" >&5
3432   cat conftest.$ac_ext >&5
3433   rm -rf conftest*
3434   eval "ac_cv_lib_$ac_lib_var=no"
3435 fi
3436 rm -f conftest*
3437 LIBS="$ac_save_LIBS"
3438
3439 fi
3440 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3441   echo "$ac_t""yes" 1>&6
3442     ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3443     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3444   cat >> confdefs.h <<EOF
3445 #define $ac_tr_lib 1
3446 EOF
3447
3448   LIBS="-lBSD $LIBS"
3449
3450 else
3451   echo "$ac_t""no" 1>&6
3452 fi
3453
3454 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3455 echo "configure:3456: checking for main in -lgen" >&5
3456 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   ac_save_LIBS="$LIBS"
3461 LIBS="-lgen  $LIBS"
3462 cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465
3466 int main() {
3467 main()
3468 ; return 0; }
3469 EOF
3470 if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3471   rm -rf conftest*
3472   eval "ac_cv_lib_$ac_lib_var=yes"
3473 else
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -rf conftest*
3477   eval "ac_cv_lib_$ac_lib_var=no"
3478 fi
3479 rm -f conftest*
3480 LIBS="$ac_save_LIBS"
3481
3482 fi
3483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3484   echo "$ac_t""yes" 1>&6
3485     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3486     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3487   cat >> confdefs.h <<EOF
3488 #define $ac_tr_lib 1
3489 EOF
3490
3491   LIBS="-lgen $LIBS"
3492
3493 else
3494   echo "$ac_t""no" 1>&6
3495 fi
3496
3497 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
3498 echo "configure:3499: checking for main in -lPW" >&5
3499 ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
3500 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   ac_save_LIBS="$LIBS"
3504 LIBS="-lPW  $LIBS"
3505 cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3508
3509 int main() {
3510 main()
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514   rm -rf conftest*
3515   eval "ac_cv_lib_$ac_lib_var=yes"
3516 else
3517   echo "configure: failed program was:" >&5
3518   cat conftest.$ac_ext >&5
3519   rm -rf conftest*
3520   eval "ac_cv_lib_$ac_lib_var=no"
3521 fi
3522 rm -f conftest*
3523 LIBS="$ac_save_LIBS"
3524
3525 fi
3526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3527   echo "$ac_t""yes" 1>&6
3528     ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3529     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3530   cat >> confdefs.h <<EOF
3531 #define $ac_tr_lib 1
3532 EOF
3533
3534   LIBS="-lPW $LIBS"
3535
3536 else
3537   echo "$ac_t""no" 1>&6
3538 fi
3539
3540
3541 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
3542 echo "configure:3543: checking for library containing crypt" >&5
3543 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
3544   echo $ac_n "(cached) $ac_c" 1>&6
3545 else
3546   ac_func_search_save_LIBS="$LIBS"
3547 ac_cv_search_crypt="no"
3548 cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 /* Override any gcc2 internal prototype to avoid an error.  */
3552 /* We use char because int might match the return type of a gcc2
3553     builtin and then its argument prototype would still apply.  */
3554 char crypt();
3555
3556 int main() {
3557 crypt()
3558 ; return 0; }
3559 EOF
3560 if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3561   rm -rf conftest*
3562   ac_cv_search_crypt="none required"
3563 else
3564   echo "configure: failed program was:" >&5
3565   cat conftest.$ac_ext >&5
3566 fi
3567 rm -f conftest*
3568 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
3569 LIBS="-l$i  $ac_func_search_save_LIBS"
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="-l$i"
3585 break
3586 else
3587   echo "configure: failed program was:" >&5
3588   cat conftest.$ac_ext >&5
3589 fi
3590 rm -f conftest*
3591 done
3592 LIBS="$ac_func_search_save_LIBS"
3593 fi
3594
3595 echo "$ac_t""$ac_cv_search_crypt" 1>&6
3596 if test "$ac_cv_search_crypt" != "no"; then
3597   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
3598   
3599 else :
3600   
3601 fi
3602 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
3603 echo "configure:3604: checking for inflate in -lz" >&5
3604 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
3605 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3606   echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608   ac_save_LIBS="$LIBS"
3609 LIBS="-lz  $LIBS"
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 /* Override any gcc2 internal prototype to avoid an error.  */
3614 /* We use char because int might match the return type of a gcc2
3615     builtin and then its argument prototype would still apply.  */
3616 char inflate();
3617
3618 int main() {
3619 inflate()
3620 ; return 0; }
3621 EOF
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623   rm -rf conftest*
3624   eval "ac_cv_lib_$ac_lib_var=yes"
3625 else
3626   echo "configure: failed program was:" >&5
3627   cat conftest.$ac_ext >&5
3628   rm -rf conftest*
3629   eval "ac_cv_lib_$ac_lib_var=no"
3630 fi
3631 rm -f conftest*
3632 LIBS="$ac_save_LIBS"
3633
3634 fi
3635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3636   echo "$ac_t""yes" 1>&6
3637     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3638     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3639   cat >> confdefs.h <<EOF
3640 #define $ac_tr_lib 1
3641 EOF
3642
3643   LIBS="-lz $LIBS"
3644
3645 else
3646   echo "$ac_t""no" 1>&6
3647 fi
3648
3649
3650 if test "$with_krb4" = yes ; then
3651   echo $ac_n "checking for des_encrypt in -ldes""... $ac_c" 1>&6
3652 echo "configure:3653: checking for des_encrypt in -ldes" >&5
3653 ac_lib_var=`echo des'_'des_encrypt | sed 'y%./+-%__p_%'`
3654 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3655   echo $ac_n "(cached) $ac_c" 1>&6
3656 else
3657   ac_save_LIBS="$LIBS"
3658 LIBS="-ldes  $LIBS"
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 /* Override any gcc2 internal prototype to avoid an error.  */
3663 /* We use char because int might match the return type of a gcc2
3664     builtin and then its argument prototype would still apply.  */
3665 char des_encrypt();
3666
3667 int main() {
3668 des_encrypt()
3669 ; return 0; }
3670 EOF
3671 if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3672   rm -rf conftest*
3673   eval "ac_cv_lib_$ac_lib_var=yes"
3674 else
3675   echo "configure: failed program was:" >&5
3676   cat conftest.$ac_ext >&5
3677   rm -rf conftest*
3678   eval "ac_cv_lib_$ac_lib_var=no"
3679 fi
3680 rm -f conftest*
3681 LIBS="$ac_save_LIBS"
3682
3683 fi
3684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3685   echo "$ac_t""yes" 1>&6
3686     ac_tr_lib=HAVE_LIB`echo des | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3687     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3688   cat >> confdefs.h <<EOF
3689 #define $ac_tr_lib 1
3690 EOF
3691
3692   LIBS="-ldes $LIBS"
3693
3694 else
3695   echo "$ac_t""no" 1>&6
3696 { echo "configure: error: library \`des' is required for Kerberos 4" 1>&2; exit 1; }
3697 fi
3698
3699   echo $ac_n "checking for krb_sendauth in -lkrb""... $ac_c" 1>&6
3700 echo "configure:3701: checking for krb_sendauth in -lkrb" >&5
3701 ac_lib_var=`echo krb'_'krb_sendauth | sed 'y%./+-%__p_%'`
3702 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3703   echo $ac_n "(cached) $ac_c" 1>&6
3704 else
3705   ac_save_LIBS="$LIBS"
3706 LIBS="-lkrb  $LIBS"
3707 cat > conftest.$ac_ext <<EOF
3708 #line 3709 "configure"
3709 #include "confdefs.h"
3710 /* Override any gcc2 internal prototype to avoid an error.  */
3711 /* We use char because int might match the return type of a gcc2
3712     builtin and then its argument prototype would still apply.  */
3713 char krb_sendauth();
3714
3715 int main() {
3716 krb_sendauth()
3717 ; return 0; }
3718 EOF
3719 if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3720   rm -rf conftest*
3721   eval "ac_cv_lib_$ac_lib_var=yes"
3722 else
3723   echo "configure: failed program was:" >&5
3724   cat conftest.$ac_ext >&5
3725   rm -rf conftest*
3726   eval "ac_cv_lib_$ac_lib_var=no"
3727 fi
3728 rm -f conftest*
3729 LIBS="$ac_save_LIBS"
3730
3731 fi
3732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3733   echo "$ac_t""yes" 1>&6
3734     ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3735     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3736   cat >> confdefs.h <<EOF
3737 #define $ac_tr_lib 1
3738 EOF
3739
3740   LIBS="-lkrb $LIBS"
3741
3742 else
3743   echo "$ac_t""no" 1>&6
3744 { echo "configure: error: library \`krb' is required for Kerberos 4" 1>&2; exit 1; }
3745 fi
3746
3747 fi
3748
3749 if test "$with_krb5" = yes ; then
3750   echo $ac_n "checking for main in -lcom_err""... $ac_c" 1>&6
3751 echo "configure:3752: checking for main in -lcom_err" >&5
3752 ac_lib_var=`echo com_err'_'main | sed 'y%./+-%__p_%'`
3753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   ac_save_LIBS="$LIBS"
3757 LIBS="-lcom_err  $LIBS"
3758 cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761
3762 int main() {
3763 main()
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3767   rm -rf conftest*
3768   eval "ac_cv_lib_$ac_lib_var=yes"
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   eval "ac_cv_lib_$ac_lib_var=no"
3774 fi
3775 rm -f conftest*
3776 LIBS="$ac_save_LIBS"
3777
3778 fi
3779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3780   echo "$ac_t""yes" 1>&6
3781     ac_tr_lib=HAVE_LIB`echo com_err | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3782     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3783   cat >> confdefs.h <<EOF
3784 #define $ac_tr_lib 1
3785 EOF
3786
3787   LIBS="-lcom_err $LIBS"
3788
3789 else
3790   echo "$ac_t""no" 1>&6
3791 { echo "configure: error: library \`com_err' is required for Kerberos 5" 1>&2; exit 1; }
3792 fi
3793
3794   echo $ac_n "checking for main in -lcrypto""... $ac_c" 1>&6
3795 echo "configure:3796: checking for main in -lcrypto" >&5
3796 ac_lib_var=`echo crypto'_'main | sed 'y%./+-%__p_%'`
3797 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3798   echo $ac_n "(cached) $ac_c" 1>&6
3799 else
3800   ac_save_LIBS="$LIBS"
3801 LIBS="-lcrypto  $LIBS"
3802 cat > conftest.$ac_ext <<EOF
3803 #line 3804 "configure"
3804 #include "confdefs.h"
3805
3806 int main() {
3807 main()
3808 ; return 0; }
3809 EOF
3810 if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3811   rm -rf conftest*
3812   eval "ac_cv_lib_$ac_lib_var=yes"
3813 else
3814   echo "configure: failed program was:" >&5
3815   cat conftest.$ac_ext >&5
3816   rm -rf conftest*
3817   eval "ac_cv_lib_$ac_lib_var=no"
3818 fi
3819 rm -f conftest*
3820 LIBS="$ac_save_LIBS"
3821
3822 fi
3823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3824   echo "$ac_t""yes" 1>&6
3825     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3826     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3827   cat >> confdefs.h <<EOF
3828 #define $ac_tr_lib 1
3829 EOF
3830
3831   LIBS="-lcrypto $LIBS"
3832
3833 else
3834   echo "$ac_t""no" 1>&6
3835 { echo "configure: error: library \`crypto' is required for Kerberos 5" 1>&2; exit 1; }
3836 fi
3837
3838   echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
3839 echo "configure:3840: checking for main in -lkrb5" >&5
3840 ac_lib_var=`echo krb5'_'main | sed 'y%./+-%__p_%'`
3841 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3842   echo $ac_n "(cached) $ac_c" 1>&6
3843 else
3844   ac_save_LIBS="$LIBS"
3845 LIBS="-lkrb5  $LIBS"
3846 cat > conftest.$ac_ext <<EOF
3847 #line 3848 "configure"
3848 #include "confdefs.h"
3849
3850 int main() {
3851 main()
3852 ; return 0; }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3855   rm -rf conftest*
3856   eval "ac_cv_lib_$ac_lib_var=yes"
3857 else
3858   echo "configure: failed program was:" >&5
3859   cat conftest.$ac_ext >&5
3860   rm -rf conftest*
3861   eval "ac_cv_lib_$ac_lib_var=no"
3862 fi
3863 rm -f conftest*
3864 LIBS="$ac_save_LIBS"
3865
3866 fi
3867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3868   echo "$ac_t""yes" 1>&6
3869     ac_tr_lib=HAVE_LIB`echo krb5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3870     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3871   cat >> confdefs.h <<EOF
3872 #define $ac_tr_lib 1
3873 EOF
3874
3875   LIBS="-lkrb5 $LIBS"
3876
3877 else
3878   echo "$ac_t""no" 1>&6
3879 { echo "configure: error: library \`krb5' is required for Kerberos 5" 1>&2; exit 1; }
3880 fi
3881
3882 fi
3883
3884 if test "$with_openssl" = yes ; then
3885     echo $ac_n "checking for CRYPTO_new_ex_data in -lcrypto""... $ac_c" 1>&6
3886 echo "configure:3887: checking for CRYPTO_new_ex_data in -lcrypto" >&5
3887 ac_lib_var=`echo crypto'_'CRYPTO_new_ex_data | sed 'y%./+-%__p_%'`
3888 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3889   echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891   ac_save_LIBS="$LIBS"
3892 LIBS="-lcrypto  $LIBS"
3893 cat > conftest.$ac_ext <<EOF
3894 #line 3895 "configure"
3895 #include "confdefs.h"
3896 /* Override any gcc2 internal prototype to avoid an error.  */
3897 /* We use char because int might match the return type of a gcc2
3898     builtin and then its argument prototype would still apply.  */
3899 char CRYPTO_new_ex_data();
3900
3901 int main() {
3902 CRYPTO_new_ex_data()
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3906   rm -rf conftest*
3907   eval "ac_cv_lib_$ac_lib_var=yes"
3908 else
3909   echo "configure: failed program was:" >&5
3910   cat conftest.$ac_ext >&5
3911   rm -rf conftest*
3912   eval "ac_cv_lib_$ac_lib_var=no"
3913 fi
3914 rm -f conftest*
3915 LIBS="$ac_save_LIBS"
3916
3917 fi
3918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919   echo "$ac_t""yes" 1>&6
3920     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3921     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3922   cat >> confdefs.h <<EOF
3923 #define $ac_tr_lib 1
3924 EOF
3925
3926   LIBS="-lcrypto $LIBS"
3927
3928 else
3929   echo "$ac_t""no" 1>&6
3930 { echo "configure: error: library \`ssl' is required for OpenSSL" 1>&2; exit 1; }
3931 fi
3932
3933   echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
3934 echo "configure:3935: checking for SSL_library_init in -lssl" >&5
3935 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
3936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   ac_save_LIBS="$LIBS"
3940 LIBS="-lssl  $LIBS"
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944 /* Override any gcc2 internal prototype to avoid an error.  */
3945 /* We use char because int might match the return type of a gcc2
3946     builtin and then its argument prototype would still apply.  */
3947 char SSL_library_init();
3948
3949 int main() {
3950 SSL_library_init()
3951 ; return 0; }
3952 EOF
3953 if { (eval echo configure:3954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3954   rm -rf conftest*
3955   eval "ac_cv_lib_$ac_lib_var=yes"
3956 else
3957   echo "configure: failed program was:" >&5
3958   cat conftest.$ac_ext >&5
3959   rm -rf conftest*
3960   eval "ac_cv_lib_$ac_lib_var=no"
3961 fi
3962 rm -f conftest*
3963 LIBS="$ac_save_LIBS"
3964
3965 fi
3966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3967   echo "$ac_t""yes" 1>&6
3968     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3969     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3970   cat >> confdefs.h <<EOF
3971 #define $ac_tr_lib 1
3972 EOF
3973
3974   LIBS="-lssl $LIBS"
3975
3976 else
3977   echo "$ac_t""no" 1>&6
3978 { echo "configure: error: library \`ssl' is required for OpenSSL" 1>&2; exit 1; }
3979 fi
3980
3981 fi
3982
3983
3984 ##
3985 ## Header files
3986 ##
3987 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
3988 do
3989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3991 echo "configure:3992: checking for $ac_hdr" >&5
3992 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3993   echo $ac_n "(cached) $ac_c" 1>&6
3994 else
3995   cat > conftest.$ac_ext <<EOF
3996 #line 3997 "configure"
3997 #include "confdefs.h"
3998 #include <$ac_hdr>
3999 EOF
4000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4001 { (eval echo configure:4002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4003 if test -z "$ac_err"; then
4004   rm -rf conftest*
4005   eval "ac_cv_header_$ac_safe=yes"
4006 else
4007   echo "$ac_err" >&5
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_header_$ac_safe=no"
4012 fi
4013 rm -f conftest*
4014 fi
4015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4016   echo "$ac_t""yes" 1>&6
4017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4018   cat >> confdefs.h <<EOF
4019 #define $ac_tr_hdr 1
4020 EOF
4021  
4022 else
4023   echo "$ac_t""no" 1>&6
4024 fi
4025 done
4026
4027
4028 for ac_hdr in readline/readline.h readline.h
4029 do
4030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4032 echo "configure:4033: checking for $ac_hdr" >&5
4033 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4034   echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036   cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039 #include <$ac_hdr>
4040 EOF
4041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4042 { (eval echo configure:4043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4044 if test -z "$ac_err"; then
4045   rm -rf conftest*
4046   eval "ac_cv_header_$ac_safe=yes"
4047 else
4048   echo "$ac_err" >&5
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -rf conftest*
4052   eval "ac_cv_header_$ac_safe=no"
4053 fi
4054 rm -f conftest*
4055 fi
4056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4057   echo "$ac_t""yes" 1>&6
4058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4059   cat >> confdefs.h <<EOF
4060 #define $ac_tr_hdr 1
4061 EOF
4062  break
4063 else
4064   echo "$ac_t""no" 1>&6
4065 fi
4066 done
4067
4068 for ac_hdr in readline/history.h history.h
4069 do
4070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4072 echo "configure:4073: checking for $ac_hdr" >&5
4073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <$ac_hdr>
4080 EOF
4081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4082 { (eval echo configure:4083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4084 if test -z "$ac_err"; then
4085   rm -rf conftest*
4086   eval "ac_cv_header_$ac_safe=yes"
4087 else
4088   echo "$ac_err" >&5
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   eval "ac_cv_header_$ac_safe=no"
4093 fi
4094 rm -f conftest*
4095 fi
4096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4097   echo "$ac_t""yes" 1>&6
4098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4099   cat >> confdefs.h <<EOF
4100 #define $ac_tr_hdr 1
4101 EOF
4102  break
4103 else
4104   echo "$ac_t""no" 1>&6
4105 fi
4106 done
4107
4108
4109 if test "$with_krb4" = yes ; then
4110   ac_safe=`echo "krb.h" | sed 'y%./+-%__p_%'`
4111 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
4112 echo "configure:4113: checking for krb.h" >&5
4113 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4114   echo $ac_n "(cached) $ac_c" 1>&6
4115 else
4116   cat > conftest.$ac_ext <<EOF
4117 #line 4118 "configure"
4118 #include "confdefs.h"
4119 #include <krb.h>
4120 EOF
4121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4122 { (eval echo configure:4123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4124 if test -z "$ac_err"; then
4125   rm -rf conftest*
4126   eval "ac_cv_header_$ac_safe=yes"
4127 else
4128   echo "$ac_err" >&5
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   eval "ac_cv_header_$ac_safe=no"
4133 fi
4134 rm -f conftest*
4135 fi
4136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4137   echo "$ac_t""yes" 1>&6
4138   :
4139 else
4140   echo "$ac_t""no" 1>&6
4141 { echo "configure: error: header file <krb.h> is required for Kerberos 4" 1>&2; exit 1; }
4142 fi
4143
4144 fi
4145
4146 if test "$with_krb5" = yes ; then
4147   ac_safe=`echo "krb5.h" | sed 'y%./+-%__p_%'`
4148 echo $ac_n "checking for krb5.h""... $ac_c" 1>&6
4149 echo "configure:4150: checking for krb5.h" >&5
4150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4151   echo $ac_n "(cached) $ac_c" 1>&6
4152 else
4153   cat > conftest.$ac_ext <<EOF
4154 #line 4155 "configure"
4155 #include "confdefs.h"
4156 #include <krb5.h>
4157 EOF
4158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4159 { (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4161 if test -z "$ac_err"; then
4162   rm -rf conftest*
4163   eval "ac_cv_header_$ac_safe=yes"
4164 else
4165   echo "$ac_err" >&5
4166   echo "configure: failed program was:" >&5
4167   cat conftest.$ac_ext >&5
4168   rm -rf conftest*
4169   eval "ac_cv_header_$ac_safe=no"
4170 fi
4171 rm -f conftest*
4172 fi
4173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4174   echo "$ac_t""yes" 1>&6
4175   :
4176 else
4177   echo "$ac_t""no" 1>&6
4178 { echo "configure: error: header file <krb5.h> is required for Kerberos 5" 1>&2; exit 1; }
4179 fi
4180
4181   ac_safe=`echo "com_err.h" | sed 'y%./+-%__p_%'`
4182 echo $ac_n "checking for com_err.h""... $ac_c" 1>&6
4183 echo "configure:4184: checking for com_err.h" >&5
4184 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4185   echo $ac_n "(cached) $ac_c" 1>&6
4186 else
4187   cat > conftest.$ac_ext <<EOF
4188 #line 4189 "configure"
4189 #include "confdefs.h"
4190 #include <com_err.h>
4191 EOF
4192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4193 { (eval echo configure:4194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4195 if test -z "$ac_err"; then
4196   rm -rf conftest*
4197   eval "ac_cv_header_$ac_safe=yes"
4198 else
4199   echo "$ac_err" >&5
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   eval "ac_cv_header_$ac_safe=no"
4204 fi
4205 rm -f conftest*
4206 fi
4207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4208   echo "$ac_t""yes" 1>&6
4209   :
4210 else
4211   echo "$ac_t""no" 1>&6
4212 { echo "configure: error: header file <com_err.h> is required for Kerberos 5" 1>&2; exit 1; }
4213 fi
4214
4215 fi
4216
4217 if test "$with_openssl" = yes ; then
4218   ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__p_%'`
4219 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
4220 echo "configure:4221: checking for openssl/ssl.h" >&5
4221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4222   echo $ac_n "(cached) $ac_c" 1>&6
4223 else
4224   cat > conftest.$ac_ext <<EOF
4225 #line 4226 "configure"
4226 #include "confdefs.h"
4227 #include <openssl/ssl.h>
4228 EOF
4229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4230 { (eval echo configure:4231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4232 if test -z "$ac_err"; then
4233   rm -rf conftest*
4234   eval "ac_cv_header_$ac_safe=yes"
4235 else
4236   echo "$ac_err" >&5
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   eval "ac_cv_header_$ac_safe=no"
4241 fi
4242 rm -f conftest*
4243 fi
4244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4245   echo "$ac_t""yes" 1>&6
4246   :
4247 else
4248   echo "$ac_t""no" 1>&6
4249 { echo "configure: error: header file <openssl/ssl.h> is required for OpenSSL" 1>&2; exit 1; }
4250 fi
4251
4252   ac_safe=`echo "openssl/err.h" | sed 'y%./+-%__p_%'`
4253 echo $ac_n "checking for openssl/err.h""... $ac_c" 1>&6
4254 echo "configure:4255: checking for openssl/err.h" >&5
4255 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4256   echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258   cat > conftest.$ac_ext <<EOF
4259 #line 4260 "configure"
4260 #include "confdefs.h"
4261 #include <openssl/err.h>
4262 EOF
4263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4264 { (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4266 if test -z "$ac_err"; then
4267   rm -rf conftest*
4268   eval "ac_cv_header_$ac_safe=yes"
4269 else
4270   echo "$ac_err" >&5
4271   echo "configure: failed program was:" >&5
4272   cat conftest.$ac_ext >&5
4273   rm -rf conftest*
4274   eval "ac_cv_header_$ac_safe=no"
4275 fi
4276 rm -f conftest*
4277 fi
4278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4279   echo "$ac_t""yes" 1>&6
4280   :
4281 else
4282   echo "$ac_t""no" 1>&6
4283 { echo "configure: error: header file <openssl/err.h> is required for OpenSSL" 1>&2; exit 1; }
4284 fi
4285
4286 fi
4287
4288
4289 ##
4290 ## Types, structures, compiler characteristics
4291 ##
4292 echo $ac_n "checking for working const""... $ac_c" 1>&6
4293 echo "configure:4294: checking for working const" >&5
4294 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4295   echo $ac_n "(cached) $ac_c" 1>&6
4296 else
4297   cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300
4301 int main() {
4302
4303 /* Ultrix mips cc rejects this.  */
4304 typedef int charset[2]; const charset x;
4305 /* SunOS 4.1.1 cc rejects this.  */
4306 char const *const *ccp;
4307 char **p;
4308 /* NEC SVR4.0.2 mips cc rejects this.  */
4309 struct point {int x, y;};
4310 static struct point const zero = {0,0};
4311 /* AIX XL C 1.02.0.0 rejects this.
4312    It does not let you subtract one const X* pointer from another in an arm
4313    of an if-expression whose if-part is not a constant expression */
4314 const char *g = "string";
4315 ccp = &g + (g ? g-g : 0);
4316 /* HPUX 7.0 cc rejects these. */
4317 ++ccp;
4318 p = (char**) ccp;
4319 ccp = (char const *const *) p;
4320 { /* SCO 3.2v4 cc rejects this.  */
4321   char *t;
4322   char const *s = 0 ? (char *) 0 : (char const *) 0;
4323
4324   *t++ = 0;
4325 }
4326 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4327   int x[] = {25, 17};
4328   const int *foo = &x[0];
4329   ++foo;
4330 }
4331 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4332   typedef const int *iptr;
4333   iptr p = 0;
4334   ++p;
4335 }
4336 { /* AIX XL C 1.02.0.0 rejects this saying
4337      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4338   struct s { int j; const int *ap[3]; };
4339   struct s *b; b->j = 5;
4340 }
4341 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4342   const int foo = 10;
4343 }
4344
4345 ; return 0; }
4346 EOF
4347 if { (eval echo configure:4348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4348   rm -rf conftest*
4349   ac_cv_c_const=yes
4350 else
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353   rm -rf conftest*
4354   ac_cv_c_const=no
4355 fi
4356 rm -f conftest*
4357 fi
4358
4359 echo "$ac_t""$ac_cv_c_const" 1>&6
4360 if test $ac_cv_c_const = no; then
4361   cat >> confdefs.h <<\EOF
4362 #define const 
4363 EOF
4364
4365 fi
4366
4367 echo $ac_n "checking for inline""... $ac_c" 1>&6
4368 echo "configure:4369: checking for inline" >&5
4369 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   ac_cv_c_inline=no
4373 for ac_kw in inline __inline__ __inline; do
4374   cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377
4378 int main() {
4379 } $ac_kw foo() {
4380 ; return 0; }
4381 EOF
4382 if { (eval echo configure:4383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4383   rm -rf conftest*
4384   ac_cv_c_inline=$ac_kw; break
4385 else
4386   echo "configure: failed program was:" >&5
4387   cat conftest.$ac_ext >&5
4388 fi
4389 rm -f conftest*
4390 done
4391
4392 fi
4393
4394 echo "$ac_t""$ac_cv_c_inline" 1>&6
4395 case "$ac_cv_c_inline" in
4396   inline | yes) ;;
4397   no) cat >> confdefs.h <<\EOF
4398 #define inline 
4399 EOF
4400  ;;
4401   *)  cat >> confdefs.h <<EOF
4402 #define inline $ac_cv_c_inline
4403 EOF
4404  ;;
4405 esac
4406
4407
4408
4409 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
4410 echo "configure:4411: checking for preprocessor stringizing operator" >&5
4411 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
4412   echo $ac_n "(cached) $ac_c" 1>&6
4413 else
4414   cat > conftest.$ac_ext <<EOF
4415 #line 4416 "configure"
4416 #include "confdefs.h"
4417
4418 #define x(y) #y
4419
4420 char *s = x(teststring);
4421
4422 EOF
4423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4424   egrep "#teststring" >/dev/null 2>&1; then
4425   rm -rf conftest*
4426   ac_cv_c_stringize=no
4427 else
4428   rm -rf conftest*
4429   ac_cv_c_stringize=yes
4430 fi
4431 rm -f conftest*
4432
4433 fi
4434
4435 if test "${ac_cv_c_stringize}" = yes
4436 then
4437         cat >> confdefs.h <<\EOF
4438 #define HAVE_STRINGIZE 1
4439 EOF
4440
4441 fi
4442 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
4443
4444 echo $ac_n "checking for signed types""... $ac_c" 1>&6
4445 echo "configure:4446: checking for signed types" >&5
4446 if eval "test \"`echo '$''{'pgac_cv_c_signed'+set}'`\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   cat > conftest.$ac_ext <<EOF
4450 #line 4451 "configure"
4451 #include "confdefs.h"
4452
4453 int main() {
4454 signed char c; signed short s; signed int i;
4455 ; return 0; }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4458   rm -rf conftest*
4459   pgac_cv_c_signed=yes
4460 else
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -rf conftest*
4464   pgac_cv_c_signed=no
4465 fi
4466 rm -f conftest*
4467 fi
4468
4469 echo "$ac_t""$pgac_cv_c_signed" 1>&6
4470 if test x"$pgac_cv_c_signed" = xno ; then
4471   cat >> confdefs.h <<\EOF
4472 #define signed 
4473 EOF
4474
4475 fi
4476 echo $ac_n "checking for volatile""... $ac_c" 1>&6
4477 echo "configure:4478: checking for volatile" >&5
4478 if eval "test \"`echo '$''{'pgac_cv_c_volatile'+set}'`\" = set"; then
4479   echo $ac_n "(cached) $ac_c" 1>&6
4480 else
4481   cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484
4485 int main() {
4486 extern volatile int i;
4487 ; return 0; }
4488 EOF
4489 if { (eval echo configure:4490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4490   rm -rf conftest*
4491   pgac_cv_c_volatile=yes
4492 else
4493   echo "configure: failed program was:" >&5
4494   cat conftest.$ac_ext >&5
4495   rm -rf conftest*
4496   pgac_cv_c_volatile=no
4497 fi
4498 rm -f conftest*
4499 fi
4500
4501 echo "$ac_t""$pgac_cv_c_volatile" 1>&6
4502 if test x"$pgac_cv_c_volatile" = xno ; then
4503   cat >> confdefs.h <<\EOF
4504 #define volatile 
4505 EOF
4506
4507 fi
4508 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4509 echo "configure:4510: checking whether struct tm is in sys/time.h or time.h" >&5
4510 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <sys/types.h>
4517 #include <time.h>
4518 int main() {
4519 struct tm *tp; tp->tm_sec;
4520 ; return 0; }
4521 EOF
4522 if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4523   rm -rf conftest*
4524   ac_cv_struct_tm=time.h
4525 else
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   ac_cv_struct_tm=sys/time.h
4530 fi
4531 rm -f conftest*
4532 fi
4533
4534 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4535 if test $ac_cv_struct_tm = sys/time.h; then
4536   cat >> confdefs.h <<\EOF
4537 #define TM_IN_SYS_TIME 1
4538 EOF
4539
4540 fi
4541
4542 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4543 echo "configure:4544: checking for tm_zone in struct tm" >&5
4544 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550 #include <sys/types.h>
4551 #include <$ac_cv_struct_tm>
4552 int main() {
4553 struct tm tm; tm.tm_zone;
4554 ; return 0; }
4555 EOF
4556 if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4557   rm -rf conftest*
4558   ac_cv_struct_tm_zone=yes
4559 else
4560   echo "configure: failed program was:" >&5
4561   cat conftest.$ac_ext >&5
4562   rm -rf conftest*
4563   ac_cv_struct_tm_zone=no
4564 fi
4565 rm -f conftest*
4566 fi
4567
4568 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4569 if test "$ac_cv_struct_tm_zone" = yes; then
4570   cat >> confdefs.h <<\EOF
4571 #define HAVE_TM_ZONE 1
4572 EOF
4573
4574 else
4575   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4576 echo "configure:4577: checking for tzname" >&5
4577 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
4578   echo $ac_n "(cached) $ac_c" 1>&6
4579 else
4580   cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583 #include <time.h>
4584 #ifndef tzname /* For SGI.  */
4585 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4586 #endif
4587 int main() {
4588 atoi(*tzname);
4589 ; return 0; }
4590 EOF
4591 if { (eval echo configure:4592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4592   rm -rf conftest*
4593   ac_cv_var_tzname=yes
4594 else
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   ac_cv_var_tzname=no
4599 fi
4600 rm -f conftest*
4601 fi
4602
4603 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4604   if test $ac_cv_var_tzname = yes; then
4605     cat >> confdefs.h <<\EOF
4606 #define HAVE_TZNAME 1
4607 EOF
4608
4609   fi
4610 fi
4611
4612 echo $ac_n "checking for union semun""... $ac_c" 1>&6
4613 echo "configure:4614: checking for union semun" >&5
4614 if eval "test \"`echo '$''{'pgac_cv_union_semun'+set}'`\" = set"; then
4615   echo $ac_n "(cached) $ac_c" 1>&6
4616 else
4617   cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620 #include <sys/types.h>
4621 #include <sys/ipc.h>
4622 #include <sys/sem.h>
4623 int main() {
4624 union semun semun;
4625 ; return 0; }
4626 EOF
4627 if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4628   rm -rf conftest*
4629   pgac_cv_union_semun=yes
4630 else
4631   echo "configure: failed program was:" >&5
4632   cat conftest.$ac_ext >&5
4633   rm -rf conftest*
4634   pgac_cv_union_semun=no
4635 fi
4636 rm -f conftest*
4637 fi
4638
4639 echo "$ac_t""$pgac_cv_union_semun" 1>&6
4640 if test x"$pgac_cv_union_semun" = xyes ; then
4641   cat >> confdefs.h <<\EOF
4642 #define HAVE_UNION_SEMUN 
4643 EOF
4644
4645 fi
4646
4647
4648 ##
4649 ## Functions, global variables
4650 ##
4651 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
4652 echo "configure:4653: checking for int timezone" >&5
4653 if eval "test \"`echo '$''{'pgac_cv_var_int_timezone'+set}'`\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656   cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4659 #include <time.h>
4660 int main() {
4661 int res = timezone / 60;
4662 ; return 0; }
4663 EOF
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665   rm -rf conftest*
4666   pgac_cv_var_int_timezone=yes
4667 else
4668   echo "configure: failed program was:" >&5
4669   cat conftest.$ac_ext >&5
4670   rm -rf conftest*
4671   pgac_cv_var_int_timezone=no
4672 fi
4673 rm -f conftest*
4674 fi
4675
4676 echo "$ac_t""$pgac_cv_var_int_timezone" 1>&6
4677 if test x"$pgac_cv_var_int_timezone" = xyes ; then
4678   cat >> confdefs.h <<\EOF
4679 #define HAVE_INT_TIMEZONE 
4680 EOF
4681
4682 fi
4683 echo $ac_n "checking types of arguments for accept()""... $ac_c" 1>&6
4684 echo "configure:4685: checking types of arguments for accept()" >&5
4685  if eval "test \"`echo '$''{'ac_cv_func_accept_arg1'+set}'`\" = set"; then
4686   echo $ac_n "(cached) $ac_c" 1>&6
4687 else
4688    if eval "test \"`echo '$''{'ac_cv_func_accept_arg2'+set}'`\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691     if eval "test \"`echo '$''{'ac_cv_func_accept_arg3'+set}'`\" = set"; then
4692   echo $ac_n "(cached) $ac_c" 1>&6
4693 else
4694      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
4695      for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
4696       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int'; do
4697        cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #ifdef HAVE_SYS_TYPES_H
4701 #include <sys/types.h>
4702 #endif
4703 #ifdef HAVE_SYS_SOCKET_H
4704 #include <sys/socket.h>
4705 #endif
4706 extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
4707 int main() {
4708
4709 ; return 0; }
4710 EOF
4711 if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4712   rm -rf conftest*
4713   ac_not_found=no; break 3
4714 else
4715   echo "configure: failed program was:" >&5
4716   cat conftest.$ac_ext >&5
4717   rm -rf conftest*
4718   ac_not_found=yes
4719 fi
4720 rm -f conftest*
4721       done
4722      done
4723     done
4724     if test "$ac_not_found" = yes; then
4725       { echo "configure: error: could not determine argument types" 1>&2; exit 1; }
4726     fi
4727    
4728 fi
4729   
4730 fi
4731  
4732 fi
4733  echo "$ac_t""$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" 1>&6
4734  cat >> confdefs.h <<EOF
4735 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
4736 EOF
4737
4738  cat >> confdefs.h <<EOF
4739 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
4740 EOF
4741
4742  cat >> confdefs.h <<EOF
4743 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
4744 EOF
4745
4746
4747 echo $ac_n "checking whether gettimeofday takes only one argument""... $ac_c" 1>&6
4748 echo "configure:4749: checking whether gettimeofday takes only one argument" >&5
4749 if eval "test \"`echo '$''{'pgac_cv_func_gettimeofday_1arg'+set}'`\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4755 #include <sys/time.h>
4756 int main() {
4757 struct timeval *tp;
4758 struct timezone *tzp;
4759 gettimeofday(tp,tzp);
4760 ; return 0; }
4761 EOF
4762 if { (eval echo configure:4763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4763   rm -rf conftest*
4764   pgac_cv_func_gettimeofday_1arg=no
4765 else
4766   echo "configure: failed program was:" >&5
4767   cat conftest.$ac_ext >&5
4768   rm -rf conftest*
4769   pgac_cv_func_gettimeofday_1arg=yes
4770 fi
4771 rm -f conftest*
4772 fi
4773
4774 echo "$ac_t""$pgac_cv_func_gettimeofday_1arg" 1>&6
4775 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
4776   cat >> confdefs.h <<\EOF
4777 #define GETTIMEOFDAY_1ARG 
4778 EOF
4779
4780 fi
4781
4782 echo $ac_n "checking for fcntl(F_SETLK)""... $ac_c" 1>&6
4783 echo "configure:4784: checking for fcntl(F_SETLK)" >&5
4784 case $host_os in
4785   linux*)       echo "$ac_t""broken on Linux" 1>&6 ;;
4786   *)
4787 cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <stdio.h>
4791 #include <fcntl.h>
4792
4793 int main() {
4794 struct flock lck;
4795 lck.l_whence = SEEK_SET; lck.l_start = lck.l_len = 0;
4796 lck.l_type = F_WRLCK;
4797 fcntl(0, F_SETLK, &lck);
4798 ; return 0; }
4799 EOF
4800 if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4801   rm -rf conftest*
4802   cat >> confdefs.h <<\EOF
4803 #define HAVE_FCNTL_SETLK 1
4804 EOF
4805  echo "$ac_t""yes" 1>&6
4806 else
4807   echo "configure: failed program was:" >&5
4808   cat conftest.$ac_ext >&5
4809   rm -rf conftest*
4810   echo "$ac_t""no" 1>&6
4811 fi
4812 rm -f conftest*
4813         ;;
4814 esac
4815
4816 for ac_func in fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid
4817 do
4818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4819 echo "configure:4820: checking for $ac_func" >&5
4820 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 /* System header to define __stub macros and hopefully few prototypes,
4827     which can conflict with char $ac_func(); below.  */
4828 #include <assert.h>
4829 /* Override any gcc2 internal prototype to avoid an error.  */
4830 /* We use char because int might match the return type of a gcc2
4831     builtin and then its argument prototype would still apply.  */
4832 char $ac_func();
4833
4834 int main() {
4835
4836 /* The GNU C library defines this for functions which it implements
4837     to always fail with ENOSYS.  Some functions are actually named
4838     something starting with __ and the normal name is an alias.  */
4839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4840 choke me
4841 #else
4842 $ac_func();
4843 #endif
4844
4845 ; return 0; }
4846 EOF
4847 if { (eval echo configure:4848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4848   rm -rf conftest*
4849   eval "ac_cv_func_$ac_func=yes"
4850 else
4851   echo "configure: failed program was:" >&5
4852   cat conftest.$ac_ext >&5
4853   rm -rf conftest*
4854   eval "ac_cv_func_$ac_func=no"
4855 fi
4856 rm -f conftest*
4857 fi
4858
4859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4860   echo "$ac_t""yes" 1>&6
4861     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4862   cat >> confdefs.h <<EOF
4863 #define $ac_tr_func 1
4864 EOF
4865  
4866 else
4867   echo "$ac_t""no" 1>&6
4868 fi
4869 done
4870
4871
4872 echo $ac_n "checking for PS_STRINGS""... $ac_c" 1>&6
4873 echo "configure:4874: checking for PS_STRINGS" >&5
4874 if eval "test \"`echo '$''{'pgac_cv_var_PS_STRINGS'+set}'`\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 #include <machine/vmparam.h>
4881 #include <sys/exec.h>
4882
4883 int main() {
4884 PS_STRINGS->ps_nargvstr = 1;
4885 PS_STRINGS->ps_argvstr = "foo";
4886 ; return 0; }
4887 EOF
4888 if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4889   rm -rf conftest*
4890   pgac_cv_var_PS_STRINGS=yes
4891 else
4892   echo "configure: failed program was:" >&5
4893   cat conftest.$ac_ext >&5
4894   rm -rf conftest*
4895   pgac_cv_var_PS_STRINGS=no
4896 fi
4897 rm -f conftest*
4898 fi
4899
4900 echo "$ac_t""$pgac_cv_var_PS_STRINGS" 1>&6
4901 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
4902   cat >> confdefs.h <<\EOF
4903 #define HAVE_PS_STRINGS 
4904 EOF
4905
4906 fi
4907
4908 SNPRINTF=''
4909 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
4910 echo "configure:4911: checking for snprintf" >&5
4911 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* System header to define __stub macros and hopefully few prototypes,
4918     which can conflict with char snprintf(); below.  */
4919 #include <assert.h>
4920 /* Override any gcc2 internal prototype to avoid an error.  */
4921 /* We use char because int might match the return type of a gcc2
4922     builtin and then its argument prototype would still apply.  */
4923 char snprintf();
4924
4925 int main() {
4926
4927 /* The GNU C library defines this for functions which it implements
4928     to always fail with ENOSYS.  Some functions are actually named
4929     something starting with __ and the normal name is an alias.  */
4930 #if defined (__stub_snprintf) || defined (__stub___snprintf)
4931 choke me
4932 #else
4933 snprintf();
4934 #endif
4935
4936 ; return 0; }
4937 EOF
4938 if { (eval echo configure:4939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4939   rm -rf conftest*
4940   eval "ac_cv_func_snprintf=yes"
4941 else
4942   echo "configure: failed program was:" >&5
4943   cat conftest.$ac_ext >&5
4944   rm -rf conftest*
4945   eval "ac_cv_func_snprintf=no"
4946 fi
4947 rm -f conftest*
4948 fi
4949
4950 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
4951   echo "$ac_t""yes" 1>&6
4952   cat >> confdefs.h <<\EOF
4953 #define HAVE_SNPRINTF 1
4954 EOF
4955
4956 else
4957   echo "$ac_t""no" 1>&6
4958 SNPRINTF='snprintf.o'
4959 fi
4960
4961 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
4962 echo "configure:4963: checking for vsnprintf" >&5
4963 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
4964   echo $ac_n "(cached) $ac_c" 1>&6
4965 else
4966   cat > conftest.$ac_ext <<EOF
4967 #line 4968 "configure"
4968 #include "confdefs.h"
4969 /* System header to define __stub macros and hopefully few prototypes,
4970     which can conflict with char vsnprintf(); below.  */
4971 #include <assert.h>
4972 /* Override any gcc2 internal prototype to avoid an error.  */
4973 /* We use char because int might match the return type of a gcc2
4974     builtin and then its argument prototype would still apply.  */
4975 char vsnprintf();
4976
4977 int main() {
4978
4979 /* The GNU C library defines this for functions which it implements
4980     to always fail with ENOSYS.  Some functions are actually named
4981     something starting with __ and the normal name is an alias.  */
4982 #if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
4983 choke me
4984 #else
4985 vsnprintf();
4986 #endif
4987
4988 ; return 0; }
4989 EOF
4990 if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4991   rm -rf conftest*
4992   eval "ac_cv_func_vsnprintf=yes"
4993 else
4994   echo "configure: failed program was:" >&5
4995   cat conftest.$ac_ext >&5
4996   rm -rf conftest*
4997   eval "ac_cv_func_vsnprintf=no"
4998 fi
4999 rm -f conftest*
5000 fi
5001
5002 if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
5003   echo "$ac_t""yes" 1>&6
5004   cat >> confdefs.h <<\EOF
5005 #define HAVE_VSNPRINTF 1
5006 EOF
5007
5008 else
5009   echo "$ac_t""no" 1>&6
5010 SNPRINTF='snprintf.o'
5011 fi
5012
5013
5014 cat > conftest.$ac_ext <<EOF
5015 #line 5016 "configure"
5016 #include "confdefs.h"
5017 #include <stdio.h>
5018 EOF
5019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5020   egrep "snprintf" >/dev/null 2>&1; then
5021   rm -rf conftest*
5022   cat >> confdefs.h <<\EOF
5023 #define HAVE_SNPRINTF_DECL 1
5024 EOF
5025
5026 fi
5027 rm -f conftest*
5028
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032 #include <stdio.h>
5033 EOF
5034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5035   egrep "vsnprintf" >/dev/null 2>&1; then
5036   rm -rf conftest*
5037   cat >> confdefs.h <<\EOF
5038 #define HAVE_VSNPRINTF_DECL 1
5039 EOF
5040
5041 fi
5042 rm -f conftest*
5043
5044
5045 # do this one the hard way in case isinf() is a macro
5046 echo $ac_n "checking for isinf""... $ac_c" 1>&6
5047 echo "configure:5048: checking for isinf" >&5
5048 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
5049   echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051   cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 #include <math.h>
5055
5056 int main() {
5057 double x = 0.0; int res = isinf(x);
5058 ; return 0; }
5059 EOF
5060 if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5061   rm -rf conftest*
5062   ac_cv_func_isinf=yes
5063 else
5064   echo "configure: failed program was:" >&5
5065   cat conftest.$ac_ext >&5
5066   rm -rf conftest*
5067   ac_cv_func_isinf=no
5068 fi
5069 rm -f conftest*
5070 fi
5071
5072 echo "$ac_t""$ac_cv_func_isinf" 1>&6
5073
5074 if test $ac_cv_func_isinf = yes ; then
5075   cat >> confdefs.h <<\EOF
5076 #define HAVE_ISINF 1
5077 EOF
5078
5079   ISINF=
5080 else
5081   ISINF='isinf.o'
5082   # Look for a way to implement a substitute for isinf()
5083   for ac_func in fpclass fp_class fp_class_d class
5084 do
5085 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5086 echo "configure:5087: checking for $ac_func" >&5
5087 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5088   echo $ac_n "(cached) $ac_c" 1>&6
5089 else
5090   cat > conftest.$ac_ext <<EOF
5091 #line 5092 "configure"
5092 #include "confdefs.h"
5093 /* System header to define __stub macros and hopefully few prototypes,
5094     which can conflict with char $ac_func(); below.  */
5095 #include <assert.h>
5096 /* Override any gcc2 internal prototype to avoid an error.  */
5097 /* We use char because int might match the return type of a gcc2
5098     builtin and then its argument prototype would still apply.  */
5099 char $ac_func();
5100
5101 int main() {
5102
5103 /* The GNU C library defines this for functions which it implements
5104     to always fail with ENOSYS.  Some functions are actually named
5105     something starting with __ and the normal name is an alias.  */
5106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5107 choke me
5108 #else
5109 $ac_func();
5110 #endif
5111
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   eval "ac_cv_func_$ac_func=yes"
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   eval "ac_cv_func_$ac_func=no"
5122 fi
5123 rm -f conftest*
5124 fi
5125
5126 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5127   echo "$ac_t""yes" 1>&6
5128     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5129   cat >> confdefs.h <<EOF
5130 #define $ac_tr_func 1
5131 EOF
5132  break
5133 else
5134   echo "$ac_t""no" 1>&6
5135 fi
5136 done
5137
5138 fi
5139
5140
5141 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
5142 echo "configure:5143: checking for getrusage" >&5
5143 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* System header to define __stub macros and hopefully few prototypes,
5150     which can conflict with char getrusage(); below.  */
5151 #include <assert.h>
5152 /* Override any gcc2 internal prototype to avoid an error.  */
5153 /* We use char because int might match the return type of a gcc2
5154     builtin and then its argument prototype would still apply.  */
5155 char getrusage();
5156
5157 int main() {
5158
5159 /* The GNU C library defines this for functions which it implements
5160     to always fail with ENOSYS.  Some functions are actually named
5161     something starting with __ and the normal name is an alias.  */
5162 #if defined (__stub_getrusage) || defined (__stub___getrusage)
5163 choke me
5164 #else
5165 getrusage();
5166 #endif
5167
5168 ; return 0; }
5169 EOF
5170 if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5171   rm -rf conftest*
5172   eval "ac_cv_func_getrusage=yes"
5173 else
5174   echo "configure: failed program was:" >&5
5175   cat conftest.$ac_ext >&5
5176   rm -rf conftest*
5177   eval "ac_cv_func_getrusage=no"
5178 fi
5179 rm -f conftest*
5180 fi
5181
5182 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
5183   echo "$ac_t""yes" 1>&6
5184   cat >> confdefs.h <<\EOF
5185 #define HAVE_GETRUSAGE 1
5186 EOF
5187
5188 else
5189   echo "$ac_t""no" 1>&6
5190 GETRUSAGE='getrusage.o'
5191 fi
5192
5193
5194 echo $ac_n "checking for srandom""... $ac_c" 1>&6
5195 echo "configure:5196: checking for srandom" >&5
5196 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199   cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* System header to define __stub macros and hopefully few prototypes,
5203     which can conflict with char srandom(); below.  */
5204 #include <assert.h>
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 /* We use char because int might match the return type of a gcc2
5207     builtin and then its argument prototype would still apply.  */
5208 char srandom();
5209
5210 int main() {
5211
5212 /* The GNU C library defines this for functions which it implements
5213     to always fail with ENOSYS.  Some functions are actually named
5214     something starting with __ and the normal name is an alias.  */
5215 #if defined (__stub_srandom) || defined (__stub___srandom)
5216 choke me
5217 #else
5218 srandom();
5219 #endif
5220
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5224   rm -rf conftest*
5225   eval "ac_cv_func_srandom=yes"
5226 else
5227   echo "configure: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   rm -rf conftest*
5230   eval "ac_cv_func_srandom=no"
5231 fi
5232 rm -f conftest*
5233 fi
5234
5235 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
5236   echo "$ac_t""yes" 1>&6
5237   cat >> confdefs.h <<\EOF
5238 #define HAVE_SRANDOM 1
5239 EOF
5240
5241 else
5242   echo "$ac_t""no" 1>&6
5243 SRANDOM='srandom.o'
5244 fi
5245
5246
5247 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
5248 echo "configure:5249: checking for gethostname" >&5
5249 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
5250   echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252   cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5255 /* System header to define __stub macros and hopefully few prototypes,
5256     which can conflict with char gethostname(); below.  */
5257 #include <assert.h>
5258 /* Override any gcc2 internal prototype to avoid an error.  */
5259 /* We use char because int might match the return type of a gcc2
5260     builtin and then its argument prototype would still apply.  */
5261 char gethostname();
5262
5263 int main() {
5264
5265 /* The GNU C library defines this for functions which it implements
5266     to always fail with ENOSYS.  Some functions are actually named
5267     something starting with __ and the normal name is an alias.  */
5268 #if defined (__stub_gethostname) || defined (__stub___gethostname)
5269 choke me
5270 #else
5271 gethostname();
5272 #endif
5273
5274 ; return 0; }
5275 EOF
5276 if { (eval echo configure:5277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5277   rm -rf conftest*
5278   eval "ac_cv_func_gethostname=yes"
5279 else
5280   echo "configure: failed program was:" >&5
5281   cat conftest.$ac_ext >&5
5282   rm -rf conftest*
5283   eval "ac_cv_func_gethostname=no"
5284 fi
5285 rm -f conftest*
5286 fi
5287
5288 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
5289   echo "$ac_t""yes" 1>&6
5290   cat >> confdefs.h <<\EOF
5291 #define HAVE_GETHOSTNAME 1
5292 EOF
5293
5294 else
5295   echo "$ac_t""no" 1>&6
5296 GETHOSTNAME='gethostname.o'
5297 fi
5298
5299
5300 echo $ac_n "checking for random""... $ac_c" 1>&6
5301 echo "configure:5302: checking for random" >&5
5302 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
5303   echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305   cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308 /* System header to define __stub macros and hopefully few prototypes,
5309     which can conflict with char random(); below.  */
5310 #include <assert.h>
5311 /* Override any gcc2 internal prototype to avoid an error.  */
5312 /* We use char because int might match the return type of a gcc2
5313     builtin and then its argument prototype would still apply.  */
5314 char random();
5315
5316 int main() {
5317
5318 /* The GNU C library defines this for functions which it implements
5319     to always fail with ENOSYS.  Some functions are actually named
5320     something starting with __ and the normal name is an alias.  */
5321 #if defined (__stub_random) || defined (__stub___random)
5322 choke me
5323 #else
5324 random();
5325 #endif
5326
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330   rm -rf conftest*
5331   eval "ac_cv_func_random=yes"
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335   rm -rf conftest*
5336   eval "ac_cv_func_random=no"
5337 fi
5338 rm -f conftest*
5339 fi
5340
5341 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
5342   echo "$ac_t""yes" 1>&6
5343   cat >> confdefs.h <<\EOF
5344 #define HAVE_RANDOM 1
5345 EOF
5346
5347 else
5348   echo "$ac_t""no" 1>&6
5349 MISSING_RANDOM='random.o'
5350 fi
5351
5352
5353 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
5354 echo "configure:5355: checking for inet_aton" >&5
5355 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
5356   echo $ac_n "(cached) $ac_c" 1>&6
5357 else
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361 /* System header to define __stub macros and hopefully few prototypes,
5362     which can conflict with char inet_aton(); below.  */
5363 #include <assert.h>
5364 /* Override any gcc2 internal prototype to avoid an error.  */
5365 /* We use char because int might match the return type of a gcc2
5366     builtin and then its argument prototype would still apply.  */
5367 char inet_aton();
5368
5369 int main() {
5370
5371 /* The GNU C library defines this for functions which it implements
5372     to always fail with ENOSYS.  Some functions are actually named
5373     something starting with __ and the normal name is an alias.  */
5374 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
5375 choke me
5376 #else
5377 inet_aton();
5378 #endif
5379
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_func_inet_aton=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_func_inet_aton=no"
5390 fi
5391 rm -f conftest*
5392 fi
5393
5394 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
5395   echo "$ac_t""yes" 1>&6
5396   cat >> confdefs.h <<\EOF
5397 #define HAVE_INET_ATON 1
5398 EOF
5399
5400 else
5401   echo "$ac_t""no" 1>&6
5402 INET_ATON='inet_aton.o'
5403 fi
5404
5405
5406 echo $ac_n "checking for strerror""... $ac_c" 1>&6
5407 echo "configure:5408: checking for strerror" >&5
5408 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
5409   echo $ac_n "(cached) $ac_c" 1>&6
5410 else
5411   cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 /* System header to define __stub macros and hopefully few prototypes,
5415     which can conflict with char strerror(); below.  */
5416 #include <assert.h>
5417 /* Override any gcc2 internal prototype to avoid an error.  */
5418 /* We use char because int might match the return type of a gcc2
5419     builtin and then its argument prototype would still apply.  */
5420 char strerror();
5421
5422 int main() {
5423
5424 /* The GNU C library defines this for functions which it implements
5425     to always fail with ENOSYS.  Some functions are actually named
5426     something starting with __ and the normal name is an alias.  */
5427 #if defined (__stub_strerror) || defined (__stub___strerror)
5428 choke me
5429 #else
5430 strerror();
5431 #endif
5432
5433 ; return 0; }
5434 EOF
5435 if { (eval echo configure:5436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5436   rm -rf conftest*
5437   eval "ac_cv_func_strerror=yes"
5438 else
5439   echo "configure: failed program was:" >&5
5440   cat conftest.$ac_ext >&5
5441   rm -rf conftest*
5442   eval "ac_cv_func_strerror=no"
5443 fi
5444 rm -f conftest*
5445 fi
5446
5447 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
5448   echo "$ac_t""yes" 1>&6
5449   cat >> confdefs.h <<\EOF
5450 #define HAVE_STRERROR 1
5451 EOF
5452
5453 else
5454   echo "$ac_t""no" 1>&6
5455 STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
5456 fi
5457
5458
5459
5460 echo $ac_n "checking for strdup""... $ac_c" 1>&6
5461 echo "configure:5462: checking for strdup" >&5
5462 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 /* System header to define __stub macros and hopefully few prototypes,
5469     which can conflict with char strdup(); below.  */
5470 #include <assert.h>
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char strdup();
5475
5476 int main() {
5477
5478 /* The GNU C library defines this for functions which it implements
5479     to always fail with ENOSYS.  Some functions are actually named
5480     something starting with __ and the normal name is an alias.  */
5481 #if defined (__stub_strdup) || defined (__stub___strdup)
5482 choke me
5483 #else
5484 strdup();
5485 #endif
5486
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_func_strdup=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_func_strdup=no"
5497 fi
5498 rm -f conftest*
5499 fi
5500
5501 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
5502   echo "$ac_t""yes" 1>&6
5503   cat >> confdefs.h <<\EOF
5504 #define HAVE_STRDUP 1
5505 EOF
5506
5507 else
5508   echo "$ac_t""no" 1>&6
5509 STRDUP='../../utils/strdup.o'
5510 fi
5511
5512
5513 echo $ac_n "checking for strtol""... $ac_c" 1>&6
5514 echo "configure:5515: checking for strtol" >&5
5515 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
5516   echo $ac_n "(cached) $ac_c" 1>&6
5517 else
5518   cat > conftest.$ac_ext <<EOF
5519 #line 5520 "configure"
5520 #include "confdefs.h"
5521 /* System header to define __stub macros and hopefully few prototypes,
5522     which can conflict with char strtol(); below.  */
5523 #include <assert.h>
5524 /* Override any gcc2 internal prototype to avoid an error.  */
5525 /* We use char because int might match the return type of a gcc2
5526     builtin and then its argument prototype would still apply.  */
5527 char strtol();
5528
5529 int main() {
5530
5531 /* The GNU C library defines this for functions which it implements
5532     to always fail with ENOSYS.  Some functions are actually named
5533     something starting with __ and the normal name is an alias.  */
5534 #if defined (__stub_strtol) || defined (__stub___strtol)
5535 choke me
5536 #else
5537 strtol();
5538 #endif
5539
5540 ; return 0; }
5541 EOF
5542 if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5543   rm -rf conftest*
5544   eval "ac_cv_func_strtol=yes"
5545 else
5546   echo "configure: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   rm -rf conftest*
5549   eval "ac_cv_func_strtol=no"
5550 fi
5551 rm -f conftest*
5552 fi
5553
5554 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
5555   echo "$ac_t""yes" 1>&6
5556   cat >> confdefs.h <<\EOF
5557 #define HAVE_STRTOL 1
5558 EOF
5559
5560 else
5561   echo "$ac_t""no" 1>&6
5562 STRTOL='strtol.o'
5563 fi
5564
5565
5566 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
5567 echo "configure:5568: checking for strtoul" >&5
5568 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
5569   echo $ac_n "(cached) $ac_c" 1>&6
5570 else
5571   cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5574 /* System header to define __stub macros and hopefully few prototypes,
5575     which can conflict with char strtoul(); below.  */
5576 #include <assert.h>
5577 /* Override any gcc2 internal prototype to avoid an error.  */
5578 /* We use char because int might match the return type of a gcc2
5579     builtin and then its argument prototype would still apply.  */
5580 char strtoul();
5581
5582 int main() {
5583
5584 /* The GNU C library defines this for functions which it implements
5585     to always fail with ENOSYS.  Some functions are actually named
5586     something starting with __ and the normal name is an alias.  */
5587 #if defined (__stub_strtoul) || defined (__stub___strtoul)
5588 choke me
5589 #else
5590 strtoul();
5591 #endif
5592
5593 ; return 0; }
5594 EOF
5595 if { (eval echo configure:5596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5596   rm -rf conftest*
5597   eval "ac_cv_func_strtoul=yes"
5598 else
5599   echo "configure: failed program was:" >&5
5600   cat conftest.$ac_ext >&5
5601   rm -rf conftest*
5602   eval "ac_cv_func_strtoul=no"
5603 fi
5604 rm -f conftest*
5605 fi
5606
5607 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
5608   echo "$ac_t""yes" 1>&6
5609   cat >> confdefs.h <<\EOF
5610 #define HAVE_STRTOUL 1
5611 EOF
5612
5613 else
5614   echo "$ac_t""no" 1>&6
5615 STRTOL='strtoul.o'
5616 fi
5617
5618
5619 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
5620 echo "configure:5621: checking for strcasecmp" >&5
5621 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
5622   echo $ac_n "(cached) $ac_c" 1>&6
5623 else
5624   cat > conftest.$ac_ext <<EOF
5625 #line 5626 "configure"
5626 #include "confdefs.h"
5627 /* System header to define __stub macros and hopefully few prototypes,
5628     which can conflict with char strcasecmp(); below.  */
5629 #include <assert.h>
5630 /* Override any gcc2 internal prototype to avoid an error.  */
5631 /* We use char because int might match the return type of a gcc2
5632     builtin and then its argument prototype would still apply.  */
5633 char strcasecmp();
5634
5635 int main() {
5636
5637 /* The GNU C library defines this for functions which it implements
5638     to always fail with ENOSYS.  Some functions are actually named
5639     something starting with __ and the normal name is an alias.  */
5640 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
5641 choke me
5642 #else
5643 strcasecmp();
5644 #endif
5645
5646 ; return 0; }
5647 EOF
5648 if { (eval echo configure:5649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5649   rm -rf conftest*
5650   eval "ac_cv_func_strcasecmp=yes"
5651 else
5652   echo "configure: failed program was:" >&5
5653   cat conftest.$ac_ext >&5
5654   rm -rf conftest*
5655   eval "ac_cv_func_strcasecmp=no"
5656 fi
5657 rm -f conftest*
5658 fi
5659
5660 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
5661   echo "$ac_t""yes" 1>&6
5662   cat >> confdefs.h <<\EOF
5663 #define HAVE_STRCASECMP 1
5664 EOF
5665
5666 else
5667   echo "$ac_t""no" 1>&6
5668 STRCASECMP='strcasecmp.o'
5669 fi
5670
5671
5672 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
5673 echo "configure:5674: checking for cbrt" >&5
5674 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
5675   echo $ac_n "(cached) $ac_c" 1>&6
5676 else
5677   cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680 /* System header to define __stub macros and hopefully few prototypes,
5681     which can conflict with char cbrt(); below.  */
5682 #include <assert.h>
5683 /* Override any gcc2 internal prototype to avoid an error.  */
5684 /* We use char because int might match the return type of a gcc2
5685     builtin and then its argument prototype would still apply.  */
5686 char cbrt();
5687
5688 int main() {
5689
5690 /* The GNU C library defines this for functions which it implements
5691     to always fail with ENOSYS.  Some functions are actually named
5692     something starting with __ and the normal name is an alias.  */
5693 #if defined (__stub_cbrt) || defined (__stub___cbrt)
5694 choke me
5695 #else
5696 cbrt();
5697 #endif
5698
5699 ; return 0; }
5700 EOF
5701 if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5702   rm -rf conftest*
5703   eval "ac_cv_func_cbrt=yes"
5704 else
5705   echo "configure: failed program was:" >&5
5706   cat conftest.$ac_ext >&5
5707   rm -rf conftest*
5708   eval "ac_cv_func_cbrt=no"
5709 fi
5710 rm -f conftest*
5711 fi
5712
5713 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
5714   echo "$ac_t""yes" 1>&6
5715   cat >> confdefs.h <<\EOF
5716 #define HAVE_CBRT 1
5717 EOF
5718
5719 else
5720   echo "$ac_t""no" 1>&6
5721 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
5722 echo "configure:5723: checking for cbrt in -lm" >&5
5723 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
5724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5725   echo $ac_n "(cached) $ac_c" 1>&6
5726 else
5727   ac_save_LIBS="$LIBS"
5728 LIBS="-lm  $LIBS"
5729 cat > conftest.$ac_ext <<EOF
5730 #line 5731 "configure"
5731 #include "confdefs.h"
5732 /* Override any gcc2 internal prototype to avoid an error.  */
5733 /* We use char because int might match the return type of a gcc2
5734     builtin and then its argument prototype would still apply.  */
5735 char cbrt();
5736
5737 int main() {
5738 cbrt()
5739 ; return 0; }
5740 EOF
5741 if { (eval echo configure:5742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5742   rm -rf conftest*
5743   eval "ac_cv_lib_$ac_lib_var=yes"
5744 else
5745   echo "configure: failed program was:" >&5
5746   cat conftest.$ac_ext >&5
5747   rm -rf conftest*
5748   eval "ac_cv_lib_$ac_lib_var=no"
5749 fi
5750 rm -f conftest*
5751 LIBS="$ac_save_LIBS"
5752
5753 fi
5754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5755   echo "$ac_t""yes" 1>&6
5756   cat >> confdefs.h <<\EOF
5757 #define HAVE_CBRT 1
5758 EOF
5759
5760 else
5761   echo "$ac_t""no" 1>&6
5762 fi
5763
5764 fi
5765
5766
5767 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
5768 # this hackery with HPUXMATHLIB allows us to cope.
5769 HPUXMATHLIB=""
5770 case $host_cpu in
5771   hppa1.1) 
5772         if [ -r /lib/pa1.1/libm.a ] ; then
5773             HPUXMATHLIB="-L /lib/pa1.1 -lm"
5774         fi ;;
5775 esac
5776
5777
5778 echo $ac_n "checking for rint""... $ac_c" 1>&6
5779 echo "configure:5780: checking for rint" >&5
5780 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
5781   echo $ac_n "(cached) $ac_c" 1>&6
5782 else
5783   cat > conftest.$ac_ext <<EOF
5784 #line 5785 "configure"
5785 #include "confdefs.h"
5786 /* System header to define __stub macros and hopefully few prototypes,
5787     which can conflict with char rint(); below.  */
5788 #include <assert.h>
5789 /* Override any gcc2 internal prototype to avoid an error.  */
5790 /* We use char because int might match the return type of a gcc2
5791     builtin and then its argument prototype would still apply.  */
5792 char rint();
5793
5794 int main() {
5795
5796 /* The GNU C library defines this for functions which it implements
5797     to always fail with ENOSYS.  Some functions are actually named
5798     something starting with __ and the normal name is an alias.  */
5799 #if defined (__stub_rint) || defined (__stub___rint)
5800 choke me
5801 #else
5802 rint();
5803 #endif
5804
5805 ; return 0; }
5806 EOF
5807 if { (eval echo configure:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5808   rm -rf conftest*
5809   eval "ac_cv_func_rint=yes"
5810 else
5811   echo "configure: failed program was:" >&5
5812   cat conftest.$ac_ext >&5
5813   rm -rf conftest*
5814   eval "ac_cv_func_rint=no"
5815 fi
5816 rm -f conftest*
5817 fi
5818
5819 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
5820   echo "$ac_t""yes" 1>&6
5821   cat >> confdefs.h <<\EOF
5822 #define HAVE_RINT 1
5823 EOF
5824
5825 else
5826   echo "$ac_t""no" 1>&6
5827 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
5828 echo "configure:5829: checking for rint in -lm" >&5
5829 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
5830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5831   echo $ac_n "(cached) $ac_c" 1>&6
5832 else
5833   ac_save_LIBS="$LIBS"
5834 LIBS="-lm $HPUXMATHLIB $LIBS"
5835 cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5838 /* Override any gcc2 internal prototype to avoid an error.  */
5839 /* We use char because int might match the return type of a gcc2
5840     builtin and then its argument prototype would still apply.  */
5841 char rint();
5842
5843 int main() {
5844 rint()
5845 ; return 0; }
5846 EOF
5847 if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5848   rm -rf conftest*
5849   eval "ac_cv_lib_$ac_lib_var=yes"
5850 else
5851   echo "configure: failed program was:" >&5
5852   cat conftest.$ac_ext >&5
5853   rm -rf conftest*
5854   eval "ac_cv_lib_$ac_lib_var=no"
5855 fi
5856 rm -f conftest*
5857 LIBS="$ac_save_LIBS"
5858
5859 fi
5860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5861   echo "$ac_t""yes" 1>&6
5862   cat >> confdefs.h <<\EOF
5863 #define HAVE_RINT 1
5864 EOF
5865
5866 else
5867   echo "$ac_t""no" 1>&6
5868 fi
5869
5870 fi
5871
5872
5873 cat > conftest.$ac_ext <<EOF
5874 #line 5875 "configure"
5875 #include "confdefs.h"
5876 #include <readline.h>
5877 EOF
5878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5879   egrep "rl_completion_append_character" >/dev/null 2>&1; then
5880   rm -rf conftest*
5881   cat >> confdefs.h <<\EOF
5882 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
5883 EOF
5884
5885 else
5886   rm -rf conftest*
5887   cat > conftest.$ac_ext <<EOF
5888 #line 5889 "configure"
5889 #include "confdefs.h"
5890 #include <readline/readline.h>
5891 EOF
5892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5893   egrep "rl_completion_append_character" >/dev/null 2>&1; then
5894   rm -rf conftest*
5895   cat >> confdefs.h <<\EOF
5896 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
5897 EOF
5898
5899 fi
5900 rm -f conftest*
5901
5902 fi
5903 rm -f conftest*
5904
5905
5906
5907 for ac_func in filename_completion_function
5908 do
5909 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5910 echo "configure:5911: checking for $ac_func" >&5
5911 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5912   echo $ac_n "(cached) $ac_c" 1>&6
5913 else
5914   cat > conftest.$ac_ext <<EOF
5915 #line 5916 "configure"
5916 #include "confdefs.h"
5917 /* System header to define __stub macros and hopefully few prototypes,
5918     which can conflict with char $ac_func(); below.  */
5919 #include <assert.h>
5920 /* Override any gcc2 internal prototype to avoid an error.  */
5921 /* We use char because int might match the return type of a gcc2
5922     builtin and then its argument prototype would still apply.  */
5923 char $ac_func();
5924
5925 int main() {
5926
5927 /* The GNU C library defines this for functions which it implements
5928     to always fail with ENOSYS.  Some functions are actually named
5929     something starting with __ and the normal name is an alias.  */
5930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5931 choke me
5932 #else
5933 $ac_func();
5934 #endif
5935
5936 ; return 0; }
5937 EOF
5938 if { (eval echo configure:5939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5939   rm -rf conftest*
5940   eval "ac_cv_func_$ac_func=yes"
5941 else
5942   echo "configure: failed program was:" >&5
5943   cat conftest.$ac_ext >&5
5944   rm -rf conftest*
5945   eval "ac_cv_func_$ac_func=no"
5946 fi
5947 rm -f conftest*
5948 fi
5949
5950 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5951   echo "$ac_t""yes" 1>&6
5952     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5953   cat >> confdefs.h <<EOF
5954 #define $ac_tr_func 1
5955 EOF
5956  cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 #include <readline.h>
5960 EOF
5961 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5962   egrep "filename_completion_function" >/dev/null 2>&1; then
5963   rm -rf conftest*
5964   cat >> confdefs.h <<\EOF
5965 #define HAVE_FILENAME_COMPLETION_FUNCTION_DECL 1
5966 EOF
5967
5968 else
5969   rm -rf conftest*
5970   cat > conftest.$ac_ext <<EOF
5971 #line 5972 "configure"
5972 #include "confdefs.h"
5973 #include <readline/readline.h>
5974 EOF
5975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5976   egrep "filename_completion_function" >/dev/null 2>&1; then
5977   rm -rf conftest*
5978   cat >> confdefs.h <<\EOF
5979 #define HAVE_FILENAME_COMPLETION_FUNCTION_DECL 1
5980 EOF
5981
5982 fi
5983 rm -f conftest*
5984
5985 fi
5986 rm -f conftest*
5987
5988
5989 else
5990   echo "$ac_t""no" 1>&6
5991 fi
5992 done
5993
5994
5995
5996
5997
5998 echo $ac_n "checking for finite""... $ac_c" 1>&6
5999 echo "configure:6000: checking for finite" >&5
6000 cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 #include <math.h>
6004 int main() {
6005 int dummy=finite(1.0);
6006 ; return 0; }
6007 EOF
6008 if { (eval echo configure:6009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6009   rm -rf conftest*
6010   cat >> confdefs.h <<\EOF
6011 #define HAVE_FINITE 1
6012 EOF
6013  echo "$ac_t""yes" 1>&6
6014 else
6015   echo "configure: failed program was:" >&5
6016   cat conftest.$ac_ext >&5
6017   rm -rf conftest*
6018   echo "$ac_t""no" 1>&6
6019 fi
6020 rm -f conftest*
6021
6022 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
6023 echo "configure:6024: checking for sigsetjmp" >&5
6024 cat > conftest.$ac_ext <<EOF
6025 #line 6026 "configure"
6026 #include "confdefs.h"
6027 #include <setjmp.h>
6028 int main() {
6029 sigjmp_buf x; sigsetjmp(x, 1);
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_SIGSETJMP 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 # Check whether --enable-syslog or --disable-syslog was given.
6047 if test "${enable_syslog+set}" = set; then
6048   enableval="$enable_syslog"
6049   case $enableval in y|ye|yes)
6050         echo $ac_n "checking for syslog""... $ac_c" 1>&6
6051 echo "configure:6052: checking for syslog" >&5
6052 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then
6053   echo $ac_n "(cached) $ac_c" 1>&6
6054 else
6055   cat > conftest.$ac_ext <<EOF
6056 #line 6057 "configure"
6057 #include "confdefs.h"
6058 /* System header to define __stub macros and hopefully few prototypes,
6059     which can conflict with char syslog(); below.  */
6060 #include <assert.h>
6061 /* Override any gcc2 internal prototype to avoid an error.  */
6062 /* We use char because int might match the return type of a gcc2
6063     builtin and then its argument prototype would still apply.  */
6064 char syslog();
6065
6066 int main() {
6067
6068 /* The GNU C library defines this for functions which it implements
6069     to always fail with ENOSYS.  Some functions are actually named
6070     something starting with __ and the normal name is an alias.  */
6071 #if defined (__stub_syslog) || defined (__stub___syslog)
6072 choke me
6073 #else
6074 syslog();
6075 #endif
6076
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6080   rm -rf conftest*
6081   eval "ac_cv_func_syslog=yes"
6082 else
6083   echo "configure: failed program was:" >&5
6084   cat conftest.$ac_ext >&5
6085   rm -rf conftest*
6086   eval "ac_cv_func_syslog=no"
6087 fi
6088 rm -f conftest*
6089 fi
6090
6091 if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then
6092   echo "$ac_t""yes" 1>&6
6093   cat >> confdefs.h <<\EOF
6094 #define ENABLE_SYSLOG 1
6095 EOF
6096
6097 else
6098   echo "$ac_t""no" 1>&6
6099 { echo "configure: error: no syslog interface found" 1>&2; exit 1; }
6100 fi
6101
6102         ;;
6103      esac
6104
6105 fi
6106
6107
6108
6109 echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6
6110 echo "configure:6111: checking whether long int is 64 bits" >&5
6111 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then
6112   echo $ac_n "(cached) $ac_c" 1>&6
6113 else
6114   if test "$cross_compiling" = yes; then
6115   pgac_cv_type_long_int_64=no
6116 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6117 else
6118   cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 typedef long int int64;
6122
6123 /*
6124  * These are globals to discourage the compiler from folding all the
6125  * arithmetic tests down to compile-time constants.
6126  */
6127 int64 a = 20000001;
6128 int64 b = 40000005;
6129
6130 int does_int64_work()
6131 {
6132   int64 c,d;
6133
6134   if (sizeof(int64) != 8)
6135     return 0;                   /* definitely not the right size */
6136
6137   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6138   c = a * b;
6139   d = (c + b) / b;
6140   if (d != a+1)
6141     return 0;
6142   return 1;
6143 }
6144 main() {
6145   exit(! does_int64_work());
6146 }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6149 then
6150   pgac_cv_type_long_int_64=yes
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -fr conftest*
6155   pgac_cv_type_long_int_64=no
6156 fi
6157 rm -fr conftest*
6158 fi
6159
6160 fi
6161
6162 echo "$ac_t""$pgac_cv_type_long_int_64" 1>&6
6163
6164 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
6165 if test x"$pgac_cv_type_long_int_64" = xyes ; then
6166   cat >> confdefs.h <<\EOF
6167 #define HAVE_LONG_INT_64 
6168 EOF
6169
6170 fi
6171
6172
6173 if test x"$HAVE_LONG_INT_64" = x"no" ; then
6174   echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6
6175 echo "configure:6176: checking whether long long int is 64 bits" >&5
6176 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then
6177   echo $ac_n "(cached) $ac_c" 1>&6
6178 else
6179   if test "$cross_compiling" = yes; then
6180   pgac_cv_type_long_long_int_64=no
6181 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
6182 else
6183   cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 typedef long long int int64;
6187
6188 /*
6189  * These are globals to discourage the compiler from folding all the
6190  * arithmetic tests down to compile-time constants.
6191  */
6192 int64 a = 20000001;
6193 int64 b = 40000005;
6194
6195 int does_int64_work()
6196 {
6197   int64 c,d;
6198
6199   if (sizeof(int64) != 8)
6200     return 0;                   /* definitely not the right size */
6201
6202   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
6203   c = a * b;
6204   d = (c + b) / b;
6205   if (d != a+1)
6206     return 0;
6207   return 1;
6208 }
6209 main() {
6210   exit(! does_int64_work());
6211 }
6212 EOF
6213 if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6214 then
6215   pgac_cv_type_long_long_int_64=yes
6216 else
6217   echo "configure: failed program was:" >&5
6218   cat conftest.$ac_ext >&5
6219   rm -fr conftest*
6220   pgac_cv_type_long_long_int_64=no
6221 fi
6222 rm -fr conftest*
6223 fi
6224
6225 fi
6226
6227 echo "$ac_t""$pgac_cv_type_long_long_int_64" 1>&6
6228
6229 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
6230 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
6231   cat >> confdefs.h <<\EOF
6232 #define HAVE_LONG_LONG_INT_64 
6233 EOF
6234
6235 fi
6236
6237 fi
6238
6239
6240
6241 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
6242   if [ x$SNPRINTF = x ] ; then
6243     echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6
6244 echo "configure:6245: checking whether snprintf handles 'long long int' as %lld" >&5
6245     if test "$cross_compiling" = yes; then
6246    echo "$ac_t""assuming not on target machine" 1>&6
6247         # Force usage of our own snprintf, since we cannot test foreign snprintf
6248         SNPRINTF='snprintf.o'
6249         INT64_FORMAT='"%lld"'
6250   
6251 else
6252   cat > conftest.$ac_ext <<EOF
6253 #line 6254 "configure"
6254 #include "confdefs.h"
6255 #include <stdio.h>
6256 typedef long long int int64;
6257 #define INT64_FORMAT "%lld"
6258
6259 int64 a = 20000001;
6260 int64 b = 40000005;
6261
6262 int does_int64_snprintf_work()
6263 {
6264   int64 c;
6265   char buf[100];
6266
6267   if (sizeof(int64) != 8)
6268     return 0;                   /* doesn't look like the right size */
6269
6270   c = a * b;
6271   snprintf(buf, 100, INT64_FORMAT, c);
6272   if (strcmp(buf, "800000140000005") != 0)
6273     return 0;                   /* either multiply or snprintf is busted */
6274   return 1;
6275 }
6276 main() {
6277   exit(! does_int64_snprintf_work());
6278 }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6281 then
6282    echo "$ac_t""yes" 1>&6
6283           INT64_FORMAT='"%lld"'
6284         
6285 else
6286   echo "configure: failed program was:" >&5
6287   cat conftest.$ac_ext >&5
6288   rm -fr conftest*
6289    echo "$ac_t""no" 1>&6
6290     echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6
6291 echo "configure:6292: checking whether snprintf handles 'long long int' as %qd" >&5 
6292     if test "$cross_compiling" = yes; then
6293    echo "$ac_t""assuming not on target machine" 1>&6
6294         # Force usage of our own snprintf, since we cannot test foreign snprintf
6295         SNPRINTF='snprintf.o'
6296         INT64_FORMAT='"%lld"'
6297   
6298 else
6299   cat > conftest.$ac_ext <<EOF
6300 #line 6301 "configure"
6301 #include "confdefs.h"
6302 #include <stdio.h>
6303 typedef long long int int64;
6304 #define INT64_FORMAT "%qd"
6305    
6306 int64 a = 20000001;
6307 int64 b = 40000005;
6308    
6309 int does_int64_snprintf_work()
6310 {  
6311   int64 c;
6312   char buf[100];
6313
6314   if (sizeof(int64) != 8)
6315     return 0;     /* doesn't look like the right size */
6316
6317   c = a * b;
6318   snprintf(buf, 100, INT64_FORMAT, c);
6319   if (strcmp(buf, "800000140000005") != 0)
6320     return 0;     /* either multiply or snprintf is busted */
6321   return 1;
6322 }
6323 main() {
6324   exit(! does_int64_snprintf_work());
6325 }
6326 EOF
6327 if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6328 then
6329    echo "$ac_t""yes" 1>&6
6330     INT64_FORMAT='"%qd"'
6331   
6332 else
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -fr conftest*
6336    echo "$ac_t""no" 1>&6
6337         # Force usage of our own snprintf, since system snprintf is broken
6338         SNPRINTF='snprintf.o'
6339         INT64_FORMAT='"%lld"'
6340   
6341 fi
6342 rm -fr conftest*
6343 fi
6344  
6345 fi
6346 rm -fr conftest*
6347 fi
6348
6349   else
6350     # here if we previously decided we needed to use our own snprintf
6351     INT64_FORMAT='"%lld"'
6352   fi
6353 else
6354   # Here if we are not using 'long long int' at all
6355   INT64_FORMAT='"%ld"'
6356 fi
6357
6358 cat >> confdefs.h <<EOF
6359 #define INT64_FORMAT $INT64_FORMAT
6360 EOF
6361
6362
6363
6364
6365 echo $ac_n "checking alignment of short""... $ac_c" 1>&6
6366 echo "configure:6367: checking alignment of short" >&5
6367 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then
6368   echo $ac_n "(cached) $ac_c" 1>&6
6369 else
6370   if test "$cross_compiling" = yes; then
6371   pgac_cv_alignof_short='sizeof(short)'
6372 else
6373   cat > conftest.$ac_ext <<EOF
6374 #line 6375 "configure"
6375 #include "confdefs.h"
6376 #include <stdio.h>
6377 struct { char filler; short field; } mystruct;
6378 main()
6379 {
6380   FILE *f=fopen("conftestval", "w");
6381   if (!f) exit(1);
6382   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
6383   exit(0);
6384 }
6385 EOF
6386 if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6387 then
6388   pgac_cv_alignof_short=`cat conftestval`
6389 else
6390   echo "configure: failed program was:" >&5
6391   cat conftest.$ac_ext >&5
6392   rm -fr conftest*
6393   pgac_cv_alignof_short='sizeof(short)'
6394 fi
6395 rm -fr conftest*
6396 fi
6397
6398 fi
6399 echo "$ac_t""$pgac_cv_alignof_short" 1>&6
6400 cat >> confdefs.h <<EOF
6401 #define ALIGNOF_SHORT $pgac_cv_alignof_short
6402 EOF
6403
6404
6405 echo $ac_n "checking alignment of int""... $ac_c" 1>&6
6406 echo "configure:6407: checking alignment of int" >&5
6407 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then
6408   echo $ac_n "(cached) $ac_c" 1>&6
6409 else
6410   if test "$cross_compiling" = yes; then
6411   pgac_cv_alignof_int='sizeof(int)'
6412 else
6413   cat > conftest.$ac_ext <<EOF
6414 #line 6415 "configure"
6415 #include "confdefs.h"
6416 #include <stdio.h>
6417 struct { char filler; int field; } mystruct;
6418 main()
6419 {
6420   FILE *f=fopen("conftestval", "w");
6421   if (!f) exit(1);
6422   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
6423   exit(0);
6424 }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6427 then
6428   pgac_cv_alignof_int=`cat conftestval`
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432   rm -fr conftest*
6433   pgac_cv_alignof_int='sizeof(int)'
6434 fi
6435 rm -fr conftest*
6436 fi
6437
6438 fi
6439 echo "$ac_t""$pgac_cv_alignof_int" 1>&6
6440 cat >> confdefs.h <<EOF
6441 #define ALIGNOF_INT $pgac_cv_alignof_int
6442 EOF
6443
6444
6445 echo $ac_n "checking alignment of long""... $ac_c" 1>&6
6446 echo "configure:6447: checking alignment of long" >&5
6447 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then
6448   echo $ac_n "(cached) $ac_c" 1>&6
6449 else
6450   if test "$cross_compiling" = yes; then
6451   pgac_cv_alignof_long='sizeof(long)'
6452 else
6453   cat > conftest.$ac_ext <<EOF
6454 #line 6455 "configure"
6455 #include "confdefs.h"
6456 #include <stdio.h>
6457 struct { char filler; long field; } mystruct;
6458 main()
6459 {
6460   FILE *f=fopen("conftestval", "w");
6461   if (!f) exit(1);
6462   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
6463   exit(0);
6464 }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6467 then
6468   pgac_cv_alignof_long=`cat conftestval`
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -fr conftest*
6473   pgac_cv_alignof_long='sizeof(long)'
6474 fi
6475 rm -fr conftest*
6476 fi
6477
6478 fi
6479 echo "$ac_t""$pgac_cv_alignof_long" 1>&6
6480 cat >> confdefs.h <<EOF
6481 #define ALIGNOF_LONG $pgac_cv_alignof_long
6482 EOF
6483
6484
6485 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
6486   echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6
6487 echo "configure:6488: checking alignment of long long int" >&5
6488 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then
6489   echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491   if test "$cross_compiling" = yes; then
6492   pgac_cv_alignof_long_long_int='sizeof(long long int)'
6493 else
6494   cat > conftest.$ac_ext <<EOF
6495 #line 6496 "configure"
6496 #include "confdefs.h"
6497 #include <stdio.h>
6498 struct { char filler; long long int field; } mystruct;
6499 main()
6500 {
6501   FILE *f=fopen("conftestval", "w");
6502   if (!f) exit(1);
6503   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
6504   exit(0);
6505 }
6506 EOF
6507 if { (eval echo configure:6508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6508 then
6509   pgac_cv_alignof_long_long_int=`cat conftestval`
6510 else
6511   echo "configure: failed program was:" >&5
6512   cat conftest.$ac_ext >&5
6513   rm -fr conftest*
6514   pgac_cv_alignof_long_long_int='sizeof(long long int)'
6515 fi
6516 rm -fr conftest*
6517 fi
6518
6519 fi
6520 echo "$ac_t""$pgac_cv_alignof_long_long_int" 1>&6
6521 cat >> confdefs.h <<EOF
6522 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
6523 EOF
6524
6525
6526 fi
6527 echo $ac_n "checking alignment of double""... $ac_c" 1>&6
6528 echo "configure:6529: checking alignment of double" >&5
6529 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then
6530   echo $ac_n "(cached) $ac_c" 1>&6
6531 else
6532   if test "$cross_compiling" = yes; then
6533   pgac_cv_alignof_double='sizeof(double)'
6534 else
6535   cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 #include <stdio.h>
6539 struct { char filler; double field; } mystruct;
6540 main()
6541 {
6542   FILE *f=fopen("conftestval", "w");
6543   if (!f) exit(1);
6544   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
6545   exit(0);
6546 }
6547 EOF
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6549 then
6550   pgac_cv_alignof_double=`cat conftestval`
6551 else
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -fr conftest*
6555   pgac_cv_alignof_double='sizeof(double)'
6556 fi
6557 rm -fr conftest*
6558 fi
6559
6560 fi
6561 echo "$ac_t""$pgac_cv_alignof_double" 1>&6
6562 cat >> confdefs.h <<EOF
6563 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
6564 EOF
6565
6566
6567
6568
6569 if test $pgac_cv_alignof_double != 'sizeof(double)' ; then
6570   MAX_ALIGNOF=$pgac_cv_alignof_long
6571   if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
6572     MAX_ALIGNOF=$pgac_cv_alignof_double
6573   fi
6574   if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
6575     MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
6576   fi
6577 else
6578     MAX_ALIGNOF="$pgac_cv_alignof_double"
6579 fi
6580 cat >> confdefs.h <<EOF
6581 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
6582 EOF
6583
6584
6585 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
6586 echo "configure:6587: checking for POSIX signal interface" >&5
6587 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
6588   echo $ac_n "(cached) $ac_c" 1>&6
6589 else
6590   cat > conftest.$ac_ext <<EOF
6591 #line 6592 "configure"
6592 #include "confdefs.h"
6593 #include <signal.h>
6594
6595 int main() {
6596 struct sigaction act, oact;
6597 sigemptyset(&act.sa_mask);
6598 act.sa_flags = SA_RESTART;
6599 sigaction(0, &act, &oact);
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6603   rm -rf conftest*
6604   pgac_cv_func_posix_signals=yes
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   pgac_cv_func_posix_signals=no
6610 fi
6611 rm -f conftest*
6612 fi
6613
6614 echo "$ac_t""$pgac_cv_func_posix_signals" 1>&6
6615 if test x"$pgac_cv_func_posix_signals" = xyes ; then
6616   cat >> confdefs.h <<\EOF
6617 #define HAVE_POSIX_SIGNALS 
6618 EOF
6619
6620 fi
6621 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
6622
6623
6624
6625
6626 if test -z "$TCL_DIRS"
6627 then
6628         # Extract the first word of "tclsh", so it can be a program name with args.
6629 set dummy tclsh; ac_word=$2
6630 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6631 echo "configure:6632: checking for $ac_word" >&5
6632 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   case "$TCLSH" in
6636   /*)
6637   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
6638   ;;
6639   ?:/*)                  
6640   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
6641   ;;
6642   *)
6643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6644   ac_dummy="$PATH"
6645   for ac_dir in $ac_dummy; do 
6646     test -z "$ac_dir" && ac_dir=.
6647     if test -f $ac_dir/$ac_word; then
6648       ac_cv_path_TCLSH="$ac_dir/$ac_word"
6649       break
6650     fi
6651   done
6652   IFS="$ac_save_ifs"
6653   ;;
6654 esac
6655 fi
6656 TCLSH="$ac_cv_path_TCLSH"
6657 if test -n "$TCLSH"; then
6658   echo "$ac_t""$TCLSH" 1>&6
6659 else
6660   echo "$ac_t""no" 1>&6
6661 fi
6662
6663         if test -z "$TCLSH"
6664         then
6665                 # Extract the first word of "tcl", so it can be a program name with args.
6666 set dummy tcl; ac_word=$2
6667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6668 echo "configure:6669: checking for $ac_word" >&5
6669 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
6670   echo $ac_n "(cached) $ac_c" 1>&6
6671 else
6672   case "$TCLSH" in
6673   /*)
6674   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
6675   ;;
6676   ?:/*)                  
6677   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
6678   ;;
6679   *)
6680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6681   ac_dummy="$PATH"
6682   for ac_dir in $ac_dummy; do 
6683     test -z "$ac_dir" && ac_dir=.
6684     if test -f $ac_dir/$ac_word; then
6685       ac_cv_path_TCLSH="$ac_dir/$ac_word"
6686       break
6687     fi
6688   done
6689   IFS="$ac_save_ifs"
6690   ;;
6691 esac
6692 fi
6693 TCLSH="$ac_cv_path_TCLSH"
6694 if test -n "$TCLSH"; then
6695   echo "$ac_t""$TCLSH" 1>&6
6696 else
6697   echo "$ac_t""no" 1>&6
6698 fi
6699
6700                 if test -z "$TCLSH"
6701                 then
6702                         echo "configure: warning: TCL/TK support disabled; tcl shell is not in your path" 1>&2
6703                         USE_TCL=
6704                 fi
6705         fi
6706 fi
6707         
6708 if test "$USE_TCL" = true
6709 then
6710         echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
6711 echo "configure:6712: checking for tclConfig.sh" >&5
6712         TCL_CONFIG_SH=
6713         library_dirs=
6714         if test -z "$TCL_DIRS"
6715         then
6716                 library_dirs=`echo 'puts $auto_path' | $TCLSH`
6717         fi
6718         library_dirs="$TCL_DIRS $TK_DIRS $library_dirs"
6719         for dir in $library_dirs; do
6720                 if test -d "$dir" -a -r "$dir/tclConfig.sh"; then
6721                         TCL_CONFIG_SH=$dir/tclConfig.sh
6722                         break
6723                 fi
6724         done
6725         if test -z "$TCL_CONFIG_SH"; then
6726                 echo "$ac_t""no" 1>&6
6727                 echo "configure: warning: TCL/TK support disabled; Tcl configuration script missing" 1>&2
6728                 USE_TCL=
6729         else
6730                 echo "$ac_t""$TCL_CONFIG_SH" 1>&6
6731                 
6732         fi
6733 fi
6734
6735 USE_TK=$USE_TCL         # If TCL is disabled, disable TK
6736
6737 if test "$USE_TK" = true
6738 then
6739         echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
6740 echo "configure:6741: checking for tkConfig.sh" >&5
6741         TK_CONFIG_SH=
6742         # library_dirs are set in the check for TCL
6743         for dir in $library_dirs
6744         do
6745                 if test -d "$dir" -a -r "$dir/tkConfig.sh"
6746                 then
6747                         TK_CONFIG_SH=$dir/tkConfig.sh
6748                         break
6749                 fi
6750         done
6751         if test -z "$TK_CONFIG_SH"
6752         then
6753                 echo "$ac_t""no" 1>&6
6754                 echo "configure: warning: TK support disabled; Tk configuration script missing" 1>&2
6755                 USE_TK=
6756         else
6757                 echo "$ac_t""$TK_CONFIG_SH" 1>&6
6758                 
6759                 # Extract the first word of "wish", so it can be a program name with args.
6760 set dummy wish; ac_word=$2
6761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6762 echo "configure:6763: checking for $ac_word" >&5
6763 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   case "$WISH" in
6767   /*)
6768   ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
6769   ;;
6770   ?:/*)                  
6771   ac_cv_path_WISH="$WISH" # Let the user override the test with a dos path.
6772   ;;
6773   *)
6774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6775   ac_dummy="$PATH"
6776   for ac_dir in $ac_dummy; do 
6777     test -z "$ac_dir" && ac_dir=.
6778     if test -f $ac_dir/$ac_word; then
6779       ac_cv_path_WISH="$ac_dir/$ac_word"
6780       break
6781     fi
6782   done
6783   IFS="$ac_save_ifs"
6784   ;;
6785 esac
6786 fi
6787 WISH="$ac_cv_path_WISH"
6788 if test -n "$WISH"; then
6789   echo "$ac_t""$WISH" 1>&6
6790 else
6791   echo "$ac_t""no" 1>&6
6792 fi
6793
6794         fi
6795 fi
6796
6797
6798 USE_X=$USE_TK
6799
6800
6801 if test "$USE_X" = true; then
6802
6803         ice_save_LIBS="$LIBS"
6804         ice_save_CFLAGS="$CFLAGS"
6805         ice_save_CPPFLAGS="$CPPFLAGS"
6806         ice_save_LDFLAGS="$LDFLAGS"
6807
6808         # If we find X, set shell vars x_includes and x_libraries to the
6809 # paths, otherwise set no_x=yes.
6810 # Uses ac_ vars as temps to allow command line to override cache and checks.
6811 # --without-x overrides everything else, but does not touch the cache.
6812 echo $ac_n "checking for X""... $ac_c" 1>&6
6813 echo "configure:6814: checking for X" >&5
6814
6815 # Check whether --with-x or --without-x was given.
6816 if test "${with_x+set}" = set; then
6817   withval="$with_x"
6818   :
6819 fi
6820
6821 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6822 if test "x$with_x" = xno; then
6823   # The user explicitly disabled X.
6824   have_x=disabled
6825 else
6826   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6827     # Both variables are already set.
6828     have_x=yes
6829   else
6830 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   # One or both of the vars are not set, and there is no cached value.
6834 ac_x_includes=NO ac_x_libraries=NO
6835 rm -fr conftestdir
6836 if mkdir conftestdir; then
6837   cd conftestdir
6838   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6839   cat > Imakefile <<'EOF'
6840 acfindx:
6841         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6842 EOF
6843   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6844     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6845     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6846     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6847     for ac_extension in a so sl; do
6848       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6849         test -f $ac_im_libdir/libX11.$ac_extension; then
6850         ac_im_usrlibdir=$ac_im_libdir; break
6851       fi
6852     done
6853     # Screen out bogus values from the imake configuration.  They are
6854     # bogus both because they are the default anyway, and because
6855     # using them would break gcc on systems where it needs fixed includes.
6856     case "$ac_im_incroot" in
6857         /usr/include) ;;
6858         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6859     esac
6860     case "$ac_im_usrlibdir" in
6861         /usr/lib | /lib) ;;
6862         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6863     esac
6864   fi
6865   cd ..
6866   rm -fr conftestdir
6867 fi
6868
6869 if test "$ac_x_includes" = NO; then
6870   # Guess where to find include files, by looking for this one X11 .h file.
6871   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6872
6873   # First, try using that file with no special directory specified.
6874 cat > conftest.$ac_ext <<EOF
6875 #line 6876 "configure"
6876 #include "confdefs.h"
6877 #include <$x_direct_test_include>
6878 EOF
6879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6880 { (eval echo configure:6881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6882 if test -z "$ac_err"; then
6883   rm -rf conftest*
6884   # We can compile using X headers with no special include directory.
6885 ac_x_includes=
6886 else
6887   echo "$ac_err" >&5
6888   echo "configure: failed program was:" >&5
6889   cat conftest.$ac_ext >&5
6890   rm -rf conftest*
6891   # Look for the header file in a standard set of common directories.
6892 # Check X11 before X11Rn because it is often a symlink to the current release.
6893   for ac_dir in               \
6894     /usr/X11/include          \
6895     /usr/X11R6/include        \
6896     /usr/X11R5/include        \
6897     /usr/X11R4/include        \
6898                               \
6899     /usr/include/X11          \
6900     /usr/include/X11R6        \
6901     /usr/include/X11R5        \
6902     /usr/include/X11R4        \
6903                               \
6904     /usr/local/X11/include    \
6905     /usr/local/X11R6/include  \
6906     /usr/local/X11R5/include  \
6907     /usr/local/X11R4/include  \
6908                               \
6909     /usr/local/include/X11    \
6910     /usr/local/include/X11R6  \
6911     /usr/local/include/X11R5  \
6912     /usr/local/include/X11R4  \
6913                               \
6914     /usr/X386/include         \
6915     /usr/x386/include         \
6916     /usr/XFree86/include/X11  \
6917                               \
6918     /usr/include              \
6919     /usr/local/include        \
6920     /usr/unsupported/include  \
6921     /usr/athena/include       \
6922     /usr/local/x11r5/include  \
6923     /usr/lpp/Xamples/include  \
6924                               \
6925     /usr/openwin/include      \
6926     /usr/openwin/share/include \
6927     ; \
6928   do
6929     if test -r "$ac_dir/$x_direct_test_include"; then
6930       ac_x_includes=$ac_dir
6931       break
6932     fi
6933   done
6934 fi
6935 rm -f conftest*
6936 fi # $ac_x_includes = NO
6937
6938 if test "$ac_x_libraries" = NO; then
6939   # Check for the libraries.
6940
6941   test -z "$x_direct_test_library" && x_direct_test_library=Xt
6942   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6943
6944   # See if we find them without any special options.
6945   # Don't add to $LIBS permanently.
6946   ac_save_LIBS="$LIBS"
6947   LIBS="-l$x_direct_test_library $LIBS"
6948 cat > conftest.$ac_ext <<EOF
6949 #line 6950 "configure"
6950 #include "confdefs.h"
6951
6952 int main() {
6953 ${x_direct_test_function}()
6954 ; return 0; }
6955 EOF
6956 if { (eval echo configure:6957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6957   rm -rf conftest*
6958   LIBS="$ac_save_LIBS"
6959 # We can link X programs with no special library path.
6960 ac_x_libraries=
6961 else
6962   echo "configure: failed program was:" >&5
6963   cat conftest.$ac_ext >&5
6964   rm -rf conftest*
6965   LIBS="$ac_save_LIBS"
6966 # First see if replacing the include by lib works.
6967 # Check X11 before X11Rn because it is often a symlink to the current release.
6968 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6969     /usr/X11/lib          \
6970     /usr/X11R6/lib        \
6971     /usr/X11R5/lib        \
6972     /usr/X11R4/lib        \
6973                           \
6974     /usr/lib/X11          \
6975     /usr/lib/X11R6        \
6976     /usr/lib/X11R5        \
6977     /usr/lib/X11R4        \
6978                           \
6979     /usr/local/X11/lib    \
6980     /usr/local/X11R6/lib  \
6981     /usr/local/X11R5/lib  \
6982     /usr/local/X11R4/lib  \
6983                           \
6984     /usr/local/lib/X11    \
6985     /usr/local/lib/X11R6  \
6986     /usr/local/lib/X11R5  \
6987     /usr/local/lib/X11R4  \
6988                           \
6989     /usr/X386/lib         \
6990     /usr/x386/lib         \
6991     /usr/XFree86/lib/X11  \
6992                           \
6993     /usr/lib              \
6994     /usr/local/lib        \
6995     /usr/unsupported/lib  \
6996     /usr/athena/lib       \
6997     /usr/local/x11r5/lib  \
6998     /usr/lpp/Xamples/lib  \
6999     /lib/usr/lib/X11      \
7000                           \
7001     /usr/openwin/lib      \
7002     /usr/openwin/share/lib \
7003     ; \
7004 do
7005   for ac_extension in a so sl; do
7006     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
7007       ac_x_libraries=$ac_dir
7008       break 2
7009     fi
7010   done
7011 done
7012 fi
7013 rm -f conftest*
7014 fi # $ac_x_libraries = NO
7015
7016 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
7017   # Didn't find X anywhere.  Cache the known absence of X.
7018   ac_cv_have_x="have_x=no"
7019 else
7020   # Record where we found X for the cache.
7021   ac_cv_have_x="have_x=yes \
7022                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7023 fi
7024 fi
7025   fi
7026   eval "$ac_cv_have_x"
7027 fi # $with_x != no
7028
7029 if test "$have_x" != yes; then
7030   echo "$ac_t""$have_x" 1>&6
7031   no_x=yes
7032 else
7033   # If each of the values was on the command line, it overrides each guess.
7034   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7035   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7036   # Update the cache value to reflect the command line values.
7037   ac_cv_have_x="have_x=yes \
7038                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7039   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
7040 fi
7041
7042 if test "$no_x" = yes; then
7043   # Not all programs may use this symbol, but it does not hurt to define it.
7044   cat >> confdefs.h <<\EOF
7045 #define X_DISPLAY_MISSING 1
7046 EOF
7047
7048   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7049 else
7050   if test -n "$x_includes"; then
7051     X_CFLAGS="$X_CFLAGS -I$x_includes"
7052   fi
7053
7054   # It would also be nice to do this for all -L options, not just this one.
7055   if test -n "$x_libraries"; then
7056     X_LIBS="$X_LIBS -L$x_libraries"
7057     # For Solaris; some versions of Sun CC require a space after -R and
7058     # others require no space.  Words are not sufficient . . . .
7059     case "`(uname -sr) 2>/dev/null`" in
7060     "SunOS 5"*)
7061       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
7062 echo "configure:7063: checking whether -R must be followed by a space" >&5
7063       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
7064       cat > conftest.$ac_ext <<EOF
7065 #line 7066 "configure"
7066 #include "confdefs.h"
7067
7068 int main() {
7069
7070 ; return 0; }
7071 EOF
7072 if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7073   rm -rf conftest*
7074   ac_R_nospace=yes
7075 else
7076   echo "configure: failed program was:" >&5
7077   cat conftest.$ac_ext >&5
7078   rm -rf conftest*
7079   ac_R_nospace=no
7080 fi
7081 rm -f conftest*
7082       if test $ac_R_nospace = yes; then
7083         echo "$ac_t""no" 1>&6
7084         X_LIBS="$X_LIBS -R$x_libraries"
7085       else
7086         LIBS="$ac_xsave_LIBS -R $x_libraries"
7087         cat > conftest.$ac_ext <<EOF
7088 #line 7089 "configure"
7089 #include "confdefs.h"
7090
7091 int main() {
7092
7093 ; return 0; }
7094 EOF
7095 if { (eval echo configure:7096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7096   rm -rf conftest*
7097   ac_R_space=yes
7098 else
7099   echo "configure: failed program was:" >&5
7100   cat conftest.$ac_ext >&5
7101   rm -rf conftest*
7102   ac_R_space=no
7103 fi
7104 rm -f conftest*
7105         if test $ac_R_space = yes; then
7106           echo "$ac_t""yes" 1>&6
7107           X_LIBS="$X_LIBS -R $x_libraries"
7108         else
7109           echo "$ac_t""neither works" 1>&6
7110         fi
7111       fi
7112       LIBS="$ac_xsave_LIBS"
7113     esac
7114   fi
7115
7116   # Check for system-dependent libraries X programs must link with.
7117   # Do this before checking for the system-independent R6 libraries
7118   # (-lICE), since we may need -lsocket or whatever for X linking.
7119
7120   if test "$ISC" = yes; then
7121     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7122   else
7123     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
7124     # libraries were built with DECnet support.  And karl@cs.umb.edu says
7125     # the Alpha needs dnet_stub (dnet does not exist).
7126     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
7127 echo "configure:7128: checking for dnet_ntoa in -ldnet" >&5
7128 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
7129 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7130   echo $ac_n "(cached) $ac_c" 1>&6
7131 else
7132   ac_save_LIBS="$LIBS"
7133 LIBS="-ldnet  $LIBS"
7134 cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 /* Override any gcc2 internal prototype to avoid an error.  */
7138 /* We use char because int might match the return type of a gcc2
7139     builtin and then its argument prototype would still apply.  */
7140 char dnet_ntoa();
7141
7142 int main() {
7143 dnet_ntoa()
7144 ; return 0; }
7145 EOF
7146 if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7147   rm -rf conftest*
7148   eval "ac_cv_lib_$ac_lib_var=yes"
7149 else
7150   echo "configure: failed program was:" >&5
7151   cat conftest.$ac_ext >&5
7152   rm -rf conftest*
7153   eval "ac_cv_lib_$ac_lib_var=no"
7154 fi
7155 rm -f conftest*
7156 LIBS="$ac_save_LIBS"
7157
7158 fi
7159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7160   echo "$ac_t""yes" 1>&6
7161   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7162 else
7163   echo "$ac_t""no" 1>&6
7164 fi
7165
7166     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7167       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
7168 echo "configure:7169: checking for dnet_ntoa in -ldnet_stub" >&5
7169 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
7170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7171   echo $ac_n "(cached) $ac_c" 1>&6
7172 else
7173   ac_save_LIBS="$LIBS"
7174 LIBS="-ldnet_stub  $LIBS"
7175 cat > conftest.$ac_ext <<EOF
7176 #line 7177 "configure"
7177 #include "confdefs.h"
7178 /* Override any gcc2 internal prototype to avoid an error.  */
7179 /* We use char because int might match the return type of a gcc2
7180     builtin and then its argument prototype would still apply.  */
7181 char dnet_ntoa();
7182
7183 int main() {
7184 dnet_ntoa()
7185 ; return 0; }
7186 EOF
7187 if { (eval echo configure:7188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7188   rm -rf conftest*
7189   eval "ac_cv_lib_$ac_lib_var=yes"
7190 else
7191   echo "configure: failed program was:" >&5
7192   cat conftest.$ac_ext >&5
7193   rm -rf conftest*
7194   eval "ac_cv_lib_$ac_lib_var=no"
7195 fi
7196 rm -f conftest*
7197 LIBS="$ac_save_LIBS"
7198
7199 fi
7200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7201   echo "$ac_t""yes" 1>&6
7202   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7203 else
7204   echo "$ac_t""no" 1>&6
7205 fi
7206
7207     fi
7208
7209     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7210     # to get the SysV transport functions.
7211     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
7212     # needs -lnsl.
7213     # The nsl library prevents programs from opening the X display
7214     # on Irix 5.2, according to dickey@clark.net.
7215     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
7216 echo "configure:7217: checking for gethostbyname" >&5
7217 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
7218   echo $ac_n "(cached) $ac_c" 1>&6
7219 else
7220   cat > conftest.$ac_ext <<EOF
7221 #line 7222 "configure"
7222 #include "confdefs.h"
7223 /* System header to define __stub macros and hopefully few prototypes,
7224     which can conflict with char gethostbyname(); below.  */
7225 #include <assert.h>
7226 /* Override any gcc2 internal prototype to avoid an error.  */
7227 /* We use char because int might match the return type of a gcc2
7228     builtin and then its argument prototype would still apply.  */
7229 char gethostbyname();
7230
7231 int main() {
7232
7233 /* The GNU C library defines this for functions which it implements
7234     to always fail with ENOSYS.  Some functions are actually named
7235     something starting with __ and the normal name is an alias.  */
7236 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7237 choke me
7238 #else
7239 gethostbyname();
7240 #endif
7241
7242 ; return 0; }
7243 EOF
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7245   rm -rf conftest*
7246   eval "ac_cv_func_gethostbyname=yes"
7247 else
7248   echo "configure: failed program was:" >&5
7249   cat conftest.$ac_ext >&5
7250   rm -rf conftest*
7251   eval "ac_cv_func_gethostbyname=no"
7252 fi
7253 rm -f conftest*
7254 fi
7255
7256 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
7257   echo "$ac_t""yes" 1>&6
7258   :
7259 else
7260   echo "$ac_t""no" 1>&6
7261 fi
7262
7263     if test $ac_cv_func_gethostbyname = no; then
7264       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
7265 echo "configure:7266: checking for gethostbyname in -lnsl" >&5
7266 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
7267 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7268   echo $ac_n "(cached) $ac_c" 1>&6
7269 else
7270   ac_save_LIBS="$LIBS"
7271 LIBS="-lnsl  $LIBS"
7272 cat > conftest.$ac_ext <<EOF
7273 #line 7274 "configure"
7274 #include "confdefs.h"
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 /* We use char because int might match the return type of a gcc2
7277     builtin and then its argument prototype would still apply.  */
7278 char gethostbyname();
7279
7280 int main() {
7281 gethostbyname()
7282 ; return 0; }
7283 EOF
7284 if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7285   rm -rf conftest*
7286   eval "ac_cv_lib_$ac_lib_var=yes"
7287 else
7288   echo "configure: failed program was:" >&5
7289   cat conftest.$ac_ext >&5
7290   rm -rf conftest*
7291   eval "ac_cv_lib_$ac_lib_var=no"
7292 fi
7293 rm -f conftest*
7294 LIBS="$ac_save_LIBS"
7295
7296 fi
7297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7298   echo "$ac_t""yes" 1>&6
7299   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7300 else
7301   echo "$ac_t""no" 1>&6
7302 fi
7303
7304     fi
7305
7306     # lieder@skyler.mavd.honeywell.com says without -lsocket,
7307     # socket/setsockopt and other routines are undefined under SCO ODT
7308     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7309     # on later versions), says simon@lia.di.epfl.ch: it contains
7310     # gethostby* variants that don't use the nameserver (or something).
7311     # -lsocket must be given before -lnsl if both are needed.
7312     # We assume that if connect needs -lnsl, so does gethostbyname.
7313     echo $ac_n "checking for connect""... $ac_c" 1>&6
7314 echo "configure:7315: checking for connect" >&5
7315 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
7316   echo $ac_n "(cached) $ac_c" 1>&6
7317 else
7318   cat > conftest.$ac_ext <<EOF
7319 #line 7320 "configure"
7320 #include "confdefs.h"
7321 /* System header to define __stub macros and hopefully few prototypes,
7322     which can conflict with char connect(); below.  */
7323 #include <assert.h>
7324 /* Override any gcc2 internal prototype to avoid an error.  */
7325 /* We use char because int might match the return type of a gcc2
7326     builtin and then its argument prototype would still apply.  */
7327 char connect();
7328
7329 int main() {
7330
7331 /* The GNU C library defines this for functions which it implements
7332     to always fail with ENOSYS.  Some functions are actually named
7333     something starting with __ and the normal name is an alias.  */
7334 #if defined (__stub_connect) || defined (__stub___connect)
7335 choke me
7336 #else
7337 connect();
7338 #endif
7339
7340 ; return 0; }
7341 EOF
7342 if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7343   rm -rf conftest*
7344   eval "ac_cv_func_connect=yes"
7345 else
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -rf conftest*
7349   eval "ac_cv_func_connect=no"
7350 fi
7351 rm -f conftest*
7352 fi
7353
7354 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
7355   echo "$ac_t""yes" 1>&6
7356   :
7357 else
7358   echo "$ac_t""no" 1>&6
7359 fi
7360
7361     if test $ac_cv_func_connect = no; then
7362       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
7363 echo "configure:7364: checking for connect in -lsocket" >&5
7364 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
7365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7366   echo $ac_n "(cached) $ac_c" 1>&6
7367 else
7368   ac_save_LIBS="$LIBS"
7369 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7370 cat > conftest.$ac_ext <<EOF
7371 #line 7372 "configure"
7372 #include "confdefs.h"
7373 /* Override any gcc2 internal prototype to avoid an error.  */
7374 /* We use char because int might match the return type of a gcc2
7375     builtin and then its argument prototype would still apply.  */
7376 char connect();
7377
7378 int main() {
7379 connect()
7380 ; return 0; }
7381 EOF
7382 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7383   rm -rf conftest*
7384   eval "ac_cv_lib_$ac_lib_var=yes"
7385 else
7386   echo "configure: failed program was:" >&5
7387   cat conftest.$ac_ext >&5
7388   rm -rf conftest*
7389   eval "ac_cv_lib_$ac_lib_var=no"
7390 fi
7391 rm -f conftest*
7392 LIBS="$ac_save_LIBS"
7393
7394 fi
7395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7396   echo "$ac_t""yes" 1>&6
7397   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7398 else
7399   echo "$ac_t""no" 1>&6
7400 fi
7401
7402     fi
7403
7404     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7405     echo $ac_n "checking for remove""... $ac_c" 1>&6
7406 echo "configure:7407: checking for remove" >&5
7407 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7408   echo $ac_n "(cached) $ac_c" 1>&6
7409 else
7410   cat > conftest.$ac_ext <<EOF
7411 #line 7412 "configure"
7412 #include "confdefs.h"
7413 /* System header to define __stub macros and hopefully few prototypes,
7414     which can conflict with char remove(); below.  */
7415 #include <assert.h>
7416 /* Override any gcc2 internal prototype to avoid an error.  */
7417 /* We use char because int might match the return type of a gcc2
7418     builtin and then its argument prototype would still apply.  */
7419 char remove();
7420
7421 int main() {
7422
7423 /* The GNU C library defines this for functions which it implements
7424     to always fail with ENOSYS.  Some functions are actually named
7425     something starting with __ and the normal name is an alias.  */
7426 #if defined (__stub_remove) || defined (__stub___remove)
7427 choke me
7428 #else
7429 remove();
7430 #endif
7431
7432 ; return 0; }
7433 EOF
7434 if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7435   rm -rf conftest*
7436   eval "ac_cv_func_remove=yes"
7437 else
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -rf conftest*
7441   eval "ac_cv_func_remove=no"
7442 fi
7443 rm -f conftest*
7444 fi
7445
7446 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7447   echo "$ac_t""yes" 1>&6
7448   :
7449 else
7450   echo "$ac_t""no" 1>&6
7451 fi
7452
7453     if test $ac_cv_func_remove = no; then
7454       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7455 echo "configure:7456: checking for remove in -lposix" >&5
7456 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7457 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7458   echo $ac_n "(cached) $ac_c" 1>&6
7459 else
7460   ac_save_LIBS="$LIBS"
7461 LIBS="-lposix  $LIBS"
7462 cat > conftest.$ac_ext <<EOF
7463 #line 7464 "configure"
7464 #include "confdefs.h"
7465 /* Override any gcc2 internal prototype to avoid an error.  */
7466 /* We use char because int might match the return type of a gcc2
7467     builtin and then its argument prototype would still apply.  */
7468 char remove();
7469
7470 int main() {
7471 remove()
7472 ; return 0; }
7473 EOF
7474 if { (eval echo configure:7475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7475   rm -rf conftest*
7476   eval "ac_cv_lib_$ac_lib_var=yes"
7477 else
7478   echo "configure: failed program was:" >&5
7479   cat conftest.$ac_ext >&5
7480   rm -rf conftest*
7481   eval "ac_cv_lib_$ac_lib_var=no"
7482 fi
7483 rm -f conftest*
7484 LIBS="$ac_save_LIBS"
7485
7486 fi
7487 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7488   echo "$ac_t""yes" 1>&6
7489   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7490 else
7491   echo "$ac_t""no" 1>&6
7492 fi
7493
7494     fi
7495
7496     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7497     echo $ac_n "checking for shmat""... $ac_c" 1>&6
7498 echo "configure:7499: checking for shmat" >&5
7499 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 /* System header to define __stub macros and hopefully few prototypes,
7506     which can conflict with char shmat(); below.  */
7507 #include <assert.h>
7508 /* Override any gcc2 internal prototype to avoid an error.  */
7509 /* We use char because int might match the return type of a gcc2
7510     builtin and then its argument prototype would still apply.  */
7511 char shmat();
7512
7513 int main() {
7514
7515 /* The GNU C library defines this for functions which it implements
7516     to always fail with ENOSYS.  Some functions are actually named
7517     something starting with __ and the normal name is an alias.  */
7518 #if defined (__stub_shmat) || defined (__stub___shmat)
7519 choke me
7520 #else
7521 shmat();
7522 #endif
7523
7524 ; return 0; }
7525 EOF
7526 if { (eval echo configure:7527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7527   rm -rf conftest*
7528   eval "ac_cv_func_shmat=yes"
7529 else
7530   echo "configure: failed program was:" >&5
7531   cat conftest.$ac_ext >&5
7532   rm -rf conftest*
7533   eval "ac_cv_func_shmat=no"
7534 fi
7535 rm -f conftest*
7536 fi
7537
7538 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7539   echo "$ac_t""yes" 1>&6
7540   :
7541 else
7542   echo "$ac_t""no" 1>&6
7543 fi
7544
7545     if test $ac_cv_func_shmat = no; then
7546       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7547 echo "configure:7548: checking for shmat in -lipc" >&5
7548 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7549 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7550   echo $ac_n "(cached) $ac_c" 1>&6
7551 else
7552   ac_save_LIBS="$LIBS"
7553 LIBS="-lipc  $LIBS"
7554 cat > conftest.$ac_ext <<EOF
7555 #line 7556 "configure"
7556 #include "confdefs.h"
7557 /* Override any gcc2 internal prototype to avoid an error.  */
7558 /* We use char because int might match the return type of a gcc2
7559     builtin and then its argument prototype would still apply.  */
7560 char shmat();
7561
7562 int main() {
7563 shmat()
7564 ; return 0; }
7565 EOF
7566 if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7567   rm -rf conftest*
7568   eval "ac_cv_lib_$ac_lib_var=yes"
7569 else
7570   echo "configure: failed program was:" >&5
7571   cat conftest.$ac_ext >&5
7572   rm -rf conftest*
7573   eval "ac_cv_lib_$ac_lib_var=no"
7574 fi
7575 rm -f conftest*
7576 LIBS="$ac_save_LIBS"
7577
7578 fi
7579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7580   echo "$ac_t""yes" 1>&6
7581   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7582 else
7583   echo "$ac_t""no" 1>&6
7584 fi
7585
7586     fi
7587   fi
7588
7589   # Check for libraries that X11R6 Xt/Xaw programs need.
7590   ac_save_LDFLAGS="$LDFLAGS"
7591   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7592   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7593   # check for ICE first), but we must link in the order -lSM -lICE or
7594   # we get undefined symbols.  So assume we have SM if we have ICE.
7595   # These have to be linked with before -lX11, unlike the other
7596   # libraries we check for below, so use a different variable.
7597   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7598   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7599 echo "configure:7600: checking for IceConnectionNumber in -lICE" >&5
7600 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7602   echo $ac_n "(cached) $ac_c" 1>&6
7603 else
7604   ac_save_LIBS="$LIBS"
7605 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7606 cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7609 /* Override any gcc2 internal prototype to avoid an error.  */
7610 /* We use char because int might match the return type of a gcc2
7611     builtin and then its argument prototype would still apply.  */
7612 char IceConnectionNumber();
7613
7614 int main() {
7615 IceConnectionNumber()
7616 ; return 0; }
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7619   rm -rf conftest*
7620   eval "ac_cv_lib_$ac_lib_var=yes"
7621 else
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   eval "ac_cv_lib_$ac_lib_var=no"
7626 fi
7627 rm -f conftest*
7628 LIBS="$ac_save_LIBS"
7629
7630 fi
7631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7632   echo "$ac_t""yes" 1>&6
7633   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7634 else
7635   echo "$ac_t""no" 1>&6
7636 fi
7637
7638   LDFLAGS="$ac_save_LDFLAGS"
7639
7640 fi
7641
7642
7643         LIBS="$LIBS $X_EXTRA_LIBS"
7644         CFLAGS="$CFLAGS $X_CFLAGS"
7645         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
7646         LDFLAGS="$LDFLAGS $X_LIBS"
7647
7648         
7649         X11_LIBS=""
7650         echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7651 echo "configure:7652: checking for XOpenDisplay in -lX11" >&5
7652 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7653 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7654   echo $ac_n "(cached) $ac_c" 1>&6
7655 else
7656   ac_save_LIBS="$LIBS"
7657 LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
7658 cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* Override any gcc2 internal prototype to avoid an error.  */
7662 /* We use char because int might match the return type of a gcc2
7663     builtin and then its argument prototype would still apply.  */
7664 char XOpenDisplay();
7665
7666 int main() {
7667 XOpenDisplay()
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7671   rm -rf conftest*
7672   eval "ac_cv_lib_$ac_lib_var=yes"
7673 else
7674   echo "configure: failed program was:" >&5
7675   cat conftest.$ac_ext >&5
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=no"
7678 fi
7679 rm -f conftest*
7680 LIBS="$ac_save_LIBS"
7681
7682 fi
7683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7684   echo "$ac_t""yes" 1>&6
7685   X11_LIBS="-lX11"
7686 else
7687   echo "$ac_t""no" 1>&6
7688 fi
7689
7690         if test "$X11_LIBS" = ""; then
7691                                 echo "configure: warning: The X11 library '-lX11' could not be found,
7692 so TK support will be disabled.  To enable TK support,
7693 please use the configure options '--x-includes=DIR'
7694 and '--x-libraries=DIR' to specify the X location.
7695 See the file 'config.log' for further diagnostics." 1>&2
7696                 USE_TK=
7697         fi
7698         
7699         
7700         
7701
7702         LIBS="$ice_save_LIBS"
7703         CFLAGS="$ice_save_CFLAGS"
7704         CPPFLAGS="$ice_save_CPPFLAGS"
7705         LDFLAGS="$ice_save_LDFLAGS"
7706 fi
7707
7708
7709 # Wait with these until we're done so no tests fail because of too
7710 # many warnings.
7711 if test x"$GCC" = x"yes" ; then
7712   CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations"
7713 fi
7714
7715
7716 trap '' 1 2 15
7717 cat > confcache <<\EOF
7718 # This file is a shell script that caches the results of configure
7719 # tests run on this system so they can be shared between configure
7720 # scripts and configure runs.  It is not useful on other systems.
7721 # If it contains results you don't want to keep, you may remove or edit it.
7722 #
7723 # By default, configure uses ./config.cache as the cache file,
7724 # creating it if it does not exist already.  You can give configure
7725 # the --cache-file=FILE option to use a different cache file; that is
7726 # what configure does when it calls configure scripts in
7727 # subdirectories, so they share the cache.
7728 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7729 # config.status only pays attention to the cache file if you give it the
7730 # --recheck option to rerun configure.
7731 #
7732 EOF
7733 # The following way of writing the cache mishandles newlines in values,
7734 # but we know of no workaround that is simple, portable, and efficient.
7735 # So, don't put newlines in cache variables' values.
7736 # Ultrix sh set writes to stderr and can't be redirected directly,
7737 # and sets the high bit in the cache file unless we assign to the vars.
7738 (set) 2>&1 |
7739   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7740   *ac_space=\ *)
7741     # `set' does not quote correctly, so add quotes (double-quote substitution
7742     # turns \\\\ into \\, and sed turns \\ into \).
7743     sed -n \
7744       -e "s/'/'\\\\''/g" \
7745       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7746     ;;
7747   *)
7748     # `set' quotes correctly as required by POSIX, so do not add quotes.
7749     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7750     ;;
7751   esac >> confcache
7752 if cmp -s $cache_file confcache; then
7753   :
7754 else
7755   if test -w $cache_file; then
7756     echo "updating cache $cache_file"
7757     cat confcache > $cache_file
7758   else
7759     echo "not updating unwritable cache $cache_file"
7760   fi
7761 fi
7762 rm -f confcache
7763
7764 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7765
7766 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7767 # Let make expand exec_prefix.
7768 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7769
7770 # Any assignment to VPATH causes Sun make to only execute
7771 # the first set of double-colon rules, so remove it if not needed.
7772 # If there is a colon in the path, we need to keep it.
7773 if test "x$srcdir" = x.; then
7774   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7775 fi
7776
7777 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7778
7779 DEFS=-DHAVE_CONFIG_H
7780
7781 # Without the "./", some shells look in PATH for config.status.
7782 : ${CONFIG_STATUS=./config.status}
7783
7784 echo creating $CONFIG_STATUS
7785 rm -f $CONFIG_STATUS
7786 cat > $CONFIG_STATUS <<EOF
7787 #! /bin/sh
7788 # Generated automatically by configure.
7789 # Run this file to recreate the current configuration.
7790 # This directory was configured as follows,
7791 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7792 #
7793 # $0 $ac_configure_args
7794 #
7795 # Compiler output produced by configure, useful for debugging
7796 # configure, is in ./config.log if it exists.
7797
7798 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7799 for ac_option
7800 do
7801   case "\$ac_option" in
7802   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7803     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7804     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7805   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7806     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7807     exit 0 ;;
7808   -help | --help | --hel | --he | --h)
7809     echo "\$ac_cs_usage"; exit 0 ;;
7810   *) echo "\$ac_cs_usage"; exit 1 ;;
7811   esac
7812 done
7813
7814 ac_given_srcdir=$srcdir
7815 ac_given_INSTALL="$INSTALL"
7816
7817 trap 'rm -fr `echo "
7818   GNUmakefile
7819   src/GNUmakefile
7820   src/Makefile.global
7821   src/backend/port/Makefile
7822  src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7823 EOF
7824 cat >> $CONFIG_STATUS <<EOF
7825
7826 # Protect against being on the right side of a sed subst in config.status.
7827 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7828  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7829 $ac_vpsub
7830 $extrasub
7831 s%@SHELL@%$SHELL%g
7832 s%@CFLAGS@%$CFLAGS%g
7833 s%@CPPFLAGS@%$CPPFLAGS%g
7834 s%@CXXFLAGS@%$CXXFLAGS%g
7835 s%@FFLAGS@%$FFLAGS%g
7836 s%@DEFS@%$DEFS%g
7837 s%@LDFLAGS@%$LDFLAGS%g
7838 s%@LIBS@%$LIBS%g
7839 s%@exec_prefix@%$exec_prefix%g
7840 s%@prefix@%$prefix%g
7841 s%@program_transform_name@%$program_transform_name%g
7842 s%@bindir@%$bindir%g
7843 s%@sbindir@%$sbindir%g
7844 s%@libexecdir@%$libexecdir%g
7845 s%@datadir@%$datadir%g
7846 s%@sysconfdir@%$sysconfdir%g
7847 s%@sharedstatedir@%$sharedstatedir%g
7848 s%@localstatedir@%$localstatedir%g
7849 s%@libdir@%$libdir%g
7850 s%@includedir@%$includedir%g
7851 s%@oldincludedir@%$oldincludedir%g
7852 s%@docdir@%$docdir%g
7853 s%@mandir@%$mandir%g
7854 s%@VERSION@%$VERSION%g
7855 s%@host@%$host%g
7856 s%@host_alias@%$host_alias%g
7857 s%@host_cpu@%$host_cpu%g
7858 s%@host_vendor@%$host_vendor%g
7859 s%@host_os@%$host_os%g
7860 s%@PORTNAME@%$PORTNAME%g
7861 s%@CPU@%$CPU%g
7862 s%@TAS@%$TAS%g
7863 s%@MULTIBYTE@%$MULTIBYTE%g
7864 s%@CC@%$CC%g
7865 s%@CPP@%$CPP%g
7866 s%@GCC@%$GCC%g
7867 s%@AROPT@%$AROPT%g
7868 s%@SHARED_LIB@%$SHARED_LIB%g
7869 s%@DLSUFFIX@%$DLSUFFIX%g
7870 s%@DL_LIB@%$DL_LIB%g
7871 s%@autodepend@%$autodepend%g
7872 s%@INCLUDES@%$INCLUDES%g
7873 s%@USE_TCL@%$USE_TCL%g
7874 s%@USE_TK@%$USE_TK%g
7875 s%@with_perl@%$with_perl%g
7876 s%@PYTHON@%$PYTHON%g
7877 s%@python_version@%$python_version%g
7878 s%@python_prefix@%$python_prefix%g
7879 s%@python_execprefix@%$python_execprefix%g
7880 s%@python_configdir@%$python_configdir%g
7881 s%@python_moduledir@%$python_moduledir%g
7882 s%@python_extmakefile@%$python_extmakefile%g
7883 s%@with_python@%$with_python%g
7884 s%@with_krb4@%$with_krb4%g
7885 s%@with_krb5@%$with_krb5%g
7886 s%@krb_srvtab@%$krb_srvtab%g
7887 s%@KRB_LIBS@%$KRB_LIBS%g
7888 s%@with_openssl@%$with_openssl%g
7889 s%@enable_odbc@%$enable_odbc%g
7890 s%@odbcinst_ini_dir@%$odbcinst_ini_dir%g
7891 s%@ELF_SYS@%$ELF_SYS%g
7892 s%@with_CXX@%$with_CXX%g
7893 s%@CXX@%$CXX%g
7894 s%@CXXCPP@%$CXXCPP%g
7895 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7896 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7897 s%@INSTALL_DATA@%$INSTALL_DATA%g
7898 s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
7899 s%@mkinstalldirs@%$mkinstalldirs%g
7900 s%@AWK@%$AWK%g
7901 s%@FLEX@%$FLEX%g
7902 s%@FLEXFLAGS@%$FLEXFLAGS%g
7903 s%@LN_S@%$LN_S%g
7904 s%@RANLIB@%$RANLIB%g
7905 s%@tar@%$tar%g
7906 s%@PERL@%$PERL%g
7907 s%@YACC@%$YACC%g
7908 s%@YFLAGS@%$YFLAGS%g
7909 s%@SNPRINTF@%$SNPRINTF%g
7910 s%@ISINF@%$ISINF%g
7911 s%@GETRUSAGE@%$GETRUSAGE%g
7912 s%@SRANDOM@%$SRANDOM%g
7913 s%@GETHOSTNAME@%$GETHOSTNAME%g
7914 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
7915 s%@INET_ATON@%$INET_ATON%g
7916 s%@STRERROR@%$STRERROR%g
7917 s%@STRERROR2@%$STRERROR2%g
7918 s%@STRDUP@%$STRDUP%g
7919 s%@STRTOL@%$STRTOL%g
7920 s%@STRTOUL@%$STRTOUL%g
7921 s%@STRCASECMP@%$STRCASECMP%g
7922 s%@HPUXMATHLIB@%$HPUXMATHLIB%g
7923 s%@HAVE_RL_COMPLETION_APPEND_CHARACTER@%$HAVE_RL_COMPLETION_APPEND_CHARACTER%g
7924 s%@HAVE_FILENAME_COMPLETION_FUNCTION@%$HAVE_FILENAME_COMPLETION_FUNCTION%g
7925 s%@HAVE_FILENAME_COMPLETION_FUNCTION_DECL@%$HAVE_FILENAME_COMPLETION_FUNCTION_DECL%g
7926 s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
7927 s%@TCLSH@%$TCLSH%g
7928 s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
7929 s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
7930 s%@WISH@%$WISH%g
7931 s%@X_CFLAGS@%$X_CFLAGS%g
7932 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7933 s%@X_LIBS@%$X_LIBS%g
7934 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7935 s%@X11_LIBS@%$X11_LIBS%g
7936
7937 CEOF
7938 EOF
7939
7940 cat >> $CONFIG_STATUS <<\EOF
7941
7942 # Split the substitutions into bite-sized pieces for seds with
7943 # small command number limits, like on Digital OSF/1 and HP-UX.
7944 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7945 ac_file=1 # Number of current file.
7946 ac_beg=1 # First line for current file.
7947 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7948 ac_more_lines=:
7949 ac_sed_cmds=""
7950 while $ac_more_lines; do
7951   if test $ac_beg -gt 1; then
7952     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7953   else
7954     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7955   fi
7956   if test ! -s conftest.s$ac_file; then
7957     ac_more_lines=false
7958     rm -f conftest.s$ac_file
7959   else
7960     if test -z "$ac_sed_cmds"; then
7961       ac_sed_cmds="sed -f conftest.s$ac_file"
7962     else
7963       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7964     fi
7965     ac_file=`expr $ac_file + 1`
7966     ac_beg=$ac_end
7967     ac_end=`expr $ac_end + $ac_max_sed_cmds`
7968   fi
7969 done
7970 if test -z "$ac_sed_cmds"; then
7971   ac_sed_cmds=cat
7972 fi
7973 EOF
7974
7975 cat >> $CONFIG_STATUS <<EOF
7976
7977 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
7978   src/GNUmakefile
7979   src/Makefile.global
7980   src/backend/port/Makefile
7981 "}
7982 EOF
7983 cat >> $CONFIG_STATUS <<\EOF
7984 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7985   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7986   case "$ac_file" in
7987   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7988        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7989   *) ac_file_in="${ac_file}.in" ;;
7990   esac
7991
7992   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7993
7994   # Remove last slash and all that follows it.  Not all systems have dirname.
7995   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7996   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7997     # The file is in a subdirectory.
7998     test ! -d "$ac_dir" && mkdir "$ac_dir"
7999     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8000     # A "../" for each directory in $ac_dir_suffix.
8001     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8002   else
8003     ac_dir_suffix= ac_dots=
8004   fi
8005
8006   case "$ac_given_srcdir" in
8007   .)  srcdir=.
8008       if test -z "$ac_dots"; then top_srcdir=.
8009       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8010   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8011   *) # Relative path.
8012     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8013     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8014   esac
8015
8016   case "$ac_given_INSTALL" in
8017   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8018   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8019   esac
8020
8021   echo creating "$ac_file"
8022   rm -f "$ac_file"
8023   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8024   case "$ac_file" in
8025   *Makefile*) ac_comsub="1i\\
8026 # $configure_input" ;;
8027   *) ac_comsub= ;;
8028   esac
8029
8030   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8031   sed -e "$ac_comsub
8032 s%@configure_input@%$configure_input%g
8033 s%@srcdir@%$srcdir%g
8034 s%@top_srcdir@%$top_srcdir%g
8035 s%@INSTALL@%$INSTALL%g
8036 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8037 fi; done
8038 rm -f conftest.s*
8039
8040 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8041 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8042 #
8043 # ac_d sets the value in "#define NAME VALUE" lines.
8044 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8045 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8046 ac_dC='\3'
8047 ac_dD='%g'
8048 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8049 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8050 ac_uB='\([      ]\)%\1#\2define\3'
8051 ac_uC=' '
8052 ac_uD='\4%g'
8053 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8054 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8055 ac_eB='$%\1#\2define\3'
8056 ac_eC=' '
8057 ac_eD='%g'
8058
8059 if test "${CONFIG_HEADERS+set}" != set; then
8060 EOF
8061 cat >> $CONFIG_STATUS <<EOF
8062   CONFIG_HEADERS="src/include/config.h"
8063 EOF
8064 cat >> $CONFIG_STATUS <<\EOF
8065 fi
8066 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8067   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8068   case "$ac_file" in
8069   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8070        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8071   *) ac_file_in="${ac_file}.in" ;;
8072   esac
8073
8074   echo creating $ac_file
8075
8076   rm -f conftest.frag conftest.in conftest.out
8077   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8078   cat $ac_file_inputs > conftest.in
8079
8080 EOF
8081
8082 # Transform confdefs.h into a sed script conftest.vals that substitutes
8083 # the proper values into config.h.in to produce config.h.  And first:
8084 # Protect against being on the right side of a sed subst in config.status.
8085 # Protect against being in an unquoted here document in config.status.
8086 rm -f conftest.vals
8087 cat > conftest.hdr <<\EOF
8088 s/[\\&%]/\\&/g
8089 s%[\\$`]%\\&%g
8090 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8091 s%ac_d%ac_u%gp
8092 s%ac_u%ac_e%gp
8093 EOF
8094 sed -n -f conftest.hdr confdefs.h > conftest.vals
8095 rm -f conftest.hdr
8096
8097 # This sed command replaces #undef with comments.  This is necessary, for
8098 # example, in the case of _POSIX_SOURCE, which is predefined and required
8099 # on some systems where configure will not decide to define it.
8100 cat >> conftest.vals <<\EOF
8101 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8102 EOF
8103
8104 # Break up conftest.vals because some shells have a limit on
8105 # the size of here documents, and old seds have small limits too.
8106
8107 rm -f conftest.tail
8108 while :
8109 do
8110   ac_lines=`grep -c . conftest.vals`
8111   # grep -c gives empty output for an empty file on some AIX systems.
8112   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8113   # Write a limited-size here document to conftest.frag.
8114   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8115   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8116   echo 'CEOF
8117   sed -f conftest.frag conftest.in > conftest.out
8118   rm -f conftest.in
8119   mv conftest.out conftest.in
8120 ' >> $CONFIG_STATUS
8121   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8122   rm -f conftest.vals
8123   mv conftest.tail conftest.vals
8124 done
8125 rm -f conftest.vals
8126
8127 cat >> $CONFIG_STATUS <<\EOF
8128   rm -f conftest.frag conftest.h
8129   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8130   cat conftest.in >> conftest.h
8131   rm -f conftest.in
8132   if cmp -s $ac_file conftest.h 2>/dev/null; then
8133     echo "$ac_file is unchanged"
8134     rm -f conftest.h
8135   else
8136     # Remove last slash and all that follows it.  Not all systems have dirname.
8137       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8138       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8139       # The file is in a subdirectory.
8140       test ! -d "$ac_dir" && mkdir "$ac_dir"
8141     fi
8142     rm -f $ac_file
8143     mv conftest.h $ac_file
8144   fi
8145 fi; done
8146
8147 EOF
8148
8149 cat >> $CONFIG_STATUS <<EOF
8150 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}"
8151 ac_dests="src/backend/port/dynloader.c src/include/dynloader.h src/include/os.h src/Makefile.port src/backend/port/tas.s"
8152 EOF
8153
8154 cat >> $CONFIG_STATUS <<\EOF
8155 srcdir=$ac_given_srcdir
8156 while test -n "$ac_sources"; do
8157   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
8158   set $ac_sources; ac_source=$1; shift; ac_sources=$*
8159
8160   echo "linking $srcdir/$ac_source to $ac_dest"
8161
8162   if test ! -r $srcdir/$ac_source; then
8163     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
8164   fi
8165   rm -f $ac_dest
8166
8167   # Make relative symlinks.
8168   # Remove last slash and all that follows it.  Not all systems have dirname.
8169   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
8170   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
8171     # The dest file is in a subdirectory.
8172     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
8173     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
8174     # A "../" for each directory in $ac_dest_dir_suffix.
8175     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
8176   else
8177     ac_dest_dir_suffix= ac_dots=
8178   fi
8179
8180   case "$srcdir" in
8181   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
8182   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
8183   esac
8184
8185   # Make a symlink if possible; otherwise try a hard link.
8186   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
8187     ln $srcdir/$ac_source $ac_dest; then :
8188   else
8189     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
8190   fi
8191 done
8192 EOF
8193 cat >> $CONFIG_STATUS <<EOF
8194
8195 EOF
8196 cat >> $CONFIG_STATUS <<\EOF
8197 echo timestamp > src/include/stamp-h
8198
8199 exit 0
8200 EOF
8201 chmod +x $CONFIG_STATUS
8202 rm -fr confdefs* $ac_clean_files
8203 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8204