I have to specify SCRIPTSNAME too, otherwise bsd.prog.mk strips the extension.
[dragonfly.git] / contrib / bc / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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_help="$ac_help
15   --with-pkg              use software installed in /usr/pkg tree"
16 ac_help="$ac_help
17   --with-libedit          support fancy BSD command input 
18 editing"
19 ac_help="$ac_help
20   --with-readline         support fancy command input editing"
21
22 # Initialize some variables set by options.
23 # The variables have the same names as the options, with
24 # dashes changed to underlines.
25 build=NONE
26 cache_file=./config.cache
27 exec_prefix=NONE
28 host=NONE
29 no_create=
30 nonopt=NONE
31 no_recursion=
32 prefix=NONE
33 program_prefix=NONE
34 program_suffix=NONE
35 program_transform_name=s,x,x,
36 silent=
37 site=
38 srcdir=
39 target=NONE
40 verbose=
41 x_includes=NONE
42 x_libraries=NONE
43 bindir='${exec_prefix}/bin'
44 sbindir='${exec_prefix}/sbin'
45 libexecdir='${exec_prefix}/libexec'
46 datadir='${prefix}/share'
47 sysconfdir='${prefix}/etc'
48 sharedstatedir='${prefix}/com'
49 localstatedir='${prefix}/var'
50 libdir='${exec_prefix}/lib'
51 includedir='${prefix}/include'
52 oldincludedir='/usr/include'
53 infodir='${prefix}/info'
54 mandir='${prefix}/man'
55
56 # Initialize some other variables.
57 subdirs=
58 MFLAGS= MAKEFLAGS=
59 SHELL=${CONFIG_SHELL-/bin/sh}
60 # Maximum number of lines to put in a shell here document.
61 ac_max_here_lines=12
62
63 ac_prev=
64 for ac_option
65 do
66
67   # If the previous option needs an argument, assign it.
68   if test -n "$ac_prev"; then
69     eval "$ac_prev=\$ac_option"
70     ac_prev=
71     continue
72   fi
73
74   case "$ac_option" in
75   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76   *) ac_optarg= ;;
77   esac
78
79   # Accept the important Cygnus configure options, so we can diagnose typos.
80
81   case "$ac_option" in
82
83   -bindir | --bindir | --bindi | --bind | --bin | --bi)
84     ac_prev=bindir ;;
85   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
86     bindir="$ac_optarg" ;;
87
88   -build | --build | --buil | --bui | --bu)
89     ac_prev=build ;;
90   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
91     build="$ac_optarg" ;;
92
93   -cache-file | --cache-file | --cache-fil | --cache-fi \
94   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95     ac_prev=cache_file ;;
96   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
97   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
98     cache_file="$ac_optarg" ;;
99
100   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
101     ac_prev=datadir ;;
102   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
103   | --da=*)
104     datadir="$ac_optarg" ;;
105
106   -disable-* | --disable-*)
107     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
108     # Reject names that are not valid shell variable names.
109     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
110       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
111     fi
112     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
113     eval "enable_${ac_feature}=no" ;;
114
115   -enable-* | --enable-*)
116     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
117     # Reject names that are not valid shell variable names.
118     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
119       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120     fi
121     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122     case "$ac_option" in
123       *=*) ;;
124       *) ac_optarg=yes ;;
125     esac
126     eval "enable_${ac_feature}='$ac_optarg'" ;;
127
128   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
129   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
130   | --exec | --exe | --ex)
131     ac_prev=exec_prefix ;;
132   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
133   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
134   | --exec=* | --exe=* | --ex=*)
135     exec_prefix="$ac_optarg" ;;
136
137   -gas | --gas | --ga | --g)
138     # Obsolete; use --with-gas.
139     with_gas=yes ;;
140
141   -help | --help | --hel | --he)
142     # Omit some internal or obsolete options to make the list less imposing.
143     # This message is too long to be a string in the A/UX 3.1 sh.
144     cat << EOF
145 Usage: configure [options] [host]
146 Options: [defaults in brackets after descriptions]
147 Configuration:
148   --cache-file=FILE       cache test results in FILE
149   --help                  print this message
150   --no-create             do not create output files
151   --quiet, --silent       do not print \`checking...' messages
152   --version               print the version of autoconf that created configure
153 Directory and file names:
154   --prefix=PREFIX         install architecture-independent files in PREFIX
155                           [$ac_default_prefix]
156   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
157                           [same as prefix]
158   --bindir=DIR            user executables in DIR [EPREFIX/bin]
159   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
160   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
161   --datadir=DIR           read-only architecture-independent data in DIR
162                           [PREFIX/share]
163   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
164   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
165                           [PREFIX/com]
166   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
167   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
168   --includedir=DIR        C header files in DIR [PREFIX/include]
169   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
170   --infodir=DIR           info documentation in DIR [PREFIX/info]
171   --mandir=DIR            man documentation in DIR [PREFIX/man]
172   --srcdir=DIR            find the sources in DIR [configure dir or ..]
173   --program-prefix=PREFIX prepend PREFIX to installed program names
174   --program-suffix=SUFFIX append SUFFIX to installed program names
175   --program-transform-name=PROGRAM
176                           run sed PROGRAM on installed program names
177 EOF
178     cat << EOF
179 Host type:
180   --build=BUILD           configure for building on BUILD [BUILD=HOST]
181   --host=HOST             configure for HOST [guessed]
182   --target=TARGET         configure for TARGET [TARGET=HOST]
183 Features and packages:
184   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
185   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
186   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
187   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
188   --x-includes=DIR        X include files are in DIR
189   --x-libraries=DIR       X library files are in DIR
190 EOF
191     if test -n "$ac_help"; then
192       echo "--enable and --with options recognized:$ac_help"
193     fi
194     exit 0 ;;
195
196   -host | --host | --hos | --ho)
197     ac_prev=host ;;
198   -host=* | --host=* | --hos=* | --ho=*)
199     host="$ac_optarg" ;;
200
201   -includedir | --includedir | --includedi | --included | --include \
202   | --includ | --inclu | --incl | --inc)
203     ac_prev=includedir ;;
204   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
205   | --includ=* | --inclu=* | --incl=* | --inc=*)
206     includedir="$ac_optarg" ;;
207
208   -infodir | --infodir | --infodi | --infod | --info | --inf)
209     ac_prev=infodir ;;
210   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
211     infodir="$ac_optarg" ;;
212
213   -libdir | --libdir | --libdi | --libd)
214     ac_prev=libdir ;;
215   -libdir=* | --libdir=* | --libdi=* | --libd=*)
216     libdir="$ac_optarg" ;;
217
218   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
219   | --libexe | --libex | --libe)
220     ac_prev=libexecdir ;;
221   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
222   | --libexe=* | --libex=* | --libe=*)
223     libexecdir="$ac_optarg" ;;
224
225   -localstatedir | --localstatedir | --localstatedi | --localstated \
226   | --localstate | --localstat | --localsta | --localst \
227   | --locals | --local | --loca | --loc | --lo)
228     ac_prev=localstatedir ;;
229   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
230   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
231   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
232     localstatedir="$ac_optarg" ;;
233
234   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
235     ac_prev=mandir ;;
236   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
237     mandir="$ac_optarg" ;;
238
239   -nfp | --nfp | --nf)
240     # Obsolete; use --without-fp.
241     with_fp=no ;;
242
243   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244   | --no-cr | --no-c)
245     no_create=yes ;;
246
247   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
248   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
249     no_recursion=yes ;;
250
251   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
252   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
253   | --oldin | --oldi | --old | --ol | --o)
254     ac_prev=oldincludedir ;;
255   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
256   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
257   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
258     oldincludedir="$ac_optarg" ;;
259
260   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
261     ac_prev=prefix ;;
262   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
263     prefix="$ac_optarg" ;;
264
265   -program-prefix | --program-prefix | --program-prefi | --program-pref \
266   | --program-pre | --program-pr | --program-p)
267     ac_prev=program_prefix ;;
268   -program-prefix=* | --program-prefix=* | --program-prefi=* \
269   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
270     program_prefix="$ac_optarg" ;;
271
272   -program-suffix | --program-suffix | --program-suffi | --program-suff \
273   | --program-suf | --program-su | --program-s)
274     ac_prev=program_suffix ;;
275   -program-suffix=* | --program-suffix=* | --program-suffi=* \
276   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
277     program_suffix="$ac_optarg" ;;
278
279   -program-transform-name | --program-transform-name \
280   | --program-transform-nam | --program-transform-na \
281   | --program-transform-n | --program-transform- \
282   | --program-transform | --program-transfor \
283   | --program-transfo | --program-transf \
284   | --program-trans | --program-tran \
285   | --progr-tra | --program-tr | --program-t)
286     ac_prev=program_transform_name ;;
287   -program-transform-name=* | --program-transform-name=* \
288   | --program-transform-nam=* | --program-transform-na=* \
289   | --program-transform-n=* | --program-transform-=* \
290   | --program-transform=* | --program-transfor=* \
291   | --program-transfo=* | --program-transf=* \
292   | --program-trans=* | --program-tran=* \
293   | --progr-tra=* | --program-tr=* | --program-t=*)
294     program_transform_name="$ac_optarg" ;;
295
296   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
297   | -silent | --silent | --silen | --sile | --sil)
298     silent=yes ;;
299
300   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
301     ac_prev=sbindir ;;
302   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
303   | --sbi=* | --sb=*)
304     sbindir="$ac_optarg" ;;
305
306   -sharedstatedir | --sharedstatedir | --sharedstatedi \
307   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
308   | --sharedst | --shareds | --shared | --share | --shar \
309   | --sha | --sh)
310     ac_prev=sharedstatedir ;;
311   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
312   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
313   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
314   | --sha=* | --sh=*)
315     sharedstatedir="$ac_optarg" ;;
316
317   -site | --site | --sit)
318     ac_prev=site ;;
319   -site=* | --site=* | --sit=*)
320     site="$ac_optarg" ;;
321
322   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
323     ac_prev=srcdir ;;
324   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
325     srcdir="$ac_optarg" ;;
326
327   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
328   | --syscon | --sysco | --sysc | --sys | --sy)
329     ac_prev=sysconfdir ;;
330   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
331   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
332     sysconfdir="$ac_optarg" ;;
333
334   -target | --target | --targe | --targ | --tar | --ta | --t)
335     ac_prev=target ;;
336   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
337     target="$ac_optarg" ;;
338
339   -v | -verbose | --verbose | --verbos | --verbo | --verb)
340     verbose=yes ;;
341
342   -version | --version | --versio | --versi | --vers)
343     echo "configure generated by autoconf version 2.13"
344     exit 0 ;;
345
346   -with-* | --with-*)
347     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
348     # Reject names that are not valid shell variable names.
349     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
350       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
351     fi
352     ac_package=`echo $ac_package| sed 's/-/_/g'`
353     case "$ac_option" in
354       *=*) ;;
355       *) ac_optarg=yes ;;
356     esac
357     eval "with_${ac_package}='$ac_optarg'" ;;
358
359   -without-* | --without-*)
360     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
361     # Reject names that are not valid shell variable names.
362     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
363       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364     fi
365     ac_package=`echo $ac_package| sed 's/-/_/g'`
366     eval "with_${ac_package}=no" ;;
367
368   --x)
369     # Obsolete; use --with-x.
370     with_x=yes ;;
371
372   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
373   | --x-incl | --x-inc | --x-in | --x-i)
374     ac_prev=x_includes ;;
375   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
376   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
377     x_includes="$ac_optarg" ;;
378
379   -x-libraries | --x-libraries | --x-librarie | --x-librari \
380   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
381     ac_prev=x_libraries ;;
382   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
383   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
384     x_libraries="$ac_optarg" ;;
385
386   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387     ;;
388
389   *)
390     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
391       echo "configure: warning: $ac_option: invalid host type" 1>&2
392     fi
393     if test "x$nonopt" != xNONE; then
394       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
395     fi
396     nonopt="$ac_option"
397     ;;
398
399   esac
400 done
401
402 if test -n "$ac_prev"; then
403   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
404 fi
405
406 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
407
408 # File descriptor usage:
409 # 0 standard input
410 # 1 file creation
411 # 2 errors and warnings
412 # 3 some systems may open it to /dev/tty
413 # 4 used on the Kubota Titan
414 # 6 checking for... messages and results
415 # 5 compiler messages saved in config.log
416 if test "$silent" = yes; then
417   exec 6>/dev/null
418 else
419   exec 6>&1
420 fi
421 exec 5>./config.log
422
423 echo "\
424 This file contains any messages produced by compilers while
425 running configure, to aid debugging if configure makes a mistake.
426 " 1>&5
427
428 # Strip out --no-create and --no-recursion so they do not pile up.
429 # Also quote any args containing shell metacharacters.
430 ac_configure_args=
431 for ac_arg
432 do
433   case "$ac_arg" in
434   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
435   | --no-cr | --no-c) ;;
436   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
437   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
438   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
439   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
440   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
441   esac
442 done
443
444 # NLS nuisances.
445 # Only set these to C if already set.  These must not be set unconditionally
446 # because not all systems understand e.g. LANG=C (notably SCO).
447 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
448 # Non-C LC_CTYPE values break the ctype check.
449 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
450 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
451 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
452 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
453
454 # confdefs.h avoids OS command line length limits that DEFS can exceed.
455 rm -rf conftest* confdefs.h
456 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
457 echo > confdefs.h
458
459 # A filename unique to this package, relative to the directory that
460 # configure is in, which we can look for to find out if srcdir is correct.
461 ac_unique_file=doc/bc.1
462
463 # Find the source files, if location was not specified.
464 if test -z "$srcdir"; then
465   ac_srcdir_defaulted=yes
466   # Try the directory containing this script, then its parent.
467   ac_prog=$0
468   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
469   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
470   srcdir=$ac_confdir
471   if test ! -r $srcdir/$ac_unique_file; then
472     srcdir=..
473   fi
474 else
475   ac_srcdir_defaulted=no
476 fi
477 if test ! -r $srcdir/$ac_unique_file; then
478   if test "$ac_srcdir_defaulted" = yes; then
479     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
480   else
481     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
482   fi
483 fi
484 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
485
486 # Prefer explicitly selected file to automatically selected ones.
487 if test -z "$CONFIG_SITE"; then
488   if test "x$prefix" != xNONE; then
489     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
490   else
491     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
492   fi
493 fi
494 for ac_site_file in $CONFIG_SITE; do
495   if test -r "$ac_site_file"; then
496     echo "loading site script $ac_site_file"
497     . "$ac_site_file"
498   fi
499 done
500
501 if test -r "$cache_file"; then
502   echo "loading cache $cache_file"
503   . $cache_file
504 else
505   echo "creating cache $cache_file"
506   > $cache_file
507 fi
508
509 ac_ext=c
510 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
511 ac_cpp='$CPP $CPPFLAGS'
512 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
513 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
514 cross_compiling=$ac_cv_prog_cc_cross
515
516 ac_exeext=
517 ac_objext=o
518 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
519   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
520   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
521     ac_n= ac_c='
522 ' ac_t='        '
523   else
524     ac_n=-n ac_c= ac_t=
525   fi
526 else
527   ac_n= ac_c='\c' ac_t=
528 fi
529
530
531 ac_aux_dir=
532 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
533   if test -f $ac_dir/install-sh; then
534     ac_aux_dir=$ac_dir
535     ac_install_sh="$ac_aux_dir/install-sh -c"
536     break
537   elif test -f $ac_dir/install.sh; then
538     ac_aux_dir=$ac_dir
539     ac_install_sh="$ac_aux_dir/install.sh -c"
540     break
541   fi
542 done
543 if test -z "$ac_aux_dir"; then
544   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
545 fi
546 ac_config_guess=$ac_aux_dir/config.guess
547 ac_config_sub=$ac_aux_dir/config.sub
548 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
549
550 # Find a good install program.  We prefer a C program (faster),
551 # so one script is as good as another.  But avoid the broken or
552 # incompatible versions:
553 # SysV /etc/install, /usr/sbin/install
554 # SunOS /usr/etc/install
555 # IRIX /sbin/install
556 # AIX /bin/install
557 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
558 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
559 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
560 # ./install, which can be erroneously created by make from ./install.sh.
561 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
562 echo "configure:563: checking for a BSD compatible install" >&5
563 if test -z "$INSTALL"; then
564 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
565   echo $ac_n "(cached) $ac_c" 1>&6
566 else
567     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
568   for ac_dir in $PATH; do
569     # Account for people who put trailing slashes in PATH elements.
570     case "$ac_dir/" in
571     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
572     *)
573       # OSF1 and SCO ODT 3.0 have their own names for install.
574       # Don't use installbsd from OSF since it installs stuff as root
575       # by default.
576       for ac_prog in ginstall scoinst install; do
577         if test -f $ac_dir/$ac_prog; then
578           if test $ac_prog = install &&
579             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
580             # AIX install.  It has an incompatible calling convention.
581             :
582           else
583             ac_cv_path_install="$ac_dir/$ac_prog -c"
584             break 2
585           fi
586         fi
587       done
588       ;;
589     esac
590   done
591   IFS="$ac_save_IFS"
592
593 fi
594   if test "${ac_cv_path_install+set}" = set; then
595     INSTALL="$ac_cv_path_install"
596   else
597     # As a last resort, use the slow shell script.  We don't cache a
598     # path for INSTALL within a source directory, because that will
599     # break other packages using the cache if that directory is
600     # removed, or if the path is relative.
601     INSTALL="$ac_install_sh"
602   fi
603 fi
604 echo "$ac_t""$INSTALL" 1>&6
605
606 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
607 # It thinks the first close brace ends the variable substitution.
608 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
609
610 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
611
612 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
613
614 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
615 echo "configure:616: checking whether build environment is sane" >&5
616 # Just in case
617 sleep 1
618 echo timestamp > conftestfile
619 # Do `set' in a subshell so we don't clobber the current shell's
620 # arguments.  Must try -L first in case configure is actually a
621 # symlink; some systems play weird games with the mod time of symlinks
622 # (eg FreeBSD returns the mod time of the symlink's containing
623 # directory).
624 if (
625    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
626    if test "$*" = "X"; then
627       # -L didn't work.
628       set X `ls -t $srcdir/configure conftestfile`
629    fi
630    if test "$*" != "X $srcdir/configure conftestfile" \
631       && test "$*" != "X conftestfile $srcdir/configure"; then
632
633       # If neither matched, then we have a broken ls.  This can happen
634       # if, for instance, CONFIG_SHELL is bash and it inherits a
635       # broken ls alias from the environment.  This has actually
636       # happened.  Such a system could not be considered "sane".
637       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
638 alias in your environment" 1>&2; exit 1; }
639    fi
640
641    test "$2" = conftestfile
642    )
643 then
644    # Ok.
645    :
646 else
647    { echo "configure: error: newly created file is older than distributed files!
648 Check your system clock" 1>&2; exit 1; }
649 fi
650 rm -f conftest*
651 echo "$ac_t""yes" 1>&6
652 if test "$program_transform_name" = s,x,x,; then
653   program_transform_name=
654 else
655   # Double any \ or $.  echo might interpret backslashes.
656   cat <<\EOF_SED > conftestsed
657 s,\\,\\\\,g; s,\$,$$,g
658 EOF_SED
659   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
660   rm -f conftestsed
661 fi
662 test "$program_prefix" != NONE &&
663   program_transform_name="s,^,${program_prefix},; $program_transform_name"
664 # Use a double $ so make ignores it.
665 test "$program_suffix" != NONE &&
666   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
667
668 # sed with no file args requires a program.
669 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
670
671 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
672 echo "configure:673: checking whether ${MAKE-make} sets \${MAKE}" >&5
673 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
674 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
675   echo $ac_n "(cached) $ac_c" 1>&6
676 else
677   cat > conftestmake <<\EOF
678 all:
679         @echo 'ac_maketemp="${MAKE}"'
680 EOF
681 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
682 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
683 if test -n "$ac_maketemp"; then
684   eval ac_cv_prog_make_${ac_make}_set=yes
685 else
686   eval ac_cv_prog_make_${ac_make}_set=no
687 fi
688 rm -f conftestmake
689 fi
690 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
691   echo "$ac_t""yes" 1>&6
692   SET_MAKE=
693 else
694   echo "$ac_t""no" 1>&6
695   SET_MAKE="MAKE=${MAKE-make}"
696 fi
697
698
699 PACKAGE="bc"
700
701 VERSION="1.06"
702
703 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
704   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
705 fi
706 cat >> confdefs.h <<EOF
707 #define PACKAGE "$PACKAGE"
708 EOF
709
710 cat >> confdefs.h <<EOF
711 #define VERSION "$VERSION"
712 EOF
713
714
715
716 missing_dir=`cd $ac_aux_dir && pwd`
717 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
718 echo "configure:719: checking for working aclocal" >&5
719 # Run test in a subshell; some versions of sh will print an error if
720 # an executable is not found, even if stderr is redirected.
721 # Redirect stdin to placate older versions of autoconf.  Sigh.
722 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
723    ACLOCAL=aclocal
724    echo "$ac_t""found" 1>&6
725 else
726    ACLOCAL="$missing_dir/missing aclocal"
727    echo "$ac_t""missing" 1>&6
728 fi
729
730 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
731 echo "configure:732: checking for working autoconf" >&5
732 # Run test in a subshell; some versions of sh will print an error if
733 # an executable is not found, even if stderr is redirected.
734 # Redirect stdin to placate older versions of autoconf.  Sigh.
735 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
736    AUTOCONF=autoconf
737    echo "$ac_t""found" 1>&6
738 else
739    AUTOCONF="$missing_dir/missing autoconf"
740    echo "$ac_t""missing" 1>&6
741 fi
742
743 echo $ac_n "checking for working automake""... $ac_c" 1>&6
744 echo "configure:745: checking for working automake" >&5
745 # Run test in a subshell; some versions of sh will print an error if
746 # an executable is not found, even if stderr is redirected.
747 # Redirect stdin to placate older versions of autoconf.  Sigh.
748 if (automake --version) < /dev/null > /dev/null 2>&1; then
749    AUTOMAKE=automake
750    echo "$ac_t""found" 1>&6
751 else
752    AUTOMAKE="$missing_dir/missing automake"
753    echo "$ac_t""missing" 1>&6
754 fi
755
756 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
757 echo "configure:758: checking for working autoheader" >&5
758 # Run test in a subshell; some versions of sh will print an error if
759 # an executable is not found, even if stderr is redirected.
760 # Redirect stdin to placate older versions of autoconf.  Sigh.
761 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
762    AUTOHEADER=autoheader
763    echo "$ac_t""found" 1>&6
764 else
765    AUTOHEADER="$missing_dir/missing autoheader"
766    echo "$ac_t""missing" 1>&6
767 fi
768
769 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
770 echo "configure:771: checking for working makeinfo" >&5
771 # Run test in a subshell; some versions of sh will print an error if
772 # an executable is not found, even if stderr is redirected.
773 # Redirect stdin to placate older versions of autoconf.  Sigh.
774 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
775    MAKEINFO=makeinfo
776    echo "$ac_t""found" 1>&6
777 else
778    MAKEINFO="$missing_dir/missing makeinfo"
779    echo "$ac_t""missing" 1>&6
780 fi
781
782
783
784
785
786
787 cat >> confdefs.h <<\EOF
788 #define DC_VERSION "1.3"
789 EOF
790
791 cat >> confdefs.h <<EOF
792 #define BC_COPYRIGHT  "Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc."
793 EOF
794
795 cat >> confdefs.h <<EOF
796 #define DC_COPYRIGHT  "Copyright 1994, 1997, 1998, 2000 Free Software Foundation, Inc."
797 EOF
798
799
800 # Extract the first word of "gcc", so it can be a program name with args.
801 set dummy gcc; ac_word=$2
802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
803 echo "configure:804: checking for $ac_word" >&5
804 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
805   echo $ac_n "(cached) $ac_c" 1>&6
806 else
807   if test -n "$CC"; then
808   ac_cv_prog_CC="$CC" # Let the user override the test.
809 else
810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
811   ac_dummy="$PATH"
812   for ac_dir in $ac_dummy; do
813     test -z "$ac_dir" && ac_dir=.
814     if test -f $ac_dir/$ac_word; then
815       ac_cv_prog_CC="gcc"
816       break
817     fi
818   done
819   IFS="$ac_save_ifs"
820 fi
821 fi
822 CC="$ac_cv_prog_CC"
823 if test -n "$CC"; then
824   echo "$ac_t""$CC" 1>&6
825 else
826   echo "$ac_t""no" 1>&6
827 fi
828
829 if test -z "$CC"; then
830   # Extract the first word of "cc", so it can be a program name with args.
831 set dummy cc; ac_word=$2
832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
833 echo "configure:834: checking for $ac_word" >&5
834 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   if test -n "$CC"; then
838   ac_cv_prog_CC="$CC" # Let the user override the test.
839 else
840   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
841   ac_prog_rejected=no
842   ac_dummy="$PATH"
843   for ac_dir in $ac_dummy; do
844     test -z "$ac_dir" && ac_dir=.
845     if test -f $ac_dir/$ac_word; then
846       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
847         ac_prog_rejected=yes
848         continue
849       fi
850       ac_cv_prog_CC="cc"
851       break
852     fi
853   done
854   IFS="$ac_save_ifs"
855 if test $ac_prog_rejected = yes; then
856   # We found a bogon in the path, so make sure we never use it.
857   set dummy $ac_cv_prog_CC
858   shift
859   if test $# -gt 0; then
860     # We chose a different compiler from the bogus one.
861     # However, it has the same basename, so the bogon will be chosen
862     # first if we set CC to just the basename; use the full file name.
863     shift
864     set dummy "$ac_dir/$ac_word" "$@"
865     shift
866     ac_cv_prog_CC="$@"
867   fi
868 fi
869 fi
870 fi
871 CC="$ac_cv_prog_CC"
872 if test -n "$CC"; then
873   echo "$ac_t""$CC" 1>&6
874 else
875   echo "$ac_t""no" 1>&6
876 fi
877
878   if test -z "$CC"; then
879     case "`uname -s`" in
880     *win32* | *WIN32*)
881       # Extract the first word of "cl", so it can be a program name with args.
882 set dummy cl; ac_word=$2
883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
884 echo "configure:885: checking for $ac_word" >&5
885 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
886   echo $ac_n "(cached) $ac_c" 1>&6
887 else
888   if test -n "$CC"; then
889   ac_cv_prog_CC="$CC" # Let the user override the test.
890 else
891   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
892   ac_dummy="$PATH"
893   for ac_dir in $ac_dummy; do
894     test -z "$ac_dir" && ac_dir=.
895     if test -f $ac_dir/$ac_word; then
896       ac_cv_prog_CC="cl"
897       break
898     fi
899   done
900   IFS="$ac_save_ifs"
901 fi
902 fi
903 CC="$ac_cv_prog_CC"
904 if test -n "$CC"; then
905   echo "$ac_t""$CC" 1>&6
906 else
907   echo "$ac_t""no" 1>&6
908 fi
909  ;;
910     esac
911   fi
912   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
913 fi
914
915 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
916 echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
917
918 ac_ext=c
919 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
920 ac_cpp='$CPP $CPPFLAGS'
921 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
922 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
923 cross_compiling=$ac_cv_prog_cc_cross
924
925 cat > conftest.$ac_ext << EOF
926
927 #line 928 "configure"
928 #include "confdefs.h"
929
930 main(){return(0);}
931 EOF
932 if { (eval echo configure:933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
933   ac_cv_prog_cc_works=yes
934   # If we can't run a trivial program, we are probably using a cross compiler.
935   if (./conftest; exit) 2>/dev/null; then
936     ac_cv_prog_cc_cross=no
937   else
938     ac_cv_prog_cc_cross=yes
939   fi
940 else
941   echo "configure: failed program was:" >&5
942   cat conftest.$ac_ext >&5
943   ac_cv_prog_cc_works=no
944 fi
945 rm -fr conftest*
946 ac_ext=c
947 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
948 ac_cpp='$CPP $CPPFLAGS'
949 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
950 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
951 cross_compiling=$ac_cv_prog_cc_cross
952
953 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
954 if test $ac_cv_prog_cc_works = no; then
955   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
956 fi
957 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
958 echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
959 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
960 cross_compiling=$ac_cv_prog_cc_cross
961
962 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
963 echo "configure:964: checking whether we are using GNU C" >&5
964 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   cat > conftest.c <<EOF
968 #ifdef __GNUC__
969   yes;
970 #endif
971 EOF
972 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
973   ac_cv_prog_gcc=yes
974 else
975   ac_cv_prog_gcc=no
976 fi
977 fi
978
979 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
980
981 if test $ac_cv_prog_gcc = yes; then
982   GCC=yes
983 else
984   GCC=
985 fi
986
987 ac_test_CFLAGS="${CFLAGS+set}"
988 ac_save_CFLAGS="$CFLAGS"
989 CFLAGS=
990 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
991 echo "configure:992: checking whether ${CC-cc} accepts -g" >&5
992 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
993   echo $ac_n "(cached) $ac_c" 1>&6
994 else
995   echo 'void f(){}' > conftest.c
996 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
997   ac_cv_prog_cc_g=yes
998 else
999   ac_cv_prog_cc_g=no
1000 fi
1001 rm -f conftest*
1002
1003 fi
1004
1005 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1006 if test "$ac_test_CFLAGS" = set; then
1007   CFLAGS="$ac_save_CFLAGS"
1008 elif test $ac_cv_prog_cc_g = yes; then
1009   if test "$GCC" = yes; then
1010     CFLAGS="-g -O2"
1011   else
1012     CFLAGS="-g"
1013   fi
1014 else
1015   if test "$GCC" = yes; then
1016     CFLAGS="-O2"
1017   else
1018     CFLAGS=
1019   fi
1020 fi
1021
1022 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1023 echo "configure:1024: checking how to run the C preprocessor" >&5
1024 # On Suns, sometimes $CPP names a directory.
1025 if test -n "$CPP" && test -d "$CPP"; then
1026   CPP=
1027 fi
1028 if test -z "$CPP"; then
1029 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1030   echo $ac_n "(cached) $ac_c" 1>&6
1031 else
1032     # This must be in double quotes, not single quotes, because CPP may get
1033   # substituted into the Makefile and "${CC-cc}" will confuse make.
1034   CPP="${CC-cc} -E"
1035   # On the NeXT, cc -E runs the code through the compiler's parser,
1036   # not just through cpp.
1037   cat > conftest.$ac_ext <<EOF
1038 #line 1039 "configure"
1039 #include "confdefs.h"
1040 #include <assert.h>
1041 Syntax Error
1042 EOF
1043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1044 { (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1046 if test -z "$ac_err"; then
1047   :
1048 else
1049   echo "$ac_err" >&5
1050   echo "configure: failed program was:" >&5
1051   cat conftest.$ac_ext >&5
1052   rm -rf conftest*
1053   CPP="${CC-cc} -E -traditional-cpp"
1054   cat > conftest.$ac_ext <<EOF
1055 #line 1056 "configure"
1056 #include "confdefs.h"
1057 #include <assert.h>
1058 Syntax Error
1059 EOF
1060 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1061 { (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1062 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1063 if test -z "$ac_err"; then
1064   :
1065 else
1066   echo "$ac_err" >&5
1067   echo "configure: failed program was:" >&5
1068   cat conftest.$ac_ext >&5
1069   rm -rf conftest*
1070   CPP="${CC-cc} -nologo -E"
1071   cat > conftest.$ac_ext <<EOF
1072 #line 1073 "configure"
1073 #include "confdefs.h"
1074 #include <assert.h>
1075 Syntax Error
1076 EOF
1077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1078 { (eval echo configure:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1080 if test -z "$ac_err"; then
1081   :
1082 else
1083   echo "$ac_err" >&5
1084   echo "configure: failed program was:" >&5
1085   cat conftest.$ac_ext >&5
1086   rm -rf conftest*
1087   CPP=/lib/cpp
1088 fi
1089 rm -f conftest*
1090 fi
1091 rm -f conftest*
1092 fi
1093 rm -f conftest*
1094   ac_cv_prog_CPP="$CPP"
1095 fi
1096   CPP="$ac_cv_prog_CPP"
1097 else
1098   ac_cv_prog_CPP="$CPP"
1099 fi
1100 echo "$ac_t""$CPP" 1>&6
1101
1102 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1103 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1104 echo "configure:1105: checking for minix/config.h" >&5
1105 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1106   echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108   cat > conftest.$ac_ext <<EOF
1109 #line 1110 "configure"
1110 #include "confdefs.h"
1111 #include <minix/config.h>
1112 EOF
1113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1114 { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1116 if test -z "$ac_err"; then
1117   rm -rf conftest*
1118   eval "ac_cv_header_$ac_safe=yes"
1119 else
1120   echo "$ac_err" >&5
1121   echo "configure: failed program was:" >&5
1122   cat conftest.$ac_ext >&5
1123   rm -rf conftest*
1124   eval "ac_cv_header_$ac_safe=no"
1125 fi
1126 rm -f conftest*
1127 fi
1128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1129   echo "$ac_t""yes" 1>&6
1130   MINIX=yes
1131 else
1132   echo "$ac_t""no" 1>&6
1133 MINIX=
1134 fi
1135
1136 if test "$MINIX" = yes; then
1137   cat >> confdefs.h <<\EOF
1138 #define _POSIX_SOURCE 1
1139 EOF
1140
1141   cat >> confdefs.h <<\EOF
1142 #define _POSIX_1_SOURCE 2
1143 EOF
1144
1145   cat >> confdefs.h <<\EOF
1146 #define _MINIX 1
1147 EOF
1148
1149 fi
1150
1151
1152 missing_dir=`cd $ac_aux_dir && pwd`
1153 for ac_prog in flex lex
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$LEX"; then
1163   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_LEX="$ac_prog"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 LEX="$ac_cv_prog_LEX"
1178 if test -n "$LEX"; then
1179   echo "$ac_t""$LEX" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$LEX" && break
1185 done
1186 test -n "$LEX" || LEX=""$missing_dir/missing flex""
1187
1188 # Extract the first word of "flex", so it can be a program name with args.
1189 set dummy flex; ac_word=$2
1190 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1191 echo "configure:1192: checking for $ac_word" >&5
1192 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1193   echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195   if test -n "$LEX"; then
1196   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1197 else
1198   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1199   ac_dummy="$PATH"
1200   for ac_dir in $ac_dummy; do
1201     test -z "$ac_dir" && ac_dir=.
1202     if test -f $ac_dir/$ac_word; then
1203       ac_cv_prog_LEX="flex"
1204       break
1205     fi
1206   done
1207   IFS="$ac_save_ifs"
1208   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1209 fi
1210 fi
1211 LEX="$ac_cv_prog_LEX"
1212 if test -n "$LEX"; then
1213   echo "$ac_t""$LEX" 1>&6
1214 else
1215   echo "$ac_t""no" 1>&6
1216 fi
1217
1218 if test -z "$LEXLIB"
1219 then
1220   case "$LEX" in
1221   flex*) ac_lib=fl ;;
1222   *) ac_lib=l ;;
1223   esac
1224   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1225 echo "configure:1226: checking for yywrap in -l$ac_lib" >&5
1226 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1228   echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230   ac_save_LIBS="$LIBS"
1231 LIBS="-l$ac_lib  $LIBS"
1232 cat > conftest.$ac_ext <<EOF
1233 #line 1234 "configure"
1234 #include "confdefs.h"
1235 /* Override any gcc2 internal prototype to avoid an error.  */
1236 /* We use char because int might match the return type of a gcc2
1237     builtin and then its argument prototype would still apply.  */
1238 char yywrap();
1239
1240 int main() {
1241 yywrap()
1242 ; return 0; }
1243 EOF
1244 if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1245   rm -rf conftest*
1246   eval "ac_cv_lib_$ac_lib_var=yes"
1247 else
1248   echo "configure: failed program was:" >&5
1249   cat conftest.$ac_ext >&5
1250   rm -rf conftest*
1251   eval "ac_cv_lib_$ac_lib_var=no"
1252 fi
1253 rm -f conftest*
1254 LIBS="$ac_save_LIBS"
1255
1256 fi
1257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1258   echo "$ac_t""yes" 1>&6
1259   LEXLIB="-l$ac_lib"
1260 else
1261   echo "$ac_t""no" 1>&6
1262 fi
1263
1264 fi
1265
1266 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1267 echo "configure:1268: checking lex output file root" >&5
1268 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1269   echo $ac_n "(cached) $ac_c" 1>&6
1270 else
1271   # The minimal lex program is just a single line: %%.  But some broken lexes
1272 # (Solaris, I think it was) want two %% lines, so accommodate them.
1273 echo '%%
1274 %%' | $LEX
1275 if test -f lex.yy.c; then
1276   ac_cv_prog_lex_root=lex.yy
1277 elif test -f lexyy.c; then
1278   ac_cv_prog_lex_root=lexyy
1279 else
1280   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1281 fi
1282 fi
1283
1284 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1285 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1286
1287 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1288 echo "configure:1289: checking whether yytext is a pointer" >&5
1289 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1290   echo $ac_n "(cached) $ac_c" 1>&6
1291 else
1292   # POSIX says lex can declare yytext either as a pointer or an array; the
1293 # default is implementation-dependent. Figure out which it is, since
1294 # not all implementations provide the %pointer and %array declarations.
1295 ac_cv_prog_lex_yytext_pointer=no
1296 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1297 ac_save_LIBS="$LIBS"
1298 LIBS="$LIBS $LEXLIB"
1299 cat > conftest.$ac_ext <<EOF
1300 #line 1301 "configure"
1301 #include "confdefs.h"
1302 `cat $LEX_OUTPUT_ROOT.c`
1303 int main() {
1304
1305 ; return 0; }
1306 EOF
1307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1308   rm -rf conftest*
1309   ac_cv_prog_lex_yytext_pointer=yes
1310 else
1311   echo "configure: failed program was:" >&5
1312   cat conftest.$ac_ext >&5
1313 fi
1314 rm -f conftest*
1315 LIBS="$ac_save_LIBS"
1316 rm -f "${LEX_OUTPUT_ROOT}.c"
1317
1318 fi
1319
1320 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1321 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1322   cat >> confdefs.h <<\EOF
1323 #define YYTEXT_POINTER 1
1324 EOF
1325
1326 fi
1327
1328 for ac_prog in 'bison -y' byacc
1329 do
1330 # Extract the first word of "$ac_prog", so it can be a program name with args.
1331 set dummy $ac_prog; ac_word=$2
1332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1333 echo "configure:1334: checking for $ac_word" >&5
1334 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1335   echo $ac_n "(cached) $ac_c" 1>&6
1336 else
1337   if test -n "$YACC"; then
1338   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1339 else
1340   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1341   ac_dummy="$PATH"
1342   for ac_dir in $ac_dummy; do
1343     test -z "$ac_dir" && ac_dir=.
1344     if test -f $ac_dir/$ac_word; then
1345       ac_cv_prog_YACC="$ac_prog"
1346       break
1347     fi
1348   done
1349   IFS="$ac_save_ifs"
1350 fi
1351 fi
1352 YACC="$ac_cv_prog_YACC"
1353 if test -n "$YACC"; then
1354   echo "$ac_t""$YACC" 1>&6
1355 else
1356   echo "$ac_t""no" 1>&6
1357 fi
1358
1359 test -n "$YACC" && break
1360 done
1361 test -n "$YACC" || YACC="yacc"
1362
1363 # Find a good install program.  We prefer a C program (faster),
1364 # so one script is as good as another.  But avoid the broken or
1365 # incompatible versions:
1366 # SysV /etc/install, /usr/sbin/install
1367 # SunOS /usr/etc/install
1368 # IRIX /sbin/install
1369 # AIX /bin/install
1370 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1371 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1372 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1373 # ./install, which can be erroneously created by make from ./install.sh.
1374 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1375 echo "configure:1376: checking for a BSD compatible install" >&5
1376 if test -z "$INSTALL"; then
1377 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1378   echo $ac_n "(cached) $ac_c" 1>&6
1379 else
1380     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1381   for ac_dir in $PATH; do
1382     # Account for people who put trailing slashes in PATH elements.
1383     case "$ac_dir/" in
1384     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1385     *)
1386       # OSF1 and SCO ODT 3.0 have their own names for install.
1387       # Don't use installbsd from OSF since it installs stuff as root
1388       # by default.
1389       for ac_prog in ginstall scoinst install; do
1390         if test -f $ac_dir/$ac_prog; then
1391           if test $ac_prog = install &&
1392             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1393             # AIX install.  It has an incompatible calling convention.
1394             :
1395           else
1396             ac_cv_path_install="$ac_dir/$ac_prog -c"
1397             break 2
1398           fi
1399         fi
1400       done
1401       ;;
1402     esac
1403   done
1404   IFS="$ac_save_IFS"
1405
1406 fi
1407   if test "${ac_cv_path_install+set}" = set; then
1408     INSTALL="$ac_cv_path_install"
1409   else
1410     # As a last resort, use the slow shell script.  We don't cache a
1411     # path for INSTALL within a source directory, because that will
1412     # break other packages using the cache if that directory is
1413     # removed, or if the path is relative.
1414     INSTALL="$ac_install_sh"
1415   fi
1416 fi
1417 echo "$ac_t""$INSTALL" 1>&6
1418
1419 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1420 # It thinks the first close brace ends the variable substitution.
1421 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1422
1423 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1424
1425 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1426
1427 # Extract the first word of "ranlib", so it can be a program name with args.
1428 set dummy ranlib; ac_word=$2
1429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1430 echo "configure:1431: checking for $ac_word" >&5
1431 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1432   echo $ac_n "(cached) $ac_c" 1>&6
1433 else
1434   if test -n "$RANLIB"; then
1435   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1436 else
1437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1438   ac_dummy="$PATH"
1439   for ac_dir in $ac_dummy; do
1440     test -z "$ac_dir" && ac_dir=.
1441     if test -f $ac_dir/$ac_word; then
1442       ac_cv_prog_RANLIB="ranlib"
1443       break
1444     fi
1445   done
1446   IFS="$ac_save_ifs"
1447   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1448 fi
1449 fi
1450 RANLIB="$ac_cv_prog_RANLIB"
1451 if test -n "$RANLIB"; then
1452   echo "$ac_t""$RANLIB" 1>&6
1453 else
1454   echo "$ac_t""no" 1>&6
1455 fi
1456
1457 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1458 echo "configure:1459: checking whether ${MAKE-make} sets \${MAKE}" >&5
1459 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1460 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1461   echo $ac_n "(cached) $ac_c" 1>&6
1462 else
1463   cat > conftestmake <<\EOF
1464 all:
1465         @echo 'ac_maketemp="${MAKE}"'
1466 EOF
1467 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1468 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1469 if test -n "$ac_maketemp"; then
1470   eval ac_cv_prog_make_${ac_make}_set=yes
1471 else
1472   eval ac_cv_prog_make_${ac_make}_set=no
1473 fi
1474 rm -f conftestmake
1475 fi
1476 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1477   echo "$ac_t""yes" 1>&6
1478   SET_MAKE=
1479 else
1480   echo "$ac_t""no" 1>&6
1481   SET_MAKE="MAKE=${MAKE-make}"
1482 fi
1483
1484
1485 for ac_hdr in stdarg.h stddef.h stdlib.h string.h limits.h unistd.h lib.h
1486 do
1487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1489 echo "configure:1490: checking for $ac_hdr" >&5
1490 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1491   echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493   cat > conftest.$ac_ext <<EOF
1494 #line 1495 "configure"
1495 #include "confdefs.h"
1496 #include <$ac_hdr>
1497 EOF
1498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1499 { (eval echo configure:1500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1501 if test -z "$ac_err"; then
1502   rm -rf conftest*
1503   eval "ac_cv_header_$ac_safe=yes"
1504 else
1505   echo "$ac_err" >&5
1506   echo "configure: failed program was:" >&5
1507   cat conftest.$ac_ext >&5
1508   rm -rf conftest*
1509   eval "ac_cv_header_$ac_safe=no"
1510 fi
1511 rm -f conftest*
1512 fi
1513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1514   echo "$ac_t""yes" 1>&6
1515     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1516   cat >> confdefs.h <<EOF
1517 #define $ac_tr_hdr 1
1518 EOF
1519  
1520 else
1521   echo "$ac_t""no" 1>&6
1522 fi
1523 done
1524
1525 echo $ac_n "checking for working const""... $ac_c" 1>&6
1526 echo "configure:1527: checking for working const" >&5
1527 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1528   echo $ac_n "(cached) $ac_c" 1>&6
1529 else
1530   cat > conftest.$ac_ext <<EOF
1531 #line 1532 "configure"
1532 #include "confdefs.h"
1533
1534 int main() {
1535
1536 /* Ultrix mips cc rejects this.  */
1537 typedef int charset[2]; const charset x;
1538 /* SunOS 4.1.1 cc rejects this.  */
1539 char const *const *ccp;
1540 char **p;
1541 /* NEC SVR4.0.2 mips cc rejects this.  */
1542 struct point {int x, y;};
1543 static struct point const zero = {0,0};
1544 /* AIX XL C 1.02.0.0 rejects this.
1545    It does not let you subtract one const X* pointer from another in an arm
1546    of an if-expression whose if-part is not a constant expression */
1547 const char *g = "string";
1548 ccp = &g + (g ? g-g : 0);
1549 /* HPUX 7.0 cc rejects these. */
1550 ++ccp;
1551 p = (char**) ccp;
1552 ccp = (char const *const *) p;
1553 { /* SCO 3.2v4 cc rejects this.  */
1554   char *t;
1555   char const *s = 0 ? (char *) 0 : (char const *) 0;
1556
1557   *t++ = 0;
1558 }
1559 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1560   int x[] = {25, 17};
1561   const int *foo = &x[0];
1562   ++foo;
1563 }
1564 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1565   typedef const int *iptr;
1566   iptr p = 0;
1567   ++p;
1568 }
1569 { /* AIX XL C 1.02.0.0 rejects this saying
1570      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1571   struct s { int j; const int *ap[3]; };
1572   struct s *b; b->j = 5;
1573 }
1574 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1575   const int foo = 10;
1576 }
1577
1578 ; return 0; }
1579 EOF
1580 if { (eval echo configure:1581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1581   rm -rf conftest*
1582   ac_cv_c_const=yes
1583 else
1584   echo "configure: failed program was:" >&5
1585   cat conftest.$ac_ext >&5
1586   rm -rf conftest*
1587   ac_cv_c_const=no
1588 fi
1589 rm -f conftest*
1590 fi
1591
1592 echo "$ac_t""$ac_cv_c_const" 1>&6
1593 if test $ac_cv_c_const = no; then
1594   cat >> confdefs.h <<\EOF
1595 #define const 
1596 EOF
1597
1598 fi
1599
1600 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1601 echo "configure:1602: checking for ANSI C header files" >&5
1602 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1603   echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605   cat > conftest.$ac_ext <<EOF
1606 #line 1607 "configure"
1607 #include "confdefs.h"
1608 #include <stdlib.h>
1609 #include <stdarg.h>
1610 #include <string.h>
1611 #include <float.h>
1612 EOF
1613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1614 { (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1616 if test -z "$ac_err"; then
1617   rm -rf conftest*
1618   ac_cv_header_stdc=yes
1619 else
1620   echo "$ac_err" >&5
1621   echo "configure: failed program was:" >&5
1622   cat conftest.$ac_ext >&5
1623   rm -rf conftest*
1624   ac_cv_header_stdc=no
1625 fi
1626 rm -f conftest*
1627
1628 if test $ac_cv_header_stdc = yes; then
1629   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1630 cat > conftest.$ac_ext <<EOF
1631 #line 1632 "configure"
1632 #include "confdefs.h"
1633 #include <string.h>
1634 EOF
1635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1636   egrep "memchr" >/dev/null 2>&1; then
1637   :
1638 else
1639   rm -rf conftest*
1640   ac_cv_header_stdc=no
1641 fi
1642 rm -f conftest*
1643
1644 fi
1645
1646 if test $ac_cv_header_stdc = yes; then
1647   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1648 cat > conftest.$ac_ext <<EOF
1649 #line 1650 "configure"
1650 #include "confdefs.h"
1651 #include <stdlib.h>
1652 EOF
1653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1654   egrep "free" >/dev/null 2>&1; then
1655   :
1656 else
1657   rm -rf conftest*
1658   ac_cv_header_stdc=no
1659 fi
1660 rm -f conftest*
1661
1662 fi
1663
1664 if test $ac_cv_header_stdc = yes; then
1665   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1666 if test "$cross_compiling" = yes; then
1667   :
1668 else
1669   cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1672 #include <ctype.h>
1673 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1674 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1675 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1676 int main () { int i; for (i = 0; i < 256; i++)
1677 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1678 exit (0); }
1679
1680 EOF
1681 if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1682 then
1683   :
1684 else
1685   echo "configure: failed program was:" >&5
1686   cat conftest.$ac_ext >&5
1687   rm -fr conftest*
1688   ac_cv_header_stdc=no
1689 fi
1690 rm -fr conftest*
1691 fi
1692
1693 fi
1694 fi
1695
1696 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1697 if test $ac_cv_header_stdc = yes; then
1698   cat >> confdefs.h <<\EOF
1699 #define STDC_HEADERS 1
1700 EOF
1701
1702 fi
1703
1704 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1705 echo "configure:1706: checking for size_t" >&5
1706 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1707   echo $ac_n "(cached) $ac_c" 1>&6
1708 else
1709   cat > conftest.$ac_ext <<EOF
1710 #line 1711 "configure"
1711 #include "confdefs.h"
1712 #include <sys/types.h>
1713 #if STDC_HEADERS
1714 #include <stdlib.h>
1715 #include <stddef.h>
1716 #endif
1717 EOF
1718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1719   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1720   rm -rf conftest*
1721   ac_cv_type_size_t=yes
1722 else
1723   rm -rf conftest*
1724   ac_cv_type_size_t=no
1725 fi
1726 rm -f conftest*
1727
1728 fi
1729 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1730 if test $ac_cv_type_size_t = no; then
1731   cat >> confdefs.h <<\EOF
1732 #define size_t unsigned
1733 EOF
1734
1735 fi
1736
1737 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
1738 echo "configure:1739: checking for ptrdiff_t" >&5
1739 if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
1740   echo $ac_n "(cached) $ac_c" 1>&6
1741 else
1742   cat > conftest.$ac_ext <<EOF
1743 #line 1744 "configure"
1744 #include "confdefs.h"
1745 #include <sys/types.h>
1746 #if STDC_HEADERS
1747 #include <stdlib.h>
1748 #include <stddef.h>
1749 #endif
1750 EOF
1751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1752   egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1753   rm -rf conftest*
1754   ac_cv_type_ptrdiff_t=yes
1755 else
1756   rm -rf conftest*
1757   ac_cv_type_ptrdiff_t=no
1758 fi
1759 rm -f conftest*
1760
1761 fi
1762 echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
1763 if test $ac_cv_type_ptrdiff_t = no; then
1764   cat >> confdefs.h <<\EOF
1765 #define ptrdiff_t size_t
1766 EOF
1767
1768 fi
1769
1770
1771 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1772 echo "configure:1773: checking for vprintf" >&5
1773 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1774   echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776   cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 /* System header to define __stub macros and hopefully few prototypes,
1780     which can conflict with char vprintf(); below.  */
1781 #include <assert.h>
1782 /* Override any gcc2 internal prototype to avoid an error.  */
1783 /* We use char because int might match the return type of a gcc2
1784     builtin and then its argument prototype would still apply.  */
1785 char vprintf();
1786
1787 int main() {
1788
1789 /* The GNU C library defines this for functions which it implements
1790     to always fail with ENOSYS.  Some functions are actually named
1791     something starting with __ and the normal name is an alias.  */
1792 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1793 choke me
1794 #else
1795 vprintf();
1796 #endif
1797
1798 ; return 0; }
1799 EOF
1800 if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1801   rm -rf conftest*
1802   eval "ac_cv_func_vprintf=yes"
1803 else
1804   echo "configure: failed program was:" >&5
1805   cat conftest.$ac_ext >&5
1806   rm -rf conftest*
1807   eval "ac_cv_func_vprintf=no"
1808 fi
1809 rm -f conftest*
1810 fi
1811
1812 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1813   echo "$ac_t""yes" 1>&6
1814   cat >> confdefs.h <<\EOF
1815 #define HAVE_VPRINTF 1
1816 EOF
1817
1818 else
1819   echo "$ac_t""no" 1>&6
1820 fi
1821
1822 if test "$ac_cv_func_vprintf" != yes; then
1823 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1824 echo "configure:1825: checking for _doprnt" >&5
1825 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1826   echo $ac_n "(cached) $ac_c" 1>&6
1827 else
1828   cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 /* System header to define __stub macros and hopefully few prototypes,
1832     which can conflict with char _doprnt(); below.  */
1833 #include <assert.h>
1834 /* Override any gcc2 internal prototype to avoid an error.  */
1835 /* We use char because int might match the return type of a gcc2
1836     builtin and then its argument prototype would still apply.  */
1837 char _doprnt();
1838
1839 int main() {
1840
1841 /* The GNU C library defines this for functions which it implements
1842     to always fail with ENOSYS.  Some functions are actually named
1843     something starting with __ and the normal name is an alias.  */
1844 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1845 choke me
1846 #else
1847 _doprnt();
1848 #endif
1849
1850 ; return 0; }
1851 EOF
1852 if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1853   rm -rf conftest*
1854   eval "ac_cv_func__doprnt=yes"
1855 else
1856   echo "configure: failed program was:" >&5
1857   cat conftest.$ac_ext >&5
1858   rm -rf conftest*
1859   eval "ac_cv_func__doprnt=no"
1860 fi
1861 rm -f conftest*
1862 fi
1863
1864 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1865   echo "$ac_t""yes" 1>&6
1866   cat >> confdefs.h <<\EOF
1867 #define HAVE_DOPRNT 1
1868 EOF
1869
1870 else
1871   echo "$ac_t""no" 1>&6
1872 fi
1873
1874 fi
1875
1876 for ac_func in isgraph setvbuf
1877 do
1878 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1879 echo "configure:1880: checking for $ac_func" >&5
1880 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886 /* System header to define __stub macros and hopefully few prototypes,
1887     which can conflict with char $ac_func(); below.  */
1888 #include <assert.h>
1889 /* Override any gcc2 internal prototype to avoid an error.  */
1890 /* We use char because int might match the return type of a gcc2
1891     builtin and then its argument prototype would still apply.  */
1892 char $ac_func();
1893
1894 int main() {
1895
1896 /* The GNU C library defines this for functions which it implements
1897     to always fail with ENOSYS.  Some functions are actually named
1898     something starting with __ and the normal name is an alias.  */
1899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1900 choke me
1901 #else
1902 $ac_func();
1903 #endif
1904
1905 ; return 0; }
1906 EOF
1907 if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1908   rm -rf conftest*
1909   eval "ac_cv_func_$ac_func=yes"
1910 else
1911   echo "configure: failed program was:" >&5
1912   cat conftest.$ac_ext >&5
1913   rm -rf conftest*
1914   eval "ac_cv_func_$ac_func=no"
1915 fi
1916 rm -f conftest*
1917 fi
1918
1919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1920   echo "$ac_t""yes" 1>&6
1921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1922   cat >> confdefs.h <<EOF
1923 #define $ac_tr_func 1
1924 EOF
1925  
1926 else
1927   echo "$ac_t""no" 1>&6
1928 fi
1929 done
1930
1931
1932 # Check whether --with-pkg or --without-pkg was given.
1933 if test "${with_pkg+set}" = set; then
1934   withval="$with_pkg"
1935   
1936    CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
1937    LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
1938    echo Using /usr/pkg/include and /usr/pkg/lib
1939
1940 fi
1941
1942
1943 bcle=n
1944 # Check whether --with-libedit or --without-libedit was given.
1945 if test "${with_libedit+set}" = set; then
1946   withval="$with_libedit"
1947   
1948    echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
1949 echo "configure:1950: checking for tgetent in -ltermcap" >&5
1950 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
1951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1952   echo $ac_n "(cached) $ac_c" 1>&6
1953 else
1954   ac_save_LIBS="$LIBS"
1955 LIBS="-ltermcap  $LIBS"
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 /* Override any gcc2 internal prototype to avoid an error.  */
1960 /* We use char because int might match the return type of a gcc2
1961     builtin and then its argument prototype would still apply.  */
1962 char tgetent();
1963
1964 int main() {
1965 tgetent()
1966 ; return 0; }
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1969   rm -rf conftest*
1970   eval "ac_cv_lib_$ac_lib_var=yes"
1971 else
1972   echo "configure: failed program was:" >&5
1973   cat conftest.$ac_ext >&5
1974   rm -rf conftest*
1975   eval "ac_cv_lib_$ac_lib_var=no"
1976 fi
1977 rm -f conftest*
1978 LIBS="$ac_save_LIBS"
1979
1980 fi
1981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1982   echo "$ac_t""yes" 1>&6
1983   TERMLIB=-ltermcap
1984 else
1985   echo "$ac_t""no" 1>&6
1986 fi
1987
1988    LDSAVE=$LDFLAGS
1989    LDFLAGS="$LDFLAGS $TERMLIB"
1990    echo $ac_n "checking for el_gets in -ledit""... $ac_c" 1>&6
1991 echo "configure:1992: checking for el_gets in -ledit" >&5
1992 ac_lib_var=`echo edit'_'el_gets | sed 'y%./+-%__p_%'`
1993 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1994   echo $ac_n "(cached) $ac_c" 1>&6
1995 else
1996   ac_save_LIBS="$LIBS"
1997 LIBS="-ledit  $LIBS"
1998 cat > conftest.$ac_ext <<EOF
1999 #line 2000 "configure"
2000 #include "confdefs.h"
2001 /* Override any gcc2 internal prototype to avoid an error.  */
2002 /* We use char because int might match the return type of a gcc2
2003     builtin and then its argument prototype would still apply.  */
2004 char el_gets();
2005
2006 int main() {
2007 el_gets()
2008 ; return 0; }
2009 EOF
2010 if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2011   rm -rf conftest*
2012   eval "ac_cv_lib_$ac_lib_var=yes"
2013 else
2014   echo "configure: failed program was:" >&5
2015   cat conftest.$ac_ext >&5
2016   rm -rf conftest*
2017   eval "ac_cv_lib_$ac_lib_var=no"
2018 fi
2019 rm -f conftest*
2020 LIBS="$ac_save_LIBS"
2021
2022 fi
2023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2024   echo "$ac_t""yes" 1>&6
2025   ac_safe=`echo "histedit.h" | sed 'y%./+-%__p_%'`
2026 echo $ac_n "checking for histedit.h""... $ac_c" 1>&6
2027 echo "configure:2028: checking for histedit.h" >&5
2028 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031   cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <histedit.h>
2035 EOF
2036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2037 { (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2039 if test -z "$ac_err"; then
2040   rm -rf conftest*
2041   eval "ac_cv_header_$ac_safe=yes"
2042 else
2043   echo "$ac_err" >&5
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -rf conftest*
2047   eval "ac_cv_header_$ac_safe=no"
2048 fi
2049 rm -f conftest*
2050 fi
2051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2052   echo "$ac_t""yes" 1>&6
2053   READLINELIB="-ledit $TERMLIB";bcle=y
2054 else
2055   echo "$ac_t""no" 1>&6
2056 fi
2057
2058 else
2059   echo "$ac_t""no" 1>&6
2060 READLINELIB=""
2061 fi
2062
2063    if test "$bcle" = "y"; then
2064      echo Using the libedit library.
2065      cat >> confdefs.h <<\EOF
2066 #define LIBEDIT 1
2067 EOF
2068
2069    fi
2070    LDFLAGS=$LDSAVE
2071
2072 fi
2073
2074  
2075 bcrl=n
2076 # Check whether --with-readline or --without-readline was given.
2077 if test "${with_readline+set}" = set; then
2078   withval="$with_readline"
2079   
2080    echo $ac_n "checking for tparm in -lncurses""... $ac_c" 1>&6
2081 echo "configure:2082: checking for tparm in -lncurses" >&5
2082 ac_lib_var=`echo ncurses'_'tparm | sed 'y%./+-%__p_%'`
2083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   ac_save_LIBS="$LIBS"
2087 LIBS="-lncurses  $LIBS"
2088 cat > conftest.$ac_ext <<EOF
2089 #line 2090 "configure"
2090 #include "confdefs.h"
2091 /* Override any gcc2 internal prototype to avoid an error.  */
2092 /* We use char because int might match the return type of a gcc2
2093     builtin and then its argument prototype would still apply.  */
2094 char tparm();
2095
2096 int main() {
2097 tparm()
2098 ; return 0; }
2099 EOF
2100 if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2101   rm -rf conftest*
2102   eval "ac_cv_lib_$ac_lib_var=yes"
2103 else
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   eval "ac_cv_lib_$ac_lib_var=no"
2108 fi
2109 rm -f conftest*
2110 LIBS="$ac_save_LIBS"
2111
2112 fi
2113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2114   echo "$ac_t""yes" 1>&6
2115   TERMLIB=-lncurses
2116 else
2117   echo "$ac_t""no" 1>&6
2118 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
2119 echo "configure:2120: checking for tgetent in -ltermcap" >&5
2120 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
2121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2122   echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124   ac_save_LIBS="$LIBS"
2125 LIBS="-ltermcap  $LIBS"
2126 cat > conftest.$ac_ext <<EOF
2127 #line 2128 "configure"
2128 #include "confdefs.h"
2129 /* Override any gcc2 internal prototype to avoid an error.  */
2130 /* We use char because int might match the return type of a gcc2
2131     builtin and then its argument prototype would still apply.  */
2132 char tgetent();
2133
2134 int main() {
2135 tgetent()
2136 ; return 0; }
2137 EOF
2138 if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2139   rm -rf conftest*
2140   eval "ac_cv_lib_$ac_lib_var=yes"
2141 else
2142   echo "configure: failed program was:" >&5
2143   cat conftest.$ac_ext >&5
2144   rm -rf conftest*
2145   eval "ac_cv_lib_$ac_lib_var=no"
2146 fi
2147 rm -f conftest*
2148 LIBS="$ac_save_LIBS"
2149
2150 fi
2151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2152   echo "$ac_t""yes" 1>&6
2153   TERMLIB=-ltermcap
2154 else
2155   echo "$ac_t""no" 1>&6
2156 fi
2157
2158 fi
2159
2160    LDSAVE=$LDFLAGS
2161    LDFLAGS="$LDFLAGS $TERMLIB"
2162    echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
2163 echo "configure:2164: checking for readline in -lreadline" >&5
2164 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
2165 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2166   echo $ac_n "(cached) $ac_c" 1>&6
2167 else
2168   ac_save_LIBS="$LIBS"
2169 LIBS="-lreadline  $LIBS"
2170 cat > conftest.$ac_ext <<EOF
2171 #line 2172 "configure"
2172 #include "confdefs.h"
2173 /* Override any gcc2 internal prototype to avoid an error.  */
2174 /* We use char because int might match the return type of a gcc2
2175     builtin and then its argument prototype would still apply.  */
2176 char readline();
2177
2178 int main() {
2179 readline()
2180 ; return 0; }
2181 EOF
2182 if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2183   rm -rf conftest*
2184   eval "ac_cv_lib_$ac_lib_var=yes"
2185 else
2186   echo "configure: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   rm -rf conftest*
2189   eval "ac_cv_lib_$ac_lib_var=no"
2190 fi
2191 rm -f conftest*
2192 LIBS="$ac_save_LIBS"
2193
2194 fi
2195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2196   echo "$ac_t""yes" 1>&6
2197   ac_safe=`echo "readline/readline.h" | sed 'y%./+-%__p_%'`
2198 echo $ac_n "checking for readline/readline.h""... $ac_c" 1>&6
2199 echo "configure:2200: checking for readline/readline.h" >&5
2200 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2201   echo $ac_n "(cached) $ac_c" 1>&6
2202 else
2203   cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 #include <readline/readline.h>
2207 EOF
2208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2209 { (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2211 if test -z "$ac_err"; then
2212   rm -rf conftest*
2213   eval "ac_cv_header_$ac_safe=yes"
2214 else
2215   echo "$ac_err" >&5
2216   echo "configure: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   rm -rf conftest*
2219   eval "ac_cv_header_$ac_safe=no"
2220 fi
2221 rm -f conftest*
2222 fi
2223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2224   echo "$ac_t""yes" 1>&6
2225   READLINELIB="-lreadline $TERMLIB";bcrl=y
2226 else
2227   echo "$ac_t""no" 1>&6
2228 fi
2229
2230 else
2231   echo "$ac_t""no" 1>&6
2232 READLINELIB=""
2233 fi
2234
2235    if test "$bcrl" = "y" ; then
2236      echo Using the readline library.
2237      cat >> confdefs.h <<\EOF
2238 #define READLINE 1
2239 EOF
2240
2241    fi
2242    LDFLAGS=$LDSAVE
2243
2244 fi
2245
2246
2247 if test "$LEX" = "flex" ; then
2248  LEX="flex -I8"
2249 else
2250  if test "$bcrl" = "y" ; then
2251   echo "configure: warning: readline works only with flex." 1>&2
2252  fi
2253 fi
2254
2255 if test "$bcrl" = "y" -a "$bcle" = "y" ; then
2256   { echo "configure: error: Can not use both readline and libedit.  Aborting." 1>&2; exit 1; }
2257 fi
2258
2259 if test "$LEX" = "lex" -a `uname -s` = "SunOS" ; then
2260   LEXLIB=""
2261   echo "SunOS using lex does not have a -ll."
2262 fi
2263
2264
2265 if test "$program_transform_name" = s,x,x,; then
2266   program_transform_name=
2267 else
2268   # Double any \ or $.  echo might interpret backslashes.
2269   cat <<\EOF_SED > conftestsed
2270 s,\\,\\\\,g; s,\$,$$,g
2271 EOF_SED
2272   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2273   rm -f conftestsed
2274 fi
2275 test "$program_prefix" != NONE &&
2276   program_transform_name="s,^,${program_prefix},; $program_transform_name"
2277 # Use a double $ so make ignores it.
2278 test "$program_suffix" != NONE &&
2279   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2280
2281 # sed with no file args requires a program.
2282 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2283
2284 trap '' 1 2 15
2285 cat > confcache <<\EOF
2286 # This file is a shell script that caches the results of configure
2287 # tests run on this system so they can be shared between configure
2288 # scripts and configure runs.  It is not useful on other systems.
2289 # If it contains results you don't want to keep, you may remove or edit it.
2290 #
2291 # By default, configure uses ./config.cache as the cache file,
2292 # creating it if it does not exist already.  You can give configure
2293 # the --cache-file=FILE option to use a different cache file; that is
2294 # what configure does when it calls configure scripts in
2295 # subdirectories, so they share the cache.
2296 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2297 # config.status only pays attention to the cache file if you give it the
2298 # --recheck option to rerun configure.
2299 #
2300 EOF
2301 # The following way of writing the cache mishandles newlines in values,
2302 # but we know of no workaround that is simple, portable, and efficient.
2303 # So, don't put newlines in cache variables' values.
2304 # Ultrix sh set writes to stderr and can't be redirected directly,
2305 # and sets the high bit in the cache file unless we assign to the vars.
2306 (set) 2>&1 |
2307   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2308   *ac_space=\ *)
2309     # `set' does not quote correctly, so add quotes (double-quote substitution
2310     # turns \\\\ into \\, and sed turns \\ into \).
2311     sed -n \
2312       -e "s/'/'\\\\''/g" \
2313       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2314     ;;
2315   *)
2316     # `set' quotes correctly as required by POSIX, so do not add quotes.
2317     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2318     ;;
2319   esac >> confcache
2320 if cmp -s $cache_file confcache; then
2321   :
2322 else
2323   if test -w $cache_file; then
2324     echo "updating cache $cache_file"
2325     cat confcache > $cache_file
2326   else
2327     echo "not updating unwritable cache $cache_file"
2328   fi
2329 fi
2330 rm -f confcache
2331
2332 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2333
2334 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2335 # Let make expand exec_prefix.
2336 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2337
2338 # Any assignment to VPATH causes Sun make to only execute
2339 # the first set of double-colon rules, so remove it if not needed.
2340 # If there is a colon in the path, we need to keep it.
2341 if test "x$srcdir" = x.; then
2342   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2343 fi
2344
2345 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2346
2347 DEFS=-DHAVE_CONFIG_H
2348
2349 # Without the "./", some shells look in PATH for config.status.
2350 : ${CONFIG_STATUS=./config.status}
2351
2352 echo creating $CONFIG_STATUS
2353 rm -f $CONFIG_STATUS
2354 cat > $CONFIG_STATUS <<EOF
2355 #! /bin/sh
2356 # Generated automatically by configure.
2357 # Run this file to recreate the current configuration.
2358 # This directory was configured as follows,
2359 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2360 #
2361 # $0 $ac_configure_args
2362 #
2363 # Compiler output produced by configure, useful for debugging
2364 # configure, is in ./config.log if it exists.
2365
2366 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2367 for ac_option
2368 do
2369   case "\$ac_option" in
2370   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2371     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2372     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2373   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2374     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2375     exit 0 ;;
2376   -help | --help | --hel | --he | --h)
2377     echo "\$ac_cs_usage"; exit 0 ;;
2378   *) echo "\$ac_cs_usage"; exit 1 ;;
2379   esac
2380 done
2381
2382 ac_given_srcdir=$srcdir
2383 ac_given_INSTALL="$INSTALL"
2384
2385 trap 'rm -fr `echo "Makefile bc/Makefile dc/Makefile doc/Makefile lib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2386 EOF
2387 cat >> $CONFIG_STATUS <<EOF
2388
2389 # Protect against being on the right side of a sed subst in config.status.
2390 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2391  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2392 $ac_vpsub
2393 $extrasub
2394 s%@SHELL@%$SHELL%g
2395 s%@CFLAGS@%$CFLAGS%g
2396 s%@CPPFLAGS@%$CPPFLAGS%g
2397 s%@CXXFLAGS@%$CXXFLAGS%g
2398 s%@FFLAGS@%$FFLAGS%g
2399 s%@DEFS@%$DEFS%g
2400 s%@LDFLAGS@%$LDFLAGS%g
2401 s%@LIBS@%$LIBS%g
2402 s%@exec_prefix@%$exec_prefix%g
2403 s%@prefix@%$prefix%g
2404 s%@program_transform_name@%$program_transform_name%g
2405 s%@bindir@%$bindir%g
2406 s%@sbindir@%$sbindir%g
2407 s%@libexecdir@%$libexecdir%g
2408 s%@datadir@%$datadir%g
2409 s%@sysconfdir@%$sysconfdir%g
2410 s%@sharedstatedir@%$sharedstatedir%g
2411 s%@localstatedir@%$localstatedir%g
2412 s%@libdir@%$libdir%g
2413 s%@includedir@%$includedir%g
2414 s%@oldincludedir@%$oldincludedir%g
2415 s%@infodir@%$infodir%g
2416 s%@mandir@%$mandir%g
2417 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2418 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2419 s%@INSTALL_DATA@%$INSTALL_DATA%g
2420 s%@PACKAGE@%$PACKAGE%g
2421 s%@VERSION@%$VERSION%g
2422 s%@ACLOCAL@%$ACLOCAL%g
2423 s%@AUTOCONF@%$AUTOCONF%g
2424 s%@AUTOMAKE@%$AUTOMAKE%g
2425 s%@AUTOHEADER@%$AUTOHEADER%g
2426 s%@MAKEINFO@%$MAKEINFO%g
2427 s%@SET_MAKE@%$SET_MAKE%g
2428 s%@CC@%$CC%g
2429 s%@CPP@%$CPP%g
2430 s%@LEX@%$LEX%g
2431 s%@LEXLIB@%$LEXLIB%g
2432 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2433 s%@YACC@%$YACC%g
2434 s%@RANLIB@%$RANLIB%g
2435 s%@READLINELIB@%$READLINELIB%g
2436
2437 CEOF
2438 EOF
2439
2440 cat >> $CONFIG_STATUS <<\EOF
2441
2442 # Split the substitutions into bite-sized pieces for seds with
2443 # small command number limits, like on Digital OSF/1 and HP-UX.
2444 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2445 ac_file=1 # Number of current file.
2446 ac_beg=1 # First line for current file.
2447 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2448 ac_more_lines=:
2449 ac_sed_cmds=""
2450 while $ac_more_lines; do
2451   if test $ac_beg -gt 1; then
2452     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2453   else
2454     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2455   fi
2456   if test ! -s conftest.s$ac_file; then
2457     ac_more_lines=false
2458     rm -f conftest.s$ac_file
2459   else
2460     if test -z "$ac_sed_cmds"; then
2461       ac_sed_cmds="sed -f conftest.s$ac_file"
2462     else
2463       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2464     fi
2465     ac_file=`expr $ac_file + 1`
2466     ac_beg=$ac_end
2467     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2468   fi
2469 done
2470 if test -z "$ac_sed_cmds"; then
2471   ac_sed_cmds=cat
2472 fi
2473 EOF
2474
2475 cat >> $CONFIG_STATUS <<EOF
2476
2477 CONFIG_FILES=\${CONFIG_FILES-"Makefile bc/Makefile dc/Makefile doc/Makefile lib/Makefile"}
2478 EOF
2479 cat >> $CONFIG_STATUS <<\EOF
2480 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2481   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2482   case "$ac_file" in
2483   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2484        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2485   *) ac_file_in="${ac_file}.in" ;;
2486   esac
2487
2488   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2489
2490   # Remove last slash and all that follows it.  Not all systems have dirname.
2491   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2492   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2493     # The file is in a subdirectory.
2494     test ! -d "$ac_dir" && mkdir "$ac_dir"
2495     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2496     # A "../" for each directory in $ac_dir_suffix.
2497     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2498   else
2499     ac_dir_suffix= ac_dots=
2500   fi
2501
2502   case "$ac_given_srcdir" in
2503   .)  srcdir=.
2504       if test -z "$ac_dots"; then top_srcdir=.
2505       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2506   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2507   *) # Relative path.
2508     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2509     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2510   esac
2511
2512   case "$ac_given_INSTALL" in
2513   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2514   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2515   esac
2516
2517   echo creating "$ac_file"
2518   rm -f "$ac_file"
2519   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2520   case "$ac_file" in
2521   *Makefile*) ac_comsub="1i\\
2522 # $configure_input" ;;
2523   *) ac_comsub= ;;
2524   esac
2525
2526   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2527   sed -e "$ac_comsub
2528 s%@configure_input@%$configure_input%g
2529 s%@srcdir@%$srcdir%g
2530 s%@top_srcdir@%$top_srcdir%g
2531 s%@INSTALL@%$INSTALL%g
2532 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2533 fi; done
2534 rm -f conftest.s*
2535
2536 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2537 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2538 #
2539 # ac_d sets the value in "#define NAME VALUE" lines.
2540 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2541 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2542 ac_dC='\3'
2543 ac_dD='%g'
2544 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2545 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2546 ac_uB='\([      ]\)%\1#\2define\3'
2547 ac_uC=' '
2548 ac_uD='\4%g'
2549 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2550 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2551 ac_eB='$%\1#\2define\3'
2552 ac_eC=' '
2553 ac_eD='%g'
2554
2555 if test "${CONFIG_HEADERS+set}" != set; then
2556 EOF
2557 cat >> $CONFIG_STATUS <<EOF
2558   CONFIG_HEADERS="config.h"
2559 EOF
2560 cat >> $CONFIG_STATUS <<\EOF
2561 fi
2562 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2563   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2564   case "$ac_file" in
2565   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2566        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2567   *) ac_file_in="${ac_file}.in" ;;
2568   esac
2569
2570   echo creating $ac_file
2571
2572   rm -f conftest.frag conftest.in conftest.out
2573   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2574   cat $ac_file_inputs > conftest.in
2575
2576 EOF
2577
2578 # Transform confdefs.h into a sed script conftest.vals that substitutes
2579 # the proper values into config.h.in to produce config.h.  And first:
2580 # Protect against being on the right side of a sed subst in config.status.
2581 # Protect against being in an unquoted here document in config.status.
2582 rm -f conftest.vals
2583 cat > conftest.hdr <<\EOF
2584 s/[\\&%]/\\&/g
2585 s%[\\$`]%\\&%g
2586 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2587 s%ac_d%ac_u%gp
2588 s%ac_u%ac_e%gp
2589 EOF
2590 sed -n -f conftest.hdr confdefs.h > conftest.vals
2591 rm -f conftest.hdr
2592
2593 # This sed command replaces #undef with comments.  This is necessary, for
2594 # example, in the case of _POSIX_SOURCE, which is predefined and required
2595 # on some systems where configure will not decide to define it.
2596 cat >> conftest.vals <<\EOF
2597 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2598 EOF
2599
2600 # Break up conftest.vals because some shells have a limit on
2601 # the size of here documents, and old seds have small limits too.
2602
2603 rm -f conftest.tail
2604 while :
2605 do
2606   ac_lines=`grep -c . conftest.vals`
2607   # grep -c gives empty output for an empty file on some AIX systems.
2608   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2609   # Write a limited-size here document to conftest.frag.
2610   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2611   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2612   echo 'CEOF
2613   sed -f conftest.frag conftest.in > conftest.out
2614   rm -f conftest.in
2615   mv conftest.out conftest.in
2616 ' >> $CONFIG_STATUS
2617   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2618   rm -f conftest.vals
2619   mv conftest.tail conftest.vals
2620 done
2621 rm -f conftest.vals
2622
2623 cat >> $CONFIG_STATUS <<\EOF
2624   rm -f conftest.frag conftest.h
2625   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2626   cat conftest.in >> conftest.h
2627   rm -f conftest.in
2628   if cmp -s $ac_file conftest.h 2>/dev/null; then
2629     echo "$ac_file is unchanged"
2630     rm -f conftest.h
2631   else
2632     # Remove last slash and all that follows it.  Not all systems have dirname.
2633       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2634       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2635       # The file is in a subdirectory.
2636       test ! -d "$ac_dir" && mkdir "$ac_dir"
2637     fi
2638     rm -f $ac_file
2639     mv conftest.h $ac_file
2640   fi
2641 fi; done
2642
2643 EOF
2644 cat >> $CONFIG_STATUS <<EOF
2645
2646
2647 EOF
2648 cat >> $CONFIG_STATUS <<\EOF
2649 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2650
2651 exit 0
2652 EOF
2653 chmod +x $CONFIG_STATUS
2654 rm -fr confdefs* $ac_clean_files
2655 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2656