]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bc/configure
This commit was generated by cvs2svn to compensate for changes in r54359,
[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
606 PACKAGE=bc
607
608 VERSION=1.04
609
610 cat >> confdefs.h <<EOF
611 #define PACKAGE "$PACKAGE"
612 EOF
613
614 cat >> confdefs.h <<EOF
615 #define VERSION "$VERSION"
616 EOF
617
618 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
619 echo "configure:620: checking whether build environment is sane" >&5
620 # Just in case
621 sleep 1
622 echo timestamp > conftestfile
623 # Do `set' in a subshell so we don't clobber the current shell's
624 # arguments.  Must try -L first in case configure is actually a
625 # symlink; some systems play weird games with the mod time of symlinks
626 # (eg FreeBSD returns the mod time of the symlink's containing
627 # directory).
628 if (
629    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
630    if test "" = "X"; then
631       # -L didn't work.
632       set X `ls -t $srcdir/configure conftestfile`
633    fi
634    test "$2" = conftestfile
635    )
636 then
637    # Ok.
638    :
639 else
640    { echo "configure: error: newly created file is older than distributed files!
641 Check your system clock" 1>&2; exit 1; }
642 fi
643 rm -f conftest*
644 echo "$ac_t""yes" 1>&6
645 if test "$program_transform_name" = s,x,x,; then
646   program_transform_name=
647 else
648   # Double any \ or $.  echo might interpret backslashes.
649   cat <<\EOF_SED > conftestsed
650 s,\\,\\\\,g; s,\$,$$,g
651 EOF_SED
652   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
653   rm -f conftestsed
654 fi
655 test "$program_prefix" != NONE &&
656   program_transform_name="s,^,${program_prefix},; $program_transform_name"
657 # Use a double $ so make ignores it.
658 test "$program_suffix" != NONE &&
659   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
660
661 # sed with no file args requires a program.
662 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
663
664 missing_dir=`cd $ac_aux_dir && pwd`
665 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
666 echo "configure:667: checking for working aclocal" >&5
667 # Run test in a subshell; some versions of sh will print an error if
668 # an executable is not found, even if stderr is redirected.
669 if (aclocal --version) > /dev/null 2>&1; then
670    ACLOCAL=aclocal
671    echo "$ac_t""found" 1>&6
672 else
673    ACLOCAL="$missing_dir/missing aclocal"
674    echo "$ac_t""missing" 1>&6
675 fi
676
677 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
678 echo "configure:679: checking for working autoconf" >&5
679 # Run test in a subshell; some versions of sh will print an error if
680 # an executable is not found, even if stderr is redirected.
681 if (autoconf --version) > /dev/null 2>&1; then
682    AUTOCONF=autoconf
683    echo "$ac_t""found" 1>&6
684 else
685    AUTOCONF="$missing_dir/missing autoconf"
686    echo "$ac_t""missing" 1>&6
687 fi
688
689 echo $ac_n "checking for working automake""... $ac_c" 1>&6
690 echo "configure:691: checking for working automake" >&5
691 # Run test in a subshell; some versions of sh will print an error if
692 # an executable is not found, even if stderr is redirected.
693 if (automake --version) > /dev/null 2>&1; then
694    AUTOMAKE=automake
695    echo "$ac_t""found" 1>&6
696 else
697    AUTOMAKE="$missing_dir/missing automake"
698    echo "$ac_t""missing" 1>&6
699 fi
700
701 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
702 echo "configure:703: checking for working autoheader" >&5
703 # Run test in a subshell; some versions of sh will print an error if
704 # an executable is not found, even if stderr is redirected.
705 if (autoheader --version) > /dev/null 2>&1; then
706    AUTOHEADER=autoheader
707    echo "$ac_t""found" 1>&6
708 else
709    AUTOHEADER="$missing_dir/missing autoheader"
710    echo "$ac_t""missing" 1>&6
711 fi
712
713 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
714 echo "configure:715: checking for working makeinfo" >&5
715 # Run test in a subshell; some versions of sh will print an error if
716 # an executable is not found, even if stderr is redirected.
717 if (makeinfo --version) > /dev/null 2>&1; then
718    MAKEINFO=makeinfo
719    echo "$ac_t""found" 1>&6
720 else
721    MAKEINFO="$missing_dir/missing makeinfo"
722    echo "$ac_t""missing" 1>&6
723 fi
724
725 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
726 echo "configure:727: checking whether ${MAKE-make} sets \${MAKE}" >&5
727 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
728 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
729   echo $ac_n "(cached) $ac_c" 1>&6
730 else
731   cat > conftestmake <<\EOF
732 all:
733         @echo 'ac_maketemp="${MAKE}"'
734 EOF
735 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
736 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
737 if test -n "$ac_maketemp"; then
738   eval ac_cv_prog_make_${ac_make}_set=yes
739 else
740   eval ac_cv_prog_make_${ac_make}_set=no
741 fi
742 rm -f conftestmake
743 fi
744 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
745   echo "$ac_t""yes" 1>&6
746   SET_MAKE=
747 else
748   echo "$ac_t""no" 1>&6
749   SET_MAKE="MAKE=${MAKE-make}"
750 fi
751
752
753
754
755
756 # Extract the first word of "gcc", so it can be a program name with args.
757 set dummy gcc; ac_word=$2
758 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
759 echo "configure:760: checking for $ac_word" >&5
760 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
761   echo $ac_n "(cached) $ac_c" 1>&6
762 else
763   if test -n "$CC"; then
764   ac_cv_prog_CC="$CC" # Let the user override the test.
765 else
766   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
767   for ac_dir in $PATH; do
768     test -z "$ac_dir" && ac_dir=.
769     if test -f $ac_dir/$ac_word; then
770       ac_cv_prog_CC="gcc"
771       break
772     fi
773   done
774   IFS="$ac_save_ifs"
775 fi
776 fi
777 CC="$ac_cv_prog_CC"
778 if test -n "$CC"; then
779   echo "$ac_t""$CC" 1>&6
780 else
781   echo "$ac_t""no" 1>&6
782 fi
783
784 if test -z "$CC"; then
785   # Extract the first word of "cc", so it can be a program name with args.
786 set dummy cc; ac_word=$2
787 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
788 echo "configure:789: checking for $ac_word" >&5
789 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   if test -n "$CC"; then
793   ac_cv_prog_CC="$CC" # Let the user override the test.
794 else
795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
796   ac_prog_rejected=no
797   for ac_dir in $PATH; do
798     test -z "$ac_dir" && ac_dir=.
799     if test -f $ac_dir/$ac_word; then
800       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
801         ac_prog_rejected=yes
802         continue
803       fi
804       ac_cv_prog_CC="cc"
805       break
806     fi
807   done
808   IFS="$ac_save_ifs"
809 if test $ac_prog_rejected = yes; then
810   # We found a bogon in the path, so make sure we never use it.
811   set dummy $ac_cv_prog_CC
812   shift
813   if test $# -gt 0; then
814     # We chose a different compiler from the bogus one.
815     # However, it has the same basename, so the bogon will be chosen
816     # first if we set CC to just the basename; use the full file name.
817     shift
818     set dummy "$ac_dir/$ac_word" "$@"
819     shift
820     ac_cv_prog_CC="$@"
821   fi
822 fi
823 fi
824 fi
825 CC="$ac_cv_prog_CC"
826 if test -n "$CC"; then
827   echo "$ac_t""$CC" 1>&6
828 else
829   echo "$ac_t""no" 1>&6
830 fi
831
832   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
833 fi
834
835 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
836 echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
837
838 ac_ext=c
839 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
840 ac_cpp='$CPP $CPPFLAGS'
841 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
842 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
843 cross_compiling=$ac_cv_prog_cc_cross
844
845 cat > conftest.$ac_ext <<EOF
846 #line 847 "configure"
847 #include "confdefs.h"
848 main(){return(0);}
849 EOF
850 if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
851   ac_cv_prog_cc_works=yes
852   # If we can't run a trivial program, we are probably using a cross compiler.
853   if (./conftest; exit) 2>/dev/null; then
854     ac_cv_prog_cc_cross=no
855   else
856     ac_cv_prog_cc_cross=yes
857   fi
858 else
859   echo "configure: failed program was:" >&5
860   cat conftest.$ac_ext >&5
861   ac_cv_prog_cc_works=no
862 fi
863 rm -fr conftest*
864
865 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
866 if test $ac_cv_prog_cc_works = no; then
867   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
868 fi
869 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
870 echo "configure:871: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
871 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
872 cross_compiling=$ac_cv_prog_cc_cross
873
874 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
875 echo "configure:876: checking whether we are using GNU C" >&5
876 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
877   echo $ac_n "(cached) $ac_c" 1>&6
878 else
879   cat > conftest.c <<EOF
880 #ifdef __GNUC__
881   yes;
882 #endif
883 EOF
884 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
885   ac_cv_prog_gcc=yes
886 else
887   ac_cv_prog_gcc=no
888 fi
889 fi
890
891 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
892
893 if test $ac_cv_prog_gcc = yes; then
894   GCC=yes
895   ac_test_CFLAGS="${CFLAGS+set}"
896   ac_save_CFLAGS="$CFLAGS"
897   CFLAGS=
898   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
899 echo "configure:900: checking whether ${CC-cc} accepts -g" >&5
900 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
901   echo $ac_n "(cached) $ac_c" 1>&6
902 else
903   echo 'void f(){}' > conftest.c
904 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
905   ac_cv_prog_cc_g=yes
906 else
907   ac_cv_prog_cc_g=no
908 fi
909 rm -f conftest*
910
911 fi
912
913 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
914   if test "$ac_test_CFLAGS" = set; then
915     CFLAGS="$ac_save_CFLAGS"
916   elif test $ac_cv_prog_cc_g = yes; then
917     CFLAGS="-g -O2"
918   else
919     CFLAGS="-O2"
920   fi
921 else
922   GCC=
923   test "${CFLAGS+set}" = set || CFLAGS="-g"
924 fi
925
926 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
927 echo "configure:928: checking how to run the C preprocessor" >&5
928 # On Suns, sometimes $CPP names a directory.
929 if test -n "$CPP" && test -d "$CPP"; then
930   CPP=
931 fi
932 if test -z "$CPP"; then
933 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
934   echo $ac_n "(cached) $ac_c" 1>&6
935 else
936     # This must be in double quotes, not single quotes, because CPP may get
937   # substituted into the Makefile and "${CC-cc}" will confuse make.
938   CPP="${CC-cc} -E"
939   # On the NeXT, cc -E runs the code through the compiler's parser,
940   # not just through cpp.
941   cat > conftest.$ac_ext <<EOF
942 #line 943 "configure"
943 #include "confdefs.h"
944 #include <assert.h>
945 Syntax Error
946 EOF
947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
948 { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
949 ac_err=`grep -v '^ *+' conftest.out`
950 if test -z "$ac_err"; then
951   :
952 else
953   echo "$ac_err" >&5
954   echo "configure: failed program was:" >&5
955   cat conftest.$ac_ext >&5
956   rm -rf conftest*
957   CPP="${CC-cc} -E -traditional-cpp"
958   cat > conftest.$ac_ext <<EOF
959 #line 960 "configure"
960 #include "confdefs.h"
961 #include <assert.h>
962 Syntax Error
963 EOF
964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
965 { (eval echo configure:966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
966 ac_err=`grep -v '^ *+' conftest.out`
967 if test -z "$ac_err"; then
968   :
969 else
970   echo "$ac_err" >&5
971   echo "configure: failed program was:" >&5
972   cat conftest.$ac_ext >&5
973   rm -rf conftest*
974   CPP=/lib/cpp
975 fi
976 rm -f conftest*
977 fi
978 rm -f conftest*
979   ac_cv_prog_CPP="$CPP"
980 fi
981   CPP="$ac_cv_prog_CPP"
982 else
983   ac_cv_prog_CPP="$CPP"
984 fi
985 echo "$ac_t""$CPP" 1>&6
986
987 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
988 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
989 echo "configure:990: checking for minix/config.h" >&5
990 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
991   echo $ac_n "(cached) $ac_c" 1>&6
992 else
993   cat > conftest.$ac_ext <<EOF
994 #line 995 "configure"
995 #include "confdefs.h"
996 #include <minix/config.h>
997 EOF
998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
999 { (eval echo configure:1000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1000 ac_err=`grep -v '^ *+' conftest.out`
1001 if test -z "$ac_err"; then
1002   rm -rf conftest*
1003   eval "ac_cv_header_$ac_safe=yes"
1004 else
1005   echo "$ac_err" >&5
1006   echo "configure: failed program was:" >&5
1007   cat conftest.$ac_ext >&5
1008   rm -rf conftest*
1009   eval "ac_cv_header_$ac_safe=no"
1010 fi
1011 rm -f conftest*
1012 fi
1013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1014   echo "$ac_t""yes" 1>&6
1015   MINIX=yes
1016 else
1017   echo "$ac_t""no" 1>&6
1018 MINIX=
1019 fi
1020
1021 if test "$MINIX" = yes; then
1022   cat >> confdefs.h <<\EOF
1023 #define _POSIX_SOURCE 1
1024 EOF
1025
1026   cat >> confdefs.h <<\EOF
1027 #define _POSIX_1_SOURCE 2
1028 EOF
1029
1030   cat >> confdefs.h <<\EOF
1031 #define _MINIX 1
1032 EOF
1033
1034 fi
1035
1036
1037 for ac_prog in 'bison -y' byacc
1038 do
1039 # Extract the first word of "$ac_prog", so it can be a program name with args.
1040 set dummy $ac_prog; ac_word=$2
1041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1042 echo "configure:1043: checking for $ac_word" >&5
1043 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1044   echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046   if test -n "$YACC"; then
1047   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1048 else
1049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1050   for ac_dir in $PATH; do
1051     test -z "$ac_dir" && ac_dir=.
1052     if test -f $ac_dir/$ac_word; then
1053       ac_cv_prog_YACC="$ac_prog"
1054       break
1055     fi
1056   done
1057   IFS="$ac_save_ifs"
1058 fi
1059 fi
1060 YACC="$ac_cv_prog_YACC"
1061 if test -n "$YACC"; then
1062   echo "$ac_t""$YACC" 1>&6
1063 else
1064   echo "$ac_t""no" 1>&6
1065 fi
1066
1067 test -n "$YACC" && break
1068 done
1069 test -n "$YACC" || YACC="yacc"
1070
1071 # Extract the first word of "flex", so it can be a program name with args.
1072 set dummy flex; ac_word=$2
1073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1074 echo "configure:1075: checking for $ac_word" >&5
1075 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1076   echo $ac_n "(cached) $ac_c" 1>&6
1077 else
1078   if test -n "$LEX"; then
1079   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1080 else
1081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1082   for ac_dir in $PATH; do
1083     test -z "$ac_dir" && ac_dir=.
1084     if test -f $ac_dir/$ac_word; then
1085       ac_cv_prog_LEX="flex"
1086       break
1087     fi
1088   done
1089   IFS="$ac_save_ifs"
1090   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1091 fi
1092 fi
1093 LEX="$ac_cv_prog_LEX"
1094 if test -n "$LEX"; then
1095   echo "$ac_t""$LEX" 1>&6
1096 else
1097   echo "$ac_t""no" 1>&6
1098 fi
1099
1100 if test -z "$LEXLIB"
1101 then
1102   case "$LEX" in
1103   flex*) ac_lib=fl ;;
1104   *) ac_lib=l ;;
1105   esac
1106   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1107 echo "configure:1108: checking for yywrap in -l$ac_lib" >&5
1108 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1109 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1110   echo $ac_n "(cached) $ac_c" 1>&6
1111 else
1112   ac_save_LIBS="$LIBS"
1113 LIBS="-l$ac_lib  $LIBS"
1114 cat > conftest.$ac_ext <<EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1117 /* Override any gcc2 internal prototype to avoid an error.  */
1118 /* We use char because int might match the return type of a gcc2
1119     builtin and then its argument prototype would still apply.  */
1120 char yywrap();
1121
1122 int main() {
1123 yywrap()
1124 ; return 0; }
1125 EOF
1126 if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1127   rm -rf conftest*
1128   eval "ac_cv_lib_$ac_lib_var=yes"
1129 else
1130   echo "configure: failed program was:" >&5
1131   cat conftest.$ac_ext >&5
1132   rm -rf conftest*
1133   eval "ac_cv_lib_$ac_lib_var=no"
1134 fi
1135 rm -f conftest*
1136 LIBS="$ac_save_LIBS"
1137
1138 fi
1139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1140   echo "$ac_t""yes" 1>&6
1141   LEXLIB="-l$ac_lib"
1142 else
1143   echo "$ac_t""no" 1>&6
1144 fi
1145
1146 fi
1147
1148 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
1149 echo "configure:1150: checking lex output file root" >&5
1150 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   # The minimal lex program is just a single line: %%.  But some broken lexes
1154 # (Solaris, I think it was) want two %% lines, so accommodate them.
1155 echo '%%
1156 %%' | $LEX
1157 if test -f lex.yy.c; then
1158   ac_cv_prog_lex_root=lex.yy
1159 elif test -f lexyy.c; then
1160   ac_cv_prog_lex_root=lexyy
1161 else
1162   { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
1163 fi
1164 fi
1165
1166 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
1167 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
1168
1169 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
1170 echo "configure:1171: checking whether yytext is a pointer" >&5
1171 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   # POSIX says lex can declare yytext either as a pointer or an array; the
1175 # default is implementation-dependent. Figure out which it is, since
1176 # not all implementations provide the %pointer and %array declarations.
1177 ac_cv_prog_lex_yytext_pointer=no
1178 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
1179 ac_save_LIBS="$LIBS"
1180 LIBS="$LIBS $LEXLIB"
1181 cat > conftest.$ac_ext <<EOF
1182 #line 1183 "configure"
1183 #include "confdefs.h"
1184 `cat $LEX_OUTPUT_ROOT.c`
1185 int main() {
1186
1187 ; return 0; }
1188 EOF
1189 if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1190   rm -rf conftest*
1191   ac_cv_prog_lex_yytext_pointer=yes
1192 else
1193   echo "configure: failed program was:" >&5
1194   cat conftest.$ac_ext >&5
1195 fi
1196 rm -f conftest*
1197 LIBS="$ac_save_LIBS"
1198 rm -f "${LEX_OUTPUT_ROOT}.c"
1199
1200 fi
1201
1202 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
1203 if test $ac_cv_prog_lex_yytext_pointer = yes; then
1204   cat >> confdefs.h <<\EOF
1205 #define YYTEXT_POINTER 1
1206 EOF
1207
1208 fi
1209
1210 # Extract the first word of "flex", so it can be a program name with args.
1211 set dummy flex; ac_word=$2
1212 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1213 echo "configure:1214: checking for $ac_word" >&5
1214 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1215   echo $ac_n "(cached) $ac_c" 1>&6
1216 else
1217   if test -n "$LEX"; then
1218   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1219 else
1220   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1221   for ac_dir in $PATH; do
1222     test -z "$ac_dir" && ac_dir=.
1223     if test -f $ac_dir/$ac_word; then
1224       ac_cv_prog_LEX="flex"
1225       break
1226     fi
1227   done
1228   IFS="$ac_save_ifs"
1229   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1230 fi
1231 fi
1232 LEX="$ac_cv_prog_LEX"
1233 if test -n "$LEX"; then
1234   echo "$ac_t""$LEX" 1>&6
1235 else
1236   echo "$ac_t""no" 1>&6
1237 fi
1238
1239 if test -z "$LEXLIB"
1240 then
1241   case "$LEX" in
1242   flex*) ac_lib=fl ;;
1243   *) ac_lib=l ;;
1244   esac
1245   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1246 echo "configure:1247: checking for yywrap in -l$ac_lib" >&5
1247 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1248 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1249   echo $ac_n "(cached) $ac_c" 1>&6
1250 else
1251   ac_save_LIBS="$LIBS"
1252 LIBS="-l$ac_lib  $LIBS"
1253 cat > conftest.$ac_ext <<EOF
1254 #line 1255 "configure"
1255 #include "confdefs.h"
1256 /* Override any gcc2 internal prototype to avoid an error.  */
1257 /* We use char because int might match the return type of a gcc2
1258     builtin and then its argument prototype would still apply.  */
1259 char yywrap();
1260
1261 int main() {
1262 yywrap()
1263 ; return 0; }
1264 EOF
1265 if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1266   rm -rf conftest*
1267   eval "ac_cv_lib_$ac_lib_var=yes"
1268 else
1269   echo "configure: failed program was:" >&5
1270   cat conftest.$ac_ext >&5
1271   rm -rf conftest*
1272   eval "ac_cv_lib_$ac_lib_var=no"
1273 fi
1274 rm -f conftest*
1275 LIBS="$ac_save_LIBS"
1276
1277 fi
1278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1279   echo "$ac_t""yes" 1>&6
1280   LEXLIB="-l$ac_lib"
1281 else
1282   echo "$ac_t""no" 1>&6
1283 fi
1284
1285 fi
1286
1287 # Find a good install program.  We prefer a C program (faster),
1288 # so one script is as good as another.  But avoid the broken or
1289 # incompatible versions:
1290 # SysV /etc/install, /usr/sbin/install
1291 # SunOS /usr/etc/install
1292 # IRIX /sbin/install
1293 # AIX /bin/install
1294 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1295 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1296 # ./install, which can be erroneously created by make from ./install.sh.
1297 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1298 echo "configure:1299: checking for a BSD compatible install" >&5
1299 if test -z "$INSTALL"; then
1300 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1301   echo $ac_n "(cached) $ac_c" 1>&6
1302 else
1303     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1304   for ac_dir in $PATH; do
1305     # Account for people who put trailing slashes in PATH elements.
1306     case "$ac_dir/" in
1307     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1308     *)
1309       # OSF1 and SCO ODT 3.0 have their own names for install.
1310       for ac_prog in ginstall installbsd scoinst install; do
1311         if test -f $ac_dir/$ac_prog; then
1312           if test $ac_prog = install &&
1313             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1314             # AIX install.  It has an incompatible calling convention.
1315             # OSF/1 installbsd also uses dspmsg, but is usable.
1316             :
1317           else
1318             ac_cv_path_install="$ac_dir/$ac_prog -c"
1319             break 2
1320           fi
1321         fi
1322       done
1323       ;;
1324     esac
1325   done
1326   IFS="$ac_save_IFS"
1327
1328 fi
1329   if test "${ac_cv_path_install+set}" = set; then
1330     INSTALL="$ac_cv_path_install"
1331   else
1332     # As a last resort, use the slow shell script.  We don't cache a
1333     # path for INSTALL within a source directory, because that will
1334     # break other packages using the cache if that directory is
1335     # removed, or if the path is relative.
1336     INSTALL="$ac_install_sh"
1337   fi
1338 fi
1339 echo "$ac_t""$INSTALL" 1>&6
1340
1341 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1342 # It thinks the first close brace ends the variable substitution.
1343 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1344
1345 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1346
1347 # Extract the first word of "ranlib", so it can be a program name with args.
1348 set dummy ranlib; ac_word=$2
1349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1350 echo "configure:1351: checking for $ac_word" >&5
1351 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1352   echo $ac_n "(cached) $ac_c" 1>&6
1353 else
1354   if test -n "$RANLIB"; then
1355   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1356 else
1357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1358   for ac_dir in $PATH; do
1359     test -z "$ac_dir" && ac_dir=.
1360     if test -f $ac_dir/$ac_word; then
1361       ac_cv_prog_RANLIB="ranlib"
1362       break
1363     fi
1364   done
1365   IFS="$ac_save_ifs"
1366   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1367 fi
1368 fi
1369 RANLIB="$ac_cv_prog_RANLIB"
1370 if test -n "$RANLIB"; then
1371   echo "$ac_t""$RANLIB" 1>&6
1372 else
1373   echo "$ac_t""no" 1>&6
1374 fi
1375
1376 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1377 echo "configure:1378: checking whether ${MAKE-make} sets \${MAKE}" >&5
1378 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1379 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1380   echo $ac_n "(cached) $ac_c" 1>&6
1381 else
1382   cat > conftestmake <<\EOF
1383 all:
1384         @echo 'ac_maketemp="${MAKE}"'
1385 EOF
1386 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1387 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1388 if test -n "$ac_maketemp"; then
1389   eval ac_cv_prog_make_${ac_make}_set=yes
1390 else
1391   eval ac_cv_prog_make_${ac_make}_set=no
1392 fi
1393 rm -f conftestmake
1394 fi
1395 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1396   echo "$ac_t""yes" 1>&6
1397   SET_MAKE=
1398 else
1399   echo "$ac_t""no" 1>&6
1400   SET_MAKE="MAKE=${MAKE-make}"
1401 fi
1402
1403
1404
1405 for ac_hdr in stdarg.h stddef.h stdlib.h string.h limits.h unistd.h lib.h
1406 do
1407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1409 echo "configure:1410: checking for $ac_hdr" >&5
1410 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1411   echo $ac_n "(cached) $ac_c" 1>&6
1412 else
1413   cat > conftest.$ac_ext <<EOF
1414 #line 1415 "configure"
1415 #include "confdefs.h"
1416 #include <$ac_hdr>
1417 EOF
1418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1419 { (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1420 ac_err=`grep -v '^ *+' conftest.out`
1421 if test -z "$ac_err"; then
1422   rm -rf conftest*
1423   eval "ac_cv_header_$ac_safe=yes"
1424 else
1425   echo "$ac_err" >&5
1426   echo "configure: failed program was:" >&5
1427   cat conftest.$ac_ext >&5
1428   rm -rf conftest*
1429   eval "ac_cv_header_$ac_safe=no"
1430 fi
1431 rm -f conftest*
1432 fi
1433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1434   echo "$ac_t""yes" 1>&6
1435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1436   cat >> confdefs.h <<EOF
1437 #define $ac_tr_hdr 1
1438 EOF
1439  
1440 else
1441   echo "$ac_t""no" 1>&6
1442 fi
1443 done
1444
1445 echo $ac_n "checking for working const""... $ac_c" 1>&6
1446 echo "configure:1447: checking for working const" >&5
1447 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1448   echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450   cat > conftest.$ac_ext <<EOF
1451 #line 1452 "configure"
1452 #include "confdefs.h"
1453
1454 int main() {
1455
1456 /* Ultrix mips cc rejects this.  */
1457 typedef int charset[2]; const charset x;
1458 /* SunOS 4.1.1 cc rejects this.  */
1459 char const *const *ccp;
1460 char **p;
1461 /* NEC SVR4.0.2 mips cc rejects this.  */
1462 struct point {int x, y;};
1463 static struct point const zero = {0,0};
1464 /* AIX XL C 1.02.0.0 rejects this.
1465    It does not let you subtract one const X* pointer from another in an arm
1466    of an if-expression whose if-part is not a constant expression */
1467 const char *g = "string";
1468 ccp = &g + (g ? g-g : 0);
1469 /* HPUX 7.0 cc rejects these. */
1470 ++ccp;
1471 p = (char**) ccp;
1472 ccp = (char const *const *) p;
1473 { /* SCO 3.2v4 cc rejects this.  */
1474   char *t;
1475   char const *s = 0 ? (char *) 0 : (char const *) 0;
1476
1477   *t++ = 0;
1478 }
1479 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1480   int x[] = {25, 17};
1481   const int *foo = &x[0];
1482   ++foo;
1483 }
1484 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1485   typedef const int *iptr;
1486   iptr p = 0;
1487   ++p;
1488 }
1489 { /* AIX XL C 1.02.0.0 rejects this saying
1490      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1491   struct s { int j; const int *ap[3]; };
1492   struct s *b; b->j = 5;
1493 }
1494 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1495   const int foo = 10;
1496 }
1497
1498 ; return 0; }
1499 EOF
1500 if { (eval echo configure:1501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1501   rm -rf conftest*
1502   ac_cv_c_const=yes
1503 else
1504   echo "configure: failed program was:" >&5
1505   cat conftest.$ac_ext >&5
1506   rm -rf conftest*
1507   ac_cv_c_const=no
1508 fi
1509 rm -f conftest*
1510 fi
1511
1512 echo "$ac_t""$ac_cv_c_const" 1>&6
1513 if test $ac_cv_c_const = no; then
1514   cat >> confdefs.h <<\EOF
1515 #define const 
1516 EOF
1517
1518 fi
1519
1520 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1521 echo "configure:1522: checking for ANSI C header files" >&5
1522 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1523   echo $ac_n "(cached) $ac_c" 1>&6
1524 else
1525   cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1528 #include <stdlib.h>
1529 #include <stdarg.h>
1530 #include <string.h>
1531 #include <float.h>
1532 EOF
1533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1534 { (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1535 ac_err=`grep -v '^ *+' conftest.out`
1536 if test -z "$ac_err"; then
1537   rm -rf conftest*
1538   ac_cv_header_stdc=yes
1539 else
1540   echo "$ac_err" >&5
1541   echo "configure: failed program was:" >&5
1542   cat conftest.$ac_ext >&5
1543   rm -rf conftest*
1544   ac_cv_header_stdc=no
1545 fi
1546 rm -f conftest*
1547
1548 if test $ac_cv_header_stdc = yes; then
1549   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1550 cat > conftest.$ac_ext <<EOF
1551 #line 1552 "configure"
1552 #include "confdefs.h"
1553 #include <string.h>
1554 EOF
1555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1556   egrep "memchr" >/dev/null 2>&1; then
1557   :
1558 else
1559   rm -rf conftest*
1560   ac_cv_header_stdc=no
1561 fi
1562 rm -f conftest*
1563
1564 fi
1565
1566 if test $ac_cv_header_stdc = yes; then
1567   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1568 cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 #include <stdlib.h>
1572 EOF
1573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1574   egrep "free" >/dev/null 2>&1; then
1575   :
1576 else
1577   rm -rf conftest*
1578   ac_cv_header_stdc=no
1579 fi
1580 rm -f conftest*
1581
1582 fi
1583
1584 if test $ac_cv_header_stdc = yes; then
1585   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1586 if test "$cross_compiling" = yes; then
1587   :
1588 else
1589   cat > conftest.$ac_ext <<EOF
1590 #line 1591 "configure"
1591 #include "confdefs.h"
1592 #include <ctype.h>
1593 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1594 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1595 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1596 int main () { int i; for (i = 0; i < 256; i++)
1597 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1598 exit (0); }
1599
1600 EOF
1601 if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1602 then
1603   :
1604 else
1605   echo "configure: failed program was:" >&5
1606   cat conftest.$ac_ext >&5
1607   rm -fr conftest*
1608   ac_cv_header_stdc=no
1609 fi
1610 rm -fr conftest*
1611 fi
1612
1613 fi
1614 fi
1615
1616 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1617 if test $ac_cv_header_stdc = yes; then
1618   cat >> confdefs.h <<\EOF
1619 #define STDC_HEADERS 1
1620 EOF
1621
1622 fi
1623
1624 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1625 echo "configure:1626: checking for size_t" >&5
1626 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1627   echo $ac_n "(cached) $ac_c" 1>&6
1628 else
1629   cat > conftest.$ac_ext <<EOF
1630 #line 1631 "configure"
1631 #include "confdefs.h"
1632 #include <sys/types.h>
1633 #if STDC_HEADERS
1634 #include <stdlib.h>
1635 #include <stddef.h>
1636 #endif
1637 EOF
1638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1639   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1640   rm -rf conftest*
1641   ac_cv_type_size_t=yes
1642 else
1643   rm -rf conftest*
1644   ac_cv_type_size_t=no
1645 fi
1646 rm -f conftest*
1647
1648 fi
1649 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1650 if test $ac_cv_type_size_t = no; then
1651   cat >> confdefs.h <<\EOF
1652 #define size_t unsigned
1653 EOF
1654
1655 fi
1656
1657 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
1658 echo "configure:1659: checking for ptrdiff_t" >&5
1659 if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
1660   echo $ac_n "(cached) $ac_c" 1>&6
1661 else
1662   cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 #include <sys/types.h>
1666 #if STDC_HEADERS
1667 #include <stdlib.h>
1668 #include <stddef.h>
1669 #endif
1670 EOF
1671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1672   egrep "ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1673   rm -rf conftest*
1674   ac_cv_type_ptrdiff_t=yes
1675 else
1676   rm -rf conftest*
1677   ac_cv_type_ptrdiff_t=no
1678 fi
1679 rm -f conftest*
1680
1681 fi
1682 echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
1683 if test $ac_cv_type_ptrdiff_t = no; then
1684   cat >> confdefs.h <<\EOF
1685 #define ptrdiff_t size_t
1686 EOF
1687
1688 fi
1689
1690
1691 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1692 echo "configure:1693: checking for vprintf" >&5
1693 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1694   echo $ac_n "(cached) $ac_c" 1>&6
1695 else
1696   cat > conftest.$ac_ext <<EOF
1697 #line 1698 "configure"
1698 #include "confdefs.h"
1699 /* System header to define __stub macros and hopefully few prototypes,
1700     which can conflict with char vprintf(); below.  */
1701 #include <assert.h>
1702 /* Override any gcc2 internal prototype to avoid an error.  */
1703 /* We use char because int might match the return type of a gcc2
1704     builtin and then its argument prototype would still apply.  */
1705 char vprintf();
1706
1707 int main() {
1708
1709 /* The GNU C library defines this for functions which it implements
1710     to always fail with ENOSYS.  Some functions are actually named
1711     something starting with __ and the normal name is an alias.  */
1712 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1713 choke me
1714 #else
1715 vprintf();
1716 #endif
1717
1718 ; return 0; }
1719 EOF
1720 if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1721   rm -rf conftest*
1722   eval "ac_cv_func_vprintf=yes"
1723 else
1724   echo "configure: failed program was:" >&5
1725   cat conftest.$ac_ext >&5
1726   rm -rf conftest*
1727   eval "ac_cv_func_vprintf=no"
1728 fi
1729 rm -f conftest*
1730 fi
1731
1732 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1733   echo "$ac_t""yes" 1>&6
1734   cat >> confdefs.h <<\EOF
1735 #define HAVE_VPRINTF 1
1736 EOF
1737
1738 else
1739   echo "$ac_t""no" 1>&6
1740 fi
1741
1742 if test "$ac_cv_func_vprintf" != yes; then
1743 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1744 echo "configure:1745: checking for _doprnt" >&5
1745 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1746   echo $ac_n "(cached) $ac_c" 1>&6
1747 else
1748   cat > conftest.$ac_ext <<EOF
1749 #line 1750 "configure"
1750 #include "confdefs.h"
1751 /* System header to define __stub macros and hopefully few prototypes,
1752     which can conflict with char _doprnt(); below.  */
1753 #include <assert.h>
1754 /* Override any gcc2 internal prototype to avoid an error.  */
1755 /* We use char because int might match the return type of a gcc2
1756     builtin and then its argument prototype would still apply.  */
1757 char _doprnt();
1758
1759 int main() {
1760
1761 /* The GNU C library defines this for functions which it implements
1762     to always fail with ENOSYS.  Some functions are actually named
1763     something starting with __ and the normal name is an alias.  */
1764 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1765 choke me
1766 #else
1767 _doprnt();
1768 #endif
1769
1770 ; return 0; }
1771 EOF
1772 if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1773   rm -rf conftest*
1774   eval "ac_cv_func__doprnt=yes"
1775 else
1776   echo "configure: failed program was:" >&5
1777   cat conftest.$ac_ext >&5
1778   rm -rf conftest*
1779   eval "ac_cv_func__doprnt=no"
1780 fi
1781 rm -f conftest*
1782 fi
1783
1784 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1785   echo "$ac_t""yes" 1>&6
1786   cat >> confdefs.h <<\EOF
1787 #define HAVE_DOPRNT 1
1788 EOF
1789
1790 else
1791   echo "$ac_t""no" 1>&6
1792 fi
1793
1794 fi
1795
1796 for ac_func in isgraph
1797 do
1798 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1799 echo "configure:1800: checking for $ac_func" >&5
1800 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1801   echo $ac_n "(cached) $ac_c" 1>&6
1802 else
1803   cat > conftest.$ac_ext <<EOF
1804 #line 1805 "configure"
1805 #include "confdefs.h"
1806 /* System header to define __stub macros and hopefully few prototypes,
1807     which can conflict with char $ac_func(); below.  */
1808 #include <assert.h>
1809 /* Override any gcc2 internal prototype to avoid an error.  */
1810 /* We use char because int might match the return type of a gcc2
1811     builtin and then its argument prototype would still apply.  */
1812 char $ac_func();
1813
1814 int main() {
1815
1816 /* The GNU C library defines this for functions which it implements
1817     to always fail with ENOSYS.  Some functions are actually named
1818     something starting with __ and the normal name is an alias.  */
1819 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1820 choke me
1821 #else
1822 $ac_func();
1823 #endif
1824
1825 ; return 0; }
1826 EOF
1827 if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1828   rm -rf conftest*
1829   eval "ac_cv_func_$ac_func=yes"
1830 else
1831   echo "configure: failed program was:" >&5
1832   cat conftest.$ac_ext >&5
1833   rm -rf conftest*
1834   eval "ac_cv_func_$ac_func=no"
1835 fi
1836 rm -f conftest*
1837 fi
1838
1839 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1840   echo "$ac_t""yes" 1>&6
1841     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1842   cat >> confdefs.h <<EOF
1843 #define $ac_tr_func 1
1844 EOF
1845  
1846 else
1847   echo "$ac_t""no" 1>&6
1848 fi
1849 done
1850
1851
1852
1853 # Check whether --with-readline or --without-readline was given.
1854 if test "${with_readline+set}" = set; then
1855   withval="$with_readline"
1856   
1857 if test "$with_readline" = "yes" ; then
1858  echo Using the readline library.
1859  cat >> confdefs.h <<\EOF
1860 #define READLINE 1
1861 EOF
1862
1863  LIBS="$LIBS -lreadline -ltermcap"
1864  bcrl=y
1865 else
1866  bcrl=n
1867 fi
1868
1869 else
1870   
1871 bcrl=n
1872
1873 fi
1874
1875
1876 if test "$LEX" = "flex" ; then
1877  LEX="flex -I8"
1878 else
1879  if test "$bcrl" = "y" ; then
1880   echo "configure: warning: readline works only with flex." 1>&2
1881  fi
1882 fi
1883
1884
1885 SaveCFLAGS="$CFLAGS"
1886 CFLAGS="-g -O -I. -I$srcdir"
1887 echo $ac_n "checking if long strings are accepted by the C compiler""... $ac_c" 1>&6
1888 echo "configure:1889: checking if long strings are accepted by the C compiler" >&5
1889 cat > conftest.$ac_ext <<EOF
1890 #line 1891 "configure"
1891 #include "confdefs.h"
1892
1893 char libmath[] = 
1894 #include "bc/libmath.h"
1895 ;
1896
1897 int main() {
1898
1899 ; return 0; }
1900 EOF
1901 if { (eval echo configure:1902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1902   rm -rf conftest*
1903   echo "$ac_t""yes" 1>&6
1904 else
1905   echo "configure: failed program was:" >&5
1906   cat conftest.$ac_ext >&5
1907   rm -rf conftest*
1908   echo "$ac_t""no" 1>&6
1909 echo "configure: warning: libmath.b will not be preloaded into the executable" 1>&2
1910 if test "${prefix}" = "NONE" ; then 
1911 cat >> confdefs.h <<EOF
1912 #define BC_MATH_FILE "/usr/local/lib/libmath.b"
1913 EOF
1914
1915 else
1916 cat >> confdefs.h <<EOF
1917 #define BC_MATH_FILE "${prefix}/lib/libmath.b"
1918 EOF
1919
1920 fi
1921 fi
1922 rm -f conftest*
1923 CFLAGS="$SaveCFLAGS"
1924
1925
1926
1927 if test "$program_transform_name" = s,x,x,; then
1928   program_transform_name=
1929 else
1930   # Double any \ or $.  echo might interpret backslashes.
1931   cat <<\EOF_SED > conftestsed
1932 s,\\,\\\\,g; s,\$,$$,g
1933 EOF_SED
1934   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1935   rm -f conftestsed
1936 fi
1937 test "$program_prefix" != NONE &&
1938   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1939 # Use a double $ so make ignores it.
1940 test "$program_suffix" != NONE &&
1941   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1942
1943 # sed with no file args requires a program.
1944 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1945
1946 trap '' 1 2 15
1947 cat > confcache <<\EOF
1948 # This file is a shell script that caches the results of configure
1949 # tests run on this system so they can be shared between configure
1950 # scripts and configure runs.  It is not useful on other systems.
1951 # If it contains results you don't want to keep, you may remove or edit it.
1952 #
1953 # By default, configure uses ./config.cache as the cache file,
1954 # creating it if it does not exist already.  You can give configure
1955 # the --cache-file=FILE option to use a different cache file; that is
1956 # what configure does when it calls configure scripts in
1957 # subdirectories, so they share the cache.
1958 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1959 # config.status only pays attention to the cache file if you give it the
1960 # --recheck option to rerun configure.
1961 #
1962 EOF
1963 # The following way of writing the cache mishandles newlines in values,
1964 # but we know of no workaround that is simple, portable, and efficient.
1965 # So, don't put newlines in cache variables' values.
1966 # Ultrix sh set writes to stderr and can't be redirected directly,
1967 # and sets the high bit in the cache file unless we assign to the vars.
1968 (set) 2>&1 |
1969   case `(ac_space=' '; set) 2>&1` in
1970   *ac_space=\ *)
1971     # `set' does not quote correctly, so add quotes (double-quote substitution
1972     # turns \\\\ into \\, and sed turns \\ into \).
1973     sed -n \
1974       -e "s/'/'\\\\''/g" \
1975       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1976     ;;
1977   *)
1978     # `set' quotes correctly as required by POSIX, so do not add quotes.
1979     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1980     ;;
1981   esac >> confcache
1982 if cmp -s $cache_file confcache; then
1983   :
1984 else
1985   if test -w $cache_file; then
1986     echo "updating cache $cache_file"
1987     cat confcache > $cache_file
1988   else
1989     echo "not updating unwritable cache $cache_file"
1990   fi
1991 fi
1992 rm -f confcache
1993
1994 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1995
1996 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1997 # Let make expand exec_prefix.
1998 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1999
2000 # Any assignment to VPATH causes Sun make to only execute
2001 # the first set of double-colon rules, so remove it if not needed.
2002 # If there is a colon in the path, we need to keep it.
2003 if test "x$srcdir" = x.; then
2004   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2005 fi
2006
2007 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2008
2009 DEFS=-DHAVE_CONFIG_H
2010
2011 # Without the "./", some shells look in PATH for config.status.
2012 : ${CONFIG_STATUS=./config.status}
2013
2014 echo creating $CONFIG_STATUS
2015 rm -f $CONFIG_STATUS
2016 cat > $CONFIG_STATUS <<EOF
2017 #! /bin/sh
2018 # Generated automatically by configure.
2019 # Run this file to recreate the current configuration.
2020 # This directory was configured as follows,
2021 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2022 #
2023 # $0 $ac_configure_args
2024 #
2025 # Compiler output produced by configure, useful for debugging
2026 # configure, is in ./config.log if it exists.
2027
2028 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2029 for ac_option
2030 do
2031   case "\$ac_option" in
2032   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2033     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2034     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2035   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2036     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2037     exit 0 ;;
2038   -help | --help | --hel | --he | --h)
2039     echo "\$ac_cs_usage"; exit 0 ;;
2040   *) echo "\$ac_cs_usage"; exit 1 ;;
2041   esac
2042 done
2043
2044 ac_given_srcdir=$srcdir
2045 ac_given_INSTALL="$INSTALL"
2046
2047 trap 'rm -fr `echo "Makefile bc/Makefile dc/Makefile doc/Makefile lib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2048 EOF
2049 cat >> $CONFIG_STATUS <<EOF
2050
2051 # Protect against being on the right side of a sed subst in config.status.
2052 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2053  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2054 $ac_vpsub
2055 $extrasub
2056 s%@CFLAGS@%$CFLAGS%g
2057 s%@CPPFLAGS@%$CPPFLAGS%g
2058 s%@CXXFLAGS@%$CXXFLAGS%g
2059 s%@DEFS@%$DEFS%g
2060 s%@LDFLAGS@%$LDFLAGS%g
2061 s%@LIBS@%$LIBS%g
2062 s%@exec_prefix@%$exec_prefix%g
2063 s%@prefix@%$prefix%g
2064 s%@program_transform_name@%$program_transform_name%g
2065 s%@bindir@%$bindir%g
2066 s%@sbindir@%$sbindir%g
2067 s%@libexecdir@%$libexecdir%g
2068 s%@datadir@%$datadir%g
2069 s%@sysconfdir@%$sysconfdir%g
2070 s%@sharedstatedir@%$sharedstatedir%g
2071 s%@localstatedir@%$localstatedir%g
2072 s%@libdir@%$libdir%g
2073 s%@includedir@%$includedir%g
2074 s%@oldincludedir@%$oldincludedir%g
2075 s%@infodir@%$infodir%g
2076 s%@mandir@%$mandir%g
2077 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2078 s%@INSTALL_DATA@%$INSTALL_DATA%g
2079 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2080 s%@PACKAGE@%$PACKAGE%g
2081 s%@VERSION@%$VERSION%g
2082 s%@ACLOCAL@%$ACLOCAL%g
2083 s%@AUTOCONF@%$AUTOCONF%g
2084 s%@AUTOMAKE@%$AUTOMAKE%g
2085 s%@AUTOHEADER@%$AUTOHEADER%g
2086 s%@MAKEINFO@%$MAKEINFO%g
2087 s%@SET_MAKE@%$SET_MAKE%g
2088 s%@CC@%$CC%g
2089 s%@CPP@%$CPP%g
2090 s%@YACC@%$YACC%g
2091 s%@LEX@%$LEX%g
2092 s%@LEXLIB@%$LEXLIB%g
2093 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
2094 s%@RANLIB@%$RANLIB%g
2095
2096 CEOF
2097 EOF
2098
2099 cat >> $CONFIG_STATUS <<\EOF
2100
2101 # Split the substitutions into bite-sized pieces for seds with
2102 # small command number limits, like on Digital OSF/1 and HP-UX.
2103 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2104 ac_file=1 # Number of current file.
2105 ac_beg=1 # First line for current file.
2106 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2107 ac_more_lines=:
2108 ac_sed_cmds=""
2109 while $ac_more_lines; do
2110   if test $ac_beg -gt 1; then
2111     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2112   else
2113     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2114   fi
2115   if test ! -s conftest.s$ac_file; then
2116     ac_more_lines=false
2117     rm -f conftest.s$ac_file
2118   else
2119     if test -z "$ac_sed_cmds"; then
2120       ac_sed_cmds="sed -f conftest.s$ac_file"
2121     else
2122       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2123     fi
2124     ac_file=`expr $ac_file + 1`
2125     ac_beg=$ac_end
2126     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2127   fi
2128 done
2129 if test -z "$ac_sed_cmds"; then
2130   ac_sed_cmds=cat
2131 fi
2132 EOF
2133
2134 cat >> $CONFIG_STATUS <<EOF
2135
2136 CONFIG_FILES=\${CONFIG_FILES-"Makefile bc/Makefile dc/Makefile doc/Makefile lib/Makefile"}
2137 EOF
2138 cat >> $CONFIG_STATUS <<\EOF
2139 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2140   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2141   case "$ac_file" in
2142   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2143        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2144   *) ac_file_in="${ac_file}.in" ;;
2145   esac
2146
2147   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2148
2149   # Remove last slash and all that follows it.  Not all systems have dirname.
2150   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2151   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2152     # The file is in a subdirectory.
2153     test ! -d "$ac_dir" && mkdir "$ac_dir"
2154     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2155     # A "../" for each directory in $ac_dir_suffix.
2156     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2157   else
2158     ac_dir_suffix= ac_dots=
2159   fi
2160
2161   case "$ac_given_srcdir" in
2162   .)  srcdir=.
2163       if test -z "$ac_dots"; then top_srcdir=.
2164       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2165   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2166   *) # Relative path.
2167     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2168     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2169   esac
2170
2171   case "$ac_given_INSTALL" in
2172   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2173   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2174   esac
2175
2176   echo creating "$ac_file"
2177   rm -f "$ac_file"
2178   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2179   case "$ac_file" in
2180   *Makefile*) ac_comsub="1i\\
2181 # $configure_input" ;;
2182   *) ac_comsub= ;;
2183   esac
2184
2185   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2186   sed -e "$ac_comsub
2187 s%@configure_input@%$configure_input%g
2188 s%@srcdir@%$srcdir%g
2189 s%@top_srcdir@%$top_srcdir%g
2190 s%@INSTALL@%$INSTALL%g
2191 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2192 fi; done
2193 rm -f conftest.s*
2194
2195 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2196 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2197 #
2198 # ac_d sets the value in "#define NAME VALUE" lines.
2199 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2200 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2201 ac_dC='\3'
2202 ac_dD='%g'
2203 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2204 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2205 ac_uB='\([      ]\)%\1#\2define\3'
2206 ac_uC=' '
2207 ac_uD='\4%g'
2208 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2209 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2210 ac_eB='$%\1#\2define\3'
2211 ac_eC=' '
2212 ac_eD='%g'
2213
2214 if test "${CONFIG_HEADERS+set}" != set; then
2215 EOF
2216 cat >> $CONFIG_STATUS <<EOF
2217   CONFIG_HEADERS="config.h"
2218 EOF
2219 cat >> $CONFIG_STATUS <<\EOF
2220 fi
2221 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2222   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2223   case "$ac_file" in
2224   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2225        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2226   *) ac_file_in="${ac_file}.in" ;;
2227   esac
2228
2229   echo creating $ac_file
2230
2231   rm -f conftest.frag conftest.in conftest.out
2232   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2233   cat $ac_file_inputs > conftest.in
2234
2235 EOF
2236
2237 # Transform confdefs.h into a sed script conftest.vals that substitutes
2238 # the proper values into config.h.in to produce config.h.  And first:
2239 # Protect against being on the right side of a sed subst in config.status.
2240 # Protect against being in an unquoted here document in config.status.
2241 rm -f conftest.vals
2242 cat > conftest.hdr <<\EOF
2243 s/[\\&%]/\\&/g
2244 s%[\\$`]%\\&%g
2245 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2246 s%ac_d%ac_u%gp
2247 s%ac_u%ac_e%gp
2248 EOF
2249 sed -n -f conftest.hdr confdefs.h > conftest.vals
2250 rm -f conftest.hdr
2251
2252 # This sed command replaces #undef with comments.  This is necessary, for
2253 # example, in the case of _POSIX_SOURCE, which is predefined and required
2254 # on some systems where configure will not decide to define it.
2255 cat >> conftest.vals <<\EOF
2256 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2257 EOF
2258
2259 # Break up conftest.vals because some shells have a limit on
2260 # the size of here documents, and old seds have small limits too.
2261
2262 rm -f conftest.tail
2263 while :
2264 do
2265   ac_lines=`grep -c . conftest.vals`
2266   # grep -c gives empty output for an empty file on some AIX systems.
2267   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2268   # Write a limited-size here document to conftest.frag.
2269   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2270   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2271   echo 'CEOF
2272   sed -f conftest.frag conftest.in > conftest.out
2273   rm -f conftest.in
2274   mv conftest.out conftest.in
2275 ' >> $CONFIG_STATUS
2276   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2277   rm -f conftest.vals
2278   mv conftest.tail conftest.vals
2279 done
2280 rm -f conftest.vals
2281
2282 cat >> $CONFIG_STATUS <<\EOF
2283   rm -f conftest.frag conftest.h
2284   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2285   cat conftest.in >> conftest.h
2286   rm -f conftest.in
2287   if cmp -s $ac_file conftest.h 2>/dev/null; then
2288     echo "$ac_file is unchanged"
2289     rm -f conftest.h
2290   else
2291     # Remove last slash and all that follows it.  Not all systems have dirname.
2292       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2293       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2294       # The file is in a subdirectory.
2295       test ! -d "$ac_dir" && mkdir "$ac_dir"
2296     fi
2297     rm -f $ac_file
2298     mv conftest.h $ac_file
2299   fi
2300 fi; done
2301
2302 EOF
2303 cat >> $CONFIG_STATUS <<EOF
2304
2305
2306 EOF
2307 cat >> $CONFIG_STATUS <<\EOF
2308 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2309
2310 exit 0
2311 EOF
2312 chmod +x $CONFIG_STATUS
2313 rm -fr confdefs* $ac_clean_files
2314 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2315