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