OSDN Git Service

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