Git init
[external/mawk.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.4 
5 # Copyright (C) 1992, 1993, 1994 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
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36
37 # Initialize some other variables.
38 subdirs=
39
40 ac_prev=
41 for ac_option
42 do
43
44   # If the previous option needs an argument, assign it.
45   if test -n "$ac_prev"; then
46     eval "$ac_prev=\$ac_option"
47     ac_prev=
48     continue
49   fi
50
51   case "$ac_option" in
52   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53   *) ac_optarg= ;;
54   esac
55
56   # Accept the important Cygnus configure options, so we can diagnose typos.
57
58   case "$ac_option" in
59
60   -build | --build | --buil | --bui | --bu | --b)
61     ac_prev=build ;;
62   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
63     build="$ac_optarg" ;;
64
65   -cache-file | --cache-file | --cache-fil | --cache-fi \
66   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
67     ac_prev=cache_file ;;
68   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
69   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
70     cache_file="$ac_optarg" ;;
71
72   -disable-* | --disable-*)
73     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
74     # Reject names that are not valid shell variable names.
75     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
76       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
77     fi
78     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
79     eval "enable_${ac_feature}=no" ;;
80
81   -enable-* | --enable-*)
82     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
83     # Reject names that are not valid shell variable names.
84     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
85       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
86     fi
87     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
88     case "$ac_option" in
89       *=*) ;;
90       *) ac_optarg=yes ;;
91     esac
92     eval "enable_${ac_feature}='$ac_optarg'" ;;
93
94   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
96   | --exec | --exe | --ex)
97     ac_prev=exec_prefix ;;
98   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
99   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
100   | --exec=* | --exe=* | --ex=*)
101     exec_prefix="$ac_optarg" ;;
102
103   -gas | --gas | --ga | --g)
104     # Obsolete; use --with-gas.
105     with_gas=yes ;;
106
107   -help | --help | --hel | --he)
108     # Omit some internal or obsolete options to make the list less imposing.
109     # This message is too long to be a string in the A/UX 3.1 sh.
110     cat << EOF
111 Usage: configure [options] [host]
112 Options: [defaults in brackets after descriptions]
113 Configuration:
114   --cache-file=FILE       cache test results in FILE
115   --help                  print this message
116   --no-create             do not create output files
117   --quiet, --silent       do not print \`checking...' messages
118   --version               print the version of autoconf that created configure
119 Directory and file names:
120   --prefix=PREFIX         install architecture-independent files in PREFIX
121                           [$ac_default_prefix]
122   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
123                           [same as prefix]
124   --srcdir=DIR            find the sources in DIR [configure dir or ..]
125   --program-prefix=PREFIX prepend PREFIX to installed program names
126   --program-suffix=SUFFIX append SUFFIX to installed program names
127   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
128 Host type:
129   --build=BUILD           configure for building on BUILD [BUILD=HOST]
130   --host=HOST             configure for HOST [guessed]
131   --target=TARGET         configure for TARGET [TARGET=HOST]
132 Features and packages:
133   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
134   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
135   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
136   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
137   --x-includes=DIR        X include files are in DIR
138   --x-libraries=DIR       X library files are in DIR
139 --enable and --with options recognized:$ac_help
140 EOF
141     exit 0 ;;
142
143   -host | --host | --hos | --ho)
144     ac_prev=host ;;
145   -host=* | --host=* | --hos=* | --ho=*)
146     host="$ac_optarg" ;;
147
148   -nfp | --nfp | --nf)
149     # Obsolete; use --without-fp.
150     with_fp=no ;;
151
152   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
153   | --no-cr | --no-c)
154     no_create=yes ;;
155
156   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
157   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
158     no_recursion=yes ;;
159
160   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
161     ac_prev=prefix ;;
162   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
163     prefix="$ac_optarg" ;;
164
165   -program-prefix | --program-prefix | --program-prefi | --program-pref \
166   | --program-pre | --program-pr | --program-p)
167     ac_prev=program_prefix ;;
168   -program-prefix=* | --program-prefix=* | --program-prefi=* \
169   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
170     program_prefix="$ac_optarg" ;;
171
172   -program-suffix | --program-suffix | --program-suffi | --program-suff \
173   | --program-suf | --program-su | --program-s)
174     ac_prev=program_suffix ;;
175   -program-suffix=* | --program-suffix=* | --program-suffi=* \
176   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
177     program_suffix="$ac_optarg" ;;
178
179   -program-transform-name | --program-transform-name \
180   | --program-transform-nam | --program-transform-na \
181   | --program-transform-n | --program-transform- \
182   | --program-transform | --program-transfor \
183   | --program-transfo | --program-transf \
184   | --program-trans | --program-tran \
185   | --progr-tra | --program-tr | --program-t)
186     ac_prev=program_transform_name ;;
187   -program-transform-name=* | --program-transform-name=* \
188   | --program-transform-nam=* | --program-transform-na=* \
189   | --program-transform-n=* | --program-transform-=* \
190   | --program-transform=* | --program-transfor=* \
191   | --program-transfo=* | --program-transf=* \
192   | --program-trans=* | --program-tran=* \
193   | --progr-tra=* | --program-tr=* | --program-t=*)
194     program_transform_name="$ac_optarg" ;;
195
196   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
197   | -silent | --silent | --silen | --sile | --sil)
198     silent=yes ;;
199
200   -site | --site | --sit)
201     ac_prev=site ;;
202   -site=* | --site=* | --sit=*)
203     site="$ac_optarg" ;;
204
205   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
206     ac_prev=srcdir ;;
207   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
208     srcdir="$ac_optarg" ;;
209
210   -target | --target | --targe | --targ | --tar | --ta | --t)
211     ac_prev=target ;;
212   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
213     target="$ac_optarg" ;;
214
215   -v | -verbose | --verbose | --verbos | --verbo | --verb)
216     verbose=yes ;;
217
218   -version | --version | --versio | --versi | --vers)
219     echo "configure generated by autoconf version 2.4"
220     exit 0 ;;
221
222   -with-* | --with-*)
223     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
224     # Reject names that are not valid shell variable names.
225     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
226       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
227     fi
228     ac_package=`echo $ac_package| sed 's/-/_/g'`
229     case "$ac_option" in
230       *=*) ;;
231       *) ac_optarg=yes ;;
232     esac
233     eval "with_${ac_package}='$ac_optarg'" ;;
234
235   -without-* | --without-*)
236     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
237     # Reject names that are not valid shell variable names.
238     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
239       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
240     fi
241     ac_package=`echo $ac_package| sed 's/-/_/g'`
242     eval "with_${ac_package}=no" ;;
243
244   --x)
245     # Obsolete; use --with-x.
246     with_x=yes ;;
247
248   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
249   | --x-incl | --x-inc | --x-in | --x-i)
250     ac_prev=x_includes ;;
251   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
252   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
253     x_includes="$ac_optarg" ;;
254
255   -x-libraries | --x-libraries | --x-librarie | --x-librari \
256   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
257     ac_prev=x_libraries ;;
258   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
259   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
260     x_libraries="$ac_optarg" ;;
261
262   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
263     ;;
264
265   *) 
266     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
267       echo "configure: warning: $ac_option: invalid host type" 1>&2
268     fi
269     if test "x$nonopt" != xNONE; then
270       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
271     fi
272     nonopt="$ac_option"
273     ;;
274
275   esac
276 done
277
278 if test -n "$ac_prev"; then
279   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280 fi
281
282 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
283
284 # File descriptor usage:
285 # 0 standard input
286 # 1 file creation
287 # 2 errors and warnings
288 # 3 some systems may open it to /dev/tty
289 # 4 used on the Kubota Titan
290 # 6 checking for... messages and results
291 # 5 compiler messages saved in config.log
292 if test "$silent" = yes; then
293   exec 6>/dev/null
294 else
295   exec 6>&1
296 fi
297 exec 5>./config.log
298
299 echo "\
300 This file contains any messages produced by compilers while
301 running configure, to aid debugging if configure makes a mistake.
302 " 1>&5
303
304 # Strip out --no-create and --no-recursion so they do not pile up.
305 # Also quote any args containing shell metacharacters.
306 ac_configure_args=
307 for ac_arg
308 do
309   case "$ac_arg" in
310   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311   | --no-cr | --no-c) ;;
312   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
314   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
315   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
316   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
317   esac
318 done
319
320 # NLS nuisances.
321 # Only set LANG and LC_ALL to C if already set.
322 # These must not be set unconditionally because not all systems understand
323 # e.g. LANG=C (notably SCO).
324 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
325 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
326
327 # confdefs.h avoids OS command line length limits that DEFS can exceed.
328 rm -rf conftest* confdefs.h
329 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
330 echo > confdefs.h
331
332 # A filename unique to this package, relative to the directory that
333 # configure is in, which we can look for to find out if srcdir is correct.
334 ac_unique_file=mawk.h
335
336 # Find the source files, if location was not specified.
337 if test -z "$srcdir"; then
338   ac_srcdir_defaulted=yes
339   # Try the directory containing this script, then its parent.
340   ac_prog=$0
341   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
342   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
343   srcdir=$ac_confdir
344   if test ! -r $srcdir/$ac_unique_file; then
345     srcdir=..
346   fi
347 else
348   ac_srcdir_defaulted=no
349 fi
350 if test ! -r $srcdir/$ac_unique_file; then
351   if test "$ac_srcdir_defaulted" = yes; then
352     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
353   else
354     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
355   fi
356 fi
357 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
358
359 # Prefer explicitly selected file to automatically selected ones.
360 if test -z "$CONFIG_SITE"; then
361   if test "x$prefix" != xNONE; then
362     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
363   else
364     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
365   fi
366 fi
367 for ac_site_file in $CONFIG_SITE; do
368   if test -r "$ac_site_file"; then
369     echo "loading site script $ac_site_file"
370     . "$ac_site_file"
371   fi
372 done
373
374 if test -r "$cache_file"; then
375   echo "loading cache $cache_file"
376   . $cache_file
377 else
378   echo "creating cache $cache_file"
379   > $cache_file
380 fi
381
382 ac_ext=c
383 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
384 ac_cpp='$CPP $CPPFLAGS'
385 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
386 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
387
388 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
389   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
390   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
391     ac_n= ac_c='
392 ' ac_t='        '
393   else
394     ac_n=-n ac_c= ac_t=
395   fi
396 else
397   ac_n= ac_c='\c' ac_t=
398 fi
399
400
401
402
403
404
405
406
407 cat < /dev/null > defines.out
408 test -f config.user && . ./config.user
409 test "${BINDIR+set}" = set || BINDIR="/usr/local/bin"
410
411 test "${MANDIR+set}" = set || MANDIR="/usr/local/man/man1"
412
413 test "${MANEXT+set}" = set || MANEXT="1"
414
415 echo "$USER_DEFINES" >> defines.out
416 # Extract the first word of "gcc", so it can be a program name with args.
417 set dummy gcc; ac_word=$2
418 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
419 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
420   echo $ac_n "(cached) $ac_c" 1>&6
421 else
422   if test -n "$CC"; then
423   ac_cv_prog_CC="$CC" # Let the user override the test.
424 else
425   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
426   for ac_dir in $PATH; do
427     test -z "$ac_dir" && ac_dir=.
428     if test -f $ac_dir/$ac_word; then
429       ac_cv_prog_CC="gcc"
430       break
431     fi
432   done
433   IFS="$ac_save_ifs"
434   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
435 fi
436 fi
437 CC="$ac_cv_prog_CC"
438 if test -n "$CC"; then
439   echo "$ac_t""$CC" 1>&6
440 else
441   echo "$ac_t""no" 1>&6
442 fi
443
444 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
445 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
446   echo $ac_n "(cached) $ac_c" 1>&6
447 else
448   cat > conftest.c <<EOF
449 #ifdef __GNUC__
450   yes;
451 #endif
452 EOF
453 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
454   ac_cv_prog_gcc=yes
455 else
456   ac_cv_prog_gcc=no
457 fi
458 fi
459 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
460 rm -f conftest*
461
462 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
463 # On Suns, sometimes $CPP names a directory.
464 if test -n "$CPP" && test -d "$CPP"; then
465   CPP=
466 fi
467 if test -z "$CPP"; then
468 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
469   echo $ac_n "(cached) $ac_c" 1>&6
470 else
471     # This must be in double quotes, not single quotes, because CPP may get
472   # substituted into the Makefile and "${CC-cc}" will confuse make.
473   CPP="${CC-cc} -E"
474   # On the NeXT, cc -E runs the code through the compiler's parser,
475   # not just through cpp.
476   cat > conftest.$ac_ext <<EOF
477 #line 478 "configure"
478 #include "confdefs.h"
479 #include <assert.h>
480 Syntax Error
481 EOF
482 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
483 ac_err=`grep -v '^ *+' conftest.out`
484 if test -z "$ac_err"; then
485   :
486 else
487   echo "$ac_err" >&5
488   rm -rf conftest*
489   CPP="${CC-cc} -E -traditional-cpp"
490   cat > conftest.$ac_ext <<EOF
491 #line 492 "configure"
492 #include "confdefs.h"
493 #include <assert.h>
494 Syntax Error
495 EOF
496 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
497 ac_err=`grep -v '^ *+' conftest.out`
498 if test -z "$ac_err"; then
499   :
500 else
501   echo "$ac_err" >&5
502   rm -rf conftest*
503   CPP=/lib/cpp
504 fi
505 rm -f conftest*
506 fi
507 rm -f conftest*
508   ac_cv_prog_CPP="$CPP"
509 fi
510   CPP="$ac_cv_prog_CPP"
511 else
512   ac_cv_prog_CPP="$CPP"
513 fi
514 echo "$ac_t""$CPP" 1>&6
515
516 test "${CFLAGS+set}" = set || CFLAGS="-O"
517
518
519 if test "${MATHLIB+set}" != set  ; then
520 echo $ac_n "checking for -lm""... $ac_c" 1>&6
521 if eval "test \"`echo '$''{'ac_cv_lib_m'+set}'`\" = set"; then
522   echo $ac_n "(cached) $ac_c" 1>&6
523 else
524   ac_save_LIBS="$LIBS"
525 LIBS="-lm  $LIBS"
526 cat > conftest.$ac_ext <<EOF
527 #line 528 "configure"
528 #include "confdefs.h"
529
530 int main() { return 0; }
531 int t() {
532 log()
533 ; return 0; }
534 EOF
535 XCFLAGS=$CFLAGS
536 CFLAGS="-fno-builtin $CFLAGS"
537 if eval $ac_link; then
538   rm -rf conftest*
539   eval "ac_cv_lib_m=yes"
540 else
541   rm -rf conftest*
542   eval "ac_cv_lib_m=no"
543 fi
544 rm -f conftest*
545 CFLAGS=$XCFLAGS
546 LIBS="$ac_save_LIBS"
547
548 fi
549 if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
550   echo "$ac_t""yes" 1>&6
551   MATHLIB=-lm ; LIBS="$LIBS -lm"
552 else
553   echo "$ac_t""no" 1>&6
554 # maybe don't need separate math library
555 echo $ac_n "checking for log""... $ac_c" 1>&6
556 if eval "test \"`echo '$''{'ac_cv_func_log'+set}'`\" = set"; then
557   echo $ac_n "(cached) $ac_c" 1>&6
558 else
559   cat > conftest.$ac_ext <<EOF
560 #line 558 "configure"
561 #include "confdefs.h"
562 /* System header to define __stub macros and hopefully few prototypes,
563     which can conflict with char log(); below.  */
564 #include <assert.h>
565 /* Override any gcc2 internal prototype to avoid an error.  */
566 char log(); 
567
568 int main() { return 0; }
569 int t() {
570
571 /* The GNU C library defines this for functions which it implements
572     to always fail with ENOSYS.  Some functions are actually named
573     something starting with __ and the normal name is an alias.  */
574 #if defined (__stub_log) || defined (__stub___log)
575 choke me
576 #else
577 log();
578 #endif
579
580 ; return 0; }
581 EOF
582 if eval $ac_link; then
583   rm -rf conftest*
584   eval "ac_cv_func_log=yes"
585 else
586   rm -rf conftest*
587   eval "ac_cv_func_log=no"
588 fi
589 rm -f conftest*
590
591 fi
592 if eval "test \"`echo '$ac_cv_func_'log`\" = yes"; then
593   echo "$ac_t""yes" 1>&6
594   log=yes
595 else
596   echo "$ac_t""no" 1>&6
597 fi
598
599 if test "$log$" = yes
600 then
601    MATHLIB='' # evidently don't need one
602 else
603    { echo "configure: error: Cannot find a math library. You need to set MATHLIB in config.user" 1>&2; exit 1; }
604 fi
605 fi
606 fi
607
608 for ac_prog in byacc bison yacc
609 do
610 # Extract the first word of "$ac_prog", so it can be a program name with args.
611 set dummy $ac_prog; ac_word=$2
612 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
613 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
614   echo $ac_n "(cached) $ac_c" 1>&6
615 else
616   if test -n "$YACC"; then
617   ac_cv_prog_YACC="$YACC" # Let the user override the test.
618 else
619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
620   for ac_dir in $PATH; do
621     test -z "$ac_dir" && ac_dir=.
622     if test -f $ac_dir/$ac_word; then
623       ac_cv_prog_YACC="$ac_prog"
624       break
625     fi
626   done
627   IFS="$ac_save_ifs"
628 fi
629 fi
630 YACC="$ac_cv_prog_YACC"
631 if test -n "$YACC"; then
632   echo "$ac_t""$YACC" 1>&6
633 else
634   echo "$ac_t""no" 1>&6
635 fi
636
637 test -n "$YACC" && break
638 done
639
640 test "$YACC" = bison && YACC='bison -y'
641 echo $ac_n "checking compiler supports void*""... $ac_c" 1>&6
642 cat > conftest.$ac_ext <<EOF
643 #line 641 "configure"
644 #include "confdefs.h"
645 char *cp ;
646 void *foo() ; 
647 int main() { return 0; }
648 int t() {
649 cp = (char*)(void*)(int*)foo() ;
650 ; return 0; }
651 EOF
652 if eval $ac_compile; then
653   rm -rf conftest*
654   void_star=yes
655 else
656   rm -rf conftest*
657   void_star=no
658 fi
659 rm -f conftest*
660
661 echo "$ac_t""$void_star" 1>&6
662 test "$void_star" = no && echo  X 'NO_VOID_STAR' '1' >> defines.out
663 echo $ac_n "checking compiler groks prototypes""... $ac_c" 1>&6
664 cat > conftest.$ac_ext <<EOF
665 #line 663 "configure"
666 #include "confdefs.h"
667
668 int main() { return 0; }
669 int t() {
670 int x(char*);
671 ; return 0; }
672 EOF
673 if eval $ac_compile; then
674   rm -rf conftest*
675   protos=yes
676 else
677   rm -rf conftest*
678   protos=no
679 fi
680 rm -f conftest*
681
682 echo "$ac_t""$protos" 1>&6
683 test "$protos" = no && echo  X 'NO_PROTOS' '1' >> defines.out
684 echo $ac_n "checking for working const""... $ac_c" 1>&6
685 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
686   echo $ac_n "(cached) $ac_c" 1>&6
687 else
688   cat > conftest.$ac_ext <<EOF
689 #line 687 "configure"
690 #include "confdefs.h"
691
692 int main() { return 0; }
693 int t() {
694
695 /* Ultrix mips cc rejects this.  */
696 typedef int charset[2]; const charset x;
697 /* SunOS 4.1.1 cc rejects this.  */
698 char const *const *ccp;
699 char **p;
700 /* NEC SVR4.0.2 mips cc rejects this.  */
701 struct point {int x, y;};
702 static struct point const zero;
703 /* AIX XL C 1.02.0.0 rejects this.
704    It does not let you subtract one const X* pointer from another in an arm
705    of an if-expression whose if-part is not a constant expression */
706 const char *g = "string";
707 ccp = &g + (g ? g-g : 0);
708 /* HPUX 7.0 cc rejects these. */
709 ++ccp;
710 p = (char**) ccp;
711 ccp = (char const *const *) p;
712 { /* SCO 3.2v4 cc rejects this.  */
713   char *t;
714   char const *s = 0 ? (char *) 0 : (char const *) 0;
715
716   *t++ = 0;
717 }
718 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
719   int x[] = {25, 17};
720   const int *foo = &x[0];
721   ++foo;
722 }
723 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
724   typedef const int *iptr;
725   iptr p = 0;
726   ++p;
727 }
728 { /* AIX XL C 1.02.0.0 rejects this saying
729      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
730   struct s { int j; const int *ap[3]; };
731   struct s *b; b->j = 5;
732 }
733 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
734   const int foo = 10;
735 }
736
737 ; return 0; }
738 EOF
739 if eval $ac_compile; then
740   rm -rf conftest*
741   ac_cv_c_const=yes
742 else
743   rm -rf conftest*
744   ac_cv_c_const=no
745 fi
746 rm -f conftest*
747
748 fi
749 echo "$ac_t""$ac_cv_c_const" 1>&6
750 if test $ac_cv_c_const = no; then
751   cat >> confdefs.h <<\EOF
752 #define const 
753 EOF
754
755 fi
756
757 test "$ac_cv_c_const" = no && echo  X 'const' '' >> defines.out
758
759   if test "$size_t_defed" != 1 ; then
760    ac_safe=`echo "stddef.h" | tr './\055' '___'`
761 echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
763   echo $ac_n "(cached) $ac_c" 1>&6
764 else
765   cat > conftest.$ac_ext <<EOF
766 #line 764 "configure"
767 #include "confdefs.h"
768 #include <stddef.h>
769 EOF
770 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
771 ac_err=`grep -v '^ *+' conftest.out`
772 if test -z "$ac_err"; then
773   rm -rf conftest*
774   eval "ac_cv_header_$ac_safe=yes"
775 else
776   echo "$ac_err" >&5
777   rm -rf conftest*
778   eval "ac_cv_header_$ac_safe=no"
779 fi
780 rm -f conftest*
781 fi
782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
783   echo "$ac_t""yes" 1>&6
784   size_t_header=ok
785 else
786   echo "$ac_t""no" 1>&6
787 fi
788
789    if test "$size_t_header" = ok ; then
790    cat > conftest.$ac_ext <<EOF
791 #line 789 "configure"
792 #include "confdefs.h"
793
794 #include <stddef.h>
795 int main() { return 0; }
796 int t() {
797 size_t *n ;
798
799 ; return 0; }
800 EOF
801 if eval $ac_compile; then
802   rm -rf conftest*
803   size_t_defed=1;
804 echo  X 'SIZE_T_STDDEF_H' '1' >> defines.out
805 echo getting size_t from '<stddef.h>'
806 fi
807 rm -f conftest*
808
809 fi;fi
810
811   if test "$size_t_defed" != 1 ; then
812    ac_safe=`echo "sys/types.h" | tr './\055' '___'`
813 echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6
814 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
815   echo $ac_n "(cached) $ac_c" 1>&6
816 else
817   cat > conftest.$ac_ext <<EOF
818 #line 816 "configure"
819 #include "confdefs.h"
820 #include <sys/types.h>
821 EOF
822 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
823 ac_err=`grep -v '^ *+' conftest.out`
824 if test -z "$ac_err"; then
825   rm -rf conftest*
826   eval "ac_cv_header_$ac_safe=yes"
827 else
828   echo "$ac_err" >&5
829   rm -rf conftest*
830   eval "ac_cv_header_$ac_safe=no"
831 fi
832 rm -f conftest*
833 fi
834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
835   echo "$ac_t""yes" 1>&6
836   size_t_header=ok
837 else
838   echo "$ac_t""no" 1>&6
839 fi
840
841    if test "$size_t_header" = ok ; then
842    cat > conftest.$ac_ext <<EOF
843 #line 841 "configure"
844 #include "confdefs.h"
845
846 #include <sys/types.h>
847 int main() { return 0; }
848 int t() {
849 size_t *n ;
850
851 ; return 0; }
852 EOF
853 if eval $ac_compile; then
854   rm -rf conftest*
855   size_t_defed=1;
856 echo  X 'SIZE_T_TYPES_H' '1' >> defines.out
857 echo getting size_t from '<sys/types.h>'
858 fi
859 rm -f conftest*
860
861 fi;fi
862 ac_safe=`echo "fcntl.h" | tr './\055' '___'`
863 echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6
864 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
865   echo $ac_n "(cached) $ac_c" 1>&6
866 else
867   cat > conftest.$ac_ext <<EOF
868 #line 866 "configure"
869 #include "confdefs.h"
870 #include <fcntl.h>
871 EOF
872 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
873 ac_err=`grep -v '^ *+' conftest.out`
874 if test -z "$ac_err"; then
875   rm -rf conftest*
876   eval "ac_cv_header_$ac_safe=yes"
877 else
878   echo "$ac_err" >&5
879   rm -rf conftest*
880   eval "ac_cv_header_$ac_safe=no"
881 fi
882 rm -f conftest*
883 fi
884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
885   echo "$ac_t""yes" 1>&6
886   :
887 else
888   echo "$ac_t""no" 1>&6
889 cat >> confdefs.h <<\EOF
890 #define NO_FCNTL_H 1
891 EOF
892
893 echo  X 'NO_FCNTL_H' '1' >> defines.out
894 fi
895  
896 ac_safe=`echo "errno.h" | tr './\055' '___'`
897 echo $ac_n "checking for errno.h""... $ac_c" 1>&6
898 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
899   echo $ac_n "(cached) $ac_c" 1>&6
900 else
901   cat > conftest.$ac_ext <<EOF
902 #line 900 "configure"
903 #include "confdefs.h"
904 #include <errno.h>
905 EOF
906 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
907 ac_err=`grep -v '^ *+' conftest.out`
908 if test -z "$ac_err"; then
909   rm -rf conftest*
910   eval "ac_cv_header_$ac_safe=yes"
911 else
912   echo "$ac_err" >&5
913   rm -rf conftest*
914   eval "ac_cv_header_$ac_safe=no"
915 fi
916 rm -f conftest*
917 fi
918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
919   echo "$ac_t""yes" 1>&6
920   :
921 else
922   echo "$ac_t""no" 1>&6
923 cat >> confdefs.h <<\EOF
924 #define NO_ERRNO_H 1
925 EOF
926
927 echo  X 'NO_ERRNO_H' '1' >> defines.out
928 fi
929  
930 ac_safe=`echo "time.h" | tr './\055' '___'`
931 echo $ac_n "checking for time.h""... $ac_c" 1>&6
932 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
933   echo $ac_n "(cached) $ac_c" 1>&6
934 else
935   cat > conftest.$ac_ext <<EOF
936 #line 934 "configure"
937 #include "confdefs.h"
938 #include <time.h>
939 EOF
940 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
941 ac_err=`grep -v '^ *+' conftest.out`
942 if test -z "$ac_err"; then
943   rm -rf conftest*
944   eval "ac_cv_header_$ac_safe=yes"
945 else
946   echo "$ac_err" >&5
947   rm -rf conftest*
948   eval "ac_cv_header_$ac_safe=no"
949 fi
950 rm -f conftest*
951 fi
952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
953   echo "$ac_t""yes" 1>&6
954   :
955 else
956   echo "$ac_t""no" 1>&6
957 cat >> confdefs.h <<\EOF
958 #define NO_TIME_H 1
959 EOF
960
961 echo  X 'NO_TIME_H' '1' >> defines.out
962 fi
963  
964 ac_safe=`echo "stdarg.h" | tr './\055' '___'`
965 echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6
966 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   cat > conftest.$ac_ext <<EOF
970 #line 968 "configure"
971 #include "confdefs.h"
972 #include <stdarg.h>
973 EOF
974 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
975 ac_err=`grep -v '^ *+' conftest.out`
976 if test -z "$ac_err"; then
977   rm -rf conftest*
978   eval "ac_cv_header_$ac_safe=yes"
979 else
980   echo "$ac_err" >&5
981   rm -rf conftest*
982   eval "ac_cv_header_$ac_safe=no"
983 fi
984 rm -f conftest*
985 fi
986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
987   echo "$ac_t""yes" 1>&6
988   :
989 else
990   echo "$ac_t""no" 1>&6
991 cat >> confdefs.h <<\EOF
992 #define NO_STDARG_H 1
993 EOF
994
995 echo  X 'NO_STDARG_H' '1' >> defines.out
996 fi
997
998 echo $ac_n "checking for memcpy""... $ac_c" 1>&6
999 if eval "test \"`echo '$''{'ac_cv_func_memcpy'+set}'`\" = set"; then
1000   echo $ac_n "(cached) $ac_c" 1>&6
1001 else
1002   cat > conftest.$ac_ext <<EOF
1003 #line 1001 "configure"
1004 #include "confdefs.h"
1005 /* System header to define __stub macros and hopefully few prototypes,
1006     which can conflict with char memcpy(); below.  */
1007 #include <assert.h>
1008 /* Override any gcc2 internal prototype to avoid an error.  */
1009 char memcpy(); 
1010
1011 int main() { return 0; }
1012 int t() {
1013
1014 /* The GNU C library defines this for functions which it implements
1015     to always fail with ENOSYS.  Some functions are actually named
1016     something starting with __ and the normal name is an alias.  */
1017 #if defined (__stub_memcpy) || defined (__stub___memcpy)
1018 choke me
1019 #else
1020 memcpy();
1021 #endif
1022
1023 ; return 0; }
1024 EOF
1025 if eval $ac_link; then
1026   rm -rf conftest*
1027   eval "ac_cv_func_memcpy=yes"
1028 else
1029   rm -rf conftest*
1030   eval "ac_cv_func_memcpy=no"
1031 fi
1032 rm -f conftest*
1033
1034 fi
1035 if eval "test \"`echo '$ac_cv_func_'memcpy`\" = yes"; then
1036   echo "$ac_t""yes" 1>&6
1037   :
1038 else
1039   echo "$ac_t""no" 1>&6
1040 cat >> confdefs.h <<\EOF
1041 #define NO_MEMCPY 1
1042 EOF
1043
1044 echo  X 'NO_MEMCPY' '1' >> defines.out
1045 fi
1046  
1047 echo $ac_n "checking for strchr""... $ac_c" 1>&6
1048 if eval "test \"`echo '$''{'ac_cv_func_strchr'+set}'`\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051   cat > conftest.$ac_ext <<EOF
1052 #line 1050 "configure"
1053 #include "confdefs.h"
1054 /* System header to define __stub macros and hopefully few prototypes,
1055     which can conflict with char strchr(); below.  */
1056 #include <assert.h>
1057 /* Override any gcc2 internal prototype to avoid an error.  */
1058 char strchr(); 
1059
1060 int main() { return 0; }
1061 int t() {
1062
1063 /* The GNU C library defines this for functions which it implements
1064     to always fail with ENOSYS.  Some functions are actually named
1065     something starting with __ and the normal name is an alias.  */
1066 #if defined (__stub_strchr) || defined (__stub___strchr)
1067 choke me
1068 #else
1069 strchr();
1070 #endif
1071
1072 ; return 0; }
1073 EOF
1074 if eval $ac_link; then
1075   rm -rf conftest*
1076   eval "ac_cv_func_strchr=yes"
1077 else
1078   rm -rf conftest*
1079   eval "ac_cv_func_strchr=no"
1080 fi
1081 rm -f conftest*
1082
1083 fi
1084 if eval "test \"`echo '$ac_cv_func_'strchr`\" = yes"; then
1085   echo "$ac_t""yes" 1>&6
1086   :
1087 else
1088   echo "$ac_t""no" 1>&6
1089 cat >> confdefs.h <<\EOF
1090 #define NO_STRCHR 1
1091 EOF
1092
1093 echo  X 'NO_STRCHR' '1' >> defines.out
1094 fi
1095  
1096 echo $ac_n "checking for strerror""... $ac_c" 1>&6
1097 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
1098   echo $ac_n "(cached) $ac_c" 1>&6
1099 else
1100   cat > conftest.$ac_ext <<EOF
1101 #line 1099 "configure"
1102 #include "confdefs.h"
1103 /* System header to define __stub macros and hopefully few prototypes,
1104     which can conflict with char strerror(); below.  */
1105 #include <assert.h>
1106 /* Override any gcc2 internal prototype to avoid an error.  */
1107 char strerror(); 
1108
1109 int main() { return 0; }
1110 int t() {
1111
1112 /* The GNU C library defines this for functions which it implements
1113     to always fail with ENOSYS.  Some functions are actually named
1114     something starting with __ and the normal name is an alias.  */
1115 #if defined (__stub_strerror) || defined (__stub___strerror)
1116 choke me
1117 #else
1118 strerror();
1119 #endif
1120
1121 ; return 0; }
1122 EOF
1123 if eval $ac_link; then
1124   rm -rf conftest*
1125   eval "ac_cv_func_strerror=yes"
1126 else
1127   rm -rf conftest*
1128   eval "ac_cv_func_strerror=no"
1129 fi
1130 rm -f conftest*
1131
1132 fi
1133 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
1134   echo "$ac_t""yes" 1>&6
1135   :
1136 else
1137   echo "$ac_t""no" 1>&6
1138 cat >> confdefs.h <<\EOF
1139 #define NO_STRERROR 1
1140 EOF
1141
1142 echo  X 'NO_STRERROR' '1' >> defines.out
1143 fi
1144  
1145 echo $ac_n "checking for vfprintf""... $ac_c" 1>&6
1146 if eval "test \"`echo '$''{'ac_cv_func_vfprintf'+set}'`\" = set"; then
1147   echo $ac_n "(cached) $ac_c" 1>&6
1148 else
1149   cat > conftest.$ac_ext <<EOF
1150 #line 1148 "configure"
1151 #include "confdefs.h"
1152 /* System header to define __stub macros and hopefully few prototypes,
1153     which can conflict with char vfprintf(); below.  */
1154 #include <assert.h>
1155 /* Override any gcc2 internal prototype to avoid an error.  */
1156 char vfprintf(); 
1157
1158 int main() { return 0; }
1159 int t() {
1160
1161 /* The GNU C library defines this for functions which it implements
1162     to always fail with ENOSYS.  Some functions are actually named
1163     something starting with __ and the normal name is an alias.  */
1164 #if defined (__stub_vfprintf) || defined (__stub___vfprintf)
1165 choke me
1166 #else
1167 vfprintf();
1168 #endif
1169
1170 ; return 0; }
1171 EOF
1172 if eval $ac_link; then
1173   rm -rf conftest*
1174   eval "ac_cv_func_vfprintf=yes"
1175 else
1176   rm -rf conftest*
1177   eval "ac_cv_func_vfprintf=no"
1178 fi
1179 rm -f conftest*
1180
1181 fi
1182 if eval "test \"`echo '$ac_cv_func_'vfprintf`\" = yes"; then
1183   echo "$ac_t""yes" 1>&6
1184   :
1185 else
1186   echo "$ac_t""no" 1>&6
1187 cat >> confdefs.h <<\EOF
1188 #define NO_VFPRINTF 1
1189 EOF
1190
1191 echo  X 'NO_VFPRINTF' '1' >> defines.out
1192 fi
1193  
1194 echo $ac_n "checking for strtod""... $ac_c" 1>&6
1195 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftest.$ac_ext <<EOF
1199 #line 1197 "configure"
1200 #include "confdefs.h"
1201 /* System header to define __stub macros and hopefully few prototypes,
1202     which can conflict with char strtod(); below.  */
1203 #include <assert.h>
1204 /* Override any gcc2 internal prototype to avoid an error.  */
1205 char strtod(); 
1206
1207 int main() { return 0; }
1208 int t() {
1209
1210 /* The GNU C library defines this for functions which it implements
1211     to always fail with ENOSYS.  Some functions are actually named
1212     something starting with __ and the normal name is an alias.  */
1213 #if defined (__stub_strtod) || defined (__stub___strtod)
1214 choke me
1215 #else
1216 strtod();
1217 #endif
1218
1219 ; return 0; }
1220 EOF
1221 if eval $ac_link; then
1222   rm -rf conftest*
1223   eval "ac_cv_func_strtod=yes"
1224 else
1225   rm -rf conftest*
1226   eval "ac_cv_func_strtod=no"
1227 fi
1228 rm -f conftest*
1229
1230 fi
1231 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
1232   echo "$ac_t""yes" 1>&6
1233   :
1234 else
1235   echo "$ac_t""no" 1>&6
1236 cat >> confdefs.h <<\EOF
1237 #define NO_STRTOD 1
1238 EOF
1239
1240 echo  X 'NO_STRTOD' '1' >> defines.out
1241 fi
1242  
1243 echo $ac_n "checking for fmod""... $ac_c" 1>&6
1244 if eval "test \"`echo '$''{'ac_cv_func_fmod'+set}'`\" = set"; then
1245   echo $ac_n "(cached) $ac_c" 1>&6
1246 else
1247   cat > conftest.$ac_ext <<EOF
1248 #line 1246 "configure"
1249 #include "confdefs.h"
1250 /* System header to define __stub macros and hopefully few prototypes,
1251     which can conflict with char fmod(); below.  */
1252 #include <assert.h>
1253 /* Override any gcc2 internal prototype to avoid an error.  */
1254 char fmod(); 
1255
1256 int main() { return 0; }
1257 int t() {
1258
1259 /* The GNU C library defines this for functions which it implements
1260     to always fail with ENOSYS.  Some functions are actually named
1261     something starting with __ and the normal name is an alias.  */
1262 #if defined (__stub_fmod) || defined (__stub___fmod)
1263 choke me
1264 #else
1265 fmod();
1266 #endif
1267
1268 ; return 0; }
1269 EOF
1270 if eval $ac_link; then
1271   rm -rf conftest*
1272   eval "ac_cv_func_fmod=yes"
1273 else
1274   rm -rf conftest*
1275   eval "ac_cv_func_fmod=no"
1276 fi
1277 rm -f conftest*
1278
1279 fi
1280 if eval "test \"`echo '$ac_cv_func_'fmod`\" = yes"; then
1281   echo "$ac_t""yes" 1>&6
1282   :
1283 else
1284   echo "$ac_t""no" 1>&6
1285 cat >> confdefs.h <<\EOF
1286 #define NO_FMOD 1
1287 EOF
1288
1289 echo  X 'NO_FMOD' '1' >> defines.out
1290 fi
1291  
1292 echo $ac_n "checking for matherr""... $ac_c" 1>&6
1293 if eval "test \"`echo '$''{'ac_cv_func_matherr'+set}'`\" = set"; then
1294   echo $ac_n "(cached) $ac_c" 1>&6
1295 else
1296   cat > conftest.$ac_ext <<EOF
1297 #line 1295 "configure"
1298 #include "confdefs.h"
1299 /* System header to define __stub macros and hopefully few prototypes,
1300     which can conflict with char matherr(); below.  */
1301 #include <assert.h>
1302 /* Override any gcc2 internal prototype to avoid an error.  */
1303 char matherr(); 
1304
1305 int main() { return 0; }
1306 int t() {
1307
1308 /* The GNU C library defines this for functions which it implements
1309     to always fail with ENOSYS.  Some functions are actually named
1310     something starting with __ and the normal name is an alias.  */
1311 #if defined (__stub_matherr) || defined (__stub___matherr)
1312 choke me
1313 #else
1314 matherr();
1315 #endif
1316
1317 ; return 0; }
1318 EOF
1319 if eval $ac_link; then
1320   rm -rf conftest*
1321   eval "ac_cv_func_matherr=yes"
1322 else
1323   rm -rf conftest*
1324   eval "ac_cv_func_matherr=no"
1325 fi
1326 rm -f conftest*
1327
1328 fi
1329 if eval "test \"`echo '$ac_cv_func_'matherr`\" = yes"; then
1330   echo "$ac_t""yes" 1>&6
1331   :
1332 else
1333   echo "$ac_t""no" 1>&6
1334 cat >> confdefs.h <<\EOF
1335 #define NO_MATHERR 1
1336 EOF
1337
1338 echo  X 'NO_MATHERR' '1' >> defines.out
1339 fi
1340
1341 cat > conftest.$ac_ext <<EOF
1342 #line 1340 "configure"
1343 #include "confdefs.h"
1344 #include <stdio.h>
1345 EOF
1346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1347   egrep "[^v]fprintf" >/dev/null 2>&1; then
1348   :
1349 else
1350   rm -rf conftest*
1351   cat >> confdefs.h <<\EOF
1352 #define NO_FPRINTF_IN_STDIO 1
1353 EOF
1354
1355 echo  X 'NO_FPRINTF_IN_STDIO' '1' >> defines.out
1356 fi
1357 rm -f conftest*
1358
1359 cat > conftest.$ac_ext <<EOF
1360 #line 1358 "configure"
1361 #include "confdefs.h"
1362 #include <stdio.h>
1363 EOF
1364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1365   egrep "[^v]sprintf" >/dev/null 2>&1; then
1366   :
1367 else
1368   rm -rf conftest*
1369   cat >> confdefs.h <<\EOF
1370 #define NO_SPRINTF_IN_STDIO 1
1371 EOF
1372
1373 echo  X 'NO_SPRINTF_IN_STDIO' '1' >> defines.out
1374 fi
1375 rm -f conftest*
1376
1377 ac_safe=`echo "limits.h" | tr './\055' '___'`
1378 echo $ac_n "checking for limits.h""... $ac_c" 1>&6
1379 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1380   echo $ac_n "(cached) $ac_c" 1>&6
1381 else
1382   cat > conftest.$ac_ext <<EOF
1383 #line 1381 "configure"
1384 #include "confdefs.h"
1385 #include <limits.h>
1386 EOF
1387 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1388 ac_err=`grep -v '^ *+' conftest.out`
1389 if test -z "$ac_err"; then
1390   rm -rf conftest*
1391   eval "ac_cv_header_$ac_safe=yes"
1392 else
1393   echo "$ac_err" >&5
1394   rm -rf conftest*
1395   eval "ac_cv_header_$ac_safe=no"
1396 fi
1397 rm -f conftest*
1398 fi
1399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1400   echo "$ac_t""yes" 1>&6
1401   limits_h=yes
1402 else
1403   echo "$ac_t""no" 1>&6
1404 fi
1405
1406 if test "$limits_h" = yes ; then :
1407 else
1408 ac_safe=`echo "values.h" | tr './\055' '___'`
1409 echo $ac_n "checking for values.h""... $ac_c" 1>&6
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 1412 "configure"
1415 #include "confdefs.h"
1416 #include <values.h>
1417 EOF
1418 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1419 ac_err=`grep -v '^ *+' conftest.out`
1420 if test -z "$ac_err"; then
1421   rm -rf conftest*
1422   eval "ac_cv_header_$ac_safe=yes"
1423 else
1424   echo "$ac_err" >&5
1425   rm -rf conftest*
1426   eval "ac_cv_header_$ac_safe=no"
1427 fi
1428 rm -f conftest*
1429 fi
1430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1431   echo "$ac_t""yes" 1>&6
1432   values_h=yes
1433 else
1434   echo "$ac_t""no" 1>&6
1435 fi
1436
1437    if test "$values_h" = yes ; then
1438    # If we cannot run a trivial program, we must be cross compiling.
1439 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1440 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1441   echo $ac_n "(cached) $ac_c" 1>&6
1442 else
1443   if test "$cross_compiling" = yes; then
1444   ac_cv_c_cross=yes
1445 else
1446 cat > conftest.$ac_ext <<EOF
1447 #line 1445 "configure"
1448 #include "confdefs.h"
1449 main(){return(0);}
1450 EOF
1451 eval $ac_link
1452 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1453   ac_cv_c_cross=no
1454 else
1455   ac_cv_c_cross=yes
1456 fi
1457 fi
1458 rm -fr conftest*
1459 fi
1460 cross_compiling=$ac_cv_c_cross
1461 echo "$ac_t""$ac_cv_c_cross" 1>&6
1462
1463 if test "$cross_compiling" = yes; then
1464     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1465 else
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1465 "configure"
1468 #include "confdefs.h"
1469 #include <values.h>
1470 #include <stdio.h>
1471 int main()
1472 {   FILE *out = fopen("maxint.out", "w") ;
1473     if ( ! out ) exit(1) ;
1474     fprintf(out, "X MAX__INT 0x%x\n", MAXINT) ;
1475     fprintf(out, "X MAX__LONG 0x%lx\n", MAXLONG) ;
1476     exit(0) ; return(0) ;
1477 }
1478
1479 EOF
1480 eval $ac_link
1481 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1482   maxint_set=1
1483 else
1484   { echo "configure: error: C program to compute maxint and maxlong failed.
1485 Please send bug report to brennan@whidbey.com." 1>&2; exit 1; }
1486 fi
1487 fi
1488 rm -fr conftest*
1489    fi
1490 if test "$maxint_set" != 1 ; then 
1491 # compute it  --  assumes two's complement
1492 if test "$cross_compiling" = yes; then
1493     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1494 else
1495 cat > conftest.$ac_ext <<EOF
1496 #line 1494 "configure"
1497 #include "confdefs.h"
1498 #include <stdio.h>
1499 int main()
1500 { int y ; long yy ;
1501   FILE *out ;
1502
1503     if ( !(out = fopen("maxint.out","w")) ) exit(1) ;
1504     /* find max int and max long */
1505     y = 0x1000 ;
1506     while ( y > 0 ) y *= 2 ;
1507     fprintf(out,"X MAX__INT 0x%x\n", y-1) ;
1508     yy = 0x1000 ;
1509     while ( yy > 0 ) yy *= 2 ;
1510     fprintf(out,"X MAX__LONG 0x%lx\n", yy-1) ;
1511     exit(0) ;
1512     return 0 ;
1513  }
1514 EOF
1515 eval $ac_link
1516 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1517   :
1518 else
1519   { echo "configure: error: C program to compute maxint and maxlong failed.
1520 Please send bug report to brennan@whidbey.com." 1>&2; exit 1; }
1521 fi
1522 fi
1523 rm -fr conftest*
1524 fi
1525 cat maxint.out >> defines.out ; rm -f maxint.out
1526 fi ;
1527 if echo "$USER_DEFINES" | grep FPE_TRAPS_ON >/dev/null
1528 then echo skipping fpe tests based on '$'USER_DEFINES
1529 else
1530 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1531 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1532   echo $ac_n "(cached) $ac_c" 1>&6
1533 else
1534   cat > conftest.$ac_ext <<EOF
1535 #line 1533 "configure"
1536 #include "confdefs.h"
1537 #include <sys/types.h>
1538 #include <signal.h>
1539 #ifdef signal
1540 #undef signal
1541 #endif
1542 #ifdef __cplusplus
1543 extern "C"
1544 #endif
1545 void (*signal ()) ();
1546 int main() { return 0; }
1547 int t() {
1548 int i;
1549 ; return 0; }
1550 EOF
1551 if eval $ac_compile; then
1552   rm -rf conftest*
1553   ac_cv_type_signal=void
1554 else
1555   rm -rf conftest*
1556   ac_cv_type_signal=int
1557 fi
1558 rm -f conftest*
1559
1560 fi
1561 echo "$ac_t""$ac_cv_type_signal" 1>&6
1562 cat >> confdefs.h <<EOF
1563 #define RETSIGTYPE $ac_cv_type_signal
1564 EOF
1565
1566
1567
1568 echo checking handling of floating point exceptions
1569 rm -f fpe_check
1570 $CC $CFLAGS -DRETSIGTYPE=$ac_cv_type_signal -o fpe_check fpe_check.c $MATHLIB
1571 if test -f fpe_check  ; then
1572    ./fpe_check 2>/dev/null
1573    status=$?
1574 else 
1575    echo fpe_check.c failed to compile 1>&2
1576    status=100
1577 fi
1578
1579 case $status in
1580    0)  ;;  # good news do nothing
1581    3)      # reasonably good news
1582 cat >> confdefs.h <<\EOF
1583 #define FPE_TRAPS_ON 1
1584 EOF
1585
1586 echo  X 'FPE_TRAPS_ON' '1' >> defines.out
1587 echo $ac_n "checking for sigaction""... $ac_c" 1>&6
1588 if eval "test \"`echo '$''{'ac_cv_func_sigaction'+set}'`\" = set"; then
1589   echo $ac_n "(cached) $ac_c" 1>&6
1590 else
1591   cat > conftest.$ac_ext <<EOF
1592 #line 1590 "configure"
1593 #include "confdefs.h"
1594 /* System header to define __stub macros and hopefully few prototypes,
1595     which can conflict with char sigaction(); below.  */
1596 #include <assert.h>
1597 /* Override any gcc2 internal prototype to avoid an error.  */
1598 char sigaction(); 
1599
1600 int main() { return 0; }
1601 int t() {
1602
1603 /* The GNU C library defines this for functions which it implements
1604     to always fail with ENOSYS.  Some functions are actually named
1605     something starting with __ and the normal name is an alias.  */
1606 #if defined (__stub_sigaction) || defined (__stub___sigaction)
1607 choke me
1608 #else
1609 sigaction();
1610 #endif
1611
1612 ; return 0; }
1613 EOF
1614 if eval $ac_link; then
1615   rm -rf conftest*
1616   eval "ac_cv_func_sigaction=yes"
1617 else
1618   rm -rf conftest*
1619   eval "ac_cv_func_sigaction=no"
1620 fi
1621 rm -f conftest*
1622
1623 fi
1624 if eval "test \"`echo '$ac_cv_func_'sigaction`\" = yes"; then
1625   echo "$ac_t""yes" 1>&6
1626   sigaction=1
1627 else
1628   echo "$ac_t""no" 1>&6
1629 fi
1630
1631 ac_safe=`echo "siginfo.h" | tr './\055' '___'`
1632 echo $ac_n "checking for siginfo.h""... $ac_c" 1>&6
1633 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1634   echo $ac_n "(cached) $ac_c" 1>&6
1635 else
1636   cat > conftest.$ac_ext <<EOF
1637 #line 1635 "configure"
1638 #include "confdefs.h"
1639 #include <siginfo.h>
1640 EOF
1641 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1642 ac_err=`grep -v '^ *+' conftest.out`
1643 if test -z "$ac_err"; then
1644   rm -rf conftest*
1645   eval "ac_cv_header_$ac_safe=yes"
1646 else
1647   echo "$ac_err" >&5
1648   rm -rf conftest*
1649   eval "ac_cv_header_$ac_safe=no"
1650 fi
1651 rm -f conftest*
1652 fi
1653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1654   echo "$ac_t""yes" 1>&6
1655   siginfo_h=1
1656 else
1657   echo "$ac_t""no" 1>&6
1658 fi
1659
1660 if test "$sigaction" = 1 && test "$siginfo_h" = 1 ; then
1661    cat >> confdefs.h <<\EOF
1662 #define SV_SIGINFO 1
1663 EOF
1664
1665 echo  X 'SV_SIGINFO' '1' >> defines.out
1666 else
1667    echo $ac_n "checking for sigvec""... $ac_c" 1>&6
1668 if eval "test \"`echo '$''{'ac_cv_func_sigvec'+set}'`\" = set"; then
1669   echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671   cat > conftest.$ac_ext <<EOF
1672 #line 1670 "configure"
1673 #include "confdefs.h"
1674 /* System header to define __stub macros and hopefully few prototypes,
1675     which can conflict with char sigvec(); below.  */
1676 #include <assert.h>
1677 /* Override any gcc2 internal prototype to avoid an error.  */
1678 char sigvec(); 
1679
1680 int main() { return 0; }
1681 int t() {
1682
1683 /* The GNU C library defines this for functions which it implements
1684     to always fail with ENOSYS.  Some functions are actually named
1685     something starting with __ and the normal name is an alias.  */
1686 #if defined (__stub_sigvec) || defined (__stub___sigvec)
1687 choke me
1688 #else
1689 sigvec();
1690 #endif
1691
1692 ; return 0; }
1693 EOF
1694 if eval $ac_link; then
1695   rm -rf conftest*
1696   eval "ac_cv_func_sigvec=yes"
1697 else
1698   rm -rf conftest*
1699   eval "ac_cv_func_sigvec=no"
1700 fi
1701 rm -f conftest*
1702
1703 fi
1704 if eval "test \"`echo '$ac_cv_func_'sigvec`\" = yes"; then
1705   echo "$ac_t""yes" 1>&6
1706   sigvec=1
1707 else
1708   echo "$ac_t""no" 1>&6
1709 fi
1710
1711    if test "$sigvec" = 1 && ./fpe_check phoney_arg >> defines.out ; then :
1712    else cat >> confdefs.h <<\EOF
1713 #define NOINFO_SIGFPE 1
1714 EOF
1715
1716 echo  X 'NOINFO_SIGFPE' '1' >> defines.out
1717    fi
1718 fi ;;
1719
1720    1|2|4)   # bad news have to turn off traps
1721             # only know how to do this on systemV and solaris
1722 ac_safe=`echo "ieeefp.h" | tr './\055' '___'`
1723 echo $ac_n "checking for ieeefp.h""... $ac_c" 1>&6
1724 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1725   echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727   cat > conftest.$ac_ext <<EOF
1728 #line 1726 "configure"
1729 #include "confdefs.h"
1730 #include <ieeefp.h>
1731 EOF
1732 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1733 ac_err=`grep -v '^ *+' conftest.out`
1734 if test -z "$ac_err"; then
1735   rm -rf conftest*
1736   eval "ac_cv_header_$ac_safe=yes"
1737 else
1738   echo "$ac_err" >&5
1739   rm -rf conftest*
1740   eval "ac_cv_header_$ac_safe=no"
1741 fi
1742 rm -f conftest*
1743 fi
1744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1745   echo "$ac_t""yes" 1>&6
1746   ieeefp_h=1
1747 else
1748   echo "$ac_t""no" 1>&6
1749 fi
1750
1751 echo $ac_n "checking for fpsetmask""... $ac_c" 1>&6
1752 if eval "test \"`echo '$''{'ac_cv_func_fpsetmask'+set}'`\" = set"; then
1753   echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755   cat > conftest.$ac_ext <<EOF
1756 #line 1754 "configure"
1757 #include "confdefs.h"
1758 /* System header to define __stub macros and hopefully few prototypes,
1759     which can conflict with char fpsetmask(); below.  */
1760 #include <assert.h>
1761 /* Override any gcc2 internal prototype to avoid an error.  */
1762 char fpsetmask(); 
1763
1764 int main() { return 0; }
1765 int t() {
1766
1767 /* The GNU C library defines this for functions which it implements
1768     to always fail with ENOSYS.  Some functions are actually named
1769     something starting with __ and the normal name is an alias.  */
1770 #if defined (__stub_fpsetmask) || defined (__stub___fpsetmask)
1771 choke me
1772 #else
1773 fpsetmask();
1774 #endif
1775
1776 ; return 0; }
1777 EOF
1778 if eval $ac_link; then
1779   rm -rf conftest*
1780   eval "ac_cv_func_fpsetmask=yes"
1781 else
1782   rm -rf conftest*
1783   eval "ac_cv_func_fpsetmask=no"
1784 fi
1785 rm -f conftest*
1786
1787 fi
1788 if eval "test \"`echo '$ac_cv_func_'fpsetmask`\" = yes"; then
1789   echo "$ac_t""yes" 1>&6
1790   fpsetmask=1
1791 else
1792   echo "$ac_t""no" 1>&6
1793 fi
1794
1795 if test "$ieeefp_h" = 1 && test "$fpsetmask" = 1 ; then
1796 cat >> confdefs.h <<\EOF
1797 #define FPE_TRAPS_ON 1
1798 EOF
1799
1800 echo  X 'FPE_TRAPS_ON' '1' >> defines.out
1801 cat >> confdefs.h <<\EOF
1802 #define USE_IEEEFP_H 1
1803 EOF
1804
1805 echo  X 'USE_IEEEFP_H' '1' >> defines.out
1806 echo  X 'TURN_ON_FPE_TRAPS()' 'fpsetmask(fpgetmask()|FP_X_DZ|FP_X_OFL)' >> defines.out
1807 echo $ac_n "checking for sigaction""... $ac_c" 1>&6
1808 if eval "test \"`echo '$''{'ac_cv_func_sigaction'+set}'`\" = set"; then
1809   echo $ac_n "(cached) $ac_c" 1>&6
1810 else
1811   cat > conftest.$ac_ext <<EOF
1812 #line 1810 "configure"
1813 #include "confdefs.h"
1814 /* System header to define __stub macros and hopefully few prototypes,
1815     which can conflict with char sigaction(); below.  */
1816 #include <assert.h>
1817 /* Override any gcc2 internal prototype to avoid an error.  */
1818 char sigaction(); 
1819
1820 int main() { return 0; }
1821 int t() {
1822
1823 /* The GNU C library defines this for functions which it implements
1824     to always fail with ENOSYS.  Some functions are actually named
1825     something starting with __ and the normal name is an alias.  */
1826 #if defined (__stub_sigaction) || defined (__stub___sigaction)
1827 choke me
1828 #else
1829 sigaction();
1830 #endif
1831
1832 ; return 0; }
1833 EOF
1834 if eval $ac_link; then
1835   rm -rf conftest*
1836   eval "ac_cv_func_sigaction=yes"
1837 else
1838   rm -rf conftest*
1839   eval "ac_cv_func_sigaction=no"
1840 fi
1841 rm -f conftest*
1842
1843 fi
1844 if eval "test \"`echo '$ac_cv_func_'sigaction`\" = yes"; then
1845   echo "$ac_t""yes" 1>&6
1846   sigaction=1
1847 else
1848   echo "$ac_t""no" 1>&6
1849 fi
1850
1851 ac_safe=`echo "siginfo.h" | tr './\055' '___'`
1852 echo $ac_n "checking for siginfo.h""... $ac_c" 1>&6
1853 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1854   echo $ac_n "(cached) $ac_c" 1>&6
1855 else
1856   cat > conftest.$ac_ext <<EOF
1857 #line 1855 "configure"
1858 #include "confdefs.h"
1859 #include <siginfo.h>
1860 EOF
1861 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1862 ac_err=`grep -v '^ *+' conftest.out`
1863 if test -z "$ac_err"; then
1864   rm -rf conftest*
1865   eval "ac_cv_header_$ac_safe=yes"
1866 else
1867   echo "$ac_err" >&5
1868   rm -rf conftest*
1869   eval "ac_cv_header_$ac_safe=no"
1870 fi
1871 rm -f conftest*
1872 fi
1873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1874   echo "$ac_t""yes" 1>&6
1875   siginfo_h=1
1876 else
1877   echo "$ac_t""no" 1>&6
1878 fi
1879
1880 if test "$sigaction" = 1 && test "$siginfo_h" = 1 ; then
1881    cat >> confdefs.h <<\EOF
1882 #define SV_SIGINFO 1
1883 EOF
1884
1885 echo  X 'SV_SIGINFO' '1' >> defines.out
1886 else
1887    echo $ac_n "checking for sigvec""... $ac_c" 1>&6
1888 if eval "test \"`echo '$''{'ac_cv_func_sigvec'+set}'`\" = set"; then
1889   echo $ac_n "(cached) $ac_c" 1>&6
1890 else
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1890 "configure"
1893 #include "confdefs.h"
1894 /* System header to define __stub macros and hopefully few prototypes,
1895     which can conflict with char sigvec(); below.  */
1896 #include <assert.h>
1897 /* Override any gcc2 internal prototype to avoid an error.  */
1898 char sigvec(); 
1899
1900 int main() { return 0; }
1901 int t() {
1902
1903 /* The GNU C library defines this for functions which it implements
1904     to always fail with ENOSYS.  Some functions are actually named
1905     something starting with __ and the normal name is an alias.  */
1906 #if defined (__stub_sigvec) || defined (__stub___sigvec)
1907 choke me
1908 #else
1909 sigvec();
1910 #endif
1911
1912 ; return 0; }
1913 EOF
1914 if eval $ac_link; then
1915   rm -rf conftest*
1916   eval "ac_cv_func_sigvec=yes"
1917 else
1918   rm -rf conftest*
1919   eval "ac_cv_func_sigvec=no"
1920 fi
1921 rm -f conftest*
1922
1923 fi
1924 if eval "test \"`echo '$ac_cv_func_'sigvec`\" = yes"; then
1925   echo "$ac_t""yes" 1>&6
1926   sigvec=1
1927 else
1928   echo "$ac_t""no" 1>&6
1929 fi
1930
1931    if test "$sigvec" = 1 && ./fpe_check phoney_arg >> defines.out ; then :
1932    else cat >> confdefs.h <<\EOF
1933 #define NOINFO_SIGFPE 1
1934 EOF
1935
1936 echo  X 'NOINFO_SIGFPE' '1' >> defines.out
1937    fi
1938 fi 
1939 # look for strtod overflow bug
1940 echo $ac_n "checking strtod bug on overflow""... $ac_c" 1>&6
1941 rm -f fpe_check
1942 $CC $CFLAGS -DRETSIGTYPE=$ac_cv_type_signal -DUSE_IEEEFP_H \
1943             -o fpe_check fpe_check.c $MATHLIB
1944 if ./fpe_check phoney_arg phoney_arg 2>/dev/null
1945 then 
1946    echo "$ac_t""no bug" 1>&6
1947 else
1948    echo "$ac_t""buggy -- will use work around" 1>&6
1949    echo  X 'HAVE_STRTOD_OVF_BUG' '1' >> defines.out
1950 fi
1951
1952 else
1953    if test $status != 4 ; then
1954       cat >> confdefs.h <<\EOF
1955 #define FPE_TRAPS_ON 1
1956 EOF
1957
1958 echo  X 'FPE_TRAPS_ON' '1' >> defines.out
1959       echo $ac_n "checking for sigaction""... $ac_c" 1>&6
1960 if eval "test \"`echo '$''{'ac_cv_func_sigaction'+set}'`\" = set"; then
1961   echo $ac_n "(cached) $ac_c" 1>&6
1962 else
1963   cat > conftest.$ac_ext <<EOF
1964 #line 1962 "configure"
1965 #include "confdefs.h"
1966 /* System header to define __stub macros and hopefully few prototypes,
1967     which can conflict with char sigaction(); below.  */
1968 #include <assert.h>
1969 /* Override any gcc2 internal prototype to avoid an error.  */
1970 char sigaction(); 
1971
1972 int main() { return 0; }
1973 int t() {
1974
1975 /* The GNU C library defines this for functions which it implements
1976     to always fail with ENOSYS.  Some functions are actually named
1977     something starting with __ and the normal name is an alias.  */
1978 #if defined (__stub_sigaction) || defined (__stub___sigaction)
1979 choke me
1980 #else
1981 sigaction();
1982 #endif
1983
1984 ; return 0; }
1985 EOF
1986 if eval $ac_link; then
1987   rm -rf conftest*
1988   eval "ac_cv_func_sigaction=yes"
1989 else
1990   rm -rf conftest*
1991   eval "ac_cv_func_sigaction=no"
1992 fi
1993 rm -f conftest*
1994
1995 fi
1996 if eval "test \"`echo '$ac_cv_func_'sigaction`\" = yes"; then
1997   echo "$ac_t""yes" 1>&6
1998   sigaction=1
1999 else
2000   echo "$ac_t""no" 1>&6
2001 fi
2002
2003 ac_safe=`echo "siginfo.h" | tr './\055' '___'`
2004 echo $ac_n "checking for siginfo.h""... $ac_c" 1>&6
2005 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2006   echo $ac_n "(cached) $ac_c" 1>&6
2007 else
2008   cat > conftest.$ac_ext <<EOF
2009 #line 2007 "configure"
2010 #include "confdefs.h"
2011 #include <siginfo.h>
2012 EOF
2013 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2014 ac_err=`grep -v '^ *+' conftest.out`
2015 if test -z "$ac_err"; then
2016   rm -rf conftest*
2017   eval "ac_cv_header_$ac_safe=yes"
2018 else
2019   echo "$ac_err" >&5
2020   rm -rf conftest*
2021   eval "ac_cv_header_$ac_safe=no"
2022 fi
2023 rm -f conftest*
2024 fi
2025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026   echo "$ac_t""yes" 1>&6
2027   siginfo_h=1
2028 else
2029   echo "$ac_t""no" 1>&6
2030 fi
2031
2032 if test "$sigaction" = 1 && test "$siginfo_h" = 1 ; then
2033    cat >> confdefs.h <<\EOF
2034 #define SV_SIGINFO 1
2035 EOF
2036
2037 echo  X 'SV_SIGINFO' '1' >> defines.out
2038 else
2039    echo $ac_n "checking for sigvec""... $ac_c" 1>&6
2040 if eval "test \"`echo '$''{'ac_cv_func_sigvec'+set}'`\" = set"; then
2041   echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043   cat > conftest.$ac_ext <<EOF
2044 #line 2042 "configure"
2045 #include "confdefs.h"
2046 /* System header to define __stub macros and hopefully few prototypes,
2047     which can conflict with char sigvec(); below.  */
2048 #include <assert.h>
2049 /* Override any gcc2 internal prototype to avoid an error.  */
2050 char sigvec(); 
2051
2052 int main() { return 0; }
2053 int t() {
2054
2055 /* The GNU C library defines this for functions which it implements
2056     to always fail with ENOSYS.  Some functions are actually named
2057     something starting with __ and the normal name is an alias.  */
2058 #if defined (__stub_sigvec) || defined (__stub___sigvec)
2059 choke me
2060 #else
2061 sigvec();
2062 #endif
2063
2064 ; return 0; }
2065 EOF
2066 if eval $ac_link; then
2067   rm -rf conftest*
2068   eval "ac_cv_func_sigvec=yes"
2069 else
2070   rm -rf conftest*
2071   eval "ac_cv_func_sigvec=no"
2072 fi
2073 rm -f conftest*
2074
2075 fi
2076 if eval "test \"`echo '$ac_cv_func_'sigvec`\" = yes"; then
2077   echo "$ac_t""yes" 1>&6
2078   sigvec=1
2079 else
2080   echo "$ac_t""no" 1>&6
2081 fi
2082
2083    if test "$sigvec" = 1 && ./fpe_check phoney_arg >> defines.out ; then :
2084    else cat >> confdefs.h <<\EOF
2085 #define NOINFO_SIGFPE 1
2086 EOF
2087
2088 echo  X 'NOINFO_SIGFPE' '1' >> defines.out
2089    fi
2090 fi 
2091     fi
2092
2093     case $status in
2094     1) 
2095 cat 1>&2 <<'EOF'
2096 Warning: Your system defaults generate floating point exception 
2097 on divide by zero but not on overflow.  You need to 
2098 #define TURN_ON_FPE_TRAPS() to handle overflow.
2099 Please report this so I can fix this script to do it automatically.
2100 EOF
2101 ;;
2102     2)
2103 cat 1>&2 <<'EOF'
2104 Warning: Your system defaults generate floating point exception 
2105 on overflow  but not on divide by zero.  You need to 
2106 #define TURN_ON_FPE_TRAPS() to handle divide by zero.
2107 Please report this so I can fix this script to do it automatically.
2108 EOF
2109 ;;
2110     4)
2111 cat 1>&2 <<'EOF'
2112 Warning: Your system defaults do not generate floating point
2113 exceptions, but your math library does not support this behavior.
2114 You need to
2115 #define TURN_ON_FPE_TRAPS() to use fp exceptions for consistency.
2116 Please report this so I can fix this script to do it automatically.
2117 EOF
2118 ;;
2119     esac
2120 echo brennan@whidbey.com
2121 echo You can continue with the build and the resulting mawk will be
2122 echo useable, but getting FPE_TRAPS_ON correct eventually is best.
2123 fi  ;;
2124
2125   *)  # some sort of disaster
2126 cat 1>&2 <<'EOF'
2127 The program `fpe_check' compiled from fpe_check.c seems to have
2128 unexpectly blown up.  Please report this to brennan@whidbey.com.
2129 EOF
2130 # quit or not ???
2131 ;;
2132 esac 
2133 rm -f fpe_check  # whew!!
2134 fi
2135 # output config.h
2136 rm -f config.h
2137 (
2138 cat<<'EOF'
2139 /* config.h -- generated by configure */
2140 #ifndef CONFIG_H
2141 #define CONFIG_H
2142
2143 EOF
2144 sed 's/^X/#define/' defines.out
2145 cat<<'EOF'
2146
2147 #define HAVE_REAL_PIPES 1
2148 #endif /* CONFIG_H */
2149 EOF
2150 ) | tee config.h
2151 rm defines.out
2152 trap '' 1 2 15
2153 cat > confcache <<\EOF
2154 # This file is a shell script that caches the results of configure
2155 # tests run on this system so they can be shared between configure
2156 # scripts and configure runs.  It is not useful on other systems.
2157 # If it contains results you don't want to keep, you may remove or edit it.
2158 #
2159 # By default, configure uses ./config.cache as the cache file,
2160 # creating it if it does not exist already.  You can give configure
2161 # the --cache-file=FILE option to use a different cache file; that is
2162 # what configure does when it calls configure scripts in
2163 # subdirectories, so they share the cache.
2164 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2165 # config.status only pays attention to the cache file if you give it the
2166 # --recheck option to rerun configure.
2167 #
2168 EOF
2169 # Ultrix sh set writes to stderr and can't be redirected directly,
2170 # and sets the high bit in the cache file unless we assign to the vars.
2171 (set) 2>&1 |
2172   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2173   >> confcache
2174 if cmp -s $cache_file confcache; then
2175   :
2176 else
2177   if test -w $cache_file; then
2178     echo "updating cache $cache_file"
2179     cat confcache > $cache_file
2180   else
2181     echo "not updating unwritable cache $cache_file"
2182   fi
2183 fi
2184 rm -f confcache
2185
2186 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2187
2188 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2189 # Let make expand exec_prefix.
2190 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2191
2192 # Any assignment to VPATH causes Sun make to only execute
2193 # the first set of double-colon rules, so remove it if not needed.
2194 # If there is a colon in the path, we need to keep it.
2195 if test "x$srcdir" = x.; then
2196   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2197 fi
2198
2199 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2200
2201 # Transform confdefs.h into DEFS.
2202 # Protect against shell expansion while executing Makefile rules.
2203 # Protect against Makefile macro expansion.
2204 cat > conftest.defs <<\EOF
2205 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2206 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2207 s%\[%\\&%g
2208 s%\]%\\&%g
2209 s%\$%$$%g
2210 EOF
2211 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2212 rm -f conftest.defs
2213
2214
2215 # Without the "./", some shells look in PATH for config.status.
2216 : ${CONFIG_STATUS=./config.status}
2217
2218 echo creating $CONFIG_STATUS
2219 rm -f $CONFIG_STATUS
2220 cat > $CONFIG_STATUS <<EOF
2221 #! /bin/sh
2222 # Generated automatically by configure.
2223 # Run this file to recreate the current configuration.
2224 # This directory was configured as follows,
2225 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2226 #
2227 # $0 $ac_configure_args
2228 #
2229 # Compiler output produced by configure, useful for debugging
2230 # configure, is in ./config.log if it exists.
2231
2232 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2233 for ac_option
2234 do
2235   case "\$ac_option" in
2236   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2237     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2238     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2239   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2240     echo "$CONFIG_STATUS generated by autoconf version 2.4"
2241     exit 0 ;;
2242   -help | --help | --hel | --he | --h)
2243     echo "\$ac_cs_usage"; exit 0 ;;
2244   *) echo "\$ac_cs_usage"; exit 1 ;;
2245   esac
2246 done
2247
2248 ac_given_srcdir=$srcdir
2249
2250 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2251
2252 # Protect against being on the right side of a sed subst in config.status. 
2253 sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
2254  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2255 $ac_vpsub
2256 $extrasub
2257 s%@CFLAGS@%$CFLAGS%g
2258 s%@CPPFLAGS@%$CPPFLAGS%g
2259 s%@CXXFLAGS@%$CXXFLAGS%g
2260 s%@DEFS@%$DEFS%g
2261 s%@LDFLAGS@%$LDFLAGS%g
2262 s%@LIBS@%$LIBS%g
2263 s%@exec_prefix@%$exec_prefix%g
2264 s%@prefix@%$prefix%g
2265 s%@program_transform_name@%$program_transform_name%g
2266 s%@BINDIR@%$BINDIR%g
2267 s%@MANDIR@%$MANDIR%g
2268 s%@MANEXT@%$MANEXT%g
2269 s%@CC@%$CC%g
2270 s%@CPP@%$CPP%g
2271 s%@MATHLIB@%$MATHLIB%g
2272 s%@YACC@%$YACC%g
2273
2274 CEOF
2275 EOF
2276 cat >> $CONFIG_STATUS <<EOF
2277
2278 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2279 EOF
2280 cat >> $CONFIG_STATUS <<\EOF
2281 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2282   # Support "outfile[:infile]", defaulting infile="outfile.in".
2283   case "$ac_file" in
2284   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2285        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2286   *) ac_file_in="${ac_file}.in" ;;
2287   esac
2288
2289   # Adjust relative srcdir, etc. for subdirectories.
2290
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     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2297     # A "../" for each directory in $ac_dir_suffix.
2298     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2299   else
2300     ac_dir_suffix= ac_dots=
2301   fi
2302
2303   case "$ac_given_srcdir" in
2304   .)  srcdir=.
2305       if test -z "$ac_dots"; then top_srcdir=.
2306       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2307   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2308   *) # Relative path.
2309     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2310     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2311   esac
2312
2313   echo creating "$ac_file"
2314   rm -f "$ac_file"
2315   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2316   case "$ac_file" in
2317   *Makefile*) ac_comsub="1i\\
2318 # $configure_input" ;;
2319   *) ac_comsub= ;;
2320   esac
2321   sed -e "$ac_comsub
2322 s%@configure_input@%$configure_input%g
2323 s%@srcdir@%$srcdir%g
2324 s%@top_srcdir@%$top_srcdir%g
2325 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2326 fi; done
2327 rm -f conftest.subs
2328
2329
2330
2331 exit 0
2332 EOF
2333 chmod +x $CONFIG_STATUS
2334 rm -fr confdefs* $ac_clean_files
2335 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2336