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