]> granicus.if.org Git - postgresql/blob - src/configure
From: t-ishii@sra.co.jp
[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 Installation Program
653
654 Welcome to the new improved PostgreSQL installation program.
655 This configuration program is for version 6.3 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 "${DEF_PGPORT}"
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"
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 union semun""... $ac_c" 1>&6
3294 echo "configure:3295: checking for union semun" >&5
3295 cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298 #include <sys/types.h>
3299 #include <sys/ipc.h>
3300 #include <sys/sem.h>
3301 int main() {
3302 union semun semun;
3303 ; return 0; }
3304 EOF
3305 if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3306   rm -rf conftest*
3307   cat >> confdefs.h <<\EOF
3308 #define HAVE_UNION_SEMUN 1
3309 EOF
3310  echo "$ac_t""yes" 1>&6
3311 else
3312   echo "configure: failed program was:" >&5
3313   cat conftest.$ac_ext >&5
3314   rm -rf conftest*
3315   echo "$ac_t""no" 1>&6
3316 fi
3317 rm -f conftest*
3318
3319 if test x$ac_cv_prog_gcc = xyes; then
3320     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3321 echo "configure:3322: checking whether ${CC-cc} needs -traditional" >&5
3322 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3323   echo $ac_n "(cached) $ac_c" 1>&6
3324 else
3325     ac_pattern="Autoconf.*'x'"
3326   cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 #include <sgtty.h>
3330 Autoconf TIOCGETP
3331 EOF
3332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3333   egrep "$ac_pattern" >/dev/null 2>&1; then
3334   rm -rf conftest*
3335   ac_cv_prog_gcc_traditional=yes
3336 else
3337   rm -rf conftest*
3338   ac_cv_prog_gcc_traditional=no
3339 fi
3340 rm -f conftest*
3341
3342
3343   if test $ac_cv_prog_gcc_traditional = no; then
3344     cat > conftest.$ac_ext <<EOF
3345 #line 3346 "configure"
3346 #include "confdefs.h"
3347 #include <termio.h>
3348 Autoconf TCGETA
3349 EOF
3350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3351   egrep "$ac_pattern" >/dev/null 2>&1; then
3352   rm -rf conftest*
3353   ac_cv_prog_gcc_traditional=yes
3354 fi
3355 rm -f conftest*
3356
3357   fi
3358 fi
3359
3360 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3361   if test $ac_cv_prog_gcc_traditional = yes; then
3362     CC="$CC -traditional"
3363   fi
3364 fi
3365
3366 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3367 echo "configure:3368: checking for 8-bit clean memcmp" >&5
3368 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3369   echo $ac_n "(cached) $ac_c" 1>&6
3370 else
3371   if test "$cross_compiling" = yes; then
3372   ac_cv_func_memcmp_clean=no
3373 else
3374   cat > conftest.$ac_ext <<EOF
3375 #line 3376 "configure"
3376 #include "confdefs.h"
3377
3378 main()
3379 {
3380   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3381   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3382 }
3383
3384 EOF
3385 if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3386 then
3387   ac_cv_func_memcmp_clean=yes
3388 else
3389   echo "configure: failed program was:" >&5
3390   cat conftest.$ac_ext >&5
3391   rm -fr conftest*
3392   ac_cv_func_memcmp_clean=no
3393 fi
3394 rm -fr conftest*
3395 fi
3396
3397 fi
3398
3399 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3400 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3401
3402 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3403 echo "configure:3404: checking return type of signal handlers" >&5
3404 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3405   echo $ac_n "(cached) $ac_c" 1>&6
3406 else
3407   cat > conftest.$ac_ext <<EOF
3408 #line 3409 "configure"
3409 #include "confdefs.h"
3410 #include <sys/types.h>
3411 #include <signal.h>
3412 #ifdef signal
3413 #undef signal
3414 #endif
3415 #ifdef __cplusplus
3416 extern "C" void (*signal (int, void (*)(int)))(int);
3417 #else
3418 void (*signal ()) ();
3419 #endif
3420
3421 int main() {
3422 int i;
3423 ; return 0; }
3424 EOF
3425 if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3426   rm -rf conftest*
3427   ac_cv_type_signal=void
3428 else
3429   echo "configure: failed program was:" >&5
3430   cat conftest.$ac_ext >&5
3431   rm -rf conftest*
3432   ac_cv_type_signal=int
3433 fi
3434 rm -f conftest*
3435 fi
3436
3437 echo "$ac_t""$ac_cv_type_signal" 1>&6
3438 cat >> confdefs.h <<EOF
3439 #define RETSIGTYPE $ac_cv_type_signal
3440 EOF
3441
3442
3443 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3444 echo "configure:3445: checking for vprintf" >&5
3445 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3446   echo $ac_n "(cached) $ac_c" 1>&6
3447 else
3448   cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 /* System header to define __stub macros and hopefully few prototypes,
3452     which can conflict with char vprintf(); below.  */
3453 #include <assert.h>
3454 /* Override any gcc2 internal prototype to avoid an error.  */
3455 /* We use char because int might match the return type of a gcc2
3456     builtin and then its argument prototype would still apply.  */
3457 char vprintf();
3458
3459 int main() {
3460
3461 /* The GNU C library defines this for functions which it implements
3462     to always fail with ENOSYS.  Some functions are actually named
3463     something starting with __ and the normal name is an alias.  */
3464 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3465 choke me
3466 #else
3467 vprintf();
3468 #endif
3469
3470 ; return 0; }
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3473   rm -rf conftest*
3474   eval "ac_cv_func_vprintf=yes"
3475 else
3476   echo "configure: failed program was:" >&5
3477   cat conftest.$ac_ext >&5
3478   rm -rf conftest*
3479   eval "ac_cv_func_vprintf=no"
3480 fi
3481 rm -f conftest*
3482 fi
3483
3484 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3485   echo "$ac_t""yes" 1>&6
3486   cat >> confdefs.h <<\EOF
3487 #define HAVE_VPRINTF 1
3488 EOF
3489
3490 else
3491   echo "$ac_t""no" 1>&6
3492 fi
3493
3494 if test "$ac_cv_func_vprintf" != yes; then
3495 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3496 echo "configure:3497: checking for _doprnt" >&5
3497 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3498   echo $ac_n "(cached) $ac_c" 1>&6
3499 else
3500   cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 /* System header to define __stub macros and hopefully few prototypes,
3504     which can conflict with char _doprnt(); below.  */
3505 #include <assert.h>
3506 /* Override any gcc2 internal prototype to avoid an error.  */
3507 /* We use char because int might match the return type of a gcc2
3508     builtin and then its argument prototype would still apply.  */
3509 char _doprnt();
3510
3511 int main() {
3512
3513 /* The GNU C library defines this for functions which it implements
3514     to always fail with ENOSYS.  Some functions are actually named
3515     something starting with __ and the normal name is an alias.  */
3516 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3517 choke me
3518 #else
3519 _doprnt();
3520 #endif
3521
3522 ; return 0; }
3523 EOF
3524 if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3525   rm -rf conftest*
3526   eval "ac_cv_func__doprnt=yes"
3527 else
3528   echo "configure: failed program was:" >&5
3529   cat conftest.$ac_ext >&5
3530   rm -rf conftest*
3531   eval "ac_cv_func__doprnt=no"
3532 fi
3533 rm -f conftest*
3534 fi
3535
3536 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3537   echo "$ac_t""yes" 1>&6
3538   cat >> confdefs.h <<\EOF
3539 #define HAVE_DOPRNT 1
3540 EOF
3541
3542 else
3543   echo "$ac_t""no" 1>&6
3544 fi
3545
3546 fi
3547
3548 for ac_func in tzset vfork memmove sigsetjmp kill sysconf fpclass
3549 do
3550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3551 echo "configure:3552: checking for $ac_func" >&5
3552 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 /* System header to define __stub macros and hopefully few prototypes,
3559     which can conflict with char $ac_func(); below.  */
3560 #include <assert.h>
3561 /* Override any gcc2 internal prototype to avoid an error.  */
3562 /* We use char because int might match the return type of a gcc2
3563     builtin and then its argument prototype would still apply.  */
3564 char $ac_func();
3565
3566 int main() {
3567
3568 /* The GNU C library defines this for functions which it implements
3569     to always fail with ENOSYS.  Some functions are actually named
3570     something starting with __ and the normal name is an alias.  */
3571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3572 choke me
3573 #else
3574 $ac_func();
3575 #endif
3576
3577 ; return 0; }
3578 EOF
3579 if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3580   rm -rf conftest*
3581   eval "ac_cv_func_$ac_func=yes"
3582 else
3583   echo "configure: failed program was:" >&5
3584   cat conftest.$ac_ext >&5
3585   rm -rf conftest*
3586   eval "ac_cv_func_$ac_func=no"
3587 fi
3588 rm -f conftest*
3589 fi
3590
3591 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3592   echo "$ac_t""yes" 1>&6
3593     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3594   cat >> confdefs.h <<EOF
3595 #define $ac_tr_func 1
3596 EOF
3597  
3598 else
3599   echo "$ac_t""no" 1>&6
3600 fi
3601 done
3602
3603 for ac_func in fp_class fp_class_d class
3604 do
3605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3606 echo "configure:3607: checking for $ac_func" >&5
3607 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 /* System header to define __stub macros and hopefully few prototypes,
3614     which can conflict with char $ac_func(); below.  */
3615 #include <assert.h>
3616 /* Override any gcc2 internal prototype to avoid an error.  */
3617 /* We use char because int might match the return type of a gcc2
3618     builtin and then its argument prototype would still apply.  */
3619 char $ac_func();
3620
3621 int main() {
3622
3623 /* The GNU C library defines this for functions which it implements
3624     to always fail with ENOSYS.  Some functions are actually named
3625     something starting with __ and the normal name is an alias.  */
3626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3627 choke me
3628 #else
3629 $ac_func();
3630 #endif
3631
3632 ; return 0; }
3633 EOF
3634 if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3635   rm -rf conftest*
3636   eval "ac_cv_func_$ac_func=yes"
3637 else
3638   echo "configure: failed program was:" >&5
3639   cat conftest.$ac_ext >&5
3640   rm -rf conftest*
3641   eval "ac_cv_func_$ac_func=no"
3642 fi
3643 rm -f conftest*
3644 fi
3645
3646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3647   echo "$ac_t""yes" 1>&6
3648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3649   cat >> confdefs.h <<EOF
3650 #define $ac_tr_func 1
3651 EOF
3652  
3653 else
3654   echo "$ac_t""no" 1>&6
3655 fi
3656 done
3657
3658 for ac_func in sigprocmask waitpid setsid fcvt
3659 do
3660 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3661 echo "configure:3662: checking for $ac_func" >&5
3662 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3663   echo $ac_n "(cached) $ac_c" 1>&6
3664 else
3665   cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 /* System header to define __stub macros and hopefully few prototypes,
3669     which can conflict with char $ac_func(); below.  */
3670 #include <assert.h>
3671 /* Override any gcc2 internal prototype to avoid an error.  */
3672 /* We use char because int might match the return type of a gcc2
3673     builtin and then its argument prototype would still apply.  */
3674 char $ac_func();
3675
3676 int main() {
3677
3678 /* The GNU C library defines this for functions which it implements
3679     to always fail with ENOSYS.  Some functions are actually named
3680     something starting with __ and the normal name is an alias.  */
3681 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3682 choke me
3683 #else
3684 $ac_func();
3685 #endif
3686
3687 ; return 0; }
3688 EOF
3689 if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3690   rm -rf conftest*
3691   eval "ac_cv_func_$ac_func=yes"
3692 else
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   eval "ac_cv_func_$ac_func=no"
3697 fi
3698 rm -f conftest*
3699 fi
3700
3701 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3702   echo "$ac_t""yes" 1>&6
3703     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3704   cat >> confdefs.h <<EOF
3705 #define $ac_tr_func 1
3706 EOF
3707  
3708 else
3709   echo "$ac_t""no" 1>&6
3710 fi
3711 done
3712
3713 echo $ac_n "checking for isinf""... $ac_c" 1>&6
3714 echo "configure:3715: checking for isinf" >&5
3715 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
3716   echo $ac_n "(cached) $ac_c" 1>&6
3717 else
3718   cat > conftest.$ac_ext <<EOF
3719 #line 3720 "configure"
3720 #include "confdefs.h"
3721 /* System header to define __stub macros and hopefully few prototypes,
3722     which can conflict with char isinf(); below.  */
3723 #include <assert.h>
3724 /* Override any gcc2 internal prototype to avoid an error.  */
3725 /* We use char because int might match the return type of a gcc2
3726     builtin and then its argument prototype would still apply.  */
3727 char isinf();
3728
3729 int main() {
3730
3731 /* The GNU C library defines this for functions which it implements
3732     to always fail with ENOSYS.  Some functions are actually named
3733     something starting with __ and the normal name is an alias.  */
3734 #if defined (__stub_isinf) || defined (__stub___isinf)
3735 choke me
3736 #else
3737 isinf();
3738 #endif
3739
3740 ; return 0; }
3741 EOF
3742 if { (eval echo configure:3743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3743   rm -rf conftest*
3744   eval "ac_cv_func_isinf=yes"
3745 else
3746   echo "configure: failed program was:" >&5
3747   cat conftest.$ac_ext >&5
3748   rm -rf conftest*
3749   eval "ac_cv_func_isinf=no"
3750 fi
3751 rm -f conftest*
3752 fi
3753
3754 if eval "test \"`echo '$ac_cv_func_'isinf`\" = yes"; then
3755   echo "$ac_t""yes" 1>&6
3756   cat >> confdefs.h <<\EOF
3757 #define HAVE_ISINF 1
3758 EOF
3759
3760 else
3761   echo "$ac_t""no" 1>&6
3762 ISINF='isinf.o'
3763 fi
3764
3765
3766 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
3767 echo "configure:3768: checking for getrusage" >&5
3768 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
3769   echo $ac_n "(cached) $ac_c" 1>&6
3770 else
3771   cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 /* System header to define __stub macros and hopefully few prototypes,
3775     which can conflict with char getrusage(); below.  */
3776 #include <assert.h>
3777 /* Override any gcc2 internal prototype to avoid an error.  */
3778 /* We use char because int might match the return type of a gcc2
3779     builtin and then its argument prototype would still apply.  */
3780 char getrusage();
3781
3782 int main() {
3783
3784 /* The GNU C library defines this for functions which it implements
3785     to always fail with ENOSYS.  Some functions are actually named
3786     something starting with __ and the normal name is an alias.  */
3787 #if defined (__stub_getrusage) || defined (__stub___getrusage)
3788 choke me
3789 #else
3790 getrusage();
3791 #endif
3792
3793 ; return 0; }
3794 EOF
3795 if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3796   rm -rf conftest*
3797   eval "ac_cv_func_getrusage=yes"
3798 else
3799   echo "configure: failed program was:" >&5
3800   cat conftest.$ac_ext >&5
3801   rm -rf conftest*
3802   eval "ac_cv_func_getrusage=no"
3803 fi
3804 rm -f conftest*
3805 fi
3806
3807 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
3808   echo "$ac_t""yes" 1>&6
3809   cat >> confdefs.h <<\EOF
3810 #define HAVE_GETRUSAGE 1
3811 EOF
3812
3813 else
3814   echo "$ac_t""no" 1>&6
3815 GETRUSAGE='getrusage.o'
3816 fi
3817
3818
3819 echo $ac_n "checking for srandom""... $ac_c" 1>&6
3820 echo "configure:3821: checking for srandom" >&5
3821 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3827 /* System header to define __stub macros and hopefully few prototypes,
3828     which can conflict with char srandom(); below.  */
3829 #include <assert.h>
3830 /* Override any gcc2 internal prototype to avoid an error.  */
3831 /* We use char because int might match the return type of a gcc2
3832     builtin and then its argument prototype would still apply.  */
3833 char srandom();
3834
3835 int main() {
3836
3837 /* The GNU C library defines this for functions which it implements
3838     to always fail with ENOSYS.  Some functions are actually named
3839     something starting with __ and the normal name is an alias.  */
3840 #if defined (__stub_srandom) || defined (__stub___srandom)
3841 choke me
3842 #else
3843 srandom();
3844 #endif
3845
3846 ; return 0; }
3847 EOF
3848 if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3849   rm -rf conftest*
3850   eval "ac_cv_func_srandom=yes"
3851 else
3852   echo "configure: failed program was:" >&5
3853   cat conftest.$ac_ext >&5
3854   rm -rf conftest*
3855   eval "ac_cv_func_srandom=no"
3856 fi
3857 rm -f conftest*
3858 fi
3859
3860 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
3861   echo "$ac_t""yes" 1>&6
3862   cat >> confdefs.h <<\EOF
3863 #define HAVE_SRANDOM 1
3864 EOF
3865
3866 else
3867   echo "$ac_t""no" 1>&6
3868 SRANDOM='srandom.o'
3869 fi
3870
3871
3872 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
3873 echo "configure:3874: checking for gethostname" >&5
3874 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3880 /* System header to define __stub macros and hopefully few prototypes,
3881     which can conflict with char gethostname(); below.  */
3882 #include <assert.h>
3883 /* Override any gcc2 internal prototype to avoid an error.  */
3884 /* We use char because int might match the return type of a gcc2
3885     builtin and then its argument prototype would still apply.  */
3886 char gethostname();
3887
3888 int main() {
3889
3890 /* The GNU C library defines this for functions which it implements
3891     to always fail with ENOSYS.  Some functions are actually named
3892     something starting with __ and the normal name is an alias.  */
3893 #if defined (__stub_gethostname) || defined (__stub___gethostname)
3894 choke me
3895 #else
3896 gethostname();
3897 #endif
3898
3899 ; return 0; }
3900 EOF
3901 if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3902   rm -rf conftest*
3903   eval "ac_cv_func_gethostname=yes"
3904 else
3905   echo "configure: failed program was:" >&5
3906   cat conftest.$ac_ext >&5
3907   rm -rf conftest*
3908   eval "ac_cv_func_gethostname=no"
3909 fi
3910 rm -f conftest*
3911 fi
3912
3913 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
3914   echo "$ac_t""yes" 1>&6
3915   cat >> confdefs.h <<\EOF
3916 #define HAVE_GETHOSTNAME 1
3917 EOF
3918
3919 else
3920   echo "$ac_t""no" 1>&6
3921 GETHOSTNAME='gethostname.o'
3922 fi
3923
3924
3925 echo $ac_n "checking for random""... $ac_c" 1>&6
3926 echo "configure:3927: checking for random" >&5
3927 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 /* System header to define __stub macros and hopefully few prototypes,
3934     which can conflict with char random(); below.  */
3935 #include <assert.h>
3936 /* Override any gcc2 internal prototype to avoid an error.  */
3937 /* We use char because int might match the return type of a gcc2
3938     builtin and then its argument prototype would still apply.  */
3939 char random();
3940
3941 int main() {
3942
3943 /* The GNU C library defines this for functions which it implements
3944     to always fail with ENOSYS.  Some functions are actually named
3945     something starting with __ and the normal name is an alias.  */
3946 #if defined (__stub_random) || defined (__stub___random)
3947 choke me
3948 #else
3949 random();
3950 #endif
3951
3952 ; return 0; }
3953 EOF
3954 if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3955   rm -rf conftest*
3956   eval "ac_cv_func_random=yes"
3957 else
3958   echo "configure: failed program was:" >&5
3959   cat conftest.$ac_ext >&5
3960   rm -rf conftest*
3961   eval "ac_cv_func_random=no"
3962 fi
3963 rm -f conftest*
3964 fi
3965
3966 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
3967   echo "$ac_t""yes" 1>&6
3968   cat >> confdefs.h <<\EOF
3969 #define HAVE_RANDOM 1
3970 EOF
3971
3972 else
3973   echo "$ac_t""no" 1>&6
3974 MISSING_RANDOM='random.o'
3975 fi
3976
3977
3978 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3979 echo "configure:3980: checking for inet_aton" >&5
3980 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
3981   echo $ac_n "(cached) $ac_c" 1>&6
3982 else
3983   cat > conftest.$ac_ext <<EOF
3984 #line 3985 "configure"
3985 #include "confdefs.h"
3986 /* System header to define __stub macros and hopefully few prototypes,
3987     which can conflict with char inet_aton(); below.  */
3988 #include <assert.h>
3989 /* Override any gcc2 internal prototype to avoid an error.  */
3990 /* We use char because int might match the return type of a gcc2
3991     builtin and then its argument prototype would still apply.  */
3992 char inet_aton();
3993
3994 int main() {
3995
3996 /* The GNU C library defines this for functions which it implements
3997     to always fail with ENOSYS.  Some functions are actually named
3998     something starting with __ and the normal name is an alias.  */
3999 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
4000 choke me
4001 #else
4002 inet_aton();
4003 #endif
4004
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4008   rm -rf conftest*
4009   eval "ac_cv_func_inet_aton=yes"
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   eval "ac_cv_func_inet_aton=no"
4015 fi
4016 rm -f conftest*
4017 fi
4018
4019 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
4020   echo "$ac_t""yes" 1>&6
4021   cat >> confdefs.h <<\EOF
4022 #define HAVE_INET_ATON 1
4023 EOF
4024
4025 else
4026   echo "$ac_t""no" 1>&6
4027 INET_ATON='inet_aton.o'
4028 fi
4029
4030
4031 echo $ac_n "checking for strerror""... $ac_c" 1>&6
4032 echo "configure:4033: checking for strerror" >&5
4033 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
4034   echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036   cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039 /* System header to define __stub macros and hopefully few prototypes,
4040     which can conflict with char strerror(); below.  */
4041 #include <assert.h>
4042 /* Override any gcc2 internal prototype to avoid an error.  */
4043 /* We use char because int might match the return type of a gcc2
4044     builtin and then its argument prototype would still apply.  */
4045 char strerror();
4046
4047 int main() {
4048
4049 /* The GNU C library defines this for functions which it implements
4050     to always fail with ENOSYS.  Some functions are actually named
4051     something starting with __ and the normal name is an alias.  */
4052 #if defined (__stub_strerror) || defined (__stub___strerror)
4053 choke me
4054 #else
4055 strerror();
4056 #endif
4057
4058 ; return 0; }
4059 EOF
4060 if { (eval echo configure:4061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4061   rm -rf conftest*
4062   eval "ac_cv_func_strerror=yes"
4063 else
4064   echo "configure: failed program was:" >&5
4065   cat conftest.$ac_ext >&5
4066   rm -rf conftest*
4067   eval "ac_cv_func_strerror=no"
4068 fi
4069 rm -f conftest*
4070 fi
4071
4072 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
4073   echo "$ac_t""yes" 1>&6
4074   cat >> confdefs.h <<\EOF
4075 #define HAVE_STRERROR 1
4076 EOF
4077
4078 else
4079   echo "$ac_t""no" 1>&6
4080 STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
4081 fi
4082
4083
4084
4085 echo $ac_n "checking for strdup""... $ac_c" 1>&6
4086 echo "configure:4087: checking for strdup" >&5
4087 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* System header to define __stub macros and hopefully few prototypes,
4094     which can conflict with char strdup(); below.  */
4095 #include <assert.h>
4096 /* Override any gcc2 internal prototype to avoid an error.  */
4097 /* We use char because int might match the return type of a gcc2
4098     builtin and then its argument prototype would still apply.  */
4099 char strdup();
4100
4101 int main() {
4102
4103 /* The GNU C library defines this for functions which it implements
4104     to always fail with ENOSYS.  Some functions are actually named
4105     something starting with __ and the normal name is an alias.  */
4106 #if defined (__stub_strdup) || defined (__stub___strdup)
4107 choke me
4108 #else
4109 strdup();
4110 #endif
4111
4112 ; return 0; }
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4115   rm -rf conftest*
4116   eval "ac_cv_func_strdup=yes"
4117 else
4118   echo "configure: failed program was:" >&5
4119   cat conftest.$ac_ext >&5
4120   rm -rf conftest*
4121   eval "ac_cv_func_strdup=no"
4122 fi
4123 rm -f conftest*
4124 fi
4125
4126 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
4127   echo "$ac_t""yes" 1>&6
4128   cat >> confdefs.h <<\EOF
4129 #define HAVE_STRDUP 1
4130 EOF
4131
4132 else
4133   echo "$ac_t""no" 1>&6
4134 STRDUP='../../utils/strdup.o'
4135 fi
4136
4137
4138 echo $ac_n "checking for strtol""... $ac_c" 1>&6
4139 echo "configure:4140: checking for strtol" >&5
4140 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   cat > conftest.$ac_ext <<EOF
4144 #line 4145 "configure"
4145 #include "confdefs.h"
4146 /* System header to define __stub macros and hopefully few prototypes,
4147     which can conflict with char strtol(); below.  */
4148 #include <assert.h>
4149 /* Override any gcc2 internal prototype to avoid an error.  */
4150 /* We use char because int might match the return type of a gcc2
4151     builtin and then its argument prototype would still apply.  */
4152 char strtol();
4153
4154 int main() {
4155
4156 /* The GNU C library defines this for functions which it implements
4157     to always fail with ENOSYS.  Some functions are actually named
4158     something starting with __ and the normal name is an alias.  */
4159 #if defined (__stub_strtol) || defined (__stub___strtol)
4160 choke me
4161 #else
4162 strtol();
4163 #endif
4164
4165 ; return 0; }
4166 EOF
4167 if { (eval echo configure:4168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4168   rm -rf conftest*
4169   eval "ac_cv_func_strtol=yes"
4170 else
4171   echo "configure: failed program was:" >&5
4172   cat conftest.$ac_ext >&5
4173   rm -rf conftest*
4174   eval "ac_cv_func_strtol=no"
4175 fi
4176 rm -f conftest*
4177 fi
4178
4179 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
4180   echo "$ac_t""yes" 1>&6
4181   cat >> confdefs.h <<\EOF
4182 #define HAVE_STRTOL 1
4183 EOF
4184
4185 else
4186   echo "$ac_t""no" 1>&6
4187 STRTOL='strtol.o'
4188 fi
4189
4190
4191 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
4192 echo "configure:4193: checking for strtoul" >&5
4193 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
4194   echo $ac_n "(cached) $ac_c" 1>&6
4195 else
4196   cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199 /* System header to define __stub macros and hopefully few prototypes,
4200     which can conflict with char strtoul(); below.  */
4201 #include <assert.h>
4202 /* Override any gcc2 internal prototype to avoid an error.  */
4203 /* We use char because int might match the return type of a gcc2
4204     builtin and then its argument prototype would still apply.  */
4205 char strtoul();
4206
4207 int main() {
4208
4209 /* The GNU C library defines this for functions which it implements
4210     to always fail with ENOSYS.  Some functions are actually named
4211     something starting with __ and the normal name is an alias.  */
4212 #if defined (__stub_strtoul) || defined (__stub___strtoul)
4213 choke me
4214 #else
4215 strtoul();
4216 #endif
4217
4218 ; return 0; }
4219 EOF
4220 if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4221   rm -rf conftest*
4222   eval "ac_cv_func_strtoul=yes"
4223 else
4224   echo "configure: failed program was:" >&5
4225   cat conftest.$ac_ext >&5
4226   rm -rf conftest*
4227   eval "ac_cv_func_strtoul=no"
4228 fi
4229 rm -f conftest*
4230 fi
4231
4232 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
4233   echo "$ac_t""yes" 1>&6
4234   cat >> confdefs.h <<\EOF
4235 #define HAVE_STRTOUL 1
4236 EOF
4237
4238 else
4239   echo "$ac_t""no" 1>&6
4240 STRTOL='strtoul.o'
4241 fi
4242
4243
4244 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
4245 echo "configure:4246: checking for strcasecmp" >&5
4246 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
4247   echo $ac_n "(cached) $ac_c" 1>&6
4248 else
4249   cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 /* System header to define __stub macros and hopefully few prototypes,
4253     which can conflict with char strcasecmp(); below.  */
4254 #include <assert.h>
4255 /* Override any gcc2 internal prototype to avoid an error.  */
4256 /* We use char because int might match the return type of a gcc2
4257     builtin and then its argument prototype would still apply.  */
4258 char strcasecmp();
4259
4260 int main() {
4261
4262 /* The GNU C library defines this for functions which it implements
4263     to always fail with ENOSYS.  Some functions are actually named
4264     something starting with __ and the normal name is an alias.  */
4265 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
4266 choke me
4267 #else
4268 strcasecmp();
4269 #endif
4270
4271 ; return 0; }
4272 EOF
4273 if { (eval echo configure:4274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4274   rm -rf conftest*
4275   eval "ac_cv_func_strcasecmp=yes"
4276 else
4277   echo "configure: failed program was:" >&5
4278   cat conftest.$ac_ext >&5
4279   rm -rf conftest*
4280   eval "ac_cv_func_strcasecmp=no"
4281 fi
4282 rm -f conftest*
4283 fi
4284
4285 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
4286   echo "$ac_t""yes" 1>&6
4287   cat >> confdefs.h <<\EOF
4288 #define HAVE_STRCASECMP 1
4289 EOF
4290
4291 else
4292   echo "$ac_t""no" 1>&6
4293 STRCASECMP='strcasecmp.o'
4294 fi
4295
4296
4297 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
4298 echo "configure:4299: checking for cbrt" >&5
4299 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
4300   echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302   cat > conftest.$ac_ext <<EOF
4303 #line 4304 "configure"
4304 #include "confdefs.h"
4305 /* System header to define __stub macros and hopefully few prototypes,
4306     which can conflict with char cbrt(); below.  */
4307 #include <assert.h>
4308 /* Override any gcc2 internal prototype to avoid an error.  */
4309 /* We use char because int might match the return type of a gcc2
4310     builtin and then its argument prototype would still apply.  */
4311 char cbrt();
4312
4313 int main() {
4314
4315 /* The GNU C library defines this for functions which it implements
4316     to always fail with ENOSYS.  Some functions are actually named
4317     something starting with __ and the normal name is an alias.  */
4318 #if defined (__stub_cbrt) || defined (__stub___cbrt)
4319 choke me
4320 #else
4321 cbrt();
4322 #endif
4323
4324 ; return 0; }
4325 EOF
4326 if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4327   rm -rf conftest*
4328   eval "ac_cv_func_cbrt=yes"
4329 else
4330   echo "configure: failed program was:" >&5
4331   cat conftest.$ac_ext >&5
4332   rm -rf conftest*
4333   eval "ac_cv_func_cbrt=no"
4334 fi
4335 rm -f conftest*
4336 fi
4337
4338 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
4339   echo "$ac_t""yes" 1>&6
4340   cat >> confdefs.h <<\EOF
4341 #define HAVE_CBRT 1
4342 EOF
4343
4344 else
4345   echo "$ac_t""no" 1>&6
4346 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
4347 echo "configure:4348: checking for cbrt in -lm" >&5
4348 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
4349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4350   echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352   ac_save_LIBS="$LIBS"
4353 LIBS="-lm  $LIBS"
4354 cat > conftest.$ac_ext <<EOF
4355 #line 4356 "configure"
4356 #include "confdefs.h"
4357 /* Override any gcc2 internal prototype to avoid an error.  */
4358 /* We use char because int might match the return type of a gcc2
4359     builtin and then its argument prototype would still apply.  */
4360 char cbrt();
4361
4362 int main() {
4363 cbrt()
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4367   rm -rf conftest*
4368   eval "ac_cv_lib_$ac_lib_var=yes"
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_lib_$ac_lib_var=no"
4374 fi
4375 rm -f conftest*
4376 LIBS="$ac_save_LIBS"
4377
4378 fi
4379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4380   echo "$ac_t""yes" 1>&6
4381   cat >> confdefs.h <<\EOF
4382 #define HAVE_CBRT 1
4383 EOF
4384
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389 fi
4390
4391 echo $ac_n "checking for rint""... $ac_c" 1>&6
4392 echo "configure:4393: checking for rint" >&5
4393 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
4394   echo $ac_n "(cached) $ac_c" 1>&6
4395 else
4396   cat > conftest.$ac_ext <<EOF
4397 #line 4398 "configure"
4398 #include "confdefs.h"
4399 /* System header to define __stub macros and hopefully few prototypes,
4400     which can conflict with char rint(); below.  */
4401 #include <assert.h>
4402 /* Override any gcc2 internal prototype to avoid an error.  */
4403 /* We use char because int might match the return type of a gcc2
4404     builtin and then its argument prototype would still apply.  */
4405 char rint();
4406
4407 int main() {
4408
4409 /* The GNU C library defines this for functions which it implements
4410     to always fail with ENOSYS.  Some functions are actually named
4411     something starting with __ and the normal name is an alias.  */
4412 #if defined (__stub_rint) || defined (__stub___rint)
4413 choke me
4414 #else
4415 rint();
4416 #endif
4417
4418 ; return 0; }
4419 EOF
4420 if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4421   rm -rf conftest*
4422   eval "ac_cv_func_rint=yes"
4423 else
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   eval "ac_cv_func_rint=no"
4428 fi
4429 rm -f conftest*
4430 fi
4431
4432 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
4433   echo "$ac_t""yes" 1>&6
4434   cat >> confdefs.h <<\EOF
4435 #define HAVE_RINT 1
4436 EOF
4437
4438 else
4439   echo "$ac_t""no" 1>&6
4440 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
4441 echo "configure:4442: checking for rint in -lm" >&5
4442 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
4443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   ac_save_LIBS="$LIBS"
4447 LIBS="-lm  $LIBS"
4448 cat > conftest.$ac_ext <<EOF
4449 #line 4450 "configure"
4450 #include "confdefs.h"
4451 /* Override any gcc2 internal prototype to avoid an error.  */
4452 /* We use char because int might match the return type of a gcc2
4453     builtin and then its argument prototype would still apply.  */
4454 char rint();
4455
4456 int main() {
4457 rint()
4458 ; return 0; }
4459 EOF
4460 if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4461   rm -rf conftest*
4462   eval "ac_cv_lib_$ac_lib_var=yes"
4463 else
4464   echo "configure: failed program was:" >&5
4465   cat conftest.$ac_ext >&5
4466   rm -rf conftest*
4467   eval "ac_cv_lib_$ac_lib_var=no"
4468 fi
4469 rm -f conftest*
4470 LIBS="$ac_save_LIBS"
4471
4472 fi
4473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4474   echo "$ac_t""yes" 1>&6
4475   cat >> confdefs.h <<\EOF
4476 #define HAVE_RINT 1
4477 EOF
4478
4479 else
4480   echo "$ac_t""no" 1>&6
4481 fi
4482
4483 fi
4484
4485
4486
4487 if test "$USE_X" = true; then
4488
4489 ice_save_LIBS="$LIBS"
4490 ice_save_CFLAGS="$CFLAGS"
4491 ice_save_CPPFLAGS="$CPPFLAGS"
4492 ice_save_LDFLAGS="$LDFLAGS"
4493
4494 # If we find X, set shell vars x_includes and x_libraries to the
4495 # paths, otherwise set no_x=yes.
4496 # Uses ac_ vars as temps to allow command line to override cache and checks.
4497 # --without-x overrides everything else, but does not touch the cache.
4498 echo $ac_n "checking for X""... $ac_c" 1>&6
4499 echo "configure:4500: checking for X" >&5
4500
4501 # Check whether --with-x or --without-x was given.
4502 if test "${with_x+set}" = set; then
4503   withval="$with_x"
4504   :
4505 fi
4506
4507 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4508 if test "x$with_x" = xno; then
4509   # The user explicitly disabled X.
4510   have_x=disabled
4511 else
4512   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4513     # Both variables are already set.
4514     have_x=yes
4515   else
4516 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   # One or both of the vars are not set, and there is no cached value.
4520 ac_x_includes=NO ac_x_libraries=NO
4521 rm -fr conftestdir
4522 if mkdir conftestdir; then
4523   cd conftestdir
4524   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4525   cat > Imakefile <<'EOF'
4526 acfindx:
4527         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4528 EOF
4529   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4530     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4531     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4532     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4533     for ac_extension in a so sl; do
4534       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4535         test -f $ac_im_libdir/libX11.$ac_extension; then
4536         ac_im_usrlibdir=$ac_im_libdir; break
4537       fi
4538     done
4539     # Screen out bogus values from the imake configuration.  They are
4540     # bogus both because they are the default anyway, and because
4541     # using them would break gcc on systems where it needs fixed includes.
4542     case "$ac_im_incroot" in
4543         /usr/include) ;;
4544         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4545     esac
4546     case "$ac_im_usrlibdir" in
4547         /usr/lib | /lib) ;;
4548         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4549     esac
4550   fi
4551   cd ..
4552   rm -fr conftestdir
4553 fi
4554
4555 if test "$ac_x_includes" = NO; then
4556   # Guess where to find include files, by looking for this one X11 .h file.
4557   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4558
4559   # First, try using that file with no special directory specified.
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4562 "configure"
4562 #include "confdefs.h"
4563 #include <$x_direct_test_include>
4564 EOF
4565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4566 { (eval echo configure:4567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4567 ac_err=`grep -v '^ *+' conftest.out`
4568 if test -z "$ac_err"; then
4569   rm -rf conftest*
4570   # We can compile using X headers with no special include directory.
4571 ac_x_includes=
4572 else
4573   echo "$ac_err" >&5
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -rf conftest*
4577   # Look for the header file in a standard set of common directories.
4578 # Check X11 before X11Rn because it is often a symlink to the current release.
4579   for ac_dir in               \
4580     /usr/X11/include          \
4581     /usr/X11R6/include        \
4582     /usr/X11R5/include        \
4583     /usr/X11R4/include        \
4584                               \
4585     /usr/include/X11          \
4586     /usr/include/X11R6        \
4587     /usr/include/X11R5        \
4588     /usr/include/X11R4        \
4589                               \
4590     /usr/local/X11/include    \
4591     /usr/local/X11R6/include  \
4592     /usr/local/X11R5/include  \
4593     /usr/local/X11R4/include  \
4594                               \
4595     /usr/local/include/X11    \
4596     /usr/local/include/X11R6  \
4597     /usr/local/include/X11R5  \
4598     /usr/local/include/X11R4  \
4599                               \
4600     /usr/X386/include         \
4601     /usr/x386/include         \
4602     /usr/XFree86/include/X11  \
4603                               \
4604     /usr/include              \
4605     /usr/local/include        \
4606     /usr/unsupported/include  \
4607     /usr/athena/include       \
4608     /usr/local/x11r5/include  \
4609     /usr/lpp/Xamples/include  \
4610                               \
4611     /usr/openwin/include      \
4612     /usr/openwin/share/include \
4613     ; \
4614   do
4615     if test -r "$ac_dir/$x_direct_test_include"; then
4616       ac_x_includes=$ac_dir
4617       break
4618     fi
4619   done
4620 fi
4621 rm -f conftest*
4622 fi # $ac_x_includes = NO
4623
4624 if test "$ac_x_libraries" = NO; then
4625   # Check for the libraries.
4626
4627   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4628   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4629
4630   # See if we find them without any special options.
4631   # Don't add to $LIBS permanently.
4632   ac_save_LIBS="$LIBS"
4633   LIBS="-l$x_direct_test_library $LIBS"
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637
4638 int main() {
4639 ${x_direct_test_function}()
4640 ; return 0; }
4641 EOF
4642 if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4643   rm -rf conftest*
4644   LIBS="$ac_save_LIBS"
4645 # We can link X programs with no special library path.
4646 ac_x_libraries=
4647 else
4648   echo "configure: failed program was:" >&5
4649   cat conftest.$ac_ext >&5
4650   rm -rf conftest*
4651   LIBS="$ac_save_LIBS"
4652 # First see if replacing the include by lib works.
4653 # Check X11 before X11Rn because it is often a symlink to the current release.
4654 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4655     /usr/X11/lib          \
4656     /usr/X11R6/lib        \
4657     /usr/X11R5/lib        \
4658     /usr/X11R4/lib        \
4659                           \
4660     /usr/lib/X11          \
4661     /usr/lib/X11R6        \
4662     /usr/lib/X11R5        \
4663     /usr/lib/X11R4        \
4664                           \
4665     /usr/local/X11/lib    \
4666     /usr/local/X11R6/lib  \
4667     /usr/local/X11R5/lib  \
4668     /usr/local/X11R4/lib  \
4669                           \
4670     /usr/local/lib/X11    \
4671     /usr/local/lib/X11R6  \
4672     /usr/local/lib/X11R5  \
4673     /usr/local/lib/X11R4  \
4674                           \
4675     /usr/X386/lib         \
4676     /usr/x386/lib         \
4677     /usr/XFree86/lib/X11  \
4678                           \
4679     /usr/lib              \
4680     /usr/local/lib        \
4681     /usr/unsupported/lib  \
4682     /usr/athena/lib       \
4683     /usr/local/x11r5/lib  \
4684     /usr/lpp/Xamples/lib  \
4685     /lib/usr/lib/X11      \
4686                           \
4687     /usr/openwin/lib      \
4688     /usr/openwin/share/lib \
4689     ; \
4690 do
4691   for ac_extension in a so sl; do
4692     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4693       ac_x_libraries=$ac_dir
4694       break 2
4695     fi
4696   done
4697 done
4698 fi
4699 rm -f conftest*
4700 fi # $ac_x_libraries = NO
4701
4702 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4703   # Didn't find X anywhere.  Cache the known absence of X.
4704   ac_cv_have_x="have_x=no"
4705 else
4706   # Record where we found X for the cache.
4707   ac_cv_have_x="have_x=yes \
4708                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4709 fi
4710 fi
4711   fi
4712   eval "$ac_cv_have_x"
4713 fi # $with_x != no
4714
4715 if test "$have_x" != yes; then
4716   echo "$ac_t""$have_x" 1>&6
4717   no_x=yes
4718 else
4719   # If each of the values was on the command line, it overrides each guess.
4720   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4721   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4722   # Update the cache value to reflect the command line values.
4723   ac_cv_have_x="have_x=yes \
4724                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4725   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4726 fi
4727
4728 if test "$no_x" = yes; then
4729   # Not all programs may use this symbol, but it does not hurt to define it.
4730   cat >> confdefs.h <<\EOF
4731 #define X_DISPLAY_MISSING 1
4732 EOF
4733
4734   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4735 else
4736   if test -n "$x_includes"; then
4737     X_CFLAGS="$X_CFLAGS -I$x_includes"
4738   fi
4739
4740   # It would also be nice to do this for all -L options, not just this one.
4741   if test -n "$x_libraries"; then
4742     X_LIBS="$X_LIBS -L$x_libraries"
4743     # For Solaris; some versions of Sun CC require a space after -R and
4744     # others require no space.  Words are not sufficient . . . .
4745     case "`(uname -sr) 2>/dev/null`" in
4746     "SunOS 5"*)
4747       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4748 echo "configure:4749: checking whether -R must be followed by a space" >&5
4749       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4750       cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753
4754 int main() {
4755
4756 ; return 0; }
4757 EOF
4758 if { (eval echo configure:4759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4759   rm -rf conftest*
4760   ac_R_nospace=yes
4761 else
4762   echo "configure: failed program was:" >&5
4763   cat conftest.$ac_ext >&5
4764   rm -rf conftest*
4765   ac_R_nospace=no
4766 fi
4767 rm -f conftest*
4768       if test $ac_R_nospace = yes; then
4769         echo "$ac_t""no" 1>&6
4770         X_LIBS="$X_LIBS -R$x_libraries"
4771       else
4772         LIBS="$ac_xsave_LIBS -R $x_libraries"
4773         cat > conftest.$ac_ext <<EOF
4774 #line 4775 "configure"
4775 #include "confdefs.h"
4776
4777 int main() {
4778
4779 ; return 0; }
4780 EOF
4781 if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4782   rm -rf conftest*
4783   ac_R_space=yes
4784 else
4785   echo "configure: failed program was:" >&5
4786   cat conftest.$ac_ext >&5
4787   rm -rf conftest*
4788   ac_R_space=no
4789 fi
4790 rm -f conftest*
4791         if test $ac_R_space = yes; then
4792           echo "$ac_t""yes" 1>&6
4793           X_LIBS="$X_LIBS -R $x_libraries"
4794         else
4795           echo "$ac_t""neither works" 1>&6
4796         fi
4797       fi
4798       LIBS="$ac_xsave_LIBS"
4799     esac
4800   fi
4801
4802   # Check for system-dependent libraries X programs must link with.
4803   # Do this before checking for the system-independent R6 libraries
4804   # (-lICE), since we may need -lsocket or whatever for X linking.
4805
4806   if test "$ISC" = yes; then
4807     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4808   else
4809     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4810     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4811     # the Alpha needs dnet_stub (dnet does not exist).
4812     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4813 echo "configure:4814: checking for dnet_ntoa in -ldnet" >&5
4814 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4816   echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818   ac_save_LIBS="$LIBS"
4819 LIBS="-ldnet  $LIBS"
4820 cat > conftest.$ac_ext <<EOF
4821 #line 4822 "configure"
4822 #include "confdefs.h"
4823 /* Override any gcc2 internal prototype to avoid an error.  */
4824 /* We use char because int might match the return type of a gcc2
4825     builtin and then its argument prototype would still apply.  */
4826 char dnet_ntoa();
4827
4828 int main() {
4829 dnet_ntoa()
4830 ; return 0; }
4831 EOF
4832 if { (eval echo configure:4833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4833   rm -rf conftest*
4834   eval "ac_cv_lib_$ac_lib_var=yes"
4835 else
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   eval "ac_cv_lib_$ac_lib_var=no"
4840 fi
4841 rm -f conftest*
4842 LIBS="$ac_save_LIBS"
4843
4844 fi
4845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4846   echo "$ac_t""yes" 1>&6
4847   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4848 else
4849   echo "$ac_t""no" 1>&6
4850 fi
4851
4852     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4853       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4854 echo "configure:4855: checking for dnet_ntoa in -ldnet_stub" >&5
4855 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4856 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   ac_save_LIBS="$LIBS"
4860 LIBS="-ldnet_stub  $LIBS"
4861 cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* Override any gcc2 internal prototype to avoid an error.  */
4865 /* We use char because int might match the return type of a gcc2
4866     builtin and then its argument prototype would still apply.  */
4867 char dnet_ntoa();
4868
4869 int main() {
4870 dnet_ntoa()
4871 ; return 0; }
4872 EOF
4873 if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4874   rm -rf conftest*
4875   eval "ac_cv_lib_$ac_lib_var=yes"
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=no"
4881 fi
4882 rm -f conftest*
4883 LIBS="$ac_save_LIBS"
4884
4885 fi
4886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4887   echo "$ac_t""yes" 1>&6
4888   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4889 else
4890   echo "$ac_t""no" 1>&6
4891 fi
4892
4893     fi
4894
4895     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4896     # to get the SysV transport functions.
4897     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4898     # needs -lnsl.
4899     # The nsl library prevents programs from opening the X display
4900     # on Irix 5.2, according to dickey@clark.net.
4901     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4902 echo "configure:4903: checking for gethostbyname" >&5
4903 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4904   echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906   cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4909 /* System header to define __stub macros and hopefully few prototypes,
4910     which can conflict with char gethostbyname(); below.  */
4911 #include <assert.h>
4912 /* Override any gcc2 internal prototype to avoid an error.  */
4913 /* We use char because int might match the return type of a gcc2
4914     builtin and then its argument prototype would still apply.  */
4915 char gethostbyname();
4916
4917 int main() {
4918
4919 /* The GNU C library defines this for functions which it implements
4920     to always fail with ENOSYS.  Some functions are actually named
4921     something starting with __ and the normal name is an alias.  */
4922 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4923 choke me
4924 #else
4925 gethostbyname();
4926 #endif
4927
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4931   rm -rf conftest*
4932   eval "ac_cv_func_gethostbyname=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_func_gethostbyname=no"
4938 fi
4939 rm -f conftest*
4940 fi
4941
4942 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4943   echo "$ac_t""yes" 1>&6
4944   :
4945 else
4946   echo "$ac_t""no" 1>&6
4947 fi
4948
4949     if test $ac_cv_func_gethostbyname = no; then
4950       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4951 echo "configure:4952: checking for gethostbyname in -lnsl" >&5
4952 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4953 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4954   echo $ac_n "(cached) $ac_c" 1>&6
4955 else
4956   ac_save_LIBS="$LIBS"
4957 LIBS="-lnsl  $LIBS"
4958 cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961 /* Override any gcc2 internal prototype to avoid an error.  */
4962 /* We use char because int might match the return type of a gcc2
4963     builtin and then its argument prototype would still apply.  */
4964 char gethostbyname();
4965
4966 int main() {
4967 gethostbyname()
4968 ; return 0; }
4969 EOF
4970 if { (eval echo configure:4971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4971   rm -rf conftest*
4972   eval "ac_cv_lib_$ac_lib_var=yes"
4973 else
4974   echo "configure: failed program was:" >&5
4975   cat conftest.$ac_ext >&5
4976   rm -rf conftest*
4977   eval "ac_cv_lib_$ac_lib_var=no"
4978 fi
4979 rm -f conftest*
4980 LIBS="$ac_save_LIBS"
4981
4982 fi
4983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4984   echo "$ac_t""yes" 1>&6
4985   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4986 else
4987   echo "$ac_t""no" 1>&6
4988 fi
4989
4990     fi
4991
4992     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4993     # socket/setsockopt and other routines are undefined under SCO ODT
4994     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4995     # on later versions), says simon@lia.di.epfl.ch: it contains
4996     # gethostby* variants that don't use the nameserver (or something).
4997     # -lsocket must be given before -lnsl if both are needed.
4998     # We assume that if connect needs -lnsl, so does gethostbyname.
4999     echo $ac_n "checking for connect""... $ac_c" 1>&6
5000 echo "configure:5001: checking for connect" >&5
5001 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007 /* System header to define __stub macros and hopefully few prototypes,
5008     which can conflict with char connect(); below.  */
5009 #include <assert.h>
5010 /* Override any gcc2 internal prototype to avoid an error.  */
5011 /* We use char because int might match the return type of a gcc2
5012     builtin and then its argument prototype would still apply.  */
5013 char connect();
5014
5015 int main() {
5016
5017 /* The GNU C library defines this for functions which it implements
5018     to always fail with ENOSYS.  Some functions are actually named
5019     something starting with __ and the normal name is an alias.  */
5020 #if defined (__stub_connect) || defined (__stub___connect)
5021 choke me
5022 #else
5023 connect();
5024 #endif
5025
5026 ; return 0; }
5027 EOF
5028 if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5029   rm -rf conftest*
5030   eval "ac_cv_func_connect=yes"
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035   eval "ac_cv_func_connect=no"
5036 fi
5037 rm -f conftest*
5038 fi
5039
5040 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5041   echo "$ac_t""yes" 1>&6
5042   :
5043 else
5044   echo "$ac_t""no" 1>&6
5045 fi
5046
5047     if test $ac_cv_func_connect = no; then
5048       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5049 echo "configure:5050: checking for connect in -lsocket" >&5
5050 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   ac_save_LIBS="$LIBS"
5055 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5056 cat > conftest.$ac_ext <<EOF
5057 #line 5058 "configure"
5058 #include "confdefs.h"
5059 /* Override any gcc2 internal prototype to avoid an error.  */
5060 /* We use char because int might match the return type of a gcc2
5061     builtin and then its argument prototype would still apply.  */
5062 char connect();
5063
5064 int main() {
5065 connect()
5066 ; return 0; }
5067 EOF
5068 if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5069   rm -rf conftest*
5070   eval "ac_cv_lib_$ac_lib_var=yes"
5071 else
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   eval "ac_cv_lib_$ac_lib_var=no"
5076 fi
5077 rm -f conftest*
5078 LIBS="$ac_save_LIBS"
5079
5080 fi
5081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5082   echo "$ac_t""yes" 1>&6
5083   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5084 else
5085   echo "$ac_t""no" 1>&6
5086 fi
5087
5088     fi
5089
5090     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5091     echo $ac_n "checking for remove""... $ac_c" 1>&6
5092 echo "configure:5093: checking for remove" >&5
5093 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   cat > conftest.$ac_ext <<EOF
5097 #line 5098 "configure"
5098 #include "confdefs.h"
5099 /* System header to define __stub macros and hopefully few prototypes,
5100     which can conflict with char remove(); below.  */
5101 #include <assert.h>
5102 /* Override any gcc2 internal prototype to avoid an error.  */
5103 /* We use char because int might match the return type of a gcc2
5104     builtin and then its argument prototype would still apply.  */
5105 char remove();
5106
5107 int main() {
5108
5109 /* The GNU C library defines this for functions which it implements
5110     to always fail with ENOSYS.  Some functions are actually named
5111     something starting with __ and the normal name is an alias.  */
5112 #if defined (__stub_remove) || defined (__stub___remove)
5113 choke me
5114 #else
5115 remove();
5116 #endif
5117
5118 ; return 0; }
5119 EOF
5120 if { (eval echo configure:5121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5121   rm -rf conftest*
5122   eval "ac_cv_func_remove=yes"
5123 else
5124   echo "configure: failed program was:" >&5
5125   cat conftest.$ac_ext >&5
5126   rm -rf conftest*
5127   eval "ac_cv_func_remove=no"
5128 fi
5129 rm -f conftest*
5130 fi
5131
5132 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134   :
5135 else
5136   echo "$ac_t""no" 1>&6
5137 fi
5138
5139     if test $ac_cv_func_remove = no; then
5140       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5141 echo "configure:5142: checking for remove in -lposix" >&5
5142 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5143 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5144   echo $ac_n "(cached) $ac_c" 1>&6
5145 else
5146   ac_save_LIBS="$LIBS"
5147 LIBS="-lposix  $LIBS"
5148 cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151 /* Override any gcc2 internal prototype to avoid an error.  */
5152 /* We use char because int might match the return type of a gcc2
5153     builtin and then its argument prototype would still apply.  */
5154 char remove();
5155
5156 int main() {
5157 remove()
5158 ; return 0; }
5159 EOF
5160 if { (eval echo configure:5161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5161   rm -rf conftest*
5162   eval "ac_cv_lib_$ac_lib_var=yes"
5163 else
5164   echo "configure: failed program was:" >&5
5165   cat conftest.$ac_ext >&5
5166   rm -rf conftest*
5167   eval "ac_cv_lib_$ac_lib_var=no"
5168 fi
5169 rm -f conftest*
5170 LIBS="$ac_save_LIBS"
5171
5172 fi
5173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5174   echo "$ac_t""yes" 1>&6
5175   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5176 else
5177   echo "$ac_t""no" 1>&6
5178 fi
5179
5180     fi
5181
5182     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5183     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5184 echo "configure:5185: checking for shmat" >&5
5185 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5186   echo $ac_n "(cached) $ac_c" 1>&6
5187 else
5188   cat > conftest.$ac_ext <<EOF
5189 #line 5190 "configure"
5190 #include "confdefs.h"
5191 /* System header to define __stub macros and hopefully few prototypes,
5192     which can conflict with char shmat(); below.  */
5193 #include <assert.h>
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 /* We use char because int might match the return type of a gcc2
5196     builtin and then its argument prototype would still apply.  */
5197 char shmat();
5198
5199 int main() {
5200
5201 /* The GNU C library defines this for functions which it implements
5202     to always fail with ENOSYS.  Some functions are actually named
5203     something starting with __ and the normal name is an alias.  */
5204 #if defined (__stub_shmat) || defined (__stub___shmat)
5205 choke me
5206 #else
5207 shmat();
5208 #endif
5209
5210 ; return 0; }
5211 EOF
5212 if { (eval echo configure:5213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5213   rm -rf conftest*
5214   eval "ac_cv_func_shmat=yes"
5215 else
5216   echo "configure: failed program was:" >&5
5217   cat conftest.$ac_ext >&5
5218   rm -rf conftest*
5219   eval "ac_cv_func_shmat=no"
5220 fi
5221 rm -f conftest*
5222 fi
5223
5224 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5225   echo "$ac_t""yes" 1>&6
5226   :
5227 else
5228   echo "$ac_t""no" 1>&6
5229 fi
5230
5231     if test $ac_cv_func_shmat = no; then
5232       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5233 echo "configure:5234: checking for shmat in -lipc" >&5
5234 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   ac_save_LIBS="$LIBS"
5239 LIBS="-lipc  $LIBS"
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* Override any gcc2 internal prototype to avoid an error.  */
5244 /* We use char because int might match the return type of a gcc2
5245     builtin and then its argument prototype would still apply.  */
5246 char shmat();
5247
5248 int main() {
5249 shmat()
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5253   rm -rf conftest*
5254   eval "ac_cv_lib_$ac_lib_var=yes"
5255 else
5256   echo "configure: failed program was:" >&5
5257   cat conftest.$ac_ext >&5
5258   rm -rf conftest*
5259   eval "ac_cv_lib_$ac_lib_var=no"
5260 fi
5261 rm -f conftest*
5262 LIBS="$ac_save_LIBS"
5263
5264 fi
5265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5266   echo "$ac_t""yes" 1>&6
5267   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5268 else
5269   echo "$ac_t""no" 1>&6
5270 fi
5271
5272     fi
5273   fi
5274
5275   # Check for libraries that X11R6 Xt/Xaw programs need.
5276   ac_save_LDFLAGS="$LDFLAGS"
5277   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5278   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5279   # check for ICE first), but we must link in the order -lSM -lICE or
5280   # we get undefined symbols.  So assume we have SM if we have ICE.
5281   # These have to be linked with before -lX11, unlike the other
5282   # libraries we check for below, so use a different variable.
5283   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5284   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5285 echo "configure:5286: checking for IceConnectionNumber in -lICE" >&5
5286 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5287 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   ac_save_LIBS="$LIBS"
5291 LIBS="-lICE  $LIBS"
5292 cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5295 /* Override any gcc2 internal prototype to avoid an error.  */
5296 /* We use char because int might match the return type of a gcc2
5297     builtin and then its argument prototype would still apply.  */
5298 char IceConnectionNumber();
5299
5300 int main() {
5301 IceConnectionNumber()
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=yes"
5307 else
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_lib_$ac_lib_var=no"
5312 fi
5313 rm -f conftest*
5314 LIBS="$ac_save_LIBS"
5315
5316 fi
5317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5318   echo "$ac_t""yes" 1>&6
5319   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5320 else
5321   echo "$ac_t""no" 1>&6
5322 fi
5323
5324   LDFLAGS="$ac_save_LDFLAGS"
5325
5326 fi
5327
5328
5329 LIBS="$LIBS $X_EXTRA_LIBS"
5330 CFLAGS="$CFLAGS $X_CFLAGS"
5331 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5332 LDFLAGS="$LDFLAGS $X_LIBS"
5333
5334
5335 X11_LIBS=""
5336 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5337 echo "configure:5338: checking for XOpenDisplay in -lX11" >&5
5338 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5339 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   ac_save_LIBS="$LIBS"
5343 LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
5344 cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 /* Override any gcc2 internal prototype to avoid an error.  */
5348 /* We use char because int might match the return type of a gcc2
5349     builtin and then its argument prototype would still apply.  */
5350 char XOpenDisplay();
5351
5352 int main() {
5353 XOpenDisplay()
5354 ; return 0; }
5355 EOF
5356 if { (eval echo configure:5357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5357   rm -rf conftest*
5358   eval "ac_cv_lib_$ac_lib_var=yes"
5359 else
5360   echo "configure: failed program was:" >&5
5361   cat conftest.$ac_ext >&5
5362   rm -rf conftest*
5363   eval "ac_cv_lib_$ac_lib_var=no"
5364 fi
5365 rm -f conftest*
5366 LIBS="$ac_save_LIBS"
5367
5368 fi
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5370   echo "$ac_t""yes" 1>&6
5371   X11_LIBS="-lX11"
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375
5376 if test "$X11_LIBS" = ""; then
5377 echo "configure: warning: The X11 library '-lX11' could not be found.
5378                     Please use the configure options '--x-includes=DIR'
5379                     and '--x-libraries=DIR' to specify the X location.
5380                     See the file 'config.log' for further diagnostics." 1>&2
5381 fi
5382
5383
5384
5385
5386 LIBS="$ice_save_LIBS"
5387 CFLAGS="$ice_save_CFLAGS"
5388 CPPFLAGS="$ice_save_CPPFLAGS"
5389 LDFLAGS="$ice_save_LDFLAGS"
5390 fi
5391
5392
5393 if test "$USE_TCL" = "true"
5394 then
5395 TCL_INCDIR=no
5396 ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
5397 echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
5398 echo "configure:5399: checking for tcl.h" >&5
5399 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5400   echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402   cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 #include <tcl.h>
5406 EOF
5407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5408 { (eval echo configure:5409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5409 ac_err=`grep -v '^ *+' conftest.out`
5410 if test -z "$ac_err"; then
5411   rm -rf conftest*
5412   eval "ac_cv_header_$ac_safe=yes"
5413 else
5414   echo "$ac_err" >&5
5415   echo "configure: failed program was:" >&5
5416   cat conftest.$ac_ext >&5
5417   rm -rf conftest*
5418   eval "ac_cv_header_$ac_safe=no"
5419 fi
5420 rm -f conftest*
5421 fi
5422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5423   echo "$ac_t""yes" 1>&6
5424   TCL_INCDIR=
5425 else
5426   echo "$ac_t""no" 1>&6
5427 fi
5428
5429 for f in /usr/include /usr/include/tcl8.0 /usr/local/include /usr/local/include/tcl8.0; do
5430 if test "$TCL_INCDIR" = "no"; then
5431 ac_safe=`echo "$f/tcl.h" | sed 'y%./+-%__p_%'`
5432 echo $ac_n "checking for $f/tcl.h""... $ac_c" 1>&6
5433 echo "configure:5434: checking for $f/tcl.h" >&5
5434 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5435   echo $ac_n "(cached) $ac_c" 1>&6
5436 else
5437   cat > conftest.$ac_ext <<EOF
5438 #line 5439 "configure"
5439 #include "confdefs.h"
5440 #include <$f/tcl.h>
5441 EOF
5442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5443 { (eval echo configure:5444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5444 ac_err=`grep -v '^ *+' conftest.out`
5445 if test -z "$ac_err"; then
5446   rm -rf conftest*
5447   eval "ac_cv_header_$ac_safe=yes"
5448 else
5449   echo "$ac_err" >&5
5450   echo "configure: failed program was:" >&5
5451   cat conftest.$ac_ext >&5
5452   rm -rf conftest*
5453   eval "ac_cv_header_$ac_safe=no"
5454 fi
5455 rm -f conftest*
5456 fi
5457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5458   echo "$ac_t""yes" 1>&6
5459   TCL_INCDIR=$f
5460 else
5461   echo "$ac_t""no" 1>&6
5462 fi
5463
5464 fi
5465 done
5466 if test "$TCL_INCDIR" = "no"; then
5467 echo "configure: warning: tcl support disabled; tcl.h missing" 1>&2
5468 USE_TCL=
5469 fi
5470
5471 fi
5472
5473 if test "$USE_TCL" = "true"
5474 then
5475 TCL_LIB=
5476 for f in tcl8.0 tcl80; do
5477 if test -z "$TCL_LIB"; then
5478 echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
5479 echo "configure:5480: checking for main in -l$f" >&5
5480 ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
5481 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5482   echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484   ac_save_LIBS="$LIBS"
5485 LIBS="-l$f  $LIBS"
5486 cat > conftest.$ac_ext <<EOF
5487 #line 5488 "configure"
5488 #include "confdefs.h"
5489
5490 int main() {
5491 main()
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=no"
5502 fi
5503 rm -f conftest*
5504 LIBS="$ac_save_LIBS"
5505
5506 fi
5507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5508   echo "$ac_t""yes" 1>&6
5509   TCL_LIB=$f
5510 else
5511   echo "$ac_t""no" 1>&6
5512 fi
5513
5514 fi
5515 done
5516 if test -z "$TCL_LIB"; then
5517 echo "configure: warning: tcl support disabled; Tcl library missing" 1>&2
5518 USE_TCL=
5519 else
5520 TCL_LIB=-l$TCL_LIB
5521 fi
5522
5523 fi
5524
5525
5526 if test "$USE_TCL" = "true"
5527 then
5528
5529 ice_save_LIBS="$LIBS"
5530 ice_save_CFLAGS="$CFLAGS"
5531 ice_save_CPPFLAGS="$CPPFLAGS"
5532 ice_save_LDFLAGS="$LDFLAGS"
5533
5534 CPPFLAGS="$CPPFLAGS $X_CFLAGS -I$TCL_INCDIR"
5535
5536 TK_INCDIR=no
5537 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5538 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5539 echo "configure:5540: checking for tk.h" >&5
5540 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5541   echo $ac_n "(cached) $ac_c" 1>&6
5542 else
5543   cat > conftest.$ac_ext <<EOF
5544 #line 5545 "configure"
5545 #include "confdefs.h"
5546 #include <tk.h>
5547 EOF
5548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5549 { (eval echo configure:5550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5550 ac_err=`grep -v '^ *+' conftest.out`
5551 if test -z "$ac_err"; then
5552   rm -rf conftest*
5553   eval "ac_cv_header_$ac_safe=yes"
5554 else
5555   echo "$ac_err" >&5
5556   echo "configure: failed program was:" >&5
5557   cat conftest.$ac_ext >&5
5558   rm -rf conftest*
5559   eval "ac_cv_header_$ac_safe=no"
5560 fi
5561 rm -f conftest*
5562 fi
5563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5564   echo "$ac_t""yes" 1>&6
5565   TK_INCDIR=
5566 else
5567   echo "$ac_t""no" 1>&6
5568 fi
5569
5570 for f in /usr/include /usr/include/tk8.0 /usr/local/include /usr/local/include/tk8.0; do
5571 if test "$TK_INCDIR" = "no"; then
5572 ac_safe=`echo "$f/tk.h" | sed 'y%./+-%__p_%'`
5573 echo $ac_n "checking for $f/tk.h""... $ac_c" 1>&6
5574 echo "configure:5575: checking for $f/tk.h" >&5
5575 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5576   echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578   cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 #include <$f/tk.h>
5582 EOF
5583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5584 { (eval echo configure:5585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5585 ac_err=`grep -v '^ *+' conftest.out`
5586 if test -z "$ac_err"; then
5587   rm -rf conftest*
5588   eval "ac_cv_header_$ac_safe=yes"
5589 else
5590   echo "$ac_err" >&5
5591   echo "configure: failed program was:" >&5
5592   cat conftest.$ac_ext >&5
5593   rm -rf conftest*
5594   eval "ac_cv_header_$ac_safe=no"
5595 fi
5596 rm -f conftest*
5597 fi
5598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5599   echo "$ac_t""yes" 1>&6
5600   TK_INCDIR=$f
5601 else
5602   echo "$ac_t""no" 1>&6
5603 fi
5604
5605 fi
5606 done
5607 if test "$TK_INCDIR" = "no"; then
5608 echo "configure: warning: tcl support disabled; tk.h missing" 1>&2
5609 USE_TCL=
5610 fi
5611
5612
5613 LIBS="$ice_save_LIBS"
5614 CFLAGS="$ice_save_CFLAGS"
5615 CPPFLAGS="$ice_save_CPPFLAGS"
5616 LDFLAGS="$ice_save_LDFLAGS"
5617 fi
5618
5619 if test "$USE_TCL" = "true"
5620 then
5621 TK_LIB=
5622 for f in tk8.0 tk80; do
5623 if test -z "$TK_LIB"; then
5624 echo $ac_n "checking for main in -l$f""... $ac_c" 1>&6
5625 echo "configure:5626: checking for main in -l$f" >&5
5626 ac_lib_var=`echo $f'_'main | sed 'y%./+-%__p_%'`
5627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5628   echo $ac_n "(cached) $ac_c" 1>&6
5629 else
5630   ac_save_LIBS="$LIBS"
5631 LIBS="-l$f  $LIBS"
5632 cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635
5636 int main() {
5637 main()
5638 ; return 0; }
5639 EOF
5640 if { (eval echo configure:5641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5641   rm -rf conftest*
5642   eval "ac_cv_lib_$ac_lib_var=yes"
5643 else
5644   echo "configure: failed program was:" >&5
5645   cat conftest.$ac_ext >&5
5646   rm -rf conftest*
5647   eval "ac_cv_lib_$ac_lib_var=no"
5648 fi
5649 rm -f conftest*
5650 LIBS="$ac_save_LIBS"
5651
5652 fi
5653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5654   echo "$ac_t""yes" 1>&6
5655   TK_LIB=$f
5656 else
5657   echo "$ac_t""no" 1>&6
5658 fi
5659
5660 fi
5661 done
5662 if test -z "$TK_LIB"; then
5663 echo "configure: warning: tcl support disabled; Tk library missing" 1>&2
5664 USE_TCL=
5665 else
5666 TK_LIB=-l$TK_LIB
5667 fi
5668
5669 fi
5670
5671 trap '' 1 2 15
5672 cat > confcache <<\EOF
5673 # This file is a shell script that caches the results of configure
5674 # tests run on this system so they can be shared between configure
5675 # scripts and configure runs.  It is not useful on other systems.
5676 # If it contains results you don't want to keep, you may remove or edit it.
5677 #
5678 # By default, configure uses ./config.cache as the cache file,
5679 # creating it if it does not exist already.  You can give configure
5680 # the --cache-file=FILE option to use a different cache file; that is
5681 # what configure does when it calls configure scripts in
5682 # subdirectories, so they share the cache.
5683 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5684 # config.status only pays attention to the cache file if you give it the
5685 # --recheck option to rerun configure.
5686 #
5687 EOF
5688 # The following way of writing the cache mishandles newlines in values,
5689 # but we know of no workaround that is simple, portable, and efficient.
5690 # So, don't put newlines in cache variables' values.
5691 # Ultrix sh set writes to stderr and can't be redirected directly,
5692 # and sets the high bit in the cache file unless we assign to the vars.
5693 (set) 2>&1 |
5694   case `(ac_space=' '; set) 2>&1` in
5695   *ac_space=\ *)
5696     # `set' does not quote correctly, so add quotes (double-quote substitution
5697     # turns \\\\ into \\, and sed turns \\ into \).
5698     sed -n \
5699       -e "s/'/'\\\\''/g" \
5700       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5701     ;;
5702   *)
5703     # `set' quotes correctly as required by POSIX, so do not add quotes.
5704     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5705     ;;
5706   esac >> confcache
5707 if cmp -s $cache_file confcache; then
5708   :
5709 else
5710   if test -w $cache_file; then
5711     echo "updating cache $cache_file"
5712     cat confcache > $cache_file
5713   else
5714     echo "not updating unwritable cache $cache_file"
5715   fi
5716 fi
5717 rm -f confcache
5718
5719 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5720
5721 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5722 # Let make expand exec_prefix.
5723 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5724
5725 # Any assignment to VPATH causes Sun make to only execute
5726 # the first set of double-colon rules, so remove it if not needed.
5727 # If there is a colon in the path, we need to keep it.
5728 if test "x$srcdir" = x.; then
5729   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5730 fi
5731
5732 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5733
5734 DEFS=-DHAVE_CONFIG_H
5735
5736 # Without the "./", some shells look in PATH for config.status.
5737 : ${CONFIG_STATUS=./config.status}
5738
5739 echo creating $CONFIG_STATUS
5740 rm -f $CONFIG_STATUS
5741 cat > $CONFIG_STATUS <<EOF
5742 #! /bin/sh
5743 # Generated automatically by configure.
5744 # Run this file to recreate the current configuration.
5745 # This directory was configured as follows,
5746 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5747 #
5748 # $0 $ac_configure_args
5749 #
5750 # Compiler output produced by configure, useful for debugging
5751 # configure, is in ./config.log if it exists.
5752
5753 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5754 for ac_option
5755 do
5756   case "\$ac_option" in
5757   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5758     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5759     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5760   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5761     echo "$CONFIG_STATUS generated by autoconf version 2.12"
5762     exit 0 ;;
5763   -help | --help | --hel | --he | --h)
5764     echo "\$ac_cs_usage"; exit 0 ;;
5765   *) echo "\$ac_cs_usage"; exit 1 ;;
5766   esac
5767 done
5768
5769 ac_given_srcdir=$srcdir
5770
5771 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
5772 EOF
5773 cat >> $CONFIG_STATUS <<EOF
5774
5775 # Protect against being on the right side of a sed subst in config.status.
5776 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5777  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5778 $ac_vpsub
5779 $extrasub
5780 s%@CFLAGS@%$CFLAGS%g
5781 s%@CPPFLAGS@%$CPPFLAGS%g
5782 s%@CXXFLAGS@%$CXXFLAGS%g
5783 s%@DEFS@%$DEFS%g
5784 s%@LDFLAGS@%$LDFLAGS%g
5785 s%@LIBS@%$LIBS%g
5786 s%@exec_prefix@%$exec_prefix%g
5787 s%@prefix@%$prefix%g
5788 s%@program_transform_name@%$program_transform_name%g
5789 s%@bindir@%$bindir%g
5790 s%@sbindir@%$sbindir%g
5791 s%@libexecdir@%$libexecdir%g
5792 s%@datadir@%$datadir%g
5793 s%@sysconfdir@%$sysconfdir%g
5794 s%@sharedstatedir@%$sharedstatedir%g
5795 s%@localstatedir@%$localstatedir%g
5796 s%@libdir@%$libdir%g
5797 s%@includedir@%$includedir%g
5798 s%@oldincludedir@%$oldincludedir%g
5799 s%@infodir@%$infodir%g
5800 s%@mandir@%$mandir%g
5801 s%@host@%$host%g
5802 s%@host_alias@%$host_alias%g
5803 s%@host_cpu@%$host_cpu%g
5804 s%@host_vendor@%$host_vendor%g
5805 s%@host_os@%$host_os%g
5806 s%@TAS@%$TAS%g
5807 s%@PORTNAME@%$PORTNAME%g
5808 s%@CC@%$CC%g
5809 s%@CPP@%$CPP%g
5810 s%@AROPT@%$AROPT%g
5811 s%@SHARED_LIB@%$SHARED_LIB%g
5812 s%@DLSUFFIX@%$DLSUFFIX%g
5813 s%@DL_LIB@%$DL_LIB%g
5814 s%@USE_TCL@%$USE_TCL%g
5815 s%@USE_PERL@%$USE_PERL%g
5816 s%@HAVECXX@%$HAVECXX%g
5817 s%@INSTALL@%$INSTALL%g
5818 s%@INSTLOPTS@%$INSTLOPTS%g
5819 s%@INSTL_LIB_OPTS@%$INSTL_LIB_OPTS%g
5820 s%@INSTL_EXE_OPTS@%$INSTL_EXE_OPTS%g
5821 s%@DASH_N@%$DASH_N%g
5822 s%@BACKSLASH_C@%$BACKSLASH_C%g
5823 s%@LEX@%$LEX%g
5824 s%@LEXLIB@%$LEXLIB%g
5825 s%@LN_S@%$LN_S%g
5826 s%@SET_MAKE@%$SET_MAKE%g
5827 s%@RANLIB@%$RANLIB%g
5828 s%@find@%$find%g
5829 s%@tar@%$tar%g
5830 s%@split@%$split%g
5831 s%@etags@%$etags%g
5832 s%@xargs@%$xargs%g
5833 s%@ipcs@%$ipcs%g
5834 s%@ipcrm@%$ipcrm%g
5835 s%@TR@%$TR%g
5836 s%@TRARGS@%$TRARGS%g
5837 s%@YACC@%$YACC%g
5838 s%@YFLAGS@%$YFLAGS%g
5839 s%@yacc@%$yacc%g
5840 s%@bison@%$bison%g
5841 s%@LIBOBJS@%$LIBOBJS%g
5842 s%@ISINF@%$ISINF%g
5843 s%@GETRUSAGE@%$GETRUSAGE%g
5844 s%@SRANDOM@%$SRANDOM%g
5845 s%@GETHOSTNAME@%$GETHOSTNAME%g
5846 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
5847 s%@INET_ATON@%$INET_ATON%g
5848 s%@STRERROR@%$STRERROR%g
5849 s%@STRERROR2@%$STRERROR2%g
5850 s%@STRDUP@%$STRDUP%g
5851 s%@STRTOL@%$STRTOL%g
5852 s%@STRTOUL@%$STRTOUL%g
5853 s%@STRCASECMP@%$STRCASECMP%g
5854 s%@X_CFLAGS@%$X_CFLAGS%g
5855 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
5856 s%@X_LIBS@%$X_LIBS%g
5857 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5858 s%@X11_LIBS@%$X11_LIBS%g
5859 s%@TCL_INCDIR@%$TCL_INCDIR%g
5860 s%@TCL_LIB@%$TCL_LIB%g
5861 s%@TK_INCDIR@%$TK_INCDIR%g
5862 s%@TK_LIB@%$TK_LIB%g
5863
5864 CEOF
5865 EOF
5866
5867 cat >> $CONFIG_STATUS <<\EOF
5868
5869 # Split the substitutions into bite-sized pieces for seds with
5870 # small command number limits, like on Digital OSF/1 and HP-UX.
5871 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5872 ac_file=1 # Number of current file.
5873 ac_beg=1 # First line for current file.
5874 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5875 ac_more_lines=:
5876 ac_sed_cmds=""
5877 while $ac_more_lines; do
5878   if test $ac_beg -gt 1; then
5879     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5880   else
5881     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5882   fi
5883   if test ! -s conftest.s$ac_file; then
5884     ac_more_lines=false
5885     rm -f conftest.s$ac_file
5886   else
5887     if test -z "$ac_sed_cmds"; then
5888       ac_sed_cmds="sed -f conftest.s$ac_file"
5889     else
5890       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5891     fi
5892     ac_file=`expr $ac_file + 1`
5893     ac_beg=$ac_end
5894     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5895   fi
5896 done
5897 if test -z "$ac_sed_cmds"; then
5898   ac_sed_cmds=cat
5899 fi
5900 EOF
5901
5902 cat >> $CONFIG_STATUS <<EOF
5903
5904 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 "}
5905 EOF
5906 cat >> $CONFIG_STATUS <<\EOF
5907 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5908   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5909   case "$ac_file" in
5910   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5911        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5912   *) ac_file_in="${ac_file}.in" ;;
5913   esac
5914
5915   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5916
5917   # Remove last slash and all that follows it.  Not all systems have dirname.
5918   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5919   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5920     # The file is in a subdirectory.
5921     test ! -d "$ac_dir" && mkdir "$ac_dir"
5922     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5923     # A "../" for each directory in $ac_dir_suffix.
5924     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5925   else
5926     ac_dir_suffix= ac_dots=
5927   fi
5928
5929   case "$ac_given_srcdir" in
5930   .)  srcdir=.
5931       if test -z "$ac_dots"; then top_srcdir=.
5932       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5933   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5934   *) # Relative path.
5935     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5936     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5937   esac
5938
5939
5940   echo creating "$ac_file"
5941   rm -f "$ac_file"
5942   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5943   case "$ac_file" in
5944   *Makefile*) ac_comsub="1i\\
5945 # $configure_input" ;;
5946   *) ac_comsub= ;;
5947   esac
5948
5949   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5950   sed -e "$ac_comsub
5951 s%@configure_input@%$configure_input%g
5952 s%@srcdir@%$srcdir%g
5953 s%@top_srcdir@%$top_srcdir%g
5954 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5955 fi; done
5956 rm -f conftest.s*
5957
5958 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5959 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5960 #
5961 # ac_d sets the value in "#define NAME VALUE" lines.
5962 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5963 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5964 ac_dC='\3'
5965 ac_dD='%g'
5966 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5967 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5968 ac_uB='\([      ]\)%\1#\2define\3'
5969 ac_uC=' '
5970 ac_uD='\4%g'
5971 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5972 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5973 ac_eB='$%\1#\2define\3'
5974 ac_eC=' '
5975 ac_eD='%g'
5976
5977 if test "${CONFIG_HEADERS+set}" != set; then
5978 EOF
5979 cat >> $CONFIG_STATUS <<EOF
5980   CONFIG_HEADERS="include/config.h"
5981 EOF
5982 cat >> $CONFIG_STATUS <<\EOF
5983 fi
5984 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5985   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5986   case "$ac_file" in
5987   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5988        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5989   *) ac_file_in="${ac_file}.in" ;;
5990   esac
5991
5992   echo creating $ac_file
5993
5994   rm -f conftest.frag conftest.in conftest.out
5995   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5996   cat $ac_file_inputs > conftest.in
5997
5998 EOF
5999
6000 # Transform confdefs.h into a sed script conftest.vals that substitutes
6001 # the proper values into config.h.in to produce config.h.  And first:
6002 # Protect against being on the right side of a sed subst in config.status.
6003 # Protect against being in an unquoted here document in config.status.
6004 rm -f conftest.vals
6005 cat > conftest.hdr <<\EOF
6006 s/[\\&%]/\\&/g
6007 s%[\\$`]%\\&%g
6008 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6009 s%ac_d%ac_u%gp
6010 s%ac_u%ac_e%gp
6011 EOF
6012 sed -n -f conftest.hdr confdefs.h > conftest.vals
6013 rm -f conftest.hdr
6014
6015 # This sed command replaces #undef with comments.  This is necessary, for
6016 # example, in the case of _POSIX_SOURCE, which is predefined and required
6017 # on some systems where configure will not decide to define it.
6018 cat >> conftest.vals <<\EOF
6019 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6020 EOF
6021
6022 # Break up conftest.vals because some shells have a limit on
6023 # the size of here documents, and old seds have small limits too.
6024
6025 rm -f conftest.tail
6026 while :
6027 do
6028   ac_lines=`grep -c . conftest.vals`
6029   # grep -c gives empty output for an empty file on some AIX systems.
6030   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6031   # Write a limited-size here document to conftest.frag.
6032   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6033   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6034   echo 'CEOF
6035   sed -f conftest.frag conftest.in > conftest.out
6036   rm -f conftest.in
6037   mv conftest.out conftest.in
6038 ' >> $CONFIG_STATUS
6039   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6040   rm -f conftest.vals
6041   mv conftest.tail conftest.vals
6042 done
6043 rm -f conftest.vals
6044
6045 cat >> $CONFIG_STATUS <<\EOF
6046   rm -f conftest.frag conftest.h
6047   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6048   cat conftest.in >> conftest.h
6049   rm -f conftest.in
6050   if cmp -s $ac_file conftest.h 2>/dev/null; then
6051     echo "$ac_file is unchanged"
6052     rm -f conftest.h
6053   else
6054     # Remove last slash and all that follows it.  Not all systems have dirname.
6055       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6056       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6057       # The file is in a subdirectory.
6058       test ! -d "$ac_dir" && mkdir "$ac_dir"
6059     fi
6060     rm -f $ac_file
6061     mv conftest.h $ac_file
6062   fi
6063 fi; done
6064
6065 EOF
6066
6067 cat >> $CONFIG_STATUS <<EOF
6068 ac_sources="backend/port/tas/${tas_file} backend/port/dynloader/${os}.c backend/port/dynloader/${os}.h include/port/${os}.h makefiles/Makefile.${os}"
6069 ac_dests="backend/port/tas.s backend/port/dynloader.c include/dynloader.h include/os.h Makefile.port"
6070 EOF
6071
6072 cat >> $CONFIG_STATUS <<\EOF
6073 srcdir=$ac_given_srcdir
6074 while test -n "$ac_sources"; do
6075   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6076   set $ac_sources; ac_source=$1; shift; ac_sources=$*
6077
6078   echo "linking $srcdir/$ac_source to $ac_dest"
6079
6080   if test ! -r $srcdir/$ac_source; then
6081     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6082   fi
6083   rm -f $ac_dest
6084
6085   # Make relative symlinks.
6086   # Remove last slash and all that follows it.  Not all systems have dirname.
6087   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6088   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6089     # The dest file is in a subdirectory.
6090     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6091     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6092     # A "../" for each directory in $ac_dest_dir_suffix.
6093     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6094   else
6095     ac_dest_dir_suffix= ac_dots=
6096   fi
6097
6098   case "$srcdir" in
6099   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6100   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6101   esac
6102
6103   # Make a symlink if possible; otherwise try a hard link.
6104   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6105     ln $srcdir/$ac_source $ac_dest; then :
6106   else
6107     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6108   fi
6109 done
6110 EOF
6111 cat >> $CONFIG_STATUS <<EOF
6112
6113 EOF
6114 cat >> $CONFIG_STATUS <<\EOF
6115
6116 exit 0
6117 EOF
6118 chmod +x $CONFIG_STATUS
6119 rm -fr confdefs* $ac_clean_files
6120 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6121