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