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