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