]> granicus.if.org Git - postgresql/blob - src/configure
From: Bruce Stephens <bruce@cenderis.demon.co.uk>
[postgresql] / src / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/pgsql
15 ac_help="$ac_help
16   --with-includes=DIR     site header files for tk/tcl, etc in DIR"
17 ac_help="$ac_help
18   --with-libraries=DIR    site library directories for tk/tcl, etc in DIR"
19 ac_help="$ac_help
20   --enable-locale         enable locale support "
21 ac_help="$ac_help
22   --enable-recode         enable cyrillic recode support "
23 ac_help="$ac_help
24   --with-pgport=<portnum> change default startup port "
25 ac_help="$ac_help
26   --with-tcl              use tcl "
27 ac_help="$ac_help
28   --with-perl             use perl "
29 ac_help="$ac_help
30   --enable-cassert        enable assertion checks (debugging) "
31 ac_help="$ac_help
32   --with-x                use the X Window System"
33
34 # Initialize some variables set by options.
35 # The variables have the same names as the options, with
36 # dashes changed to underlines.
37 build=NONE
38 cache_file=./config.cache
39 exec_prefix=NONE
40 host=NONE
41 no_create=
42 nonopt=NONE
43 no_recursion=
44 prefix=NONE
45 program_prefix=NONE
46 program_suffix=NONE
47 program_transform_name=s,x,x,
48 silent=
49 site=
50 srcdir=
51 target=NONE
52 verbose=
53 x_includes=NONE
54 x_libraries=NONE
55 bindir='${exec_prefix}/bin'
56 sbindir='${exec_prefix}/sbin'
57 libexecdir='${exec_prefix}/libexec'
58 datadir='${prefix}/share'
59 sysconfdir='${prefix}/etc'
60 sharedstatedir='${prefix}/com'
61 localstatedir='${prefix}/var'
62 libdir='${exec_prefix}/lib'
63 includedir='${prefix}/include'
64 oldincludedir='/usr/include'
65 infodir='${prefix}/info'
66 mandir='${prefix}/man'
67
68 # Initialize some other variables.
69 subdirs=
70 MFLAGS= MAKEFLAGS=
71 # Maximum number of lines to put in a shell here document.
72 ac_max_here_lines=12
73
74 ac_prev=
75 for ac_option
76 do
77
78   # If the previous option needs an argument, assign it.
79   if test -n "$ac_prev"; then
80     eval "$ac_prev=\$ac_option"
81     ac_prev=
82     continue
83   fi
84
85   case "$ac_option" in
86   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87   *) ac_optarg= ;;
88   esac
89
90   # Accept the important Cygnus configure options, so we can diagnose typos.
91
92   case "$ac_option" in
93
94   -bindir | --bindir | --bindi | --bind | --bin | --bi)
95     ac_prev=bindir ;;
96   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
97     bindir="$ac_optarg" ;;
98
99   -build | --build | --buil | --bui | --bu)
100     ac_prev=build ;;
101   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
102     build="$ac_optarg" ;;
103
104   -cache-file | --cache-file | --cache-fil | --cache-fi \
105   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
106     ac_prev=cache_file ;;
107   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
108   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
109     cache_file="$ac_optarg" ;;
110
111   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
112     ac_prev=datadir ;;
113   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
114   | --da=*)
115     datadir="$ac_optarg" ;;
116
117   -disable-* | --disable-*)
118     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
119     # Reject names that are not valid shell variable names.
120     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
121       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122     fi
123     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124     eval "enable_${ac_feature}=no" ;;
125
126   -enable-* | --enable-*)
127     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
128     # Reject names that are not valid shell variable names.
129     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
130       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131     fi
132     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133     case "$ac_option" in
134       *=*) ;;
135       *) ac_optarg=yes ;;
136     esac
137     eval "enable_${ac_feature}='$ac_optarg'" ;;
138
139   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
140   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
141   | --exec | --exe | --ex)
142     ac_prev=exec_prefix ;;
143   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
144   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
145   | --exec=* | --exe=* | --ex=*)
146     exec_prefix="$ac_optarg" ;;
147
148   -gas | --gas | --ga | --g)
149     # Obsolete; use --with-gas.
150     with_gas=yes ;;
151
152   -help | --help | --hel | --he)
153     # Omit some internal or obsolete options to make the list less imposing.
154     # This message is too long to be a string in the A/UX 3.1 sh.
155     cat << EOF
156 Usage: configure [options] [host]
157 Options: [defaults in brackets after descriptions]
158 Configuration:
159   --cache-file=FILE       cache test results in FILE
160   --help                  print this message
161   --no-create             do not create output files
162   --quiet, --silent       do not print \`checking...' messages
163   --version               print the version of autoconf that created configure
164 Directory and file names:
165   --prefix=PREFIX         install architecture-independent files in PREFIX
166                           [$ac_default_prefix]
167   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
168                           [same as prefix]
169   --bindir=DIR            user executables in DIR [EPREFIX/bin]
170   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
171   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
172   --datadir=DIR           read-only architecture-independent data in DIR
173                           [PREFIX/share]
174   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
175   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
176                           [PREFIX/com]
177   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
178   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
179   --includedir=DIR        C header files in DIR [PREFIX/include]
180   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
181   --infodir=DIR           info documentation in DIR [PREFIX/info]
182   --mandir=DIR            man documentation in DIR [PREFIX/man]
183   --srcdir=DIR            find the sources in DIR [configure dir or ..]
184   --program-prefix=PREFIX prepend PREFIX to installed program names
185   --program-suffix=SUFFIX append SUFFIX to installed program names
186   --program-transform-name=PROGRAM
187                           run sed PROGRAM on installed program names
188 EOF
189     cat << EOF
190 Host type:
191   --build=BUILD           configure for building on BUILD [BUILD=HOST]
192   --host=HOST             configure for HOST [guessed]
193   --target=TARGET         configure for TARGET [TARGET=HOST]
194 Features and packages:
195   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
196   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
197   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
198   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
199   --x-includes=DIR        X include files are in DIR
200   --x-libraries=DIR       X library files are in DIR
201 EOF
202     if test -n "$ac_help"; then
203       echo "--enable and --with options recognized:$ac_help"
204     fi
205     exit 0 ;;
206
207   -host | --host | --hos | --ho)
208     ac_prev=host ;;
209   -host=* | --host=* | --hos=* | --ho=*)
210     host="$ac_optarg" ;;
211
212   -includedir | --includedir | --includedi | --included | --include \
213   | --includ | --inclu | --incl | --inc)
214     ac_prev=includedir ;;
215   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216   | --includ=* | --inclu=* | --incl=* | --inc=*)
217     includedir="$ac_optarg" ;;
218
219   -infodir | --infodir | --infodi | --infod | --info | --inf)
220     ac_prev=infodir ;;
221   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222     infodir="$ac_optarg" ;;
223
224   -libdir | --libdir | --libdi | --libd)
225     ac_prev=libdir ;;
226   -libdir=* | --libdir=* | --libdi=* | --libd=*)
227     libdir="$ac_optarg" ;;
228
229   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230   | --libexe | --libex | --libe)
231     ac_prev=libexecdir ;;
232   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233   | --libexe=* | --libex=* | --libe=*)
234     libexecdir="$ac_optarg" ;;
235
236   -localstatedir | --localstatedir | --localstatedi | --localstated \
237   | --localstate | --localstat | --localsta | --localst \
238   | --locals | --local | --loca | --loc | --lo)
239     ac_prev=localstatedir ;;
240   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243     localstatedir="$ac_optarg" ;;
244
245   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246     ac_prev=mandir ;;
247   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248     mandir="$ac_optarg" ;;
249
250   -nfp | --nfp | --nf)
251     # Obsolete; use --without-fp.
252     with_fp=no ;;
253
254   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255   | --no-cr | --no-c)
256     no_create=yes ;;
257
258   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260     no_recursion=yes ;;
261
262   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264   | --oldin | --oldi | --old | --ol | --o)
265     ac_prev=oldincludedir ;;
266   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269     oldincludedir="$ac_optarg" ;;
270
271   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272     ac_prev=prefix ;;
273   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274     prefix="$ac_optarg" ;;
275
276   -program-prefix | --program-prefix | --program-prefi | --program-pref \
277   | --program-pre | --program-pr | --program-p)
278     ac_prev=program_prefix ;;
279   -program-prefix=* | --program-prefix=* | --program-prefi=* \
280   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281     program_prefix="$ac_optarg" ;;
282
283   -program-suffix | --program-suffix | --program-suffi | --program-suff \
284   | --program-suf | --program-su | --program-s)
285     ac_prev=program_suffix ;;
286   -program-suffix=* | --program-suffix=* | --program-suffi=* \
287   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288     program_suffix="$ac_optarg" ;;
289
290   -program-transform-name | --program-transform-name \
291   | --program-transform-nam | --program-transform-na \
292   | --program-transform-n | --program-transform- \
293   | --program-transform | --program-transfor \
294   | --program-transfo | --program-transf \
295   | --program-trans | --program-tran \
296   | --progr-tra | --program-tr | --program-t)
297     ac_prev=program_transform_name ;;
298   -program-transform-name=* | --program-transform-name=* \
299   | --program-transform-nam=* | --program-transform-na=* \
300   | --program-transform-n=* | --program-transform-=* \
301   | --program-transform=* | --program-transfor=* \
302   | --program-transfo=* | --program-transf=* \
303   | --program-trans=* | --program-tran=* \
304   | --progr-tra=* | --program-tr=* | --program-t=*)
305     program_transform_name="$ac_optarg" ;;
306
307   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308   | -silent | --silent | --silen | --sile | --sil)
309     silent=yes ;;
310
311   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312     ac_prev=sbindir ;;
313   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314   | --sbi=* | --sb=*)
315     sbindir="$ac_optarg" ;;
316
317   -sharedstatedir | --sharedstatedir | --sharedstatedi \
318   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319   | --sharedst | --shareds | --shared | --share | --shar \
320   | --sha | --sh)
321     ac_prev=sharedstatedir ;;
322   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325   | --sha=* | --sh=*)
326     sharedstatedir="$ac_optarg" ;;
327
328   -site | --site | --sit)
329     ac_prev=site ;;
330   -site=* | --site=* | --sit=*)
331     site="$ac_optarg" ;;
332
333   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334     ac_prev=srcdir ;;
335   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336     srcdir="$ac_optarg" ;;
337
338   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339   | --syscon | --sysco | --sysc | --sys | --sy)
340     ac_prev=sysconfdir ;;
341   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343     sysconfdir="$ac_optarg" ;;
344
345   -target | --target | --targe | --targ | --tar | --ta | --t)
346     ac_prev=target ;;
347   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348     target="$ac_optarg" ;;
349
350   -v | -verbose | --verbose | --verbos | --verbo | --verb)
351     verbose=yes ;;
352
353   -version | --version | --versio | --versi | --vers)
354     echo "configure generated by autoconf version 2.12"
355     exit 0 ;;
356
357   -with-* | --with-*)
358     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
359     # Reject names that are not valid shell variable names.
360     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
361       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362     fi
363     ac_package=`echo $ac_package| sed 's/-/_/g'`
364     case "$ac_option" in
365       *=*) ;;
366       *) ac_optarg=yes ;;
367     esac
368     eval "with_${ac_package}='$ac_optarg'" ;;
369
370   -without-* | --without-*)
371     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
372     # Reject names that are not valid shell variable names.
373     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
374       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375     fi
376     ac_package=`echo $ac_package| sed 's/-/_/g'`
377     eval "with_${ac_package}=no" ;;
378
379   --x)
380     # Obsolete; use --with-x.
381     with_x=yes ;;
382
383   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384   | --x-incl | --x-inc | --x-in | --x-i)
385     ac_prev=x_includes ;;
386   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388     x_includes="$ac_optarg" ;;
389
390   -x-libraries | --x-libraries | --x-librarie | --x-librari \
391   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392     ac_prev=x_libraries ;;
393   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395     x_libraries="$ac_optarg" ;;
396
397   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398     ;;
399
400   *)
401     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402       echo "configure: warning: $ac_option: invalid host type" 1>&2
403     fi
404     if test "x$nonopt" != xNONE; then
405       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406     fi
407     nonopt="$ac_option"
408     ;;
409
410   esac
411 done
412
413 if test -n "$ac_prev"; then
414   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415 fi
416
417 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419 # File descriptor usage:
420 # 0 standard input
421 # 1 file creation
422 # 2 errors and warnings
423 # 3 some systems may open it to /dev/tty
424 # 4 used on the Kubota Titan
425 # 6 checking for... messages and results
426 # 5 compiler messages saved in config.log
427 if test "$silent" = yes; then
428   exec 6>/dev/null
429 else
430   exec 6>&1
431 fi
432 exec 5>./config.log
433
434 echo "\
435 This file contains any messages produced by compilers while
436 running configure, to aid debugging if configure makes a mistake.
437 " 1>&5
438
439 # Strip out --no-create and --no-recursion so they do not pile up.
440 # Also quote any args containing shell metacharacters.
441 ac_configure_args=
442 for ac_arg
443 do
444   case "$ac_arg" in
445   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446   | --no-cr | --no-c) ;;
447   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452   esac
453 done
454
455 # NLS nuisances.
456 # Only set these to C if already set.  These must not be set unconditionally
457 # because not all systems understand e.g. LANG=C (notably SCO).
458 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459 # Non-C LC_CTYPE values break the ctype check.
460 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
461 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
464
465 # confdefs.h avoids OS command line length limits that DEFS can exceed.
466 rm -rf conftest* confdefs.h
467 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
468 echo > confdefs.h
469
470 # A filename unique to this package, relative to the directory that
471 # configure is in, which we can look for to find out if srcdir is correct.
472 ac_unique_file=backend/access/common/heaptuple.c
473
474 # Find the source files, if location was not specified.
475 if test -z "$srcdir"; then
476   ac_srcdir_defaulted=yes
477   # Try the directory containing this script, then its parent.
478   ac_prog=$0
479   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481   srcdir=$ac_confdir
482   if test ! -r $srcdir/$ac_unique_file; then
483     srcdir=..
484   fi
485 else
486   ac_srcdir_defaulted=no
487 fi
488 if test ! -r $srcdir/$ac_unique_file; then
489   if test "$ac_srcdir_defaulted" = yes; then
490     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491   else
492     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493   fi
494 fi
495 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497 # Prefer explicitly selected file to automatically selected ones.
498 if test -z "$CONFIG_SITE"; then
499   if test "x$prefix" != xNONE; then
500     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
501   else
502     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
503   fi
504 fi
505 for ac_site_file in $CONFIG_SITE; do
506   if test -r "$ac_site_file"; then
507     echo "loading site script $ac_site_file"
508     . "$ac_site_file"
509   fi
510 done
511
512 if test -r "$cache_file"; then
513   echo "loading cache $cache_file"
514   . $cache_file
515 else
516   echo "creating cache $cache_file"
517   > $cache_file
518 fi
519
520 ac_ext=c
521 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
522 ac_cpp='$CPP $CPPFLAGS'
523 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
524 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
525 cross_compiling=$ac_cv_prog_cc_cross
526
527 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
528   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
529   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530     ac_n= ac_c='
531 ' ac_t='        '
532   else
533     ac_n=-n ac_c= ac_t=
534   fi
535 else
536   ac_n= ac_c='\c' ac_t=
537 fi
538
539
540
541
542 ac_aux_dir=
543 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
544   if test -f $ac_dir/install-sh; then
545     ac_aux_dir=$ac_dir
546     ac_install_sh="$ac_aux_dir/install-sh -c"
547     break
548   elif test -f $ac_dir/install.sh; then
549     ac_aux_dir=$ac_dir
550     ac_install_sh="$ac_aux_dir/install.sh -c"
551     break
552   fi
553 done
554 if test -z "$ac_aux_dir"; then
555   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
556 fi
557 ac_config_guess=$ac_aux_dir/config.guess
558 ac_config_sub=$ac_aux_dir/config.sub
559 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
560
561
562 # Make sure we can run config.sub.
563 if $ac_config_sub sun4 >/dev/null 2>&1; then :
564 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
565 fi
566
567 echo $ac_n "checking host system type""... $ac_c" 1>&6
568 echo "configure:569: checking host system type" >&5
569
570 host_alias=$host
571 case "$host_alias" in
572 NONE)
573   case $nonopt in
574   NONE)
575     if host_alias=`$ac_config_guess`; then :
576     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
577     fi ;;
578   *) host_alias=$nonopt ;;
579   esac ;;
580 esac
581
582 host=`$ac_config_sub $host_alias`
583 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
584 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
585 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
586 echo "$ac_t""$host" 1>&6
587
588
589 tas_file=dummy.s
590 case "$host_os" in
591  solaris*)
592         case "$host_cpu" in
593           sparc) os=sparc_solaris need_tas=yes tas_file=sparc_solaris.s ;;
594            i386) os=i386_solaris need_tas=yes tas_file=i386_solaris.s ;;
595         esac ;;
596    sunos*) os=sunos4 need_tas=no ;;
597      aux*) os=aux need_tas=no ;;
598    linux*) os=linux need_tas=no ;;
599     bsdi*) os=bsdi need_tas=no ;;
600  freebsd*|netbsd*|openbsd*) os=bsd need_tas=no ;;
601     dgux*) os=dgux need_tas=no ;;
602      aix*) os=aix need_tas=no ;;
603 nextstep*) os=nextstep need_tas=no ;;
604   ultrix*) os=ultrix4 need_tas=no ;;
605     irix*) os=irix5 need_tas=no ;;
606     hpux*) os=hpux need_tas=yes tas_file=hpux.s ;;
607      osf*) os=alpha need_tas=no ;;
608      sco*) os=sco need_tas=no ;;
609  machten*) os=machten need_tas=no ;;
610   cygwin*) os=win need_tas=no ;;
611  sysv4.2*)
612        case "$host_vendor" in
613                univel) os=univel need_tas=no ;;
614                     *) os=unknown need_tas=no ;;
615        esac ;;
616    sysv4*) os=svr4 need_tas=no ;;
617 *) echo ""
618    echo "*************************************************************"
619    echo "configure does not currently recognize your operating system,"
620    echo "therefore you must do a manual configuration of:"
621    echo "$host_os"
622    echo "Please contact scrappy@hub.org to see about rectifying this, "
623    echo "including the above 'checking host system type...' line "
624    echo "*************************************************************"
625    echo ""
626    exit;;
627 esac
628
629 if test "X$need_tas" = "Xyes"
630 then
631         
632         TAS=tas.o
633         
634 fi
635
636 PORTNAME=${os}
637
638
639
640
641
642
643
644 echo "checking echo setting..."
645 if echo '\c' | grep -s c >/dev/null 2>&1
646 then
647         ECHO_N="echo -n"
648         ECHO_C=""
649 else
650         ECHO_N="echo"
651         ECHO_C='\c'
652 fi
653
654 cat <<EOT
655 **************************************************************
656         PostreSQL v6.3.2 Installation Program
657
658 Welcome to the new improved PostgreSQL installation program.
659 This configuration program is for version 6.3.2 of the
660 PostgreSQL software.
661
662 EOT
663
664
665 if test "X$with_template" != "X"
666 then
667         TEMPLATE=template/$with_template
668 else
669         TEMPLATE=DO_NOT_CHANGE_THIS_INVALID_FILENAME
670 fi
671
672 if test ! -f $TEMPLATE
673 then
674         cat <<EOT
675 Please select a template from the ones listed below.  If no
676 template is available, then select the 'generic' one and
677 consider emailling scrappy@hub.org with the above line which
678 starts 'checking host system type...'
679 **************************************************************
680 EOT
681         TEMPLATE=generic
682         GUESS=`grep "^$host_no_ver=" template/.similar 2>/dev/null`
683         if test ! "$GUESS"
684         then    host_no_ver=`echo "$host" | sed 's/[0-9.]*$//'`
685                 GUESS=`grep "$host_no_ver" template/.similar 2>/dev/null`
686         fi
687         if test "$GUESS"
688         then
689                 TEMPLATE=`echo $GUESS | sed 's/.*=//'`
690         fi
691         export TEMPLATE
692         ls template
693         echo "**************************************************************"
694         $ECHO_N "Appropriate template file { $TEMPLATE }: $ECHO_C"
695         read a
696         if test "$a." != "."
697         then
698                 TEMPLATE=$a
699         fi
700         if test ! -f template/$TEMPLATE
701         then
702                 echo "You must choose an appropriate template file."
703                 exit
704         fi
705         TEMPLATE=template/$TEMPLATE
706 fi
707 export TEMPLATE
708 echo ""
709
710 AROPT=`grep '^AROPT:' $TEMPLATE | awk -F: '{print $2}'`
711 SHARED_LIB=`grep '^SHARED_LIB:' $TEMPLATE | awk -F: '{print $2}'`
712 CFLAGS=`grep '^CFLAGS:' $TEMPLATE | awk -F: '{print $2}'`
713 SRCH_INC=`grep '^SRCH_INC:' $TEMPLATE | awk -F: '{print $2}'`
714 SRCH_LIB=`grep '^SRCH_LIB:' $TEMPLATE | awk -F: '{print $2}'`
715 USE_LOCALE=`grep '^USE_LOCALE:' $TEMPLATE | awk -F: '{print $2}'`
716 DLSUFFIX=`grep '^DLSUFFIX:' $TEMPLATE | awk -F: '{print $2}'`
717 DL_LIB=`grep '^DL_LIB:' $TEMPLATE | awk -F: '{print $2}'`
718 YACC=`grep '^YACC:' $TEMPLATE | awk -F: '{print $2}'`
719 YFLAGS=`grep '^YFLAGS:' $TEMPLATE | awk -F: '{print $2}'`
720 CC=`grep '^CC:' $TEMPLATE | awk -F: '{print $2}'`
721 LIBS=`grep '^LIBS:' $TEMPLATE | awk -F: '{print $2}'`
722
723
724 # Check whether --with-includes or --without-includes was given.
725 if test "${with_includes+set}" = set; then
726   withval="$with_includes"
727   
728         case "$withval" in
729         "" | y | ye | yes | n | no)
730             { echo "configure: error: *** You must supply an argument to the --with-includes option." 1>&2; exit 1; }
731           ;;
732         esac
733         INCLUDE_DIRS="$withval"
734     
735 fi
736
737
738 if test "$INCLUDE_DIRS"; then
739         for dir in $INCLUDE_DIRS; do
740                 if test -d "$dir"; then
741                         PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir"
742                 else
743                         echo "configure: warning: *** Include directory $dir does not exist." 1>&2
744                 fi
745         done
746 fi
747
748 # Check whether --with-libraries or --without-libraries was given.
749 if test "${with_libraries+set}" = set; then
750   withval="$with_libraries"
751   
752         case "$withval" in
753         "" | y | ye | yes | n | no)
754             { echo "configure: error: *** You must supply an argument to the --with-libraries option." 1>&2; exit 1; }
755           ;;
756         esac
757         LIBRARY_DIRS="$withval"
758     
759 fi
760
761
762 if test "$LIBRARY_DIRS"; then
763         for dir in $withval; do
764                 if test -d "$dir"; then
765                         PGSQL_LDFLAGS="$PGSQL_LDFLAGS -L$dir"
766                 else
767                         echo "configure: warning: *** Library directory $dir does not exist." 1>&2
768                 fi
769         done
770 fi
771
772 echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
773 echo "configure:774: checking setting USE_LOCALE" >&5
774 # Check whether --enable-locale or --disable-locale was given.
775 if test "${enable_locale+set}" = set; then
776   enableval="$enable_locale"
777   cat >> confdefs.h <<\EOF
778 #define USE_LOCALE 1
779 EOF
780  echo "$ac_t""enabled" 1>&6
781 else
782   echo "$ac_t""disabled" 1>&6
783
784 fi
785
786
787 echo $ac_n "checking setting CYR_RECODE""... $ac_c" 1>&6
788 echo "configure:789: checking setting CYR_RECODE" >&5
789 # Check whether --enable-recode or --disable-recode was given.
790 if test "${enable_recode+set}" = set; then
791   enableval="$enable_recode"
792   cat >> confdefs.h <<\EOF
793 #define CYR_RECODE 1
794 EOF
795  echo "$ac_t""enabled" 1>&6
796 else
797   echo "$ac_t""disabled" 1>&6
798
799 fi
800
801
802 echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
803 echo "configure:804: checking setting DEF_PGPORT" >&5
804 # Check whether --with-pgport or --without-pgport was given.
805 if test "${with_pgport+set}" = set; then
806   withval="$with_pgport"
807   cat >> confdefs.h <<EOF
808 #define DEF_PGPORT "${withval}"
809 EOF
810  echo "$ac_t""$with_pgport" 1>&6
811 else
812   cat >> confdefs.h <<EOF
813 #define DEF_PGPORT "5432"
814 EOF
815  echo "$ac_t""5432" 1>&6
816
817 fi
818
819
820 echo $ac_n "checking setting USE_TCL""... $ac_c" 1>&6
821 echo "configure:822: checking setting USE_TCL" >&5
822 # Check whether --with-tcl or --without-tcl was given.
823 if test "${with_tcl+set}" = set; then
824   withval="$with_tcl"
825   USE_TCL=true; echo "$ac_t""enabled" 1>&6
826 else
827   USE_TCL=false; echo "$ac_t""disabled" 1>&6
828
829 fi
830
831
832 if test "$USE_TCL"; then
833         header_dirs="/usr/include $INCLUDE_DIRS"
834         tcl_dirs="tcl8.0 tcl80 tcl7.6 tcl76"
835         tk_dirs="tk8.0 tk4.2"
836         for dir in $header_dirs; do
837                 for tcl_dir in $tcl_dirs; do
838                         if test -d "$dir/$tcl_dir"; then
839                                 PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tcl_dir"
840                         fi
841                 done
842         done
843         for dir in $header_dirs; do
844                 for tk_dir in $tk_dirs; do
845                         if test -d "$dir/$tk_dir"; then
846                         PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tk_dir"
847                         fi
848                 done
849         done
850 fi
851 export USE_TCL
852 USE_X=$USE_TCL
853
854 echo $ac_n "checking setting USE_PERL""... $ac_c" 1>&6
855 echo "configure:856: checking setting USE_PERL" >&5
856 # Check whether --with-perl or --without-perl was given.
857 if test "${with_perl+set}" = set; then
858   withval="$with_perl"
859   USE_PERL=true; echo "$ac_t""enabled" 1>&6
860 else
861   USE_PERL=false; echo "$ac_t""disabled" 1>&6
862
863 fi
864
865
866 if test "$USE_PERL" = "true"; then
867         if test ! -x $prefix/bin/postgres; then
868                 echo "configure: warning: perl support disabled; postgres not previously installed" 1>&2
869                 USE_PERL=
870         fi
871 fi
872 export USE_PERL
873
874 echo $ac_n "checking setting ASSERT CHECKING""... $ac_c" 1>&6
875 echo "configure:876: checking setting ASSERT CHECKING" >&5
876 # Check whether --enable-cassert or --disable-cassert was given.
877 if test "${enable_cassert+set}" = set; then
878   enableval="$enable_cassert"
879   cat >> confdefs.h <<\EOF
880 #define USE_ASSERT_CHECKING 1
881 EOF
882  echo "$ac_t""enabled" 1>&6
883 else
884   echo "$ac_t""disabled" 1>&6
885
886 fi
887
888
889 if test "X$with_compiler" != "X"
890 then
891         CC=$with_compiler
892 else
893         # Extract the first word of "gcc", so it can be a program name with args.
894 set dummy gcc; ac_word=$2
895 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
896 echo "configure:897: checking for $ac_word" >&5
897 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
898   echo $ac_n "(cached) $ac_c" 1>&6
899 else
900   if test -n "$CC"; then
901   ac_cv_prog_CC="$CC" # Let the user override the test.
902 else
903   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
904   for ac_dir in $PATH; do
905     test -z "$ac_dir" && ac_dir=.
906     if test -f $ac_dir/$ac_word; then
907       ac_cv_prog_CC="gcc"
908       break
909     fi
910   done
911   IFS="$ac_save_ifs"
912 fi
913 fi
914 CC="$ac_cv_prog_CC"
915 if test -n "$CC"; then
916   echo "$ac_t""$CC" 1>&6
917 else
918   echo "$ac_t""no" 1>&6
919 fi
920
921 if test -z "$CC"; then
922   # Extract the first word of "cc", so it can be a program name with args.
923 set dummy cc; ac_word=$2
924 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
925 echo "configure:926: checking for $ac_word" >&5
926 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
927   echo $ac_n "(cached) $ac_c" 1>&6
928 else
929   if test -n "$CC"; then
930   ac_cv_prog_CC="$CC" # Let the user override the test.
931 else
932   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
933   ac_prog_rejected=no
934   for ac_dir in $PATH; do
935     test -z "$ac_dir" && ac_dir=.
936     if test -f $ac_dir/$ac_word; then
937       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
938         ac_prog_rejected=yes
939         continue
940       fi
941       ac_cv_prog_CC="cc"
942       break
943     fi
944   done
945   IFS="$ac_save_ifs"
946 if test $ac_prog_rejected = yes; then
947   # We found a bogon in the path, so make sure we never use it.
948   set dummy $ac_cv_prog_CC
949   shift
950   if test $# -gt 0; then
951     # We chose a different compiler from the bogus one.
952     # However, it has the same basename, so the bogon will be chosen
953     # first if we set CC to just the basename; use the full file name.
954     shift
955     set dummy "$ac_dir/$ac_word" "$@"
956     shift
957     ac_cv_prog_CC="$@"
958   fi
959 fi
960 fi
961 fi
962 CC="$ac_cv_prog_CC"
963 if test -n "$CC"; then
964   echo "$ac_t""$CC" 1>&6
965 else
966   echo "$ac_t""no" 1>&6
967 fi
968
969   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
970 fi
971
972 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
973 echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
974
975 ac_ext=c
976 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
977 ac_cpp='$CPP $CPPFLAGS'
978 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
979 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
980 cross_compiling=$ac_cv_prog_cc_cross
981
982 cat > conftest.$ac_ext <<EOF
983 #line 984 "configure"
984 #include "confdefs.h"
985 main(){return(0);}
986 EOF
987 if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
988   ac_cv_prog_cc_works=yes
989   # If we can't run a trivial program, we are probably using a cross compiler.
990   if (./conftest; exit) 2>/dev/null; then
991     ac_cv_prog_cc_cross=no
992   else
993     ac_cv_prog_cc_cross=yes
994   fi
995 else
996   echo "configure: failed program was:" >&5
997   cat conftest.$ac_ext >&5
998   ac_cv_prog_cc_works=no
999 fi
1000 rm -fr conftest*
1001
1002 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003 if test $ac_cv_prog_cc_works = no; then
1004   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1005 fi
1006 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1008 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009 cross_compiling=$ac_cv_prog_cc_cross
1010
1011 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1012 echo "configure:1013: checking whether we are using GNU C" >&5
1013 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1014   echo $ac_n "(cached) $ac_c" 1>&6
1015 else
1016   cat > conftest.c <<EOF
1017 #ifdef __GNUC__
1018   yes;
1019 #endif
1020 EOF
1021 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1022   ac_cv_prog_gcc=yes
1023 else
1024   ac_cv_prog_gcc=no
1025 fi
1026 fi
1027
1028 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1029
1030 if test $ac_cv_prog_gcc = yes; then
1031   GCC=yes
1032   ac_test_CFLAGS="${CFLAGS+set}"
1033   ac_save_CFLAGS="$CFLAGS"
1034   CFLAGS=
1035   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1036 echo "configure:1037: checking whether ${CC-cc} accepts -g" >&5
1037 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040   echo 'void f(){}' > conftest.c
1041 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1042   ac_cv_prog_cc_g=yes
1043 else
1044   ac_cv_prog_cc_g=no
1045 fi
1046 rm -f conftest*
1047
1048 fi
1049
1050 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1051   if test "$ac_test_CFLAGS" = set; then
1052     CFLAGS="$ac_save_CFLAGS"
1053   elif test $ac_cv_prog_cc_g = yes; then
1054     CFLAGS="-g -O2"
1055   else
1056     CFLAGS="-O2"
1057   fi
1058 else
1059   GCC=
1060   test "${CFLAGS+set}" = set || CFLAGS="-g"
1061 fi
1062
1063 fi
1064
1065 CPPFLAGS="$CPPFLAGS $PGSQL_CPPFLAGS"
1066 export CPPFLAGS
1067 echo "- setting CPPFLAGS=$CPPFLAGS"
1068
1069 LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
1070 export LDFLAGS
1071 echo "- setting LDFLAGS=$LDFLAGS"
1072
1073
1074
1075 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1076 echo "configure:1077: checking how to run the C preprocessor" >&5
1077 # On Suns, sometimes $CPP names a directory.
1078 if test -n "$CPP" && test -d "$CPP"; then
1079   CPP=
1080 fi
1081 if test -z "$CPP"; then
1082 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1083   echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085     # This must be in double quotes, not single quotes, because CPP may get
1086   # substituted into the Makefile and "${CC-cc}" will confuse make.
1087   CPP="${CC-cc} -E"
1088   # On the NeXT, cc -E runs the code through the compiler's parser,
1089   # not just through cpp.
1090   cat > conftest.$ac_ext <<EOF
1091 #line 1092 "configure"
1092 #include "confdefs.h"
1093 #include <assert.h>
1094 Syntax Error
1095 EOF
1096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1097 { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1098 ac_err=`grep -v '^ *+' conftest.out`
1099 if test -z "$ac_err"; then
1100   :
1101 else
1102   echo "$ac_err" >&5
1103   echo "configure: failed program was:" >&5
1104   cat conftest.$ac_ext >&5
1105   rm -rf conftest*
1106   CPP="${CC-cc} -E -traditional-cpp"
1107   cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 #include <assert.h>
1111 Syntax Error
1112 EOF
1113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1114 { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1115 ac_err=`grep -v '^ *+' conftest.out`
1116 if test -z "$ac_err"; then
1117   :
1118 else
1119   echo "$ac_err" >&5
1120   echo "configure: failed program was:" >&5
1121   cat conftest.$ac_ext >&5
1122   rm -rf conftest*
1123   CPP=/lib/cpp
1124 fi
1125 rm -f conftest*
1126 fi
1127 rm -f conftest*
1128   ac_cv_prog_CPP="$CPP"
1129 fi
1130   CPP="$ac_cv_prog_CPP"
1131 else
1132   ac_cv_prog_CPP="$CPP"
1133 fi
1134 echo "$ac_t""$CPP" 1>&6
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148 HAVECXX='HAVE_Cplusplus=false'
1149
1150 INSTALLPATH="/usr/ucb:$PATH"
1151 for ac_prog in ginstall installbsd bsdinst scoinst install
1152 do
1153 # Extract the first word of "$ac_prog", so it can be a program name with args.
1154 set dummy $ac_prog; ac_word=$2
1155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1156 echo "configure:1157: checking for $ac_word" >&5
1157 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   case "$INSTALL" in
1161   /*)
1162   ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
1163   ;;
1164   *)
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1166   for ac_dir in $INSTALLPATH$ac_dummy; do
1167     test -z "$ac_dir" && ac_dir=.
1168     if test -f $ac_dir/$ac_word; then
1169       ac_cv_path_INSTALL="$ac_dir/$ac_word"
1170       break
1171     fi
1172   done
1173   IFS="$ac_save_ifs"
1174   ;;
1175 esac
1176 fi
1177 INSTALL="$ac_cv_path_INSTALL"
1178 if test -n "$INSTALL"; then
1179   echo "$ac_t""$INSTALL" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$INSTALL" && break
1185 done
1186 test -n "$INSTALL" || INSTALL="NONE"
1187
1188 if test $INSTALL = "NONE"
1189 then
1190         echo "- No Install Script found - aborting."
1191         exit 0;
1192 fi
1193
1194 INSTLOPTS="-m 444"
1195 INSTL_EXE_OPTS="-m 555"
1196 INSTL_LIB_OPTS="-m 644"
1197
1198 case "`basename $INSTALL`" in
1199  install|installbsd|scoinst)
1200         INSTLOPTS="-c $INSTLOPTS"
1201         INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
1202         INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS";;
1203 esac
1204
1205 echo "- Using $INSTALL"
1206
1207
1208
1209
1210
1211 ECHO_N_OUT=`echo -n "" | wc -c`
1212 ECHO_C_OUT=`echo "\c" | wc -c`
1213 if test "$ECHO_N_OUT" -eq 0; then
1214         DASH_N='-n'
1215         BACKSLASH_C=
1216 else
1217         if test "ECHO_C_OUT" -eq 0; then
1218                 DASH_N=
1219                 BACKSLASH_C='\\\\c'
1220         else
1221                 { echo "configure: error: "echo behaviour undetermined"" 1>&2; exit 1; }
1222         fi
1223 fi
1224
1225
1226
1227 # Extract the first word of "flex", so it can be a program name with args.
1228 set dummy flex; ac_word=$2
1229 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1230 echo "configure:1231: checking for $ac_word" >&5
1231 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1232   echo $ac_n "(cached) $ac_c" 1>&6
1233 else
1234   if test -n "$LEX"; then
1235   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1236 else
1237   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1238   for ac_dir in $PATH; do
1239     test -z "$ac_dir" && ac_dir=.
1240     if test -f $ac_dir/$ac_word; then
1241       ac_cv_prog_LEX="flex"
1242       break
1243     fi
1244   done
1245   IFS="$ac_save_ifs"
1246   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1247 fi
1248 fi
1249 LEX="$ac_cv_prog_LEX"
1250 if test -n "$LEX"; then
1251   echo "$ac_t""$LEX" 1>&6
1252 else
1253   echo "$ac_t""no" 1>&6
1254 fi
1255
1256 if test -z "$LEXLIB"
1257 then
1258   case "$LEX" in
1259   flex*) ac_lib=fl ;;
1260   *) ac_lib=l ;;
1261   esac
1262   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1263 echo "configure:1264: checking for yywrap in -l$ac_lib" >&5
1264 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1266   echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268   ac_save_LIBS="$LIBS"
1269 LIBS="-l$ac_lib  $LIBS"
1270 cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 /* Override any gcc2 internal prototype to avoid an error.  */
1274 /* We use char because int might match the return type of a gcc2
1275     builtin and then its argument prototype would still apply.  */
1276 char yywrap();
1277
1278 int main() {
1279 yywrap()
1280 ; return 0; }
1281 EOF
1282 if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1283   rm -rf conftest*
1284   eval "ac_cv_lib_$ac_lib_var=yes"
1285 else
1286   echo "configure: failed program was:" >&5
1287   cat conftest.$ac_ext >&5
1288   rm -rf conftest*
1289   eval "ac_cv_lib_$ac_lib_var=no"
1290 fi
1291 rm -f conftest*
1292 LIBS="$ac_save_LIBS"
1293
1294 fi
1295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1296   echo "$ac_t""yes" 1>&6
1297   LEXLIB="-l$ac_lib"
1298 else
1299   echo "$ac_t""no" 1>&6
1300 fi
1301
1302 fi
1303
1304 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1305 echo "configure:1306: checking whether ln -s works" >&5
1306 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   rm -f conftestdata
1310 if ln -s X conftestdata 2>/dev/null
1311 then
1312   rm -f conftestdata
1313   ac_cv_prog_LN_S="ln -s"
1314 else
1315   ac_cv_prog_LN_S=ln
1316 fi
1317 fi
1318 LN_S="$ac_cv_prog_LN_S"
1319 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1320   echo "$ac_t""yes" 1>&6
1321 else
1322   echo "$ac_t""no" 1>&6
1323 fi
1324
1325 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1326 echo "configure:1327: checking whether ${MAKE-make} sets \${MAKE}" >&5
1327 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1328 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1329   echo $ac_n "(cached) $ac_c" 1>&6
1330 else
1331   cat > conftestmake <<\EOF
1332 all:
1333         @echo 'ac_maketemp="${MAKE}"'
1334 EOF
1335 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1336 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1337 if test -n "$ac_maketemp"; then
1338   eval ac_cv_prog_make_${ac_make}_set=yes
1339 else
1340   eval ac_cv_prog_make_${ac_make}_set=no
1341 fi
1342 rm -f conftestmake
1343 fi
1344 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1345   echo "$ac_t""yes" 1>&6
1346   SET_MAKE=
1347 else
1348   echo "$ac_t""no" 1>&6
1349   SET_MAKE="MAKE=${MAKE-make}"
1350 fi
1351
1352 # Extract the first word of "ranlib", so it can be a program name with args.
1353 set dummy ranlib; ac_word=$2
1354 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1355 echo "configure:1356: checking for $ac_word" >&5
1356 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1357   echo $ac_n "(cached) $ac_c" 1>&6
1358 else
1359   if test -n "$RANLIB"; then
1360   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1361 else
1362   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1363   for ac_dir in $PATH; do
1364     test -z "$ac_dir" && ac_dir=.
1365     if test -f $ac_dir/$ac_word; then
1366       ac_cv_prog_RANLIB="ranlib"
1367       break
1368     fi
1369   done
1370   IFS="$ac_save_ifs"
1371   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1372 fi
1373 fi
1374 RANLIB="$ac_cv_prog_RANLIB"
1375 if test -n "$RANLIB"; then
1376   echo "$ac_t""$RANLIB" 1>&6
1377 else
1378   echo "$ac_t""no" 1>&6
1379 fi
1380
1381 # Extract the first word of "find", so it can be a program name with args.
1382 set dummy find; ac_word=$2
1383 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1384 echo "configure:1385: checking for $ac_word" >&5
1385 if eval "test \"`echo '$''{'ac_cv_path_find'+set}'`\" = set"; then
1386   echo $ac_n "(cached) $ac_c" 1>&6
1387 else
1388   case "$find" in
1389   /*)
1390   ac_cv_path_find="$find" # Let the user override the test with a path.
1391   ;;
1392   *)
1393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1394   for ac_dir in $PATH; do
1395     test -z "$ac_dir" && ac_dir=.
1396     if test -f $ac_dir/$ac_word; then
1397       ac_cv_path_find="$ac_dir/$ac_word"
1398       break
1399     fi
1400   done
1401   IFS="$ac_save_ifs"
1402   ;;
1403 esac
1404 fi
1405 find="$ac_cv_path_find"
1406 if test -n "$find"; then
1407   echo "$ac_t""$find" 1>&6
1408 else
1409   echo "$ac_t""no" 1>&6
1410 fi
1411
1412 # Extract the first word of "tar", so it can be a program name with args.
1413 set dummy tar; ac_word=$2
1414 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1415 echo "configure:1416: checking for $ac_word" >&5
1416 if eval "test \"`echo '$''{'ac_cv_path_tar'+set}'`\" = set"; then
1417   echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419   case "$tar" in
1420   /*)
1421   ac_cv_path_tar="$tar" # Let the user override the test with a path.
1422   ;;
1423   *)
1424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1425   for ac_dir in $PATH; do
1426     test -z "$ac_dir" && ac_dir=.
1427     if test -f $ac_dir/$ac_word; then
1428       ac_cv_path_tar="$ac_dir/$ac_word"
1429       break
1430     fi
1431   done
1432   IFS="$ac_save_ifs"
1433   ;;
1434 esac
1435 fi
1436 tar="$ac_cv_path_tar"
1437 if test -n "$tar"; then
1438   echo "$ac_t""$tar" 1>&6
1439 else
1440   echo "$ac_t""no" 1>&6
1441 fi
1442
1443 # Extract the first word of "split", so it can be a program name with args.
1444 set dummy split; ac_word=$2
1445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1446 echo "configure:1447: checking for $ac_word" >&5
1447 if eval "test \"`echo '$''{'ac_cv_path_split'+set}'`\" = set"; then
1448   echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450   case "$split" in
1451   /*)
1452   ac_cv_path_split="$split" # Let the user override the test with a path.
1453   ;;
1454   *)
1455   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1456   for ac_dir in $PATH; do
1457     test -z "$ac_dir" && ac_dir=.
1458     if test -f $ac_dir/$ac_word; then
1459       ac_cv_path_split="$ac_dir/$ac_word"
1460       break
1461     fi
1462   done
1463   IFS="$ac_save_ifs"
1464   ;;
1465 esac
1466 fi
1467 split="$ac_cv_path_split"
1468 if test -n "$split"; then
1469   echo "$ac_t""$split" 1>&6
1470 else
1471   echo "$ac_t""no" 1>&6
1472 fi
1473
1474 # Extract the first word of "etags", so it can be a program name with args.
1475 set dummy etags; ac_word=$2
1476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1477 echo "configure:1478: checking for $ac_word" >&5
1478 if eval "test \"`echo '$''{'ac_cv_path_etags'+set}'`\" = set"; then
1479   echo $ac_n "(cached) $ac_c" 1>&6
1480 else
1481   case "$etags" in
1482   /*)
1483   ac_cv_path_etags="$etags" # Let the user override the test with a path.
1484   ;;
1485   *)
1486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1487   for ac_dir in $PATH; do
1488     test -z "$ac_dir" && ac_dir=.
1489     if test -f $ac_dir/$ac_word; then
1490       ac_cv_path_etags="$ac_dir/$ac_word"
1491       break
1492     fi
1493   done
1494   IFS="$ac_save_ifs"
1495   ;;
1496 esac
1497 fi
1498 etags="$ac_cv_path_etags"
1499 if test -n "$etags"; then
1500   echo "$ac_t""$etags" 1>&6
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504
1505 # Extract the first word of "xargs", so it can be a program name with args.
1506 set dummy xargs; ac_word=$2
1507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1508 echo "configure:1509: checking for $ac_word" >&5
1509 if eval "test \"`echo '$''{'ac_cv_path_xargs'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   case "$xargs" in
1513   /*)
1514   ac_cv_path_xargs="$xargs" # Let the user override the test with a path.
1515   ;;
1516   *)
1517   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1518   for ac_dir in $PATH; do
1519     test -z "$ac_dir" && ac_dir=.
1520     if test -f $ac_dir/$ac_word; then
1521       ac_cv_path_xargs="$ac_dir/$ac_word"
1522       break
1523     fi
1524   done
1525   IFS="$ac_save_ifs"
1526   ;;
1527 esac
1528 fi
1529 xargs="$ac_cv_path_xargs"
1530 if test -n "$xargs"; then
1531   echo "$ac_t""$xargs" 1>&6
1532 else
1533   echo "$ac_t""no" 1>&6
1534 fi
1535
1536 # Extract the first word of "ipcs", so it can be a program name with args.
1537 set dummy ipcs; ac_word=$2
1538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1539 echo "configure:1540: checking for $ac_word" >&5
1540 if eval "test \"`echo '$''{'ac_cv_path_ipcs'+set}'`\" = set"; then
1541   echo $ac_n "(cached) $ac_c" 1>&6
1542 else
1543   case "$ipcs" in
1544   /*)
1545   ac_cv_path_ipcs="$ipcs" # Let the user override the test with a path.
1546   ;;
1547   *)
1548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1549   for ac_dir in $PATH; do
1550     test -z "$ac_dir" && ac_dir=.
1551     if test -f $ac_dir/$ac_word; then
1552       ac_cv_path_ipcs="$ac_dir/$ac_word"
1553       break
1554     fi
1555   done
1556   IFS="$ac_save_ifs"
1557   ;;
1558 esac
1559 fi
1560 ipcs="$ac_cv_path_ipcs"
1561 if test -n "$ipcs"; then
1562   echo "$ac_t""$ipcs" 1>&6
1563 else
1564   echo "$ac_t""no" 1>&6
1565 fi
1566
1567 # Extract the first word of "ipcrm", so it can be a program name with args.
1568 set dummy ipcrm; ac_word=$2
1569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1570 echo "configure:1571: checking for $ac_word" >&5
1571 if eval "test \"`echo '$''{'ac_cv_path_ipcrm'+set}'`\" = set"; then
1572   echo $ac_n "(cached) $ac_c" 1>&6
1573 else
1574   case "$ipcrm" in
1575   /*)
1576   ac_cv_path_ipcrm="$ipcrm" # Let the user override the test with a path.
1577   ;;
1578   *)
1579   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1580   for ac_dir in $PATH; do
1581     test -z "$ac_dir" && ac_dir=.
1582     if test -f $ac_dir/$ac_word; then
1583       ac_cv_path_ipcrm="$ac_dir/$ac_word"
1584       break
1585     fi
1586   done
1587   IFS="$ac_save_ifs"
1588   ;;
1589 esac
1590 fi
1591 ipcrm="$ac_cv_path_ipcrm"
1592 if test -n "$ipcrm"; then
1593   echo "$ac_t""$ipcrm" 1>&6
1594 else
1595   echo "$ac_t""no" 1>&6
1596 fi
1597
1598 for ac_prog in trbsd tr
1599 do
1600 # Extract the first word of "$ac_prog", so it can be a program name with args.
1601 set dummy $ac_prog; ac_word=$2
1602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1603 echo "configure:1604: checking for $ac_word" >&5
1604 if eval "test \"`echo '$''{'ac_cv_path_TR'+set}'`\" = set"; then
1605   echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607   case "$TR" in
1608   /*)
1609   ac_cv_path_TR="$TR" # Let the user override the test with a path.
1610   ;;
1611   *)
1612   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1613   for ac_dir in $PATH; do
1614     test -z "$ac_dir" && ac_dir=.
1615     if test -f $ac_dir/$ac_word; then
1616       ac_cv_path_TR="$ac_dir/$ac_word"
1617       break
1618     fi
1619   done
1620   IFS="$ac_save_ifs"
1621   ;;
1622 esac
1623 fi
1624 TR="$ac_cv_path_TR"
1625 if test -n "$TR"; then
1626   echo "$ac_t""$TR" 1>&6
1627 else
1628   echo "$ac_t""no" 1>&6
1629 fi
1630
1631 test -n "$TR" && break
1632 done
1633 test -n "$TR" || TR="NOT_FOUND"
1634
1635
1636 TRSTRINGS="`echo ABCdef | $TR '[a-z]' '[A-Z]' 2>/dev/null | grep ABCDEF`"
1637 TRCLASS="`echo ABCdef | $TR '[:lower:]' '[:upper:]' 2>/dev/null | grep ABCDEF`"
1638
1639 if test "$TRSTRINGS" = "ABCDEF"; then
1640         TRARGS="'[a-z]' '[A-Z]'"
1641 elif test "$TRCLASS" = "ABCDEF"; then
1642         TRARGS="'[:lower:]' '[:upper:]'"
1643 else
1644         { echo "configure: error: "Can\'t find method to covert from upper to lower case with tr"" 1>&2; exit 1; }
1645 fi
1646
1647
1648
1649
1650
1651 # Extract the first word of "yacc", so it can be a program name with args.
1652 set dummy yacc; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655 if eval "test \"`echo '$''{'ac_cv_path_yacc'+set}'`\" = set"; then
1656   echo $ac_n "(cached) $ac_c" 1>&6
1657 else
1658   case "$yacc" in
1659   /*)
1660   ac_cv_path_yacc="$yacc" # Let the user override the test with a path.
1661   ;;
1662   *)
1663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1664   for ac_dir in $PATH; do
1665     test -z "$ac_dir" && ac_dir=.
1666     if test -f $ac_dir/$ac_word; then
1667       ac_cv_path_yacc="$ac_dir/$ac_word"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672   ;;
1673 esac
1674 fi
1675 yacc="$ac_cv_path_yacc"
1676 if test -n "$yacc"; then
1677   echo "$ac_t""$yacc" 1>&6
1678 else
1679   echo "$ac_t""no" 1>&6
1680 fi
1681
1682 # Extract the first word of "bison", so it can be a program name with args.
1683 set dummy bison; ac_word=$2
1684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1685 echo "configure:1686: checking for $ac_word" >&5
1686 if eval "test \"`echo '$''{'ac_cv_path_bison'+set}'`\" = set"; then
1687   echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689   case "$bison" in
1690   /*)
1691   ac_cv_path_bison="$bison" # Let the user override the test with a path.
1692   ;;
1693   *)
1694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1695   for ac_dir in $PATH; do
1696     test -z "$ac_dir" && ac_dir=.
1697     if test -f $ac_dir/$ac_word; then
1698       ac_cv_path_bison="$ac_dir/$ac_word"
1699       break
1700     fi
1701   done
1702   IFS="$ac_save_ifs"
1703   ;;
1704 esac
1705 fi
1706 bison="$ac_cv_path_bison"
1707 if test -n "$bison"; then
1708   echo "$ac_t""$bison" 1>&6
1709 else
1710   echo "$ac_t""no" 1>&6
1711 fi
1712
1713 if test -f "$YACC"
1714 then
1715         echo "- Using $YACC $YFLAGS"
1716 elif test -f "$bison"
1717 then
1718         echo "- Using $bison -y $YFLAGS"
1719         YACC="$bison"
1720         YFLAGS="-y $YFLAGS"
1721         export YACC YFLAGS
1722 else
1723         echo "- Using $yacc $YFLAGS"
1724         YACC="$yacc"
1725         export YACC
1726 fi
1727
1728 echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
1729 echo "configure:1730: checking for main in -lcurses" >&5
1730 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
1731 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1732   echo $ac_n "(cached) $ac_c" 1>&6
1733 else
1734   ac_save_LIBS="$LIBS"
1735 LIBS="-lcurses  $LIBS"
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739
1740 int main() {
1741 main()
1742 ; return 0; }
1743 EOF
1744 if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1745   rm -rf conftest*
1746   eval "ac_cv_lib_$ac_lib_var=yes"
1747 else
1748   echo "configure: failed program was:" >&5
1749   cat conftest.$ac_ext >&5
1750   rm -rf conftest*
1751   eval "ac_cv_lib_$ac_lib_var=no"
1752 fi
1753 rm -f conftest*
1754 LIBS="$ac_save_LIBS"
1755
1756 fi
1757 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1758   echo "$ac_t""yes" 1>&6
1759     ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1760     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1761   cat >> confdefs.h <<EOF
1762 #define $ac_tr_lib 1
1763 EOF
1764
1765   LIBS="-lcurses $LIBS"
1766
1767 else
1768   echo "$ac_t""no" 1>&6
1769 fi
1770
1771 echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
1772 echo "configure:1773: checking for main in -ltermcap" >&5
1773 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
1774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   ac_save_LIBS="$LIBS"
1778 LIBS="-ltermcap  $LIBS"
1779 cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782
1783 int main() {
1784 main()
1785 ; return 0; }
1786 EOF
1787 if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1788   rm -rf conftest*
1789   eval "ac_cv_lib_$ac_lib_var=yes"
1790 else
1791   echo "configure: failed program was:" >&5
1792   cat conftest.$ac_ext >&5
1793   rm -rf conftest*
1794   eval "ac_cv_lib_$ac_lib_var=no"
1795 fi
1796 rm -f conftest*
1797 LIBS="$ac_save_LIBS"
1798
1799 fi
1800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1801   echo "$ac_t""yes" 1>&6
1802     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1804   cat >> confdefs.h <<EOF
1805 #define $ac_tr_lib 1
1806 EOF
1807
1808   LIBS="-ltermcap $LIBS"
1809
1810 else
1811   echo "$ac_t""no" 1>&6
1812 fi
1813
1814 echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
1815 echo "configure:1816: checking for main in -lhistory" >&5
1816 ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
1817 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1818   echo $ac_n "(cached) $ac_c" 1>&6
1819 else
1820   ac_save_LIBS="$LIBS"
1821 LIBS="-lhistory  $LIBS"
1822 cat > conftest.$ac_ext <<EOF
1823 #line 1824 "configure"
1824 #include "confdefs.h"
1825
1826 int main() {
1827 main()
1828 ; return 0; }
1829 EOF
1830 if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1831   rm -rf conftest*
1832   eval "ac_cv_lib_$ac_lib_var=yes"
1833 else
1834   echo "configure: failed program was:" >&5
1835   cat conftest.$ac_ext >&5
1836   rm -rf conftest*
1837   eval "ac_cv_lib_$ac_lib_var=no"
1838 fi
1839 rm -f conftest*
1840 LIBS="$ac_save_LIBS"
1841
1842 fi
1843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1844   echo "$ac_t""yes" 1>&6
1845     ac_tr_lib=HAVE_LIB`echo history | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1846     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1847   cat >> confdefs.h <<EOF
1848 #define $ac_tr_lib 1
1849 EOF
1850
1851   LIBS="-lhistory $LIBS"
1852
1853 else
1854   echo "$ac_t""no" 1>&6
1855 fi
1856
1857 echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
1858 echo "configure:1859: checking for main in -lreadline" >&5
1859 ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
1860 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1861   echo $ac_n "(cached) $ac_c" 1>&6
1862 else
1863   ac_save_LIBS="$LIBS"
1864 LIBS="-lreadline  $LIBS"
1865 cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868
1869 int main() {
1870 main()
1871 ; return 0; }
1872 EOF
1873 if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1874   rm -rf conftest*
1875   eval "ac_cv_lib_$ac_lib_var=yes"
1876 else
1877   echo "configure: failed program was:" >&5
1878   cat conftest.$ac_ext >&5
1879   rm -rf conftest*
1880   eval "ac_cv_lib_$ac_lib_var=no"
1881 fi
1882 rm -f conftest*
1883 LIBS="$ac_save_LIBS"
1884
1885 fi
1886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1887   echo "$ac_t""yes" 1>&6
1888     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1889     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1890   cat >> confdefs.h <<EOF
1891 #define $ac_tr_lib 1
1892 EOF
1893
1894   LIBS="-lreadline $LIBS"
1895
1896 else
1897   echo "$ac_t""no" 1>&6
1898 fi
1899
1900 echo $ac_n "checking for write_history in -lreadline""... $ac_c" 1>&6
1901 echo "configure:1902: checking for write_history in -lreadline" >&5
1902 ac_lib_var=`echo readline'_'write_history | sed 'y%./+-%__p_%'`
1903 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1904   echo $ac_n "(cached) $ac_c" 1>&6
1905 else
1906   ac_save_LIBS="$LIBS"
1907 LIBS="-lreadline  $LIBS"
1908 cat > conftest.$ac_ext <<EOF
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911 /* Override any gcc2 internal prototype to avoid an error.  */
1912 /* We use char because int might match the return type of a gcc2
1913     builtin and then its argument prototype would still apply.  */
1914 char write_history();
1915
1916 int main() {
1917 write_history()
1918 ; return 0; }
1919 EOF
1920 if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1921   rm -rf conftest*
1922   eval "ac_cv_lib_$ac_lib_var=yes"
1923 else
1924   echo "configure: failed program was:" >&5
1925   cat conftest.$ac_ext >&5
1926   rm -rf conftest*
1927   eval "ac_cv_lib_$ac_lib_var=no"
1928 fi
1929 rm -f conftest*
1930 LIBS="$ac_save_LIBS"
1931
1932 fi
1933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1934   echo "$ac_t""yes" 1>&6
1935   cat >> confdefs.h <<\EOF
1936 #define HAVE_HISTORY 1
1937 EOF
1938
1939 else
1940   echo "$ac_t""no" 1>&6
1941 fi
1942
1943 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
1944 then
1945         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
1946 echo "configure:1947: checking for main in -lbsd" >&5
1947 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
1948 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   ac_save_LIBS="$LIBS"
1952 LIBS="-lbsd  $LIBS"
1953 cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956
1957 int main() {
1958 main()
1959 ; return 0; }
1960 EOF
1961 if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1962   rm -rf conftest*
1963   eval "ac_cv_lib_$ac_lib_var=yes"
1964 else
1965   echo "configure: failed program was:" >&5
1966   cat conftest.$ac_ext >&5
1967   rm -rf conftest*
1968   eval "ac_cv_lib_$ac_lib_var=no"
1969 fi
1970 rm -f conftest*
1971 LIBS="$ac_save_LIBS"
1972
1973 fi
1974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1975   echo "$ac_t""yes" 1>&6
1976     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1977     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1978   cat >> confdefs.h <<EOF
1979 #define $ac_tr_lib 1
1980 EOF
1981
1982   LIBS="-lbsd $LIBS"
1983
1984 else
1985   echo "$ac_t""no" 1>&6
1986 fi
1987
1988 fi
1989 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
1990 echo "configure:1991: checking for main in -lm" >&5
1991 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
1992 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1993   echo $ac_n "(cached) $ac_c" 1>&6
1994 else
1995   ac_save_LIBS="$LIBS"
1996 LIBS="-lm  $LIBS"
1997 cat > conftest.$ac_ext <<EOF
1998 #line 1999 "configure"
1999 #include "confdefs.h"
2000
2001 int main() {
2002 main()
2003 ; return 0; }
2004 EOF
2005 if { (eval echo configure:2006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2006   rm -rf conftest*
2007   eval "ac_cv_lib_$ac_lib_var=yes"
2008 else
2009   echo "configure: failed program was:" >&5
2010   cat conftest.$ac_ext >&5
2011   rm -rf conftest*
2012   eval "ac_cv_lib_$ac_lib_var=no"
2013 fi
2014 rm -f conftest*
2015 LIBS="$ac_save_LIBS"
2016
2017 fi
2018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2019   echo "$ac_t""yes" 1>&6
2020     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2021     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2022   cat >> confdefs.h <<EOF
2023 #define $ac_tr_lib 1
2024 EOF
2025
2026   LIBS="-lm $LIBS"
2027
2028 else
2029   echo "$ac_t""no" 1>&6
2030 fi
2031
2032 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2033 echo "configure:2034: checking for main in -ldl" >&5
2034 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2035 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   ac_save_LIBS="$LIBS"
2039 LIBS="-ldl  $LIBS"
2040 cat > conftest.$ac_ext <<EOF
2041 #line 2042 "configure"
2042 #include "confdefs.h"
2043
2044 int main() {
2045 main()
2046 ; return 0; }
2047 EOF
2048 if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2049   rm -rf conftest*
2050   eval "ac_cv_lib_$ac_lib_var=yes"
2051 else
2052   echo "configure: failed program was:" >&5
2053   cat conftest.$ac_ext >&5
2054   rm -rf conftest*
2055   eval "ac_cv_lib_$ac_lib_var=no"
2056 fi
2057 rm -f conftest*
2058 LIBS="$ac_save_LIBS"
2059
2060 fi
2061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2062   echo "$ac_t""yes" 1>&6
2063     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2064     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2065   cat >> confdefs.h <<EOF
2066 #define $ac_tr_lib 1
2067 EOF
2068
2069   LIBS="-ldl $LIBS"
2070
2071 else
2072   echo "$ac_t""no" 1>&6
2073 fi
2074
2075 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2076 echo "configure:2077: checking for main in -lsocket" >&5
2077 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2079   echo $ac_n "(cached) $ac_c" 1>&6
2080 else
2081   ac_save_LIBS="$LIBS"
2082 LIBS="-lsocket  $LIBS"
2083 cat > conftest.$ac_ext <<EOF
2084 #line 2085 "configure"
2085 #include "confdefs.h"
2086
2087 int main() {
2088 main()
2089 ; return 0; }
2090 EOF
2091 if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2092   rm -rf conftest*
2093   eval "ac_cv_lib_$ac_lib_var=yes"
2094 else
2095   echo "configure: failed program was:" >&5
2096   cat conftest.$ac_ext >&5
2097   rm -rf conftest*
2098   eval "ac_cv_lib_$ac_lib_var=no"
2099 fi
2100 rm -f conftest*
2101 LIBS="$ac_save_LIBS"
2102
2103 fi
2104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2105   echo "$ac_t""yes" 1>&6
2106     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2107     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2108   cat >> confdefs.h <<EOF
2109 #define $ac_tr_lib 1
2110 EOF
2111
2112   LIBS="-lsocket $LIBS"
2113
2114 else
2115   echo "$ac_t""no" 1>&6
2116 fi
2117
2118 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2119 echo "configure:2120: checking for main in -lnsl" >&5
2120 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   ac_save_LIBS="$LIBS"
2125 LIBS="-lnsl  $LIBS"
2126 cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129
2130 int main() {
2131 main()
2132 ; return 0; }
2133 EOF
2134 if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2135   rm -rf conftest*
2136   eval "ac_cv_lib_$ac_lib_var=yes"
2137 else
2138   echo "configure: failed program was:" >&5
2139   cat conftest.$ac_ext >&5
2140   rm -rf conftest*
2141   eval "ac_cv_lib_$ac_lib_var=no"
2142 fi
2143 rm -f conftest*
2144 LIBS="$ac_save_LIBS"
2145
2146 fi
2147 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2148   echo "$ac_t""yes" 1>&6
2149     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2150     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2151   cat >> confdefs.h <<EOF
2152 #define $ac_tr_lib 1
2153 EOF
2154
2155   LIBS="-lnsl $LIBS"
2156
2157 else
2158   echo "$ac_t""no" 1>&6
2159 fi
2160
2161 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
2162 echo "configure:2163: checking for main in -lipc" >&5
2163 ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
2164 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2165   echo $ac_n "(cached) $ac_c" 1>&6
2166 else
2167   ac_save_LIBS="$LIBS"
2168 LIBS="-lipc  $LIBS"
2169 cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172
2173 int main() {
2174 main()
2175 ; return 0; }
2176 EOF
2177 if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2178   rm -rf conftest*
2179   eval "ac_cv_lib_$ac_lib_var=yes"
2180 else
2181   echo "configure: failed program was:" >&5
2182   cat conftest.$ac_ext >&5
2183   rm -rf conftest*
2184   eval "ac_cv_lib_$ac_lib_var=no"
2185 fi
2186 rm -f conftest*
2187 LIBS="$ac_save_LIBS"
2188
2189 fi
2190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2191   echo "$ac_t""yes" 1>&6
2192     ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2193     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2194   cat >> confdefs.h <<EOF
2195 #define $ac_tr_lib 1
2196 EOF
2197
2198   LIBS="-lipc $LIBS"
2199
2200 else
2201   echo "$ac_t""no" 1>&6
2202 fi
2203
2204 echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
2205 echo "configure:2206: checking for main in -lIPC" >&5
2206 ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
2207 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2208   echo $ac_n "(cached) $ac_c" 1>&6
2209 else
2210   ac_save_LIBS="$LIBS"
2211 LIBS="-lIPC  $LIBS"
2212 cat > conftest.$ac_ext <<EOF
2213 #line 2214 "configure"
2214 #include "confdefs.h"
2215
2216 int main() {
2217 main()
2218 ; return 0; }
2219 EOF
2220 if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2221   rm -rf conftest*
2222   eval "ac_cv_lib_$ac_lib_var=yes"
2223 else
2224   echo "configure: failed program was:" >&5
2225   cat conftest.$ac_ext >&5
2226   rm -rf conftest*
2227   eval "ac_cv_lib_$ac_lib_var=no"
2228 fi
2229 rm -f conftest*
2230 LIBS="$ac_save_LIBS"
2231
2232 fi
2233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2234   echo "$ac_t""yes" 1>&6
2235     ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2236     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2237   cat >> confdefs.h <<EOF
2238 #define $ac_tr_lib 1
2239 EOF
2240
2241   LIBS="-lIPC $LIBS"
2242
2243 else
2244   echo "$ac_t""no" 1>&6
2245 fi
2246
2247 echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
2248 echo "configure:2249: checking for main in -llc" >&5
2249 ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
2250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2251   echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253   ac_save_LIBS="$LIBS"
2254 LIBS="-llc  $LIBS"
2255 cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258
2259 int main() {
2260 main()
2261 ; return 0; }
2262 EOF
2263 if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2264   rm -rf conftest*
2265   eval "ac_cv_lib_$ac_lib_var=yes"
2266 else
2267   echo "configure: failed program was:" >&5
2268   cat conftest.$ac_ext >&5
2269   rm -rf conftest*
2270   eval "ac_cv_lib_$ac_lib_var=no"
2271 fi
2272 rm -f conftest*
2273 LIBS="$ac_save_LIBS"
2274
2275 fi
2276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2277   echo "$ac_t""yes" 1>&6
2278     ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2279     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2280   cat >> confdefs.h <<EOF
2281 #define $ac_tr_lib 1
2282 EOF
2283
2284   LIBS="-llc $LIBS"
2285
2286 else
2287   echo "$ac_t""no" 1>&6
2288 fi
2289
2290 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
2291 echo "configure:2292: checking for main in -ldld" >&5
2292 ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
2293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2294   echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296   ac_save_LIBS="$LIBS"
2297 LIBS="-ldld  $LIBS"
2298 cat > conftest.$ac_ext <<EOF
2299 #line 2300 "configure"
2300 #include "confdefs.h"
2301
2302 int main() {
2303 main()
2304 ; return 0; }
2305 EOF
2306 if { (eval echo configure:2307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2307   rm -rf conftest*
2308   eval "ac_cv_lib_$ac_lib_var=yes"
2309 else
2310   echo "configure: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   rm -rf conftest*
2313   eval "ac_cv_lib_$ac_lib_var=no"
2314 fi
2315 rm -f conftest*
2316 LIBS="$ac_save_LIBS"
2317
2318 fi
2319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2320   echo "$ac_t""yes" 1>&6
2321     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2322     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2323   cat >> confdefs.h <<EOF
2324 #define $ac_tr_lib 1
2325 EOF
2326
2327   LIBS="-ldld $LIBS"
2328
2329 else
2330   echo "$ac_t""no" 1>&6
2331 fi
2332
2333 echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
2334 echo "configure:2335: checking for main in -lln" >&5
2335 ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
2336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2337   echo $ac_n "(cached) $ac_c" 1>&6
2338 else
2339   ac_save_LIBS="$LIBS"
2340 LIBS="-lln  $LIBS"
2341 cat > conftest.$ac_ext <<EOF
2342 #line 2343 "configure"
2343 #include "confdefs.h"
2344
2345 int main() {
2346 main()
2347 ; return 0; }
2348 EOF
2349 if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2350   rm -rf conftest*
2351   eval "ac_cv_lib_$ac_lib_var=yes"
2352 else
2353   echo "configure: failed program was:" >&5
2354   cat conftest.$ac_ext >&5
2355   rm -rf conftest*
2356   eval "ac_cv_lib_$ac_lib_var=no"
2357 fi
2358 rm -f conftest*
2359 LIBS="$ac_save_LIBS"
2360
2361 fi
2362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2363   echo "$ac_t""yes" 1>&6
2364     ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2365     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2366   cat >> confdefs.h <<EOF
2367 #define $ac_tr_lib 1
2368 EOF
2369
2370   LIBS="-lln $LIBS"
2371
2372 else
2373   echo "$ac_t""no" 1>&6
2374 fi
2375
2376 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
2377 echo "configure:2378: checking for main in -lld" >&5
2378 ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
2379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2380   echo $ac_n "(cached) $ac_c" 1>&6
2381 else
2382   ac_save_LIBS="$LIBS"
2383 LIBS="-lld  $LIBS"
2384 cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387
2388 int main() {
2389 main()
2390 ; return 0; }
2391 EOF
2392 if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2393   rm -rf conftest*
2394   eval "ac_cv_lib_$ac_lib_var=yes"
2395 else
2396   echo "configure: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   rm -rf conftest*
2399   eval "ac_cv_lib_$ac_lib_var=no"
2400 fi
2401 rm -f conftest*
2402 LIBS="$ac_save_LIBS"
2403
2404 fi
2405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2406   echo "$ac_t""yes" 1>&6
2407     ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2409   cat >> confdefs.h <<EOF
2410 #define $ac_tr_lib 1
2411 EOF
2412
2413   LIBS="-lld $LIBS"
2414
2415 else
2416   echo "$ac_t""no" 1>&6
2417 fi
2418
2419 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
2420 echo "configure:2421: checking for main in -lcompat" >&5
2421 ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
2422 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2423   echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425   ac_save_LIBS="$LIBS"
2426 LIBS="-lcompat  $LIBS"
2427 cat > conftest.$ac_ext <<EOF
2428 #line 2429 "configure"
2429 #include "confdefs.h"
2430
2431 int main() {
2432 main()
2433 ; return 0; }
2434 EOF
2435 if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2436   rm -rf conftest*
2437   eval "ac_cv_lib_$ac_lib_var=yes"
2438 else
2439   echo "configure: failed program was:" >&5
2440   cat conftest.$ac_ext >&5
2441   rm -rf conftest*
2442   eval "ac_cv_lib_$ac_lib_var=no"
2443 fi
2444 rm -f conftest*
2445 LIBS="$ac_save_LIBS"
2446
2447 fi
2448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2449   echo "$ac_t""yes" 1>&6
2450     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2452   cat >> confdefs.h <<EOF
2453 #define $ac_tr_lib 1
2454 EOF
2455
2456   LIBS="-lcompat $LIBS"
2457
2458 else
2459   echo "$ac_t""no" 1>&6
2460 fi
2461
2462 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
2463 echo "configure:2464: checking for main in -lBSD" >&5
2464 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
2465 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2466   echo $ac_n "(cached) $ac_c" 1>&6
2467 else
2468   ac_save_LIBS="$LIBS"
2469 LIBS="-lBSD  $LIBS"
2470 cat > conftest.$ac_ext <<EOF
2471 #line 2472 "configure"
2472 #include "confdefs.h"
2473
2474 int main() {
2475 main()
2476 ; return 0; }
2477 EOF
2478 if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2479   rm -rf conftest*
2480   eval "ac_cv_lib_$ac_lib_var=yes"
2481 else
2482   echo "configure: failed program was:" >&5
2483   cat conftest.$ac_ext >&5
2484   rm -rf conftest*
2485   eval "ac_cv_lib_$ac_lib_var=no"
2486 fi
2487 rm -f conftest*
2488 LIBS="$ac_save_LIBS"
2489
2490 fi
2491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2492   echo "$ac_t""yes" 1>&6
2493     ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2494     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2495   cat >> confdefs.h <<EOF
2496 #define $ac_tr_lib 1
2497 EOF
2498
2499   LIBS="-lBSD $LIBS"
2500
2501 else
2502   echo "$ac_t""no" 1>&6
2503 fi
2504
2505 echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
2506 echo "configure:2507: checking for main in -lcrypt" >&5
2507 ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
2508 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2509   echo $ac_n "(cached) $ac_c" 1>&6
2510 else
2511   ac_save_LIBS="$LIBS"
2512 LIBS="-lcrypt  $LIBS"
2513 cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516
2517 int main() {
2518 main()
2519 ; return 0; }
2520 EOF
2521 if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2522   rm -rf conftest*
2523   eval "ac_cv_lib_$ac_lib_var=yes"
2524 else
2525   echo "configure: failed program was:" >&5
2526   cat conftest.$ac_ext >&5
2527   rm -rf conftest*
2528   eval "ac_cv_lib_$ac_lib_var=no"
2529 fi
2530 rm -f conftest*
2531 LIBS="$ac_save_LIBS"
2532
2533 fi
2534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2535   echo "$ac_t""yes" 1>&6
2536     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2537     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2538   cat >> confdefs.h <<EOF
2539 #define $ac_tr_lib 1
2540 EOF
2541
2542   LIBS="-lcrypt $LIBS"
2543
2544 else
2545   echo "$ac_t""no" 1>&6
2546 fi
2547
2548 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2549 echo "configure:2550: checking for main in -lgen" >&5
2550 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
2551 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2552   echo $ac_n "(cached) $ac_c" 1>&6
2553 else
2554   ac_save_LIBS="$LIBS"
2555 LIBS="-lgen  $LIBS"
2556 cat > conftest.$ac_ext <<EOF
2557 #line 2558 "configure"
2558 #include "confdefs.h"
2559
2560 int main() {
2561 main()
2562 ; return 0; }
2563 EOF
2564 if { (eval echo configure:2565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2565   rm -rf conftest*
2566   eval "ac_cv_lib_$ac_lib_var=yes"
2567 else
2568   echo "configure: failed program was:" >&5
2569   cat conftest.$ac_ext >&5
2570   rm -rf conftest*
2571   eval "ac_cv_lib_$ac_lib_var=no"
2572 fi
2573 rm -f conftest*
2574 LIBS="$ac_save_LIBS"
2575
2576 fi
2577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2578   echo "$ac_t""yes" 1>&6
2579     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2580     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2581   cat >> confdefs.h <<EOF
2582 #define $ac_tr_lib 1
2583 EOF
2584
2585   LIBS="-lgen $LIBS"
2586
2587 else
2588   echo "$ac_t""no" 1>&6
2589 fi
2590
2591 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
2592 echo "configure:2593: checking for main in -lPW" >&5
2593 ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
2594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2595   echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597   ac_save_LIBS="$LIBS"
2598 LIBS="-lPW  $LIBS"
2599 cat > conftest.$ac_ext <<EOF
2600 #line 2601 "configure"
2601 #include "confdefs.h"
2602
2603 int main() {
2604 main()
2605 ; return 0; }
2606 EOF
2607 if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2608   rm -rf conftest*
2609   eval "ac_cv_lib_$ac_lib_var=yes"
2610 else
2611   echo "configure: failed program was:" >&5
2612   cat conftest.$ac_ext >&5
2613   rm -rf conftest*
2614   eval "ac_cv_lib_$ac_lib_var=no"
2615 fi
2616 rm -f conftest*
2617 LIBS="$ac_save_LIBS"
2618
2619 fi
2620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2621   echo "$ac_t""yes" 1>&6
2622     ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2623     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2624   cat >> confdefs.h <<EOF
2625 #define $ac_tr_lib 1
2626 EOF
2627
2628   LIBS="-lPW $LIBS"
2629
2630 else
2631   echo "$ac_t""no" 1>&6
2632 fi
2633
2634
2635 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2636 echo "configure:2637: checking for ANSI C header files" >&5
2637 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2638   echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640   cat > conftest.$ac_ext <<EOF
2641 #line 2642 "configure"
2642 #include "confdefs.h"
2643 #include <stdlib.h>
2644 #include <stdarg.h>
2645 #include <string.h>
2646 #include <float.h>
2647 EOF
2648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2649 { (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2650 ac_err=`grep -v '^ *+' conftest.out`
2651 if test -z "$ac_err"; then
2652   rm -rf conftest*
2653   ac_cv_header_stdc=yes
2654 else
2655   echo "$ac_err" >&5
2656   echo "configure: failed program was:" >&5
2657   cat conftest.$ac_ext >&5
2658   rm -rf conftest*
2659   ac_cv_header_stdc=no
2660 fi
2661 rm -f conftest*
2662
2663 if test $ac_cv_header_stdc = yes; then
2664   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2665 cat > conftest.$ac_ext <<EOF
2666 #line 2667 "configure"
2667 #include "confdefs.h"
2668 #include <string.h>
2669 EOF
2670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2671   egrep "memchr" >/dev/null 2>&1; then
2672   :
2673 else
2674   rm -rf conftest*
2675   ac_cv_header_stdc=no
2676 fi
2677 rm -f conftest*
2678
2679 fi
2680
2681 if test $ac_cv_header_stdc = yes; then
2682   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2683 cat > conftest.$ac_ext <<EOF
2684 #line 2685 "configure"
2685 #include "confdefs.h"
2686 #include <stdlib.h>
2687 EOF
2688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2689   egrep "free" >/dev/null 2>&1; then
2690   :
2691 else
2692   rm -rf conftest*
2693   ac_cv_header_stdc=no
2694 fi
2695 rm -f conftest*
2696
2697 fi
2698
2699 if test $ac_cv_header_stdc = yes; then
2700   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2701 if test "$cross_compiling" = yes; then
2702   :
2703 else
2704   cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707 #include <ctype.h>
2708 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2709 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2710 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2711 int main () { int i; for (i = 0; i < 256; i++)
2712 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2713 exit (0); }
2714
2715 EOF
2716 if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2717 then
2718   :
2719 else
2720   echo "configure: failed program was:" >&5
2721   cat conftest.$ac_ext >&5
2722   rm -fr conftest*
2723   ac_cv_header_stdc=no
2724 fi
2725 rm -fr conftest*
2726 fi
2727
2728 fi
2729 fi
2730
2731 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2732 if test $ac_cv_header_stdc = yes; then
2733   cat >> confdefs.h <<\EOF
2734 #define STDC_HEADERS 1
2735 EOF
2736
2737 fi
2738
2739 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2740 echo "configure:2741: checking for sys/wait.h that is POSIX.1 compatible" >&5
2741 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2742   echo $ac_n "(cached) $ac_c" 1>&6
2743 else
2744   cat > conftest.$ac_ext <<EOF
2745 #line 2746 "configure"
2746 #include "confdefs.h"
2747 #include <sys/types.h>
2748 #include <sys/wait.h>
2749 #ifndef WEXITSTATUS
2750 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2751 #endif
2752 #ifndef WIFEXITED
2753 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2754 #endif
2755 int main() {
2756 int s;
2757 wait (&s);
2758 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2759 ; return 0; }
2760 EOF
2761 if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2762   rm -rf conftest*
2763   ac_cv_header_sys_wait_h=yes
2764 else
2765   echo "configure: failed program was:" >&5
2766   cat conftest.$ac_ext >&5
2767   rm -rf conftest*
2768   ac_cv_header_sys_wait_h=no
2769 fi
2770 rm -f conftest*
2771 fi
2772
2773 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2774 if test $ac_cv_header_sys_wait_h = yes; then
2775   cat >> confdefs.h <<\EOF
2776 #define HAVE_SYS_WAIT_H 1
2777 EOF
2778
2779 fi
2780
2781 for ac_hdr in limits.h unistd.h termios.h values.h sys/select.h
2782 do
2783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2785 echo "configure:2786: checking for $ac_hdr" >&5
2786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2787   echo $ac_n "(cached) $ac_c" 1>&6
2788 else
2789   cat > conftest.$ac_ext <<EOF
2790 #line 2791 "configure"
2791 #include "confdefs.h"
2792 #include <$ac_hdr>
2793 EOF
2794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2795 { (eval echo configure:2796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2796 ac_err=`grep -v '^ *+' conftest.out`
2797 if test -z "$ac_err"; then
2798   rm -rf conftest*
2799   eval "ac_cv_header_$ac_safe=yes"
2800 else
2801   echo "$ac_err" >&5
2802   echo "configure: failed program was:" >&5
2803   cat conftest.$ac_ext >&5
2804   rm -rf conftest*
2805   eval "ac_cv_header_$ac_safe=no"
2806 fi
2807 rm -f conftest*
2808 fi
2809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2810   echo "$ac_t""yes" 1>&6
2811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2812   cat >> confdefs.h <<EOF
2813 #define $ac_tr_hdr 1
2814 EOF
2815  
2816 else
2817   echo "$ac_t""no" 1>&6
2818 fi
2819 done
2820
2821 for ac_hdr in sys/resource.h netdb.h arpa/inet.h getopt.h
2822 do
2823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2825 echo "configure:2826: checking for $ac_hdr" >&5
2826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2827   echo $ac_n "(cached) $ac_c" 1>&6
2828 else
2829   cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 #include <$ac_hdr>
2833 EOF
2834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2835 { (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2836 ac_err=`grep -v '^ *+' conftest.out`
2837 if test -z "$ac_err"; then
2838   rm -rf conftest*
2839   eval "ac_cv_header_$ac_safe=yes"
2840 else
2841   echo "$ac_err" >&5
2842   echo "configure: failed program was:" >&5
2843   cat conftest.$ac_ext >&5
2844   rm -rf conftest*
2845   eval "ac_cv_header_$ac_safe=no"
2846 fi
2847 rm -f conftest*
2848 fi
2849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2850   echo "$ac_t""yes" 1>&6
2851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2852   cat >> confdefs.h <<EOF
2853 #define $ac_tr_hdr 1
2854 EOF
2855  
2856 else
2857   echo "$ac_t""no" 1>&6
2858 fi
2859 done
2860
2861 for ac_hdr in readline.h history.h dld.h crypt.h endian.h float.h
2862 do
2863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2865 echo "configure:2866: checking for $ac_hdr" >&5
2866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <$ac_hdr>
2873 EOF
2874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2875 { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2876 ac_err=`grep -v '^ *+' conftest.out`
2877 if test -z "$ac_err"; then
2878   rm -rf conftest*
2879   eval "ac_cv_header_$ac_safe=yes"
2880 else
2881   echo "$ac_err" >&5
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -rf conftest*
2885   eval "ac_cv_header_$ac_safe=no"
2886 fi
2887 rm -f conftest*
2888 fi
2889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2890   echo "$ac_t""yes" 1>&6
2891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2892   cat >> confdefs.h <<EOF
2893 #define $ac_tr_hdr 1
2894 EOF
2895  
2896 else
2897   echo "$ac_t""no" 1>&6
2898 fi
2899 done
2900
2901 for ac_hdr in readline/readline.h readline/history.h ieeefp.h fp_class.h
2902 do
2903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2905 echo "configure:2906: checking for $ac_hdr" >&5
2906 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2907   echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909   cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912 #include <$ac_hdr>
2913 EOF
2914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2915 { (eval echo configure:2916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2916 ac_err=`grep -v '^ *+' conftest.out`
2917 if test -z "$ac_err"; then
2918   rm -rf conftest*
2919   eval "ac_cv_header_$ac_safe=yes"
2920 else
2921   echo "$ac_err" >&5
2922   echo "configure: failed program was:" >&5
2923   cat conftest.$ac_ext >&5
2924   rm -rf conftest*
2925   eval "ac_cv_header_$ac_safe=no"
2926 fi
2927 rm -f conftest*
2928 fi
2929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2930   echo "$ac_t""yes" 1>&6
2931     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2932   cat >> confdefs.h <<EOF
2933 #define $ac_tr_hdr 1
2934 EOF
2935  
2936 else
2937   echo "$ac_t""no" 1>&6
2938 fi
2939 done
2940
2941 for ac_hdr in netinet/in.h string.h strings.h
2942 do
2943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2945 echo "configure:2946: checking for $ac_hdr" >&5
2946 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2947   echo $ac_n "(cached) $ac_c" 1>&6
2948 else
2949   cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <$ac_hdr>
2953 EOF
2954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2955 { (eval echo configure:2956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2956 ac_err=`grep -v '^ *+' conftest.out`
2957 if test -z "$ac_err"; then
2958   rm -rf conftest*
2959   eval "ac_cv_header_$ac_safe=yes"
2960 else
2961   echo "$ac_err" >&5
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965   eval "ac_cv_header_$ac_safe=no"
2966 fi
2967 rm -f conftest*
2968 fi
2969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2970   echo "$ac_t""yes" 1>&6
2971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2972   cat >> confdefs.h <<EOF
2973 #define $ac_tr_hdr 1
2974 EOF
2975  
2976 else
2977   echo "$ac_t""no" 1>&6
2978 fi
2979 done
2980
2981
2982 echo $ac_n "checking for working const""... $ac_c" 1>&6
2983 echo "configure:2984: checking for working const" >&5
2984 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990
2991 int main() {
2992
2993 /* Ultrix mips cc rejects this.  */
2994 typedef int charset[2]; const charset x;
2995 /* SunOS 4.1.1 cc rejects this.  */
2996 char const *const *ccp;
2997 char **p;
2998 /* NEC SVR4.0.2 mips cc rejects this.  */
2999 struct point {int x, y;};
3000 static struct point const zero = {0,0};
3001 /* AIX XL C 1.02.0.0 rejects this.
3002    It does not let you subtract one const X* pointer from another in an arm
3003    of an if-expression whose if-part is not a constant expression */
3004 const char *g = "string";
3005 ccp = &g + (g ? g-g : 0);
3006 /* HPUX 7.0 cc rejects these. */
3007 ++ccp;
3008 p = (char**) ccp;
3009 ccp = (char const *const *) p;
3010 { /* SCO 3.2v4 cc rejects this.  */
3011   char *t;
3012   char const *s = 0 ? (char *) 0 : (char const *) 0;
3013
3014   *t++ = 0;
3015 }
3016 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3017   int x[] = {25, 17};
3018   const int *foo = &x[0];
3019   ++foo;
3020 }
3021 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3022   typedef const int *iptr;
3023   iptr p = 0;
3024   ++p;
3025 }
3026 { /* AIX XL C 1.02.0.0 rejects this saying
3027      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3028   struct s { int j; const int *ap[3]; };
3029   struct s *b; b->j = 5;
3030 }
3031 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3032   const int foo = 10;
3033 }
3034
3035 ; return 0; }
3036 EOF
3037 if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3038   rm -rf conftest*
3039   ac_cv_c_const=yes
3040 else
3041   echo "configure: failed program was:" >&5
3042   cat conftest.$ac_ext >&5
3043   rm -rf conftest*
3044   ac_cv_c_const=no
3045 fi
3046 rm -f conftest*
3047 fi
3048
3049 echo "$ac_t""$ac_cv_c_const" 1>&6
3050 if test $ac_cv_c_const = no; then
3051   cat >> confdefs.h <<\EOF
3052 #define const 
3053 EOF
3054
3055 fi
3056
3057 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3058 echo "configure:3059: checking for uid_t in sys/types.h" >&5
3059 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   cat > conftest.$ac_ext <<EOF
3063 #line 3064 "configure"
3064 #include "confdefs.h"
3065 #include <sys/types.h>
3066 EOF
3067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3068   egrep "uid_t" >/dev/null 2>&1; then
3069   rm -rf conftest*
3070   ac_cv_type_uid_t=yes
3071 else
3072   rm -rf conftest*
3073   ac_cv_type_uid_t=no
3074 fi
3075 rm -f conftest*
3076
3077 fi
3078
3079 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3080 if test $ac_cv_type_uid_t = no; then
3081   cat >> confdefs.h <<\EOF
3082 #define uid_t int
3083 EOF
3084
3085   cat >> confdefs.h <<\EOF
3086 #define gid_t int
3087 EOF
3088
3089 fi
3090
3091 echo $ac_n "checking for inline""... $ac_c" 1>&6
3092 echo "configure:3093: checking for inline" >&5
3093 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3094   echo $ac_n "(cached) $ac_c" 1>&6
3095 else
3096   ac_cv_c_inline=no
3097 for ac_kw in inline __inline__ __inline; do
3098   cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101
3102 int main() {
3103 } $ac_kw foo() {
3104 ; return 0; }
3105 EOF
3106 if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3107   rm -rf conftest*
3108   ac_cv_c_inline=$ac_kw; break
3109 else
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112 fi
3113 rm -f conftest*
3114 done
3115
3116 fi
3117
3118 echo "$ac_t""$ac_cv_c_inline" 1>&6
3119 case "$ac_cv_c_inline" in
3120   inline | yes) ;;
3121   no) cat >> confdefs.h <<\EOF
3122 #define inline 
3123 EOF
3124  ;;
3125   *)  cat >> confdefs.h <<EOF
3126 #define inline $ac_cv_c_inline
3127 EOF
3128  ;;
3129 esac
3130
3131 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3132 echo "configure:3133: checking for mode_t" >&5
3133 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139 #include <sys/types.h>
3140 #if STDC_HEADERS
3141 #include <stdlib.h>
3142 #include <stddef.h>
3143 #endif
3144 EOF
3145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3146   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3147   rm -rf conftest*
3148   ac_cv_type_mode_t=yes
3149 else
3150   rm -rf conftest*
3151   ac_cv_type_mode_t=no
3152 fi
3153 rm -f conftest*
3154
3155 fi
3156 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3157 if test $ac_cv_type_mode_t = no; then
3158   cat >> confdefs.h <<\EOF
3159 #define mode_t int
3160 EOF
3161
3162 fi
3163
3164 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3165 echo "configure:3166: checking for off_t" >&5
3166 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3167   echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <sys/types.h>
3173 #if STDC_HEADERS
3174 #include <stdlib.h>
3175 #include <stddef.h>
3176 #endif
3177 EOF
3178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3179   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3180   rm -rf conftest*
3181   ac_cv_type_off_t=yes
3182 else
3183   rm -rf conftest*
3184   ac_cv_type_off_t=no
3185 fi
3186 rm -f conftest*
3187
3188 fi
3189 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3190 if test $ac_cv_type_off_t = no; then
3191   cat >> confdefs.h <<\EOF
3192 #define off_t long
3193 EOF
3194
3195 fi
3196
3197 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3198 echo "configure:3199: checking for size_t" >&5
3199 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #include <sys/types.h>
3206 #if STDC_HEADERS
3207 #include <stdlib.h>
3208 #include <stddef.h>
3209 #endif
3210 EOF
3211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3212   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3213   rm -rf conftest*
3214   ac_cv_type_size_t=yes
3215 else
3216   rm -rf conftest*
3217   ac_cv_type_size_t=no
3218 fi
3219 rm -f conftest*
3220
3221 fi
3222 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3223 if test $ac_cv_type_size_t = no; then
3224   cat >> confdefs.h <<\EOF
3225 #define size_t unsigned
3226 EOF
3227
3228 fi
3229
3230 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3231 echo "configure:3232: checking whether time.h and sys/time.h may both be included" >&5
3232 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <sys/types.h>
3239 #include <sys/time.h>
3240 #include <time.h>
3241 int main() {
3242 struct tm *tp;
3243 ; return 0; }
3244 EOF
3245 if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3246   rm -rf conftest*
3247   ac_cv_header_time=yes
3248 else
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   ac_cv_header_time=no
3253 fi
3254 rm -f conftest*
3255 fi
3256
3257 echo "$ac_t""$ac_cv_header_time" 1>&6
3258 if test $ac_cv_header_time = yes; then
3259   cat >> confdefs.h <<\EOF
3260 #define TIME_WITH_SYS_TIME 1
3261 EOF
3262
3263 fi
3264
3265 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3266 echo "configure:3267: checking whether struct tm is in sys/time.h or time.h" >&5
3267 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3268   echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270   cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 #include <sys/types.h>
3274 #include <time.h>
3275 int main() {
3276 struct tm *tp; tp->tm_sec;
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3280   rm -rf conftest*
3281   ac_cv_struct_tm=time.h
3282 else
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   ac_cv_struct_tm=sys/time.h
3287 fi
3288 rm -f conftest*
3289 fi
3290
3291 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3292 if test $ac_cv_struct_tm = sys/time.h; then
3293   cat >> confdefs.h <<\EOF
3294 #define TM_IN_SYS_TIME 1
3295 EOF
3296
3297 fi
3298
3299
3300 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
3301 echo "configure:3302: checking for int timezone" >&5
3302 cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #include <time.h>
3306 int main() {
3307 int res = timezone / 60; 
3308 ; return 0; }
3309 EOF
3310 if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3311   rm -rf conftest*
3312   cat >> confdefs.h <<\EOF
3313 #define HAVE_INT_TIMEZONE 1
3314 EOF
3315  echo "$ac_t""yes" 1>&6
3316 else
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   echo "$ac_t""no" 1>&6
3321 fi
3322 rm -f conftest*
3323
3324 echo $ac_n "checking for gettimeofday args""... $ac_c" 1>&6
3325 echo "configure:3326: checking for gettimeofday args" >&5
3326 cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 #include <sys/time.h>
3330 int main() {
3331 struct timeval *tp; struct timezone *tzp; gettimeofday(tp,tzp); 
3332 ; return 0; }
3333 EOF
3334 if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3335   rm -rf conftest*
3336   cat >> confdefs.h <<\EOF
3337 #define HAVE_GETTIMEOFDAY_2_ARGS 1
3338 EOF
3339  echo "$ac_t""2 args" 1>&6
3340 else
3341   echo "configure: failed program was:" >&5
3342   cat conftest.$ac_ext >&5
3343   rm -rf conftest*
3344   echo "$ac_t""no" 1>&6
3345 fi
3346 rm -f conftest*
3347
3348 echo $ac_n "checking for union semun""... $ac_c" 1>&6
3349 echo "configure:3350: checking for union semun" >&5
3350 cat > conftest.$ac_ext <<EOF
3351 #line 3352 "configure"
3352 #include "confdefs.h"
3353 #include <sys/types.h>
3354 #include <sys/ipc.h>
3355 #include <sys/sem.h>
3356 int main() {
3357 union semun semun;
3358 ; return 0; }
3359 EOF
3360 if { (eval echo configure:3361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3361   rm -rf conftest*
3362   cat >> confdefs.h <<\EOF
3363 #define HAVE_UNION_SEMUN 1
3364 EOF
3365  echo "$ac_t""yes" 1>&6
3366 else
3367   echo "configure: failed program was:" >&5
3368   cat conftest.$ac_ext >&5
3369   rm -rf conftest*
3370   echo "$ac_t""no" 1>&6
3371 fi
3372 rm -f conftest*
3373
3374 if test x$ac_cv_prog_gcc = xyes; then
3375     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3376 echo "configure:3377: checking whether ${CC-cc} needs -traditional" >&5
3377 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380     ac_pattern="Autoconf.*'x'"
3381   cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 #include <sgtty.h>
3385 Autoconf TIOCGETP
3386 EOF
3387 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3388   egrep "$ac_pattern" >/dev/null 2>&1; then
3389   rm -rf conftest*
3390   ac_cv_prog_gcc_traditional=yes
3391 else
3392   rm -rf conftest*
3393   ac_cv_prog_gcc_traditional=no
3394 fi
3395 rm -f conftest*
3396
3397
3398   if test $ac_cv_prog_gcc_traditional = no; then
3399     cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 #include <termio.h>
3403 Autoconf TCGETA
3404 EOF
3405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3406   egrep "$ac_pattern" >/dev/null 2>&1; then
3407   rm -rf conftest*
3408   ac_cv_prog_gcc_traditional=yes
3409 fi
3410 rm -f conftest*
3411
3412   fi
3413 fi
3414
3415 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3416   if test $ac_cv_prog_gcc_traditional = yes; then
3417     CC="$CC -traditional"
3418   fi
3419 fi
3420
3421 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3422 echo "configure:3423: checking for 8-bit clean memcmp" >&5
3423 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3424   echo $ac_n "(cached) $ac_c" 1>&6
3425 else
3426   if test "$cross_compiling" = yes; then
3427   ac_cv_func_memcmp_clean=no
3428 else
3429   cat > conftest.$ac_ext <<EOF
3430 #line 3431 "configure"
3431 #include "confdefs.h"
3432
3433 main()
3434 {
3435   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3436   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3437 }
3438
3439 EOF
3440 if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3441 then
3442   ac_cv_func_memcmp_clean=yes
3443 else
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -fr conftest*
3447   ac_cv_func_memcmp_clean=no
3448 fi
3449 rm -fr conftest*
3450 fi
3451
3452 fi
3453
3454 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3455 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3456
3457 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3458 echo "configure:3459: checking return type of signal handlers" >&5
3459 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3460   echo $ac_n "(cached) $ac_c" 1>&6
3461 else
3462   cat > conftest.$ac_ext <<EOF
3463 #line 3464 "configure"
3464 #include "confdefs.h"
3465 #include <sys/types.h>
3466 #include <signal.h>
3467 #ifdef signal
3468 #undef signal
3469 #endif
3470 #ifdef __cplusplus
3471 extern "C" void (*signal (int, void (*)(int)))(int);
3472 #else
3473 void (*signal ()) ();
3474 #endif
3475
3476 int main() {
3477 int i;
3478 ; return 0; }
3479 EOF
3480 if { (eval echo configure:3481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3481   rm -rf conftest*
3482   ac_cv_type_signal=void
3483 else
3484   echo "configure: failed program was:" >&5
3485   cat conftest.$ac_ext >&5
3486   rm -rf conftest*
3487   ac_cv_type_signal=int
3488 fi
3489 rm -f conftest*
3490 fi
3491
3492 echo "$ac_t""$ac_cv_type_signal" 1>&6
3493 cat >> confdefs.h <<EOF
3494 #define RETSIGTYPE $ac_cv_type_signal
3495 EOF
3496
3497
3498 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3499 echo "configure:3500: checking for vprintf" >&5
3500 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3501   echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503   cat > conftest.$ac_ext <<EOF
3504 #line 3505 "configure"
3505 #include "confdefs.h"
3506 /* System header to define __stub macros and hopefully few prototypes,
3507     which can conflict with char vprintf(); below.  */
3508 #include <assert.h>
3509 /* Override any gcc2 internal prototype to avoid an error.  */
3510 /* We use char because int might match the return type of a gcc2
3511     builtin and then its argument prototype would still apply.  */
3512 char vprintf();
3513
3514 int main() {
3515
3516 /* The GNU C library defines this for functions which it implements
3517     to always fail with ENOSYS.  Some functions are actually named
3518     something starting with __ and the normal name is an alias.  */
3519 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3520 choke me
3521 #else
3522 vprintf();
3523 #endif
3524
3525 ; return 0; }
3526 EOF
3527 if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3528   rm -rf conftest*
3529   eval "ac_cv_func_vprintf=yes"
3530 else
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -rf conftest*
3534   eval "ac_cv_func_vprintf=no"
3535 fi
3536 rm -f conftest*
3537 fi
3538
3539 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3540   echo "$ac_t""yes" 1>&6
3541   cat >> confdefs.h <<\EOF
3542 #define HAVE_VPRINTF 1
3543 EOF
3544
3545 else
3546   echo "$ac_t""no" 1>&6
3547 fi
3548
3549 if test "$ac_cv_func_vprintf" != yes; then
3550 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3551 echo "configure:3552: checking for _doprnt" >&5
3552 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 /* System header to define __stub macros and hopefully few prototypes,
3559     which can conflict with char _doprnt(); below.  */
3560 #include <assert.h>
3561 /* Override any gcc2 internal prototype to avoid an error.  */
3562 /* We use char because int might match the return type of a gcc2
3563     builtin and then its argument prototype would still apply.  */
3564 char _doprnt();
3565
3566 int main() {
3567
3568 /* The GNU C library defines this for functions which it implements
3569     to always fail with ENOSYS.  Some functions are actually named
3570     something starting with __ and the normal name is an alias.  */
3571 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3572 choke me
3573 #else
3574 _doprnt();
3575 #endif
3576
3577 ; return 0; }
3578 EOF
3579 if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3580   rm -rf conftest*
3581   eval "ac_cv_func__doprnt=yes"
3582 else
3583   echo "configure: failed program was:" >&5
3584   cat conftest.$ac_ext >&5
3585   rm -rf conftest*
3586   eval "ac_cv_func__doprnt=no"
3587 fi
3588 rm -f conftest*
3589 fi
3590
3591 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3592   echo "$ac_t""yes" 1>&6
3593   cat >> confdefs.h <<\EOF
3594 #define HAVE_DOPRNT 1
3595 EOF
3596
3597 else
3598   echo "$ac_t""no" 1>&6
3599 fi
3600
3601 fi
3602
3603 for ac_func in tzset vfork memmove sigsetjmp kill sysconf fpclass
3604 do
3605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3606 echo "configure:3607: checking for $ac_func" >&5
3607 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 /* System header to define __stub macros and hopefully few prototypes,
3614     which can conflict with char $ac_func(); below.  */
3615 #include <assert.h>
3616 /* Override any gcc2 internal prototype to avoid an error.  */
3617 /* We use char because int might match the return type of a gcc2
3618     builtin and then its argument prototype would still apply.  */
3619 char $ac_func();
3620
3621 int main() {
3622
3623 /* The GNU C library defines this for functions which it implements
3624     to always fail with ENOSYS.  Some functions are actually named
3625     something starting with __ and the normal name is an alias.  */
3626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3627 choke me
3628 #else
3629 $ac_func();
3630 #endif
3631
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3635   rm -rf conftest*
3636   eval "ac_cv_func_$ac_func=yes"
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   eval "ac_cv_func_$ac_func=no"
3642 fi
3643 rm -f conftest*
3644 fi
3645
3646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3647   echo "$ac_t""yes" 1>&6
3648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3649   cat >> confdefs.h <<EOF
3650 #define $ac_tr_func 1
3651 EOF
3652  
3653 else
3654   echo "$ac_t""no" 1>&6
3655 fi
3656 done
3657
3658 for ac_func in fp_class fp_class_d class
3659 do
3660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3661 echo "configure:3662: checking for $ac_func" >&5
3662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3663   echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665   cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 /* System header to define __stub macros and hopefully few prototypes,
3669     which can conflict with char $ac_func(); below.  */
3670 #include <assert.h>
3671 /* Override any gcc2 internal prototype to avoid an error.  */
3672 /* We use char because int might match the return type of a gcc2
3673     builtin and then its argument prototype would still apply.  */
3674 char $ac_func();
3675
3676 int main() {
3677
3678 /* The GNU C library defines this for functions which it implements
3679     to always fail with ENOSYS.  Some functions are actually named
3680     something starting with __ and the normal name is an alias.  */
3681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3682 choke me
3683 #else
3684 $ac_func();
3685 #endif
3686
3687 ; return 0; }
3688 EOF
3689 if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3690   rm -rf conftest*
3691   eval "ac_cv_func_$ac_func=yes"
3692 else
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   eval "ac_cv_func_$ac_func=no"
3697 fi
3698 rm -f conftest*
3699 fi
3700
3701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3702   echo "$ac_t""yes" 1>&6
3703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3704   cat >> confdefs.h <<EOF
3705 #define $ac_tr_func 1
3706 EOF
3707  
3708 else
3709   echo "$ac_t""no" 1>&6
3710 fi
3711 done
3712
3713 for ac_func in sigprocmask waitpid setsid fcvt
3714 do
3715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3716 echo "configure:3717: checking for $ac_func" >&5
3717 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3718   echo $ac_n "(cached) $ac_c" 1>&6
3719 else
3720   cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723 /* System header to define __stub macros and hopefully few prototypes,
3724     which can conflict with char $ac_func(); below.  */
3725 #include <assert.h>
3726 /* Override any gcc2 internal prototype to avoid an error.  */
3727 /* We use char because int might match the return type of a gcc2
3728     builtin and then its argument prototype would still apply.  */
3729 char $ac_func();
3730
3731 int main() {
3732
3733 /* The GNU C library defines this for functions which it implements
3734     to always fail with ENOSYS.  Some functions are actually named
3735     something starting with __ and the normal name is an alias.  */
3736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3737 choke me
3738 #else
3739 $ac_func();
3740 #endif
3741
3742 ; return 0; }
3743 EOF
3744 if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3745   rm -rf conftest*
3746   eval "ac_cv_func_$ac_func=yes"
3747 else
3748   echo "configure: failed program was:" >&5
3749   cat conftest.$ac_ext >&5
3750   rm -rf conftest*
3751   eval "ac_cv_func_$ac_func=no"
3752 fi
3753 rm -f conftest*
3754 fi
3755
3756 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3757   echo "$ac_t""yes" 1>&6
3758     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3759   cat >> confdefs.h <<EOF
3760 #define $ac_tr_func 1
3761 EOF
3762  
3763 else
3764   echo "$ac_t""no" 1>&6
3765 fi
3766 done
3767
3768 echo $ac_n "checking for isinf""... $ac_c" 1>&6
3769 echo "configure:3770: checking for isinf" >&5
3770 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
3771   echo $ac_n "(cached) $ac_c" 1>&6
3772 else
3773   cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 /* System header to define __stub macros and hopefully few prototypes,
3777     which can conflict with char isinf(); below.  */
3778 #include <assert.h>
3779 /* Override any gcc2 internal prototype to avoid an error.  */
3780 /* We use char because int might match the return type of a gcc2
3781     builtin and then its argument prototype would still apply.  */
3782 char isinf();
3783
3784 int main() {
3785
3786 /* The GNU C library defines this for functions which it implements
3787     to always fail with ENOSYS.  Some functions are actually named
3788     something starting with __ and the normal name is an alias.  */
3789 #if defined (__stub_isinf) || defined (__stub___isinf)
3790 choke me
3791 #else
3792 isinf();
3793 #endif
3794
3795 ; return 0; }
3796 EOF
3797 if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3798   rm -rf conftest*
3799   eval "ac_cv_func_isinf=yes"
3800 else
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   eval "ac_cv_func_isinf=no"
3805 fi
3806 rm -f conftest*
3807 fi
3808
3809 if eval "test \"`echo '$ac_cv_func_'isinf`\" = yes"; then
3810   echo "$ac_t""yes" 1>&6
3811   cat >> confdefs.h <<\EOF
3812 #define HAVE_ISINF 1
3813 EOF
3814
3815 else
3816   echo "$ac_t""no" 1>&6
3817 ISINF='isinf.o'
3818 fi
3819
3820
3821 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
3822 echo "configure:3823: checking for getrusage" >&5
3823 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
3824   echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826   cat > conftest.$ac_ext <<EOF
3827 #line 3828 "configure"
3828 #include "confdefs.h"
3829 /* System header to define __stub macros and hopefully few prototypes,
3830     which can conflict with char getrusage(); below.  */
3831 #include <assert.h>
3832 /* Override any gcc2 internal prototype to avoid an error.  */
3833 /* We use char because int might match the return type of a gcc2
3834     builtin and then its argument prototype would still apply.  */
3835 char getrusage();
3836
3837 int main() {
3838
3839 /* The GNU C library defines this for functions which it implements
3840     to always fail with ENOSYS.  Some functions are actually named
3841     something starting with __ and the normal name is an alias.  */
3842 #if defined (__stub_getrusage) || defined (__stub___getrusage)
3843 choke me
3844 #else
3845 getrusage();
3846 #endif
3847
3848 ; return 0; }
3849 EOF
3850 if { (eval echo configure:3851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3851   rm -rf conftest*
3852   eval "ac_cv_func_getrusage=yes"
3853 else
3854   echo "configure: failed program was:" >&5
3855   cat conftest.$ac_ext >&5
3856   rm -rf conftest*
3857   eval "ac_cv_func_getrusage=no"
3858 fi
3859 rm -f conftest*
3860 fi
3861
3862 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
3863   echo "$ac_t""yes" 1>&6
3864   cat >> confdefs.h <<\EOF
3865 #define HAVE_GETRUSAGE 1
3866 EOF
3867
3868 else
3869   echo "$ac_t""no" 1>&6
3870 GETRUSAGE='getrusage.o'
3871 fi
3872
3873
3874 echo $ac_n "checking for srandom""... $ac_c" 1>&6
3875 echo "configure:3876: checking for srandom" >&5
3876 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
3877   echo $ac_n "(cached) $ac_c" 1>&6
3878 else
3879   cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 /* System header to define __stub macros and hopefully few prototypes,
3883     which can conflict with char srandom(); below.  */
3884 #include <assert.h>
3885 /* Override any gcc2 internal prototype to avoid an error.  */
3886 /* We use char because int might match the return type of a gcc2
3887     builtin and then its argument prototype would still apply.  */
3888 char srandom();
3889
3890 int main() {
3891
3892 /* The GNU C library defines this for functions which it implements
3893     to always fail with ENOSYS.  Some functions are actually named
3894     something starting with __ and the normal name is an alias.  */
3895 #if defined (__stub_srandom) || defined (__stub___srandom)
3896 choke me
3897 #else
3898 srandom();
3899 #endif
3900
3901 ; return 0; }
3902 EOF
3903 if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3904   rm -rf conftest*
3905   eval "ac_cv_func_srandom=yes"
3906 else
3907   echo "configure: failed program was:" >&5
3908   cat conftest.$ac_ext >&5
3909   rm -rf conftest*
3910   eval "ac_cv_func_srandom=no"
3911 fi
3912 rm -f conftest*
3913 fi
3914
3915 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
3916   echo "$ac_t""yes" 1>&6
3917   cat >> confdefs.h <<\EOF
3918 #define HAVE_SRANDOM 1
3919 EOF
3920
3921 else
3922   echo "$ac_t""no" 1>&6
3923 SRANDOM='srandom.o'
3924 fi
3925
3926
3927 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
3928 echo "configure:3929: checking for gethostname" >&5
3929 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
3930   echo $ac_n "(cached) $ac_c" 1>&6
3931 else
3932   cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 /* System header to define __stub macros and hopefully few prototypes,
3936     which can conflict with char gethostname(); below.  */
3937 #include <assert.h>
3938 /* Override any gcc2 internal prototype to avoid an error.  */
3939 /* We use char because int might match the return type of a gcc2
3940     builtin and then its argument prototype would still apply.  */
3941 char gethostname();
3942
3943 int main() {
3944
3945 /* The GNU C library defines this for functions which it implements
3946     to always fail with ENOSYS.  Some functions are actually named
3947     something starting with __ and the normal name is an alias.  */
3948 #if defined (__stub_gethostname) || defined (__stub___gethostname)
3949 choke me
3950 #else
3951 gethostname();
3952 #endif
3953
3954 ; return 0; }
3955 EOF
3956 if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3957   rm -rf conftest*
3958   eval "ac_cv_func_gethostname=yes"
3959 else
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -rf conftest*
3963   eval "ac_cv_func_gethostname=no"
3964 fi
3965 rm -f conftest*
3966 fi
3967
3968 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
3969   echo "$ac_t""yes" 1>&6
3970   cat >> confdefs.h <<\EOF
3971 #define HAVE_GETHOSTNAME 1
3972 EOF
3973
3974 else
3975   echo "$ac_t""no" 1>&6
3976 GETHOSTNAME='gethostname.o'
3977 fi
3978
3979
3980 echo $ac_n "checking for random""... $ac_c" 1>&6
3981 echo "configure:3982: checking for random" >&5
3982 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
3983   echo $ac_n "(cached) $ac_c" 1>&6
3984 else
3985   cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 /* System header to define __stub macros and hopefully few prototypes,
3989     which can conflict with char random(); below.  */
3990 #include <assert.h>
3991 /* Override any gcc2 internal prototype to avoid an error.  */
3992 /* We use char because int might match the return type of a gcc2
3993     builtin and then its argument prototype would still apply.  */
3994 char random();
3995
3996 int main() {
3997
3998 /* The GNU C library defines this for functions which it implements
3999     to always fail with ENOSYS.  Some functions are actually named
4000     something starting with __ and the normal name is an alias.  */
4001 #if defined (__stub_random) || defined (__stub___random)
4002 choke me
4003 #else
4004 random();
4005 #endif
4006
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4010   rm -rf conftest*
4011   eval "ac_cv_func_random=yes"
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -rf conftest*
4016   eval "ac_cv_func_random=no"
4017 fi
4018 rm -f conftest*
4019 fi
4020
4021 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
4022   echo "$ac_t""yes" 1>&6
4023   cat >> confdefs.h <<\EOF
4024 #define HAVE_RANDOM 1
4025 EOF
4026
4027 else
4028   echo "$ac_t""no" 1>&6
4029 MISSING_RANDOM='random.o'
4030 fi
4031
4032
4033 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
4034 echo "configure:4035: checking for inet_aton" >&5
4035 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
4036   echo $ac_n "(cached) $ac_c" 1>&6
4037 else
4038   cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 /* System header to define __stub macros and hopefully few prototypes,
4042     which can conflict with char inet_aton(); below.  */
4043 #include <assert.h>
4044 /* Override any gcc2 internal prototype to avoid an error.  */
4045 /* We use char because int might match the return type of a gcc2
4046     builtin and then its argument prototype would still apply.  */
4047 char inet_aton();
4048
4049 int main() {
4050
4051 /* The GNU C library defines this for functions which it implements
4052     to always fail with ENOSYS.  Some functions are actually named
4053     something starting with __ and the normal name is an alias.  */
4054 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
4055 choke me
4056 #else
4057 inet_aton();
4058 #endif
4059
4060 ; return 0; }
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4063   rm -rf conftest*
4064   eval "ac_cv_func_inet_aton=yes"
4065 else
4066   echo "configure: failed program was:" >&5
4067   cat conftest.$ac_ext >&5
4068   rm -rf conftest*
4069   eval "ac_cv_func_inet_aton=no"
4070 fi
4071 rm -f conftest*
4072 fi
4073
4074 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
4075   echo "$ac_t""yes" 1>&6
4076   cat >> confdefs.h <<\EOF
4077 #define HAVE_INET_ATON 1
4078 EOF
4079
4080 else
4081   echo "$ac_t""no" 1>&6
4082 INET_ATON='inet_aton.o'
4083 fi
4084
4085
4086 echo $ac_n "checking for strerror""... $ac_c" 1>&6
4087 echo "configure:4088: checking for strerror" >&5
4088 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094 /* System header to define __stub macros and hopefully few prototypes,
4095     which can conflict with char strerror(); below.  */
4096 #include <assert.h>
4097 /* Override any gcc2 internal prototype to avoid an error.  */
4098 /* We use char because int might match the return type of a gcc2
4099     builtin and then its argument prototype would still apply.  */
4100 char strerror();
4101
4102 int main() {
4103
4104 /* The GNU C library defines this for functions which it implements
4105     to always fail with ENOSYS.  Some functions are actually named
4106     something starting with __ and the normal name is an alias.  */
4107 #if defined (__stub_strerror) || defined (__stub___strerror)
4108 choke me
4109 #else
4110 strerror();
4111 #endif
4112
4113 ; return 0; }
4114 EOF
4115 if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4116   rm -rf conftest*
4117   eval "ac_cv_func_strerror=yes"
4118 else
4119   echo "configure: failed program was:" >&5
4120   cat conftest.$ac_ext >&5
4121   rm -rf conftest*
4122   eval "ac_cv_func_strerror=no"
4123 fi
4124 rm -f conftest*
4125 fi
4126
4127 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
4128   echo "$ac_t""yes" 1>&6
4129   cat >> confdefs.h <<\EOF
4130 #define HAVE_STRERROR 1
4131 EOF
4132
4133 else
4134   echo "$ac_t""no" 1>&6
4135 STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
4136 fi
4137
4138
4139
4140 echo $ac_n "checking for strdup""... $ac_c" 1>&6
4141 echo "configure:4142: checking for strdup" >&5
4142 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
4143   echo $ac_n "(cached) $ac_c" 1>&6
4144 else
4145   cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 /* System header to define __stub macros and hopefully few prototypes,
4149     which can conflict with char strdup(); below.  */
4150 #include <assert.h>
4151 /* Override any gcc2 internal prototype to avoid an error.  */
4152 /* We use char because int might match the return type of a gcc2
4153     builtin and then its argument prototype would still apply.  */
4154 char strdup();
4155
4156 int main() {
4157
4158 /* The GNU C library defines this for functions which it implements
4159     to always fail with ENOSYS.  Some functions are actually named
4160     something starting with __ and the normal name is an alias.  */
4161 #if defined (__stub_strdup) || defined (__stub___strdup)
4162 choke me
4163 #else
4164 strdup();
4165 #endif
4166
4167 ; return 0; }
4168 EOF
4169 if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4170   rm -rf conftest*
4171   eval "ac_cv_func_strdup=yes"
4172 else
4173   echo "configure: failed program was:" >&5
4174   cat conftest.$ac_ext >&5
4175   rm -rf conftest*
4176   eval "ac_cv_func_strdup=no"
4177 fi
4178 rm -f conftest*
4179 fi
4180
4181 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
4182   echo "$ac_t""yes" 1>&6
4183   cat >> confdefs.h <<\EOF
4184 #define HAVE_STRDUP 1
4185 EOF
4186
4187 else
4188   echo "$ac_t""no" 1>&6
4189 STRDUP='../../utils/strdup.o'
4190 fi
4191
4192
4193 echo $ac_n "checking for strtol""... $ac_c" 1>&6
4194 echo "configure:4195: checking for strtol" >&5
4195 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
4196   echo $ac_n "(cached) $ac_c" 1>&6
4197 else
4198   cat > conftest.$ac_ext <<EOF
4199 #line 4200 "configure"
4200 #include "confdefs.h"
4201 /* System header to define __stub macros and hopefully few prototypes,
4202     which can conflict with char strtol(); below.  */
4203 #include <assert.h>
4204 /* Override any gcc2 internal prototype to avoid an error.  */
4205 /* We use char because int might match the return type of a gcc2
4206     builtin and then its argument prototype would still apply.  */
4207 char strtol();
4208
4209 int main() {
4210
4211 /* The GNU C library defines this for functions which it implements
4212     to always fail with ENOSYS.  Some functions are actually named
4213     something starting with __ and the normal name is an alias.  */
4214 #if defined (__stub_strtol) || defined (__stub___strtol)
4215 choke me
4216 #else
4217 strtol();
4218 #endif
4219
4220 ; return 0; }
4221 EOF
4222 if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4223   rm -rf conftest*
4224   eval "ac_cv_func_strtol=yes"
4225 else
4226   echo "configure: failed program was:" >&5
4227   cat conftest.$ac_ext >&5
4228   rm -rf conftest*
4229   eval "ac_cv_func_strtol=no"
4230 fi
4231 rm -f conftest*
4232 fi
4233
4234 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
4235   echo "$ac_t""yes" 1>&6
4236   cat >> confdefs.h <<\EOF
4237 #define HAVE_STRTOL 1
4238 EOF
4239
4240 else
4241   echo "$ac_t""no" 1>&6
4242 STRTOL='strtol.o'
4243 fi
4244
4245
4246 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
4247 echo "configure:4248: checking for strtoul" >&5
4248 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
4249   echo $ac_n "(cached) $ac_c" 1>&6
4250 else
4251   cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254 /* System header to define __stub macros and hopefully few prototypes,
4255     which can conflict with char strtoul(); below.  */
4256 #include <assert.h>
4257 /* Override any gcc2 internal prototype to avoid an error.  */
4258 /* We use char because int might match the return type of a gcc2
4259     builtin and then its argument prototype would still apply.  */
4260 char strtoul();
4261
4262 int main() {
4263
4264 /* The GNU C library defines this for functions which it implements
4265     to always fail with ENOSYS.  Some functions are actually named
4266     something starting with __ and the normal name is an alias.  */
4267 #if defined (__stub_strtoul) || defined (__stub___strtoul)
4268 choke me
4269 #else
4270 strtoul();
4271 #endif
4272
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4276   rm -rf conftest*
4277   eval "ac_cv_func_strtoul=yes"
4278 else
4279   echo "configure: failed program was:" >&5
4280   cat conftest.$ac_ext >&5
4281   rm -rf conftest*
4282   eval "ac_cv_func_strtoul=no"
4283 fi
4284 rm -f conftest*
4285 fi
4286
4287 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
4288   echo "$ac_t""yes" 1>&6
4289   cat >> confdefs.h <<\EOF
4290 #define HAVE_STRTOUL 1
4291 EOF
4292
4293 else
4294   echo "$ac_t""no" 1>&6
4295 STRTOL='strtoul.o'
4296 fi
4297
4298
4299 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
4300 echo "configure:4301: checking for strcasecmp" >&5
4301 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
4302   echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304   cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 /* System header to define __stub macros and hopefully few prototypes,
4308     which can conflict with char strcasecmp(); below.  */
4309 #include <assert.h>
4310 /* Override any gcc2 internal prototype to avoid an error.  */
4311 /* We use char because int might match the return type of a gcc2
4312     builtin and then its argument prototype would still apply.  */
4313 char strcasecmp();
4314
4315 int main() {
4316
4317 /* The GNU C library defines this for functions which it implements
4318     to always fail with ENOSYS.  Some functions are actually named
4319     something starting with __ and the normal name is an alias.  */
4320 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
4321 choke me
4322 #else
4323 strcasecmp();
4324 #endif
4325
4326 ; return 0; }
4327 EOF
4328 if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4329   rm -rf conftest*
4330   eval "ac_cv_func_strcasecmp=yes"
4331 else
4332   echo "configure: failed program was:" >&5
4333   cat conftest.$ac_ext >&5
4334   rm -rf conftest*
4335   eval "ac_cv_func_strcasecmp=no"
4336 fi
4337 rm -f conftest*
4338 fi
4339
4340 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
4341   echo "$ac_t""yes" 1>&6
4342   cat >> confdefs.h <<\EOF
4343 #define HAVE_STRCASECMP 1
4344 EOF
4345
4346 else
4347   echo "$ac_t""no" 1>&6
4348 STRCASECMP='strcasecmp.o'
4349 fi
4350
4351
4352 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
4353 echo "configure:4354: checking for cbrt" >&5
4354 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 /* System header to define __stub macros and hopefully few prototypes,
4361     which can conflict with char cbrt(); below.  */
4362 #include <assert.h>
4363 /* Override any gcc2 internal prototype to avoid an error.  */
4364 /* We use char because int might match the return type of a gcc2
4365     builtin and then its argument prototype would still apply.  */
4366 char cbrt();
4367
4368 int main() {
4369
4370 /* The GNU C library defines this for functions which it implements
4371     to always fail with ENOSYS.  Some functions are actually named
4372     something starting with __ and the normal name is an alias.  */
4373 #if defined (__stub_cbrt) || defined (__stub___cbrt)
4374 choke me
4375 #else
4376 cbrt();
4377 #endif
4378
4379 ; return 0; }
4380 EOF
4381 if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4382   rm -rf conftest*
4383   eval "ac_cv_func_cbrt=yes"
4384 else
4385   echo "configure: failed program was:" >&5
4386   cat conftest.$ac_ext >&5
4387   rm -rf conftest*
4388   eval "ac_cv_func_cbrt=no"
4389 fi
4390 rm -f conftest*
4391 fi
4392
4393 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
4394   echo "$ac_t""yes" 1>&6
4395   cat >> confdefs.h <<\EOF
4396 #define HAVE_CBRT 1
4397 EOF
4398
4399 else
4400   echo "$ac_t""no" 1>&6
4401 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
4402 echo "configure:4403: checking for cbrt in -lm" >&5
4403 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
4404 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   ac_save_LIBS="$LIBS"
4408 LIBS="-lm  $LIBS"
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* Override any gcc2 internal prototype to avoid an error.  */
4413 /* We use char because int might match the return type of a gcc2
4414     builtin and then its argument prototype would still apply.  */
4415 char cbrt();
4416
4417 int main() {
4418 cbrt()
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4422   rm -rf conftest*
4423   eval "ac_cv_lib_$ac_lib_var=yes"
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427   rm -rf conftest*
4428   eval "ac_cv_lib_$ac_lib_var=no"
4429 fi
4430 rm -f conftest*
4431 LIBS="$ac_save_LIBS"
4432
4433 fi
4434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4435   echo "$ac_t""yes" 1>&6
4436   cat >> confdefs.h <<\EOF
4437 #define HAVE_CBRT 1
4438 EOF
4439
4440 else
4441   echo "$ac_t""no" 1>&6
4442 fi
4443
4444 fi
4445
4446 echo $ac_n "checking for rint""... $ac_c" 1>&6
4447 echo "configure:4448: checking for rint" >&5
4448 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
4449   echo $ac_n "(cached) $ac_c" 1>&6
4450 else
4451   cat > conftest.$ac_ext <<EOF
4452 #line 4453 "configure"
4453 #include "confdefs.h"
4454 /* System header to define __stub macros and hopefully few prototypes,
4455     which can conflict with char rint(); below.  */
4456 #include <assert.h>
4457 /* Override any gcc2 internal prototype to avoid an error.  */
4458 /* We use char because int might match the return type of a gcc2
4459     builtin and then its argument prototype would still apply.  */
4460 char rint();
4461
4462 int main() {
4463
4464 /* The GNU C library defines this for functions which it implements
4465     to always fail with ENOSYS.  Some functions are actually named
4466     something starting with __ and the normal name is an alias.  */
4467 #if defined (__stub_rint) || defined (__stub___rint)
4468 choke me
4469 #else
4470 rint();
4471 #endif
4472
4473 ; return 0; }
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4476   rm -rf conftest*
4477   eval "ac_cv_func_rint=yes"
4478 else
4479   echo "configure: failed program was:" >&5
4480   cat conftest.$ac_ext >&5
4481   rm -rf conftest*
4482   eval "ac_cv_func_rint=no"
4483 fi
4484 rm -f conftest*
4485 fi
4486
4487 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
4488   echo "$ac_t""yes" 1>&6
4489   cat >> confdefs.h <<\EOF
4490 #define HAVE_RINT 1
4491 EOF
4492
4493 else
4494   echo "$ac_t""no" 1>&6
4495 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
4496 echo "configure:4497: checking for rint in -lm" >&5
4497 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
4498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4499   echo $ac_n "(cached) $ac_c" 1>&6
4500 else
4501   ac_save_LIBS="$LIBS"
4502 LIBS="-lm  $LIBS"
4503 cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506 /* Override any gcc2 internal prototype to avoid an error.  */
4507 /* We use char because int might match the return type of a gcc2
4508     builtin and then its argument prototype would still apply.  */
4509 char rint();
4510
4511 int main() {
4512 rint()
4513 ; return 0; }
4514 EOF
4515 if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4516   rm -rf conftest*
4517   eval "ac_cv_lib_$ac_lib_var=yes"
4518 else
4519   echo "configure: failed program was:" >&5
4520   cat conftest.$ac_ext >&5
4521   rm -rf conftest*
4522   eval "ac_cv_lib_$ac_lib_var=no"
4523 fi
4524 rm -f conftest*
4525 LIBS="$ac_save_LIBS"
4526
4527 fi
4528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4529   echo "$ac_t""yes" 1>&6
4530   cat >> confdefs.h <<\EOF
4531 #define HAVE_RINT 1
4532 EOF
4533
4534 else
4535   echo "$ac_t""no" 1>&6
4536 fi
4537
4538 fi
4539
4540
4541
4542 if test "$USE_X" = true; then
4543
4544         ice_save_LIBS="$LIBS"
4545         ice_save_CFLAGS="$CFLAGS"
4546         ice_save_CPPFLAGS="$CPPFLAGS"
4547         ice_save_LDFLAGS="$LDFLAGS"
4548
4549         # If we find X, set shell vars x_includes and x_libraries to the
4550 # paths, otherwise set no_x=yes.
4551 # Uses ac_ vars as temps to allow command line to override cache and checks.
4552 # --without-x overrides everything else, but does not touch the cache.
4553 echo $ac_n "checking for X""... $ac_c" 1>&6
4554 echo "configure:4555: checking for X" >&5
4555
4556 # Check whether --with-x or --without-x was given.
4557 if test "${with_x+set}" = set; then
4558   withval="$with_x"
4559   :
4560 fi
4561
4562 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4563 if test "x$with_x" = xno; then
4564   # The user explicitly disabled X.
4565   have_x=disabled
4566 else
4567   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4568     # Both variables are already set.
4569     have_x=yes
4570   else
4571 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   # One or both of the vars are not set, and there is no cached value.
4575 ac_x_includes=NO ac_x_libraries=NO
4576 rm -fr conftestdir
4577 if mkdir conftestdir; then
4578   cd conftestdir
4579   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4580   cat > Imakefile <<'EOF'
4581 acfindx:
4582         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4583 EOF
4584   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4585     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4586     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4587     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4588     for ac_extension in a so sl; do
4589       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4590         test -f $ac_im_libdir/libX11.$ac_extension; then
4591         ac_im_usrlibdir=$ac_im_libdir; break
4592       fi
4593     done
4594     # Screen out bogus values from the imake configuration.  They are
4595     # bogus both because they are the default anyway, and because
4596     # using them would break gcc on systems where it needs fixed includes.
4597     case "$ac_im_incroot" in
4598         /usr/include) ;;
4599         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4600     esac
4601     case "$ac_im_usrlibdir" in
4602         /usr/lib | /lib) ;;
4603         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4604     esac
4605   fi
4606   cd ..
4607   rm -fr conftestdir
4608 fi
4609
4610 if test "$ac_x_includes" = NO; then
4611   # Guess where to find include files, by looking for this one X11 .h file.
4612   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4613
4614   # First, try using that file with no special directory specified.
4615 cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 #include <$x_direct_test_include>
4619 EOF
4620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4621 { (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4622 ac_err=`grep -v '^ *+' conftest.out`
4623 if test -z "$ac_err"; then
4624   rm -rf conftest*
4625   # We can compile using X headers with no special include directory.
4626 ac_x_includes=
4627 else
4628   echo "$ac_err" >&5
4629   echo "configure: failed program was:" >&5
4630   cat conftest.$ac_ext >&5
4631   rm -rf conftest*
4632   # Look for the header file in a standard set of common directories.
4633 # Check X11 before X11Rn because it is often a symlink to the current release.
4634   for ac_dir in               \
4635     /usr/X11/include          \
4636     /usr/X11R6/include        \
4637     /usr/X11R5/include        \
4638     /usr/X11R4/include        \
4639                               \
4640     /usr/include/X11          \
4641     /usr/include/X11R6        \
4642     /usr/include/X11R5        \
4643     /usr/include/X11R4        \
4644                               \
4645     /usr/local/X11/include    \
4646     /usr/local/X11R6/include  \
4647     /usr/local/X11R5/include  \
4648     /usr/local/X11R4/include  \
4649                               \
4650     /usr/local/include/X11    \
4651     /usr/local/include/X11R6  \
4652     /usr/local/include/X11R5  \
4653     /usr/local/include/X11R4  \
4654                               \
4655     /usr/X386/include         \
4656     /usr/x386/include         \
4657     /usr/XFree86/include/X11  \
4658                               \
4659     /usr/include              \
4660     /usr/local/include        \
4661     /usr/unsupported/include  \
4662     /usr/athena/include       \
4663     /usr/local/x11r5/include  \
4664     /usr/lpp/Xamples/include  \
4665                               \
4666     /usr/openwin/include      \
4667     /usr/openwin/share/include \
4668     ; \
4669   do
4670     if test -r "$ac_dir/$x_direct_test_include"; then
4671       ac_x_includes=$ac_dir
4672       break
4673     fi
4674   done
4675 fi
4676 rm -f conftest*
4677 fi # $ac_x_includes = NO
4678
4679 if test "$ac_x_libraries" = NO; then
4680   # Check for the libraries.
4681
4682   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4683   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4684
4685   # See if we find them without any special options.
4686   # Don't add to $LIBS permanently.
4687   ac_save_LIBS="$LIBS"
4688   LIBS="-l$x_direct_test_library $LIBS"
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4692
4693 int main() {
4694 ${x_direct_test_function}()
4695 ; return 0; }
4696 EOF
4697 if { (eval echo configure:4698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4698   rm -rf conftest*
4699   LIBS="$ac_save_LIBS"
4700 # We can link X programs with no special library path.
4701 ac_x_libraries=
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
4706   LIBS="$ac_save_LIBS"
4707 # First see if replacing the include by lib works.
4708 # Check X11 before X11Rn because it is often a symlink to the current release.
4709 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4710     /usr/X11/lib          \
4711     /usr/X11R6/lib        \
4712     /usr/X11R5/lib        \
4713     /usr/X11R4/lib        \
4714                           \
4715     /usr/lib/X11          \
4716     /usr/lib/X11R6        \
4717     /usr/lib/X11R5        \
4718     /usr/lib/X11R4        \
4719                           \
4720     /usr/local/X11/lib    \
4721     /usr/local/X11R6/lib  \
4722     /usr/local/X11R5/lib  \
4723     /usr/local/X11R4/lib  \
4724                           \
4725     /usr/local/lib/X11    \
4726     /usr/local/lib/X11R6  \
4727     /usr/local/lib/X11R5  \
4728     /usr/local/lib/X11R4  \
4729                           \
4730     /usr/X386/lib         \
4731     /usr/x386/lib         \
4732     /usr/XFree86/lib/X11  \
4733                           \
4734     /usr/lib              \
4735     /usr/local/lib        \
4736     /usr/unsupported/lib  \
4737     /usr/athena/lib       \
4738     /usr/local/x11r5/lib  \
4739     /usr/lpp/Xamples/lib  \
4740     /lib/usr/lib/X11      \
4741                           \
4742     /usr/openwin/lib      \
4743     /usr/openwin/share/lib \
4744     ; \
4745 do
4746   for ac_extension in a so sl; do
4747     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4748       ac_x_libraries=$ac_dir
4749       break 2
4750     fi
4751   done
4752 done
4753 fi
4754 rm -f conftest*
4755 fi # $ac_x_libraries = NO
4756
4757 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4758   # Didn't find X anywhere.  Cache the known absence of X.
4759   ac_cv_have_x="have_x=no"
4760 else
4761   # Record where we found X for the cache.
4762   ac_cv_have_x="have_x=yes \
4763                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4764 fi
4765 fi
4766   fi
4767   eval "$ac_cv_have_x"
4768 fi # $with_x != no
4769
4770 if test "$have_x" != yes; then
4771   echo "$ac_t""$have_x" 1>&6
4772   no_x=yes
4773 else
4774   # If each of the values was on the command line, it overrides each guess.
4775   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4776   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4777   # Update the cache value to reflect the command line values.
4778   ac_cv_have_x="have_x=yes \
4779                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4780   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4781 fi
4782
4783 if test "$no_x" = yes; then
4784   # Not all programs may use this symbol, but it does not hurt to define it.
4785   cat >> confdefs.h <<\EOF
4786 #define X_DISPLAY_MISSING 1
4787 EOF
4788
4789   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4790 else
4791   if test -n "$x_includes"; then
4792     X_CFLAGS="$X_CFLAGS -I$x_includes"
4793   fi
4794
4795   # It would also be nice to do this for all -L options, not just this one.
4796   if test -n "$x_libraries"; then
4797     X_LIBS="$X_LIBS -L$x_libraries"
4798     # For Solaris; some versions of Sun CC require a space after -R and
4799     # others require no space.  Words are not sufficient . . . .
4800     case "`(uname -sr) 2>/dev/null`" in
4801     "SunOS 5"*)
4802       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4803 echo "configure:4804: checking whether -R must be followed by a space" >&5
4804       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4805       cat > conftest.$ac_ext <<EOF
4806 #line 4807 "configure"
4807 #include "confdefs.h"
4808
4809 int main() {
4810
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4814   rm -rf conftest*
4815   ac_R_nospace=yes
4816 else
4817   echo "configure: failed program was:" >&5
4818   cat conftest.$ac_ext >&5
4819   rm -rf conftest*
4820   ac_R_nospace=no
4821 fi
4822 rm -f conftest*
4823       if test $ac_R_nospace = yes; then
4824         echo "$ac_t""no" 1>&6
4825         X_LIBS="$X_LIBS -R$x_libraries"
4826       else
4827         LIBS="$ac_xsave_LIBS -R $x_libraries"
4828         cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831
4832 int main() {
4833
4834 ; return 0; }
4835 EOF
4836 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4837   rm -rf conftest*
4838   ac_R_space=yes
4839 else
4840   echo "configure: failed program was:" >&5
4841   cat conftest.$ac_ext >&5
4842   rm -rf conftest*
4843   ac_R_space=no
4844 fi
4845 rm -f conftest*
4846         if test $ac_R_space = yes; then
4847           echo "$ac_t""yes" 1>&6
4848           X_LIBS="$X_LIBS -R $x_libraries"
4849         else
4850           echo "$ac_t""neither works" 1>&6
4851         fi
4852       fi
4853       LIBS="$ac_xsave_LIBS"
4854     esac
4855   fi
4856
4857   # Check for system-dependent libraries X programs must link with.
4858   # Do this before checking for the system-independent R6 libraries
4859   # (-lICE), since we may need -lsocket or whatever for X linking.
4860
4861   if test "$ISC" = yes; then
4862     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4863   else
4864     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4865     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4866     # the Alpha needs dnet_stub (dnet does not exist).
4867     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4868 echo "configure:4869: checking for dnet_ntoa in -ldnet" >&5
4869 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4870 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   ac_save_LIBS="$LIBS"
4874 LIBS="-ldnet  $LIBS"
4875 cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878 /* Override any gcc2 internal prototype to avoid an error.  */
4879 /* We use char because int might match the return type of a gcc2
4880     builtin and then its argument prototype would still apply.  */
4881 char dnet_ntoa();
4882
4883 int main() {
4884 dnet_ntoa()
4885 ; return 0; }
4886 EOF
4887 if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4888   rm -rf conftest*
4889   eval "ac_cv_lib_$ac_lib_var=yes"
4890 else
4891   echo "configure: failed program was:" >&5
4892   cat conftest.$ac_ext >&5
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=no"
4895 fi
4896 rm -f conftest*
4897 LIBS="$ac_save_LIBS"
4898
4899 fi
4900 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4901   echo "$ac_t""yes" 1>&6
4902   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4903 else
4904   echo "$ac_t""no" 1>&6
4905 fi
4906
4907     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4908       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4909 echo "configure:4910: checking for dnet_ntoa in -ldnet_stub" >&5
4910 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4911 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4912   echo $ac_n "(cached) $ac_c" 1>&6
4913 else
4914   ac_save_LIBS="$LIBS"
4915 LIBS="-ldnet_stub  $LIBS"
4916 cat > conftest.$ac_ext <<EOF
4917 #line 4918 "configure"
4918 #include "confdefs.h"
4919 /* Override any gcc2 internal prototype to avoid an error.  */
4920 /* We use char because int might match the return type of a gcc2
4921     builtin and then its argument prototype would still apply.  */
4922 char dnet_ntoa();
4923
4924 int main() {
4925 dnet_ntoa()
4926 ; return 0; }
4927 EOF
4928 if { (eval echo configure:4929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=yes"
4931 else
4932   echo "configure: failed program was:" >&5
4933   cat conftest.$ac_ext >&5
4934   rm -rf conftest*
4935   eval "ac_cv_lib_$ac_lib_var=no"
4936 fi
4937 rm -f conftest*
4938 LIBS="$ac_save_LIBS"
4939
4940 fi
4941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4942   echo "$ac_t""yes" 1>&6
4943   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4944 else
4945   echo "$ac_t""no" 1>&6
4946 fi
4947
4948     fi
4949
4950     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4951     # to get the SysV transport functions.
4952     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4953     # needs -lnsl.
4954     # The nsl library prevents programs from opening the X display
4955     # on Irix 5.2, according to dickey@clark.net.
4956     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4957 echo "configure:4958: checking for gethostbyname" >&5
4958 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4959   echo $ac_n "(cached) $ac_c" 1>&6
4960 else
4961   cat > conftest.$ac_ext <<EOF
4962 #line 4963 "configure"
4963 #include "confdefs.h"
4964 /* System header to define __stub macros and hopefully few prototypes,
4965     which can conflict with char gethostbyname(); below.  */
4966 #include <assert.h>
4967 /* Override any gcc2 internal prototype to avoid an error.  */
4968 /* We use char because int might match the return type of a gcc2
4969     builtin and then its argument prototype would still apply.  */
4970 char gethostbyname();
4971
4972 int main() {
4973
4974 /* The GNU C library defines this for functions which it implements
4975     to always fail with ENOSYS.  Some functions are actually named
4976     something starting with __ and the normal name is an alias.  */
4977 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4978 choke me
4979 #else
4980 gethostbyname();
4981 #endif
4982
4983 ; return 0; }
4984 EOF
4985 if { (eval echo configure:4986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4986   rm -rf conftest*
4987   eval "ac_cv_func_gethostbyname=yes"
4988 else
4989   echo "configure: failed program was:" >&5
4990   cat conftest.$ac_ext >&5
4991   rm -rf conftest*
4992   eval "ac_cv_func_gethostbyname=no"
4993 fi
4994 rm -f conftest*
4995 fi
4996
4997 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4998   echo "$ac_t""yes" 1>&6
4999   :
5000 else
5001   echo "$ac_t""no" 1>&6
5002 fi
5003
5004     if test $ac_cv_func_gethostbyname = no; then
5005       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5006 echo "configure:5007: checking for gethostbyname in -lnsl" >&5
5007 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5009   echo $ac_n "(cached) $ac_c" 1>&6
5010 else
5011   ac_save_LIBS="$LIBS"
5012 LIBS="-lnsl  $LIBS"
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016 /* Override any gcc2 internal prototype to avoid an error.  */
5017 /* We use char because int might match the return type of a gcc2
5018     builtin and then its argument prototype would still apply.  */
5019 char gethostbyname();
5020
5021 int main() {
5022 gethostbyname()
5023 ; return 0; }
5024 EOF
5025 if { (eval echo configure:5026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5026   rm -rf conftest*
5027   eval "ac_cv_lib_$ac_lib_var=yes"
5028 else
5029   echo "configure: failed program was:" >&5
5030   cat conftest.$ac_ext >&5
5031   rm -rf conftest*
5032   eval "ac_cv_lib_$ac_lib_var=no"
5033 fi
5034 rm -f conftest*
5035 LIBS="$ac_save_LIBS"
5036
5037 fi
5038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5039   echo "$ac_t""yes" 1>&6
5040   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5041 else
5042   echo "$ac_t""no" 1>&6
5043 fi
5044
5045     fi
5046
5047     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5048     # socket/setsockopt and other routines are undefined under SCO ODT
5049     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5050     # on later versions), says simon@lia.di.epfl.ch: it contains
5051     # gethostby* variants that don't use the nameserver (or something).
5052     # -lsocket must be given before -lnsl if both are needed.
5053     # We assume that if connect needs -lnsl, so does gethostbyname.
5054     echo $ac_n "checking for connect""... $ac_c" 1>&6
5055 echo "configure:5056: checking for connect" >&5
5056 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5057   echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059   cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062 /* System header to define __stub macros and hopefully few prototypes,
5063     which can conflict with char connect(); below.  */
5064 #include <assert.h>
5065 /* Override any gcc2 internal prototype to avoid an error.  */
5066 /* We use char because int might match the return type of a gcc2
5067     builtin and then its argument prototype would still apply.  */
5068 char connect();
5069
5070 int main() {
5071
5072 /* The GNU C library defines this for functions which it implements
5073     to always fail with ENOSYS.  Some functions are actually named
5074     something starting with __ and the normal name is an alias.  */
5075 #if defined (__stub_connect) || defined (__stub___connect)
5076 choke me
5077 #else
5078 connect();
5079 #endif
5080
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5084   rm -rf conftest*
5085   eval "ac_cv_func_connect=yes"
5086 else
5087   echo "configure: failed program was:" >&5
5088   cat conftest.$ac_ext >&5
5089   rm -rf conftest*
5090   eval "ac_cv_func_connect=no"
5091 fi
5092 rm -f conftest*
5093 fi
5094
5095 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5096   echo "$ac_t""yes" 1>&6
5097   :
5098 else
5099   echo "$ac_t""no" 1>&6
5100 fi
5101
5102     if test $ac_cv_func_connect = no; then
5103       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5104 echo "configure:5105: checking for connect in -lsocket" >&5
5105 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5106 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5107   echo $ac_n "(cached) $ac_c" 1>&6
5108 else
5109   ac_save_LIBS="$LIBS"
5110 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5111 cat > conftest.$ac_ext <<EOF
5112 #line 5113 "configure"
5113 #include "confdefs.h"
5114 /* Override any gcc2 internal prototype to avoid an error.  */
5115 /* We use char because int might match the return type of a gcc2
5116     builtin and then its argument prototype would still apply.  */
5117 char connect();
5118
5119 int main() {
5120 connect()
5121 ; return 0; }
5122 EOF
5123 if { (eval echo configure:5124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5124   rm -rf conftest*
5125   eval "ac_cv_lib_$ac_lib_var=yes"
5126 else
5127   echo "configure: failed program was:" >&5
5128   cat conftest.$ac_ext >&5
5129   rm -rf conftest*
5130   eval "ac_cv_lib_$ac_lib_var=no"
5131 fi
5132 rm -f conftest*
5133 LIBS="$ac_save_LIBS"
5134
5135 fi
5136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5137   echo "$ac_t""yes" 1>&6
5138   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142
5143     fi
5144
5145     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5146     echo $ac_n "checking for remove""... $ac_c" 1>&6
5147 echo "configure:5148: checking for remove" >&5
5148 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5149   echo $ac_n "(cached) $ac_c" 1>&6
5150 else
5151   cat > conftest.$ac_ext <<EOF
5152 #line 5153 "configure"
5153 #include "confdefs.h"
5154 /* System header to define __stub macros and hopefully few prototypes,
5155     which can conflict with char remove(); below.  */
5156 #include <assert.h>
5157 /* Override any gcc2 internal prototype to avoid an error.  */
5158 /* We use char because int might match the return type of a gcc2
5159     builtin and then its argument prototype would still apply.  */
5160 char remove();
5161
5162 int main() {
5163
5164 /* The GNU C library defines this for functions which it implements
5165     to always fail with ENOSYS.  Some functions are actually named
5166     something starting with __ and the normal name is an alias.  */
5167 #if defined (__stub_remove) || defined (__stub___remove)
5168 choke me
5169 #else
5170 remove();
5171 #endif
5172
5173 ; return 0; }
5174 EOF
5175 if { (eval echo configure:5176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5176   rm -rf conftest*
5177   eval "ac_cv_func_remove=yes"
5178 else
5179   echo "configure: failed program was:" >&5
5180   cat conftest.$ac_ext >&5
5181   rm -rf conftest*
5182   eval "ac_cv_func_remove=no"
5183 fi
5184 rm -f conftest*
5185 fi
5186
5187 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5188   echo "$ac_t""yes" 1>&6
5189   :
5190 else
5191   echo "$ac_t""no" 1>&6
5192 fi
5193
5194     if test $ac_cv_func_remove = no; then
5195       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5196 echo "configure:5197: checking for remove in -lposix" >&5
5197 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5198 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5199   echo $ac_n "(cached) $ac_c" 1>&6
5200 else
5201   ac_save_LIBS="$LIBS"
5202 LIBS="-lposix  $LIBS"
5203 cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5206 /* Override any gcc2 internal prototype to avoid an error.  */
5207 /* We use char because int might match the return type of a gcc2
5208     builtin and then its argument prototype would still apply.  */
5209 char remove();
5210
5211 int main() {
5212 remove()
5213 ; return 0; }
5214 EOF
5215 if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5216   rm -rf conftest*
5217   eval "ac_cv_lib_$ac_lib_var=yes"
5218 else
5219   echo "configure: failed program was:" >&5
5220   cat conftest.$ac_ext >&5
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=no"
5223 fi
5224 rm -f conftest*
5225 LIBS="$ac_save_LIBS"
5226
5227 fi
5228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5231 else
5232   echo "$ac_t""no" 1>&6
5233 fi
5234
5235     fi
5236
5237     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5238     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5239 echo "configure:5240: checking for shmat" >&5
5240 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5241   echo $ac_n "(cached) $ac_c" 1>&6
5242 else
5243   cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246 /* System header to define __stub macros and hopefully few prototypes,
5247     which can conflict with char shmat(); below.  */
5248 #include <assert.h>
5249 /* Override any gcc2 internal prototype to avoid an error.  */
5250 /* We use char because int might match the return type of a gcc2
5251     builtin and then its argument prototype would still apply.  */
5252 char shmat();
5253
5254 int main() {
5255
5256 /* The GNU C library defines this for functions which it implements
5257     to always fail with ENOSYS.  Some functions are actually named
5258     something starting with __ and the normal name is an alias.  */
5259 #if defined (__stub_shmat) || defined (__stub___shmat)
5260 choke me
5261 #else
5262 shmat();
5263 #endif
5264
5265 ; return 0; }
5266 EOF
5267 if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5268   rm -rf conftest*
5269   eval "ac_cv_func_shmat=yes"
5270 else
5271   echo "configure: failed program was:" >&5
5272   cat conftest.$ac_ext >&5
5273   rm -rf conftest*
5274   eval "ac_cv_func_shmat=no"
5275 fi
5276 rm -f conftest*
5277 fi
5278
5279 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5280   echo "$ac_t""yes" 1>&6
5281   :
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285
5286     if test $ac_cv_func_shmat = no; then
5287       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5288 echo "configure:5289: checking for shmat in -lipc" >&5
5289 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5291   echo $ac_n "(cached) $ac_c" 1>&6
5292 else
5293   ac_save_LIBS="$LIBS"
5294 LIBS="-lipc  $LIBS"
5295 cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298 /* Override any gcc2 internal prototype to avoid an error.  */
5299 /* We use char because int might match the return type of a gcc2
5300     builtin and then its argument prototype would still apply.  */
5301 char shmat();
5302
5303 int main() {
5304 shmat()
5305 ; return 0; }
5306 EOF
5307 if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5308   rm -rf conftest*
5309   eval "ac_cv_lib_$ac_lib_var=yes"
5310 else
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=no"
5315 fi
5316 rm -f conftest*
5317 LIBS="$ac_save_LIBS"
5318
5319 fi
5320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5321   echo "$ac_t""yes" 1>&6
5322   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5323 else
5324   echo "$ac_t""no" 1>&6
5325 fi
5326
5327     fi
5328   fi
5329
5330   # Check for libraries that X11R6 Xt/Xaw programs need.
5331   ac_save_LDFLAGS="$LDFLAGS"
5332   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5333   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5334   # check for ICE first), but we must link in the order -lSM -lICE or
5335   # we get undefined symbols.  So assume we have SM if we have ICE.
5336   # These have to be linked with before -lX11, unlike the other
5337   # libraries we check for below, so use a different variable.
5338   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5339   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5340 echo "configure:5341: checking for IceConnectionNumber in -lICE" >&5
5341 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5343   echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345   ac_save_LIBS="$LIBS"
5346 LIBS="-lICE  $LIBS"
5347 cat > conftest.$ac_ext <<EOF
5348 #line 5349 "configure"
5349 #include "confdefs.h"
5350 /* Override any gcc2 internal prototype to avoid an error.  */
5351 /* We use char because int might match the return type of a gcc2
5352     builtin and then its argument prototype would still apply.  */
5353 char IceConnectionNumber();
5354
5355 int main() {
5356 IceConnectionNumber()
5357 ; return 0; }
5358 EOF
5359 if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5360   rm -rf conftest*
5361   eval "ac_cv_lib_$ac_lib_var=yes"
5362 else
5363   echo "configure: failed program was:" >&5
5364   cat conftest.$ac_ext >&5
5365   rm -rf conftest*
5366   eval "ac_cv_lib_$ac_lib_var=no"
5367 fi
5368 rm -f conftest*
5369 LIBS="$ac_save_LIBS"
5370
5371 fi
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5373   echo "$ac_t""yes" 1>&6
5374   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5375 else
5376   echo "$ac_t""no" 1>&6
5377 fi
5378
5379   LDFLAGS="$ac_save_LDFLAGS"
5380
5381 fi
5382
5383
5384         LIBS="$LIBS $X_EXTRA_LIBS"
5385         CFLAGS="$CFLAGS $X_CFLAGS"
5386         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5387         LDFLAGS="$LDFLAGS $X_LIBS"
5388
5389         
5390         X11_LIBS=""
5391         echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5392 echo "configure:5393: checking for XOpenDisplay in -lX11" >&5
5393 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5395   echo $ac_n "(cached) $ac_c" 1>&6
5396 else
5397   ac_save_LIBS="$LIBS"
5398 LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
5399 cat > conftest.$ac_ext <<EOF
5400 #line 5401 "configure"
5401 #include "confdefs.h"
5402 /* Override any gcc2 internal prototype to avoid an error.  */
5403 /* We use char because int might match the return type of a gcc2
5404     builtin and then its argument prototype would still apply.  */
5405 char XOpenDisplay();
5406
5407 int main() {
5408 XOpenDisplay()
5409 ; return 0; }
5410 EOF
5411 if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5412   rm -rf conftest*
5413   eval "ac_cv_lib_$ac_lib_var=yes"
5414 else
5415   echo "configure: failed program was:" >&5
5416   cat conftest.$ac_ext >&5
5417   rm -rf conftest*
5418   eval "ac_cv_lib_$ac_lib_var=no"
5419 fi
5420 rm -f conftest*
5421 LIBS="$ac_save_LIBS"
5422
5423 fi
5424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5425   echo "$ac_t""yes" 1>&6
5426   X11_LIBS="-lX11"
5427 else
5428   echo "$ac_t""no" 1>&6
5429 fi
5430
5431         if test "$X11_LIBS" = ""; then
5432                                 echo "configure: warning: The X11 library '-lX11' could not be found.
5433                             Please use the configure options '--x-includes=DIR'
5434                             and '--x-libraries=DIR' to specify the X location.
5435                             See the file 'config.log' for further diagnostics." 1>&2
5436         fi
5437         
5438         
5439         
5440
5441         LIBS="$ice_save_LIBS"
5442         CFLAGS="$ice_save_CFLAGS"
5443         CPPFLAGS="$ice_save_CPPFLAGS"
5444         LDFLAGS="$ice_save_LDFLAGS"
5445 fi
5446
5447
5448 if test "$USE_TCL" = "true"
5449 then
5450         TCL_INCDIR=no
5451         ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
5452 echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
5453 echo "configure:5454: checking for tcl.h" >&5
5454 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5455   echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457   cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460 #include <tcl.h>
5461 EOF
5462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5463 { (eval echo configure:5464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5464 ac_err=`grep -v '^ *+' conftest.out`
5465 if test -z "$ac_err"; then
5466   rm -rf conftest*
5467   eval "ac_cv_header_$ac_safe=yes"
5468 else
5469   echo "$ac_err" >&5
5470   echo "configure: failed program was:" >&5
5471   cat conftest.$ac_ext >&5
5472   rm -rf conftest*
5473   eval "ac_cv_header_$ac_safe=no"
5474 fi
5475 rm -f conftest*
5476 fi
5477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5478   echo "$ac_t""yes" 1>&6
5479   TCL_INCDIR=yes
5480 else
5481   echo "$ac_t""no" 1>&6
5482 fi
5483
5484         if test "$TCL_INCDIR" = "no"; then
5485                 echo "configure: warning: tcl support disabled; tcl.h missing" 1>&2
5486                 USE_TCL=
5487         fi
5488 fi
5489
5490 if test "$USE_TCL" = "true"; then
5491         TCL_LIB=
5492         tcl_libs="tcl8.0 tcl80 tcl7.6 tcl76 tcl"
5493         for tcl_lib in $tcl_libs; do
5494                 if test -z "$TCL_LIB"; then
5495                         echo $ac_n "checking for main in -l$tcl_lib""... $ac_c" 1>&6
5496 echo "configure:5497: checking for main in -l$tcl_lib" >&5
5497 ac_lib_var=`echo $tcl_lib'_'main | sed 'y%./+-%__p_%'`
5498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   ac_save_LIBS="$LIBS"
5502 LIBS="-l$tcl_lib  $LIBS"
5503 cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506
5507 int main() {
5508 main()
5509 ; return 0; }
5510 EOF
5511 if { (eval echo configure:5512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5512   rm -rf conftest*
5513   eval "ac_cv_lib_$ac_lib_var=yes"
5514 else
5515   echo "configure: failed program was:" >&5
5516   cat conftest.$ac_ext >&5
5517   rm -rf conftest*
5518   eval "ac_cv_lib_$ac_lib_var=no"
5519 fi
5520 rm -f conftest*
5521 LIBS="$ac_save_LIBS"
5522
5523 fi
5524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5525   echo "$ac_t""yes" 1>&6
5526   TCL_LIB=$tcl_lib
5527 else
5528   echo "$ac_t""no" 1>&6
5529 fi
5530
5531                 fi
5532         done
5533         if test -z "$TCL_LIB"; then
5534                 echo "configure: warning: tcl support disabled; Tcl library missing" 1>&2
5535                 USE_TCL=
5536         else
5537                 TCL_LIB=-l$TCL_LIB
5538         fi
5539         
5540 fi
5541
5542
5543 if test "$USE_TCL" = "true"
5544 then
5545         ice_save_LIBS="$LIBS"
5546         ice_save_CFLAGS="$CFLAGS"
5547         ice_save_CPPFLAGS="$CPPFLAGS"
5548         ice_save_LDFLAGS="$LDFLAGS"
5549
5550         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5551
5552         TK_INCDIR=no
5553         ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5554 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5555 echo "configure:5556: checking for tk.h" >&5
5556 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5557   echo $ac_n "(cached) $ac_c" 1>&6
5558 else
5559   cat > conftest.$ac_ext <<EOF
5560 #line 5561 "configure"
5561 #include "confdefs.h"
5562 #include <tk.h>
5563 EOF
5564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5565 { (eval echo configure:5566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5566 ac_err=`grep -v '^ *+' conftest.out`
5567 if test -z "$ac_err"; then
5568   rm -rf conftest*
5569   eval "ac_cv_header_$ac_safe=yes"
5570 else
5571   echo "$ac_err" >&5
5572   echo "configure: failed program was:" >&5
5573   cat conftest.$ac_ext >&5
5574   rm -rf conftest*
5575   eval "ac_cv_header_$ac_safe=no"
5576 fi
5577 rm -f conftest*
5578 fi
5579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5580   echo "$ac_t""yes" 1>&6
5581   TK_INCDIR=yes
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585
5586         if test "$TK_INCDIR" = "no"; then
5587                 echo "configure: warning: tcl support disabled; tk.h missing" 1>&2
5588                 USE_TCL=
5589         fi
5590
5591         LIBS="$ice_save_LIBS"
5592         CFLAGS="$ice_save_CFLAGS"
5593         CPPFLAGS="$ice_save_CPPFLAGS"
5594         LDFLAGS="$ice_save_LDFLAGS"
5595 fi
5596
5597 if test "$USE_TCL" = "true"
5598 then
5599         ice_save_LIBS="$LIBS"
5600         ice_save_CFLAGS="$CFLAGS"
5601         ice_save_CPPFLAGS="$CPPFLAGS"
5602         ice_save_LDFLAGS="$LDFLAGS"
5603
5604         LIBS="$LIBS $X_EXTRA_LIBS"
5605         CFLAGS="$CFLAGS $X_CFLAGS"
5606         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5607         LDFLAGS="$LDFLAGS $X_LIBS"
5608
5609         TK_LIB=
5610         tk_libs="tk8.0 tk80 tk4.2 tk42 tk"
5611         for tk_lib in $tk_libs; do
5612                 if test -z "$TK_LIB"; then
5613                         echo $ac_n "checking for main in -l$tk_lib""... $ac_c" 1>&6
5614 echo "configure:5615: checking for main in -l$tk_lib" >&5
5615 ac_lib_var=`echo $tk_lib'_'main | sed 'y%./+-%__p_%'`
5616 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5617   echo $ac_n "(cached) $ac_c" 1>&6
5618 else
5619   ac_save_LIBS="$LIBS"
5620 LIBS="-l$tk_lib $TCL_LIB $X_PRE_LIBS $X_LIBS $X11_LIBS $LIBS"
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624
5625 int main() {
5626 main()
5627 ; return 0; }
5628 EOF
5629 if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5630   rm -rf conftest*
5631   eval "ac_cv_lib_$ac_lib_var=yes"
5632 else
5633   echo "configure: failed program was:" >&5
5634   cat conftest.$ac_ext >&5
5635   rm -rf conftest*
5636   eval "ac_cv_lib_$ac_lib_var=no"
5637 fi
5638 rm -f conftest*
5639 LIBS="$ac_save_LIBS"
5640
5641 fi
5642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5643   echo "$ac_t""yes" 1>&6
5644   TK_LIB=$tk_lib
5645 else
5646   echo "$ac_t""no" 1>&6
5647 fi
5648
5649                 fi
5650         done
5651         if test -z "$TK_LIB"; then
5652                 echo "configure: warning: tk support disabled; Tk library missing" 1>&2
5653                 USE_TCL=
5654         else
5655                 TK_LIB=-l$TK_LIB
5656         fi
5657
5658         
5659
5660         LIBS="$ice_save_LIBS"
5661         CFLAGS="$ice_save_CFLAGS"
5662         CPPFLAGS="$ice_save_CPPFLAGS"
5663         LDFLAGS="$ice_save_LDFLAGS"
5664 fi
5665
5666 trap '' 1 2 15
5667 cat > confcache <<\EOF
5668 # This file is a shell script that caches the results of configure
5669 # tests run on this system so they can be shared between configure
5670 # scripts and configure runs.  It is not useful on other systems.
5671 # If it contains results you don't want to keep, you may remove or edit it.
5672 #
5673 # By default, configure uses ./config.cache as the cache file,
5674 # creating it if it does not exist already.  You can give configure
5675 # the --cache-file=FILE option to use a different cache file; that is
5676 # what configure does when it calls configure scripts in
5677 # subdirectories, so they share the cache.
5678 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5679 # config.status only pays attention to the cache file if you give it the
5680 # --recheck option to rerun configure.
5681 #
5682 EOF
5683 # The following way of writing the cache mishandles newlines in values,
5684 # but we know of no workaround that is simple, portable, and efficient.
5685 # So, don't put newlines in cache variables' values.
5686 # Ultrix sh set writes to stderr and can't be redirected directly,
5687 # and sets the high bit in the cache file unless we assign to the vars.
5688 (set) 2>&1 |
5689   case `(ac_space=' '; set) 2>&1` in
5690   *ac_space=\ *)
5691     # `set' does not quote correctly, so add quotes (double-quote substitution
5692     # turns \\\\ into \\, and sed turns \\ into \).
5693     sed -n \
5694       -e "s/'/'\\\\''/g" \
5695       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5696     ;;
5697   *)
5698     # `set' quotes correctly as required by POSIX, so do not add quotes.
5699     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5700     ;;
5701   esac >> confcache
5702 if cmp -s $cache_file confcache; then
5703   :
5704 else
5705   if test -w $cache_file; then
5706     echo "updating cache $cache_file"
5707     cat confcache > $cache_file
5708   else
5709     echo "not updating unwritable cache $cache_file"
5710   fi
5711 fi
5712 rm -f confcache
5713
5714 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5715
5716 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5717 # Let make expand exec_prefix.
5718 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5719
5720 # Any assignment to VPATH causes Sun make to only execute
5721 # the first set of double-colon rules, so remove it if not needed.
5722 # If there is a colon in the path, we need to keep it.
5723 if test "x$srcdir" = x.; then
5724   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5725 fi
5726
5727 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5728
5729 DEFS=-DHAVE_CONFIG_H
5730
5731 # Without the "./", some shells look in PATH for config.status.
5732 : ${CONFIG_STATUS=./config.status}
5733
5734 echo creating $CONFIG_STATUS
5735 rm -f $CONFIG_STATUS
5736 cat > $CONFIG_STATUS <<EOF
5737 #! /bin/sh
5738 # Generated automatically by configure.
5739 # Run this file to recreate the current configuration.
5740 # This directory was configured as follows,
5741 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5742 #
5743 # $0 $ac_configure_args
5744 #
5745 # Compiler output produced by configure, useful for debugging
5746 # configure, is in ./config.log if it exists.
5747
5748 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5749 for ac_option
5750 do
5751   case "\$ac_option" in
5752   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5753     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5754     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5755   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5756     echo "$CONFIG_STATUS generated by autoconf version 2.12"
5757     exit 0 ;;
5758   -help | --help | --hel | --he | --h)
5759     echo "\$ac_cs_usage"; exit 0 ;;
5760   *) echo "\$ac_cs_usage"; exit 1 ;;
5761   esac
5762 done
5763
5764 ac_given_srcdir=$srcdir
5765
5766 trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5767 EOF
5768 cat >> $CONFIG_STATUS <<EOF
5769
5770 # Protect against being on the right side of a sed subst in config.status.
5771 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5772  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5773 $ac_vpsub
5774 $extrasub
5775 s%@CFLAGS@%$CFLAGS%g
5776 s%@CPPFLAGS@%$CPPFLAGS%g
5777 s%@CXXFLAGS@%$CXXFLAGS%g
5778 s%@DEFS@%$DEFS%g
5779 s%@LDFLAGS@%$LDFLAGS%g
5780 s%@LIBS@%$LIBS%g
5781 s%@exec_prefix@%$exec_prefix%g
5782 s%@prefix@%$prefix%g
5783 s%@program_transform_name@%$program_transform_name%g
5784 s%@bindir@%$bindir%g
5785 s%@sbindir@%$sbindir%g
5786 s%@libexecdir@%$libexecdir%g
5787 s%@datadir@%$datadir%g
5788 s%@sysconfdir@%$sysconfdir%g
5789 s%@sharedstatedir@%$sharedstatedir%g
5790 s%@localstatedir@%$localstatedir%g
5791 s%@libdir@%$libdir%g
5792 s%@includedir@%$includedir%g
5793 s%@oldincludedir@%$oldincludedir%g
5794 s%@infodir@%$infodir%g
5795 s%@mandir@%$mandir%g
5796 s%@host@%$host%g
5797 s%@host_alias@%$host_alias%g
5798 s%@host_cpu@%$host_cpu%g
5799 s%@host_vendor@%$host_vendor%g
5800 s%@host_os@%$host_os%g
5801 s%@TAS@%$TAS%g
5802 s%@PORTNAME@%$PORTNAME%g
5803 s%@CC@%$CC%g
5804 s%@CPP@%$CPP%g
5805 s%@AROPT@%$AROPT%g
5806 s%@SHARED_LIB@%$SHARED_LIB%g
5807 s%@DLSUFFIX@%$DLSUFFIX%g
5808 s%@DL_LIB@%$DL_LIB%g
5809 s%@USE_TCL@%$USE_TCL%g
5810 s%@USE_PERL@%$USE_PERL%g
5811 s%@HAVECXX@%$HAVECXX%g
5812 s%@INSTALL@%$INSTALL%g
5813 s%@INSTLOPTS@%$INSTLOPTS%g
5814 s%@INSTL_LIB_OPTS@%$INSTL_LIB_OPTS%g
5815 s%@INSTL_EXE_OPTS@%$INSTL_EXE_OPTS%g
5816 s%@DASH_N@%$DASH_N%g
5817 s%@BACKSLASH_C@%$BACKSLASH_C%g
5818 s%@LEX@%$LEX%g
5819 s%@LEXLIB@%$LEXLIB%g
5820 s%@LN_S@%$LN_S%g
5821 s%@SET_MAKE@%$SET_MAKE%g
5822 s%@RANLIB@%$RANLIB%g
5823 s%@find@%$find%g
5824 s%@tar@%$tar%g
5825 s%@split@%$split%g
5826 s%@etags@%$etags%g
5827 s%@xargs@%$xargs%g
5828 s%@ipcs@%$ipcs%g
5829 s%@ipcrm@%$ipcrm%g
5830 s%@TR@%$TR%g
5831 s%@TRARGS@%$TRARGS%g
5832 s%@YACC@%$YACC%g
5833 s%@YFLAGS@%$YFLAGS%g
5834 s%@yacc@%$yacc%g
5835 s%@bison@%$bison%g
5836 s%@LIBOBJS@%$LIBOBJS%g
5837 s%@ISINF@%$ISINF%g
5838 s%@GETRUSAGE@%$GETRUSAGE%g
5839 s%@SRANDOM@%$SRANDOM%g
5840 s%@GETHOSTNAME@%$GETHOSTNAME%g
5841 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
5842 s%@INET_ATON@%$INET_ATON%g
5843 s%@STRERROR@%$STRERROR%g
5844 s%@STRERROR2@%$STRERROR2%g
5845 s%@STRDUP@%$STRDUP%g
5846 s%@STRTOL@%$STRTOL%g
5847 s%@STRTOUL@%$STRTOUL%g
5848 s%@STRCASECMP@%$STRCASECMP%g
5849 s%@X_CFLAGS@%$X_CFLAGS%g
5850 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
5851 s%@X_LIBS@%$X_LIBS%g
5852 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5853 s%@X11_LIBS@%$X11_LIBS%g
5854 s%@TCL_LIB@%$TCL_LIB%g
5855 s%@TK_LIB@%$TK_LIB%g
5856
5857 CEOF
5858 EOF
5859
5860 cat >> $CONFIG_STATUS <<\EOF
5861
5862 # Split the substitutions into bite-sized pieces for seds with
5863 # small command number limits, like on Digital OSF/1 and HP-UX.
5864 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5865 ac_file=1 # Number of current file.
5866 ac_beg=1 # First line for current file.
5867 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5868 ac_more_lines=:
5869 ac_sed_cmds=""
5870 while $ac_more_lines; do
5871   if test $ac_beg -gt 1; then
5872     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5873   else
5874     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5875   fi
5876   if test ! -s conftest.s$ac_file; then
5877     ac_more_lines=false
5878     rm -f conftest.s$ac_file
5879   else
5880     if test -z "$ac_sed_cmds"; then
5881       ac_sed_cmds="sed -f conftest.s$ac_file"
5882     else
5883       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5884     fi
5885     ac_file=`expr $ac_file + 1`
5886     ac_beg=$ac_end
5887     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5888   fi
5889 done
5890 if test -z "$ac_sed_cmds"; then
5891   ac_sed_cmds=cat
5892 fi
5893 EOF
5894
5895 cat >> $CONFIG_STATUS <<EOF
5896
5897 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile "}
5898 EOF
5899 cat >> $CONFIG_STATUS <<\EOF
5900 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5901   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5902   case "$ac_file" in
5903   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5904        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5905   *) ac_file_in="${ac_file}.in" ;;
5906   esac
5907
5908   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5909
5910   # Remove last slash and all that follows it.  Not all systems have dirname.
5911   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5912   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5913     # The file is in a subdirectory.
5914     test ! -d "$ac_dir" && mkdir "$ac_dir"
5915     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5916     # A "../" for each directory in $ac_dir_suffix.
5917     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5918   else
5919     ac_dir_suffix= ac_dots=
5920   fi
5921
5922   case "$ac_given_srcdir" in
5923   .)  srcdir=.
5924       if test -z "$ac_dots"; then top_srcdir=.
5925       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5926   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5927   *) # Relative path.
5928     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5929     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5930   esac
5931
5932
5933   echo creating "$ac_file"
5934   rm -f "$ac_file"
5935   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5936   case "$ac_file" in
5937   *Makefile*) ac_comsub="1i\\
5938 # $configure_input" ;;
5939   *) ac_comsub= ;;
5940   esac
5941
5942   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5943   sed -e "$ac_comsub
5944 s%@configure_input@%$configure_input%g
5945 s%@srcdir@%$srcdir%g
5946 s%@top_srcdir@%$top_srcdir%g
5947 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5948 fi; done
5949 rm -f conftest.s*
5950
5951 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5952 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5953 #
5954 # ac_d sets the value in "#define NAME VALUE" lines.
5955 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5956 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5957 ac_dC='\3'
5958 ac_dD='%g'
5959 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5960 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5961 ac_uB='\([      ]\)%\1#\2define\3'
5962 ac_uC=' '
5963 ac_uD='\4%g'
5964 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5965 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5966 ac_eB='$%\1#\2define\3'
5967 ac_eC=' '
5968 ac_eD='%g'
5969
5970 if test "${CONFIG_HEADERS+set}" != set; then
5971 EOF
5972 cat >> $CONFIG_STATUS <<EOF
5973   CONFIG_HEADERS="include/config.h"
5974 EOF
5975 cat >> $CONFIG_STATUS <<\EOF
5976 fi
5977 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5978   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5979   case "$ac_file" in
5980   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5981        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5982   *) ac_file_in="${ac_file}.in" ;;
5983   esac
5984
5985   echo creating $ac_file
5986
5987   rm -f conftest.frag conftest.in conftest.out
5988   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5989   cat $ac_file_inputs > conftest.in
5990
5991 EOF
5992
5993 # Transform confdefs.h into a sed script conftest.vals that substitutes
5994 # the proper values into config.h.in to produce config.h.  And first:
5995 # Protect against being on the right side of a sed subst in config.status.
5996 # Protect against being in an unquoted here document in config.status.
5997 rm -f conftest.vals
5998 cat > conftest.hdr <<\EOF
5999 s/[\\&%]/\\&/g
6000 s%[\\$`]%\\&%g
6001 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6002 s%ac_d%ac_u%gp
6003 s%ac_u%ac_e%gp
6004 EOF
6005 sed -n -f conftest.hdr confdefs.h > conftest.vals
6006 rm -f conftest.hdr
6007
6008 # This sed command replaces #undef with comments.  This is necessary, for
6009 # example, in the case of _POSIX_SOURCE, which is predefined and required
6010 # on some systems where configure will not decide to define it.
6011 cat >> conftest.vals <<\EOF
6012 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6013 EOF
6014
6015 # Break up conftest.vals because some shells have a limit on
6016 # the size of here documents, and old seds have small limits too.
6017
6018 rm -f conftest.tail
6019 while :
6020 do
6021   ac_lines=`grep -c . conftest.vals`
6022   # grep -c gives empty output for an empty file on some AIX systems.
6023   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6024   # Write a limited-size here document to conftest.frag.
6025   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6026   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6027   echo 'CEOF
6028   sed -f conftest.frag conftest.in > conftest.out
6029   rm -f conftest.in
6030   mv conftest.out conftest.in
6031 ' >> $CONFIG_STATUS
6032   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6033   rm -f conftest.vals
6034   mv conftest.tail conftest.vals
6035 done
6036 rm -f conftest.vals
6037
6038 cat >> $CONFIG_STATUS <<\EOF
6039   rm -f conftest.frag conftest.h
6040   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6041   cat conftest.in >> conftest.h
6042   rm -f conftest.in
6043   if cmp -s $ac_file conftest.h 2>/dev/null; then
6044     echo "$ac_file is unchanged"
6045     rm -f conftest.h
6046   else
6047     # Remove last slash and all that follows it.  Not all systems have dirname.
6048       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6049       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6050       # The file is in a subdirectory.
6051       test ! -d "$ac_dir" && mkdir "$ac_dir"
6052     fi
6053     rm -f $ac_file
6054     mv conftest.h $ac_file
6055   fi
6056 fi; done
6057
6058 EOF
6059
6060 cat >> $CONFIG_STATUS <<EOF
6061 ac_sources="backend/port/tas/${tas_file} backend/port/dynloader/${os}.c backend/port/dynloader/${os}.h include/port/${os}.h makefiles/Makefile.${os}"
6062 ac_dests="backend/port/tas.s backend/port/dynloader.c include/dynloader.h include/os.h Makefile.port"
6063 EOF
6064
6065 cat >> $CONFIG_STATUS <<\EOF
6066 srcdir=$ac_given_srcdir
6067 while test -n "$ac_sources"; do
6068   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6069   set $ac_sources; ac_source=$1; shift; ac_sources=$*
6070
6071   echo "linking $srcdir/$ac_source to $ac_dest"
6072
6073   if test ! -r $srcdir/$ac_source; then
6074     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6075   fi
6076   rm -f $ac_dest
6077
6078   # Make relative symlinks.
6079   # Remove last slash and all that follows it.  Not all systems have dirname.
6080   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6081   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6082     # The dest file is in a subdirectory.
6083     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6084     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6085     # A "../" for each directory in $ac_dest_dir_suffix.
6086     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6087   else
6088     ac_dest_dir_suffix= ac_dots=
6089   fi
6090
6091   case "$srcdir" in
6092   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6093   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6094   esac
6095
6096   # Make a symlink if possible; otherwise try a hard link.
6097   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6098     ln $srcdir/$ac_source $ac_dest; then :
6099   else
6100     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6101   fi
6102 done
6103 EOF
6104 cat >> $CONFIG_STATUS <<EOF
6105
6106 EOF
6107 cat >> $CONFIG_STATUS <<\EOF
6108
6109 exit 0
6110 EOF
6111 chmod +x $CONFIG_STATUS
6112 rm -fr confdefs* $ac_clean_files
6113 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6114