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