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