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