home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / configure < prev    next >
Text File  |  1997-05-13  |  89KB  |  3,164 lines

  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.   --enable-bitops    Enable Octal and Hex constants and bit functions"
  16. ac_help="$ac_help
  17.   --enable-non-decimal-data    Enable Octal and Hex constants as valid input data"
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40. bindir='${exec_prefix}/bin'
  41. sbindir='${exec_prefix}/sbin'
  42. libexecdir='${exec_prefix}/libexec'
  43. datadir='${prefix}/share'
  44. sysconfdir='${prefix}/etc'
  45. sharedstatedir='${prefix}/com'
  46. localstatedir='${prefix}/var'
  47. libdir='${exec_prefix}/lib'
  48. includedir='${prefix}/include'
  49. oldincludedir='/usr/include'
  50. infodir='${prefix}/info'
  51. mandir='${prefix}/man'
  52.  
  53. # Initialize some other variables.
  54. subdirs=
  55. MFLAGS= MAKEFLAGS=
  56. # Maximum number of lines to put in a shell here document.
  57. ac_max_here_lines=12
  58.  
  59. ac_prev=
  60. for ac_option
  61. do
  62.  
  63.   # If the previous option needs an argument, assign it.
  64.   if test -n "$ac_prev"; then
  65.     eval "$ac_prev=\$ac_option"
  66.     ac_prev=
  67.     continue
  68.   fi
  69.  
  70.   case "$ac_option" in
  71.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  72.   *) ac_optarg= ;;
  73.   esac
  74.  
  75.   # Accept the important Cygnus configure options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.  
  79.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  80.     ac_prev=bindir ;;
  81.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  82.     bindir="$ac_optarg" ;;
  83.  
  84.   -build | --build | --buil | --bui | --bu)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  90.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  91.     ac_prev=cache_file ;;
  92.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  93.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  94.     cache_file="$ac_optarg" ;;
  95.  
  96.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  97.     ac_prev=datadir ;;
  98.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  99.   | --da=*)
  100.     datadir="$ac_optarg" ;;
  101.  
  102.   -disable-* | --disable-*)
  103.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  104.     # Reject names that are not valid shell variable names.
  105.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  106.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  107.     fi
  108.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  109.     eval "enable_${ac_feature}=no" ;;
  110.  
  111.   -enable-* | --enable-*)
  112.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  113.     # Reject names that are not valid shell variable names.
  114.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  115.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  116.     fi
  117.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  118.     case "$ac_option" in
  119.       *=*) ;;
  120.       *) ac_optarg=yes ;;
  121.     esac
  122.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  123.  
  124.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  125.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  126.   | --exec | --exe | --ex)
  127.     ac_prev=exec_prefix ;;
  128.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  129.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  130.   | --exec=* | --exe=* | --ex=*)
  131.     exec_prefix="$ac_optarg" ;;
  132.  
  133.   -gas | --gas | --ga | --g)
  134.     # Obsolete; use --with-gas.
  135.     with_gas=yes ;;
  136.  
  137.   -help | --help | --hel | --he)
  138.     # Omit some internal or obsolete options to make the list less imposing.
  139.     # This message is too long to be a string in the A/UX 3.1 sh.
  140.     cat << EOF
  141. Usage: configure [options] [host]
  142. Options: [defaults in brackets after descriptions]
  143. Configuration:
  144.   --cache-file=FILE       cache test results in FILE
  145.   --help                  print this message
  146.   --no-create             do not create output files
  147.   --quiet, --silent       do not print \`checking...' messages
  148.   --version               print the version of autoconf that created configure
  149. Directory and file names:
  150.   --prefix=PREFIX         install architecture-independent files in PREFIX
  151.                           [$ac_default_prefix]
  152.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  153.                           [same as prefix]
  154.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  155.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  156.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  157.   --datadir=DIR           read-only architecture-independent data in DIR
  158.                           [PREFIX/share]
  159.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  160.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  161.                           [PREFIX/com]
  162.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  163.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  164.   --includedir=DIR        C header files in DIR [PREFIX/include]
  165.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  166.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  167.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  168.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  169.   --program-prefix=PREFIX prepend PREFIX to installed program names
  170.   --program-suffix=SUFFIX append SUFFIX to installed program names
  171.   --program-transform-name=PROGRAM
  172.                           run sed PROGRAM on installed program names
  173. EOF
  174.     cat << EOF
  175. Host type:
  176.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  177.   --host=HOST             configure for HOST [guessed]
  178.   --target=TARGET         configure for TARGET [TARGET=HOST]
  179. Features and packages:
  180.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  181.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  182.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  183.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  184.   --x-includes=DIR        X include files are in DIR
  185.   --x-libraries=DIR       X library files are in DIR
  186. EOF
  187.     if test -n "$ac_help"; then
  188.       echo "--enable and --with options recognized:$ac_help"
  189.     fi
  190.     exit 0 ;;
  191.  
  192.   -host | --host | --hos | --ho)
  193.     ac_prev=host ;;
  194.   -host=* | --host=* | --hos=* | --ho=*)
  195.     host="$ac_optarg" ;;
  196.  
  197.   -includedir | --includedir | --includedi | --included | --include \
  198.   | --includ | --inclu | --incl | --inc)
  199.     ac_prev=includedir ;;
  200.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  201.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  202.     includedir="$ac_optarg" ;;
  203.  
  204.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  205.     ac_prev=infodir ;;
  206.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  207.     infodir="$ac_optarg" ;;
  208.  
  209.   -libdir | --libdir | --libdi | --libd)
  210.     ac_prev=libdir ;;
  211.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  212.     libdir="$ac_optarg" ;;
  213.  
  214.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  215.   | --libexe | --libex | --libe)
  216.     ac_prev=libexecdir ;;
  217.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  218.   | --libexe=* | --libex=* | --libe=*)
  219.     libexecdir="$ac_optarg" ;;
  220.  
  221.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  222.   | --localstate | --localstat | --localsta | --localst \
  223.   | --locals | --local | --loca | --loc | --lo)
  224.     ac_prev=localstatedir ;;
  225.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  226.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  227.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  228.     localstatedir="$ac_optarg" ;;
  229.  
  230.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  231.     ac_prev=mandir ;;
  232.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  233.     mandir="$ac_optarg" ;;
  234.  
  235.   -nfp | --nfp | --nf)
  236.     # Obsolete; use --without-fp.
  237.     with_fp=no ;;
  238.  
  239.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  240.   | --no-cr | --no-c)
  241.     no_create=yes ;;
  242.  
  243.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  244.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  245.     no_recursion=yes ;;
  246.  
  247.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  248.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  249.   | --oldin | --oldi | --old | --ol | --o)
  250.     ac_prev=oldincludedir ;;
  251.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  252.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  253.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  254.     oldincludedir="$ac_optarg" ;;
  255.  
  256.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  257.     ac_prev=prefix ;;
  258.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  259.     prefix="$ac_optarg" ;;
  260.  
  261.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  262.   | --program-pre | --program-pr | --program-p)
  263.     ac_prev=program_prefix ;;
  264.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  265.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  266.     program_prefix="$ac_optarg" ;;
  267.  
  268.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  269.   | --program-suf | --program-su | --program-s)
  270.     ac_prev=program_suffix ;;
  271.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  272.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  273.     program_suffix="$ac_optarg" ;;
  274.  
  275.   -program-transform-name | --program-transform-name \
  276.   | --program-transform-nam | --program-transform-na \
  277.   | --program-transform-n | --program-transform- \
  278.   | --program-transform | --program-transfor \
  279.   | --program-transfo | --program-transf \
  280.   | --program-trans | --program-tran \
  281.   | --progr-tra | --program-tr | --program-t)
  282.     ac_prev=program_transform_name ;;
  283.   -program-transform-name=* | --program-transform-name=* \
  284.   | --program-transform-nam=* | --program-transform-na=* \
  285.   | --program-transform-n=* | --program-transform-=* \
  286.   | --program-transform=* | --program-transfor=* \
  287.   | --program-transfo=* | --program-transf=* \
  288.   | --program-trans=* | --program-tran=* \
  289.   | --progr-tra=* | --program-tr=* | --program-t=*)
  290.     program_transform_name="$ac_optarg" ;;
  291.  
  292.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  293.   | -silent | --silent | --silen | --sile | --sil)
  294.     silent=yes ;;
  295.  
  296.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  297.     ac_prev=sbindir ;;
  298.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  299.   | --sbi=* | --sb=*)
  300.     sbindir="$ac_optarg" ;;
  301.  
  302.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  303.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  304.   | --sharedst | --shareds | --shared | --share | --shar \
  305.   | --sha | --sh)
  306.     ac_prev=sharedstatedir ;;
  307.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  308.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  309.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  310.   | --sha=* | --sh=*)
  311.     sharedstatedir="$ac_optarg" ;;
  312.  
  313.   -site | --site | --sit)
  314.     ac_prev=site ;;
  315.   -site=* | --site=* | --sit=*)
  316.     site="$ac_optarg" ;;
  317.  
  318.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  319.     ac_prev=srcdir ;;
  320.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  321.     srcdir="$ac_optarg" ;;
  322.  
  323.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  324.   | --syscon | --sysco | --sysc | --sys | --sy)
  325.     ac_prev=sysconfdir ;;
  326.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  327.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  328.     sysconfdir="$ac_optarg" ;;
  329.  
  330.   -target | --target | --targe | --targ | --tar | --ta | --t)
  331.     ac_prev=target ;;
  332.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  333.     target="$ac_optarg" ;;
  334.  
  335.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  336.     verbose=yes ;;
  337.  
  338.   -version | --version | --versio | --versi | --vers)
  339.     echo "configure generated by autoconf version 2.12"
  340.     exit 0 ;;
  341.  
  342.   -with-* | --with-*)
  343.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  344.     # Reject names that are not valid shell variable names.
  345.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  346.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  347.     fi
  348.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  349.     case "$ac_option" in
  350.       *=*) ;;
  351.       *) ac_optarg=yes ;;
  352.     esac
  353.     eval "with_${ac_package}='$ac_optarg'" ;;
  354.  
  355.   -without-* | --without-*)
  356.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  357.     # Reject names that are not valid shell variable names.
  358.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  359.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  360.     fi
  361.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  362.     eval "with_${ac_package}=no" ;;
  363.  
  364.   --x)
  365.     # Obsolete; use --with-x.
  366.     with_x=yes ;;
  367.  
  368.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  369.   | --x-incl | --x-inc | --x-in | --x-i)
  370.     ac_prev=x_includes ;;
  371.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  372.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  373.     x_includes="$ac_optarg" ;;
  374.  
  375.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  376.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  377.     ac_prev=x_libraries ;;
  378.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  379.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  380.     x_libraries="$ac_optarg" ;;
  381.  
  382.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  383.     ;;
  384.  
  385.   *)
  386.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  387.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  388.     fi
  389.     if test "x$nonopt" != xNONE; then
  390.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  391.     fi
  392.     nonopt="$ac_option"
  393.     ;;
  394.  
  395.   esac
  396. done
  397.  
  398. if test -n "$ac_prev"; then
  399.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  400. fi
  401.  
  402. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  403.  
  404. # File descriptor usage:
  405. # 0 standard input
  406. # 1 file creation
  407. # 2 errors and warnings
  408. # 3 some systems may open it to /dev/tty
  409. # 4 used on the Kubota Titan
  410. # 6 checking for... messages and results
  411. # 5 compiler messages saved in config.log
  412. if test "$silent" = yes; then
  413.   exec 6>/dev/null
  414. else
  415.   exec 6>&1
  416. fi
  417. exec 5>./config.log
  418.  
  419. echo "\
  420. This file contains any messages produced by compilers while
  421. running configure, to aid debugging if configure makes a mistake.
  422. " 1>&5
  423.  
  424. # Strip out --no-create and --no-recursion so they do not pile up.
  425. # Also quote any args containing shell metacharacters.
  426. ac_configure_args=
  427. for ac_arg
  428. do
  429.   case "$ac_arg" in
  430.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  431.   | --no-cr | --no-c) ;;
  432.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  433.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  434.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  435.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  436.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  437.   esac
  438. done
  439.  
  440. # NLS nuisances.
  441. # Only set these to C if already set.  These must not be set unconditionally
  442. # because not all systems understand e.g. LANG=C (notably SCO).
  443. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  444. # Non-C LC_CTYPE values break the ctype check.
  445. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  446. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  447. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  448. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  449.  
  450. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  451. rm -rf conftest* confdefs.h
  452. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  453. echo > confdefs.h
  454.  
  455. # A filename unique to this package, relative to the directory that
  456. # configure is in, which we can look for to find out if srcdir is correct.
  457. ac_unique_file=awk.h
  458.  
  459. # Find the source files, if location was not specified.
  460. if test -z "$srcdir"; then
  461.   ac_srcdir_defaulted=yes
  462.   # Try the directory containing this script, then its parent.
  463.   ac_prog=$0
  464.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  465.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  466.   srcdir=$ac_confdir
  467.   if test ! -r $srcdir/$ac_unique_file; then
  468.     srcdir=..
  469.   fi
  470. else
  471.   ac_srcdir_defaulted=no
  472. fi
  473. if test ! -r $srcdir/$ac_unique_file; then
  474.   if test "$ac_srcdir_defaulted" = yes; then
  475.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  476.   else
  477.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  478.   fi
  479. fi
  480. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  481.  
  482. # Prefer explicitly selected file to automatically selected ones.
  483. if test -z "$CONFIG_SITE"; then
  484.   if test "x$prefix" != xNONE; then
  485.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  486.   else
  487.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  488.   fi
  489. fi
  490. for ac_site_file in $CONFIG_SITE; do
  491.   if test -r "$ac_site_file"; then
  492.     echo "loading site script $ac_site_file"
  493.     . "$ac_site_file"
  494.   fi
  495. done
  496.  
  497. if test -r "$cache_file"; then
  498.   echo "loading cache $cache_file"
  499.   . $cache_file
  500. else
  501.   echo "creating cache $cache_file"
  502.   > $cache_file
  503. fi
  504.  
  505. ac_ext=c
  506. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  507. ac_cpp='$CPP $CPPFLAGS'
  508. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  509. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  510. cross_compiling=$ac_cv_prog_cc_cross
  511.  
  512. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  513.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  514.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  515.     ac_n= ac_c='
  516. ' ac_t='    '
  517.   else
  518.     ac_n=-n ac_c= ac_t=
  519.   fi
  520. else
  521.   ac_n= ac_c='\c' ac_t=
  522. fi
  523.  
  524.  
  525.  
  526.  
  527.  
  528. # Check whether --enable-bitops or --disable-bitops was given.
  529. if test "${enable_bitops+set}" = set; then
  530.   enableval="$enable_bitops"
  531.   cat >> confdefs.h <<\EOF
  532. #define BITOPS 1
  533. EOF
  534.  
  535. fi
  536.  
  537. # Check whether --enable-non-decimal-data or --disable-non-decimal-data was given.
  538. if test "${enable_non_decimal_data+set}" = set; then
  539.   enableval="$enable_non_decimal_data"
  540.   cat >> confdefs.h <<\EOF
  541. #define NONDECDATA 1
  542. EOF
  543.  
  544. fi
  545.  
  546.  
  547. for ac_prog in 'bison -y' byacc
  548. do
  549. # Extract the first word of "$ac_prog", so it can be a program name with args.
  550. set dummy $ac_prog; ac_word=$2
  551. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  552. echo "configure:553: checking for $ac_word" >&5
  553. if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  554.   echo $ac_n "(cached) $ac_c" 1>&6
  555. else
  556.   if test -n "$YACC"; then
  557.   ac_cv_prog_YACC="$YACC" # Let the user override the test.
  558. else
  559.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  560.   for ac_dir in $PATH; do
  561.     test -z "$ac_dir" && ac_dir=.
  562.     if test -f $ac_dir/$ac_word; then
  563.       ac_cv_prog_YACC="$ac_prog"
  564.       break
  565.     fi
  566.   done
  567.   IFS="$ac_save_ifs"
  568. fi
  569. fi
  570. YACC="$ac_cv_prog_YACC"
  571. if test -n "$YACC"; then
  572.   echo "$ac_t""$YACC" 1>&6
  573. else
  574.   echo "$ac_t""no" 1>&6
  575. fi
  576.  
  577. test -n "$YACC" && break
  578. done
  579. test -n "$YACC" || YACC="yacc"
  580.  
  581. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  582. echo "configure:583: checking whether ln -s works" >&5
  583. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  584.   echo $ac_n "(cached) $ac_c" 1>&6
  585. else
  586.   rm -f conftestdata
  587. if ln -s X conftestdata 2>/dev/null
  588. then
  589.   rm -f conftestdata
  590.   ac_cv_prog_LN_S="ln -s"
  591. else
  592.   ac_cv_prog_LN_S=ln
  593. fi
  594. fi
  595. LN_S="$ac_cv_prog_LN_S"
  596. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  597.   echo "$ac_t""yes" 1>&6
  598. else
  599.   echo "$ac_t""no" 1>&6
  600. fi
  601.  
  602. # Extract the first word of "gcc", so it can be a program name with args.
  603. set dummy gcc; ac_word=$2
  604. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  605. echo "configure:606: checking for $ac_word" >&5
  606. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  607.   echo $ac_n "(cached) $ac_c" 1>&6
  608. else
  609.   if test -n "$CC"; then
  610.   ac_cv_prog_CC="$CC" # Let the user override the test.
  611. else
  612.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  613.   for ac_dir in $PATH; do
  614.     test -z "$ac_dir" && ac_dir=.
  615.     if test -f $ac_dir/$ac_word; then
  616.       ac_cv_prog_CC="gcc"
  617.       break
  618.     fi
  619.   done
  620.   IFS="$ac_save_ifs"
  621. fi
  622. fi
  623. CC="$ac_cv_prog_CC"
  624. if test -n "$CC"; then
  625.   echo "$ac_t""$CC" 1>&6
  626. else
  627.   echo "$ac_t""no" 1>&6
  628. fi
  629.  
  630. if test -z "$CC"; then
  631.   # Extract the first word of "cc", so it can be a program name with args.
  632. set dummy cc; ac_word=$2
  633. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  634. echo "configure:635: checking for $ac_word" >&5
  635. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  636.   echo $ac_n "(cached) $ac_c" 1>&6
  637. else
  638.   if test -n "$CC"; then
  639.   ac_cv_prog_CC="$CC" # Let the user override the test.
  640. else
  641.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  642.   ac_prog_rejected=no
  643.   for ac_dir in $PATH; do
  644.     test -z "$ac_dir" && ac_dir=.
  645.     if test -f $ac_dir/$ac_word; then
  646.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  647.         ac_prog_rejected=yes
  648.     continue
  649.       fi
  650.       ac_cv_prog_CC="cc"
  651.       break
  652.     fi
  653.   done
  654.   IFS="$ac_save_ifs"
  655. if test $ac_prog_rejected = yes; then
  656.   # We found a bogon in the path, so make sure we never use it.
  657.   set dummy $ac_cv_prog_CC
  658.   shift
  659.   if test $# -gt 0; then
  660.     # We chose a different compiler from the bogus one.
  661.     # However, it has the same basename, so the bogon will be chosen
  662.     # first if we set CC to just the basename; use the full file name.
  663.     shift
  664.     set dummy "$ac_dir/$ac_word" "$@"
  665.     shift
  666.     ac_cv_prog_CC="$@"
  667.   fi
  668. fi
  669. fi
  670. fi
  671. CC="$ac_cv_prog_CC"
  672. if test -n "$CC"; then
  673.   echo "$ac_t""$CC" 1>&6
  674. else
  675.   echo "$ac_t""no" 1>&6
  676. fi
  677.  
  678.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  679. fi
  680.  
  681. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  682. echo "configure:683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  683.  
  684. ac_ext=c
  685. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  686. ac_cpp='$CPP $CPPFLAGS'
  687. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  688. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  689. cross_compiling=$ac_cv_prog_cc_cross
  690.  
  691. cat > conftest.$ac_ext <<EOF
  692. #line 693 "configure"
  693. #include "confdefs.h"
  694. main(){return(0);}
  695. EOF
  696. if { (eval echo configure:697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  697.   ac_cv_prog_cc_works=yes
  698.   # If we can't run a trivial program, we are probably using a cross compiler.
  699.   if (./conftest; exit) 2>/dev/null; then
  700.     ac_cv_prog_cc_cross=no
  701.   else
  702.     ac_cv_prog_cc_cross=yes
  703.   fi
  704. else
  705.   echo "configure: failed program was:" >&5
  706.   cat conftest.$ac_ext >&5
  707.   ac_cv_prog_cc_works=no
  708. fi
  709. rm -fr conftest*
  710.  
  711. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  712. if test $ac_cv_prog_cc_works = no; then
  713.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  714. fi
  715. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  716. echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  717. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  718. cross_compiling=$ac_cv_prog_cc_cross
  719.  
  720. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  721. echo "configure:722: checking whether we are using GNU C" >&5
  722. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  723.   echo $ac_n "(cached) $ac_c" 1>&6
  724. else
  725.   cat > conftest.c <<EOF
  726. #ifdef __GNUC__
  727.   yes;
  728. #endif
  729. EOF
  730. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  731.   ac_cv_prog_gcc=yes
  732. else
  733.   ac_cv_prog_gcc=no
  734. fi
  735. fi
  736.  
  737. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  738.  
  739. if test $ac_cv_prog_gcc = yes; then
  740.   GCC=yes
  741.   ac_test_CFLAGS="${CFLAGS+set}"
  742.   ac_save_CFLAGS="$CFLAGS"
  743.   CFLAGS=
  744.   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  745. echo "configure:746: checking whether ${CC-cc} accepts -g" >&5
  746. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  747.   echo $ac_n "(cached) $ac_c" 1>&6
  748. else
  749.   echo 'void f(){}' > conftest.c
  750. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  751.   ac_cv_prog_cc_g=yes
  752. else
  753.   ac_cv_prog_cc_g=no
  754. fi
  755. rm -f conftest*
  756.  
  757. fi
  758.  
  759. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  760.   if test "$ac_test_CFLAGS" = set; then
  761.     CFLAGS="$ac_save_CFLAGS"
  762.   elif test $ac_cv_prog_cc_g = yes; then
  763.     CFLAGS="-g -O2"
  764.   else
  765.     CFLAGS="-O2"
  766.   fi
  767. else
  768.   GCC=
  769.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  770. fi
  771.  
  772. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  773. echo "configure:774: checking how to run the C preprocessor" >&5
  774. # On Suns, sometimes $CPP names a directory.
  775. if test -n "$CPP" && test -d "$CPP"; then
  776.   CPP=
  777. fi
  778. if test -z "$CPP"; then
  779. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  780.   echo $ac_n "(cached) $ac_c" 1>&6
  781. else
  782.     # This must be in double quotes, not single quotes, because CPP may get
  783.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  784.   CPP="${CC-cc} -E"
  785.   # On the NeXT, cc -E runs the code through the compiler's parser,
  786.   # not just through cpp.
  787.   cat > conftest.$ac_ext <<EOF
  788. #line 789 "configure"
  789. #include "confdefs.h"
  790. #include <assert.h>
  791. Syntax Error
  792. EOF
  793. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  794. { (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  795. ac_err=`grep -v '^ *+' conftest.out`
  796. if test -z "$ac_err"; then
  797.   :
  798. else
  799.   echo "$ac_err" >&5
  800.   echo "configure: failed program was:" >&5
  801.   cat conftest.$ac_ext >&5
  802.   rm -rf conftest*
  803.   CPP="${CC-cc} -E -traditional-cpp"
  804.   cat > conftest.$ac_ext <<EOF
  805. #line 806 "configure"
  806. #include "confdefs.h"
  807. #include <assert.h>
  808. Syntax Error
  809. EOF
  810. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  811. { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  812. ac_err=`grep -v '^ *+' conftest.out`
  813. if test -z "$ac_err"; then
  814.   :
  815. else
  816.   echo "$ac_err" >&5
  817.   echo "configure: failed program was:" >&5
  818.   cat conftest.$ac_ext >&5
  819.   rm -rf conftest*
  820.   CPP=/lib/cpp
  821. fi
  822. rm -f conftest*
  823. fi
  824. rm -f conftest*
  825.   ac_cv_prog_CPP="$CPP"
  826. fi
  827.   CPP="$ac_cv_prog_CPP"
  828. else
  829.   ac_cv_prog_CPP="$CPP"
  830. fi
  831. echo "$ac_t""$CPP" 1>&6
  832.  
  833.  
  834. # This is a hack. Different versions of install on different systems
  835. # are just too different. Chuck it and use install-sh.
  836. INSTALL="$srcdir/install-sh -c"; export INSTALL
  837. ac_aux_dir=
  838. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  839.   if test -f $ac_dir/install-sh; then
  840.     ac_aux_dir=$ac_dir
  841.     ac_install_sh="$ac_aux_dir/install-sh -c"
  842.     break
  843.   elif test -f $ac_dir/install.sh; then
  844.     ac_aux_dir=$ac_dir
  845.     ac_install_sh="$ac_aux_dir/install.sh -c"
  846.     break
  847.   fi
  848. done
  849. if test -z "$ac_aux_dir"; then
  850.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  851. fi
  852. ac_config_guess=$ac_aux_dir/config.guess
  853. ac_config_sub=$ac_aux_dir/config.sub
  854. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  855.  
  856. # Find a good install program.  We prefer a C program (faster),
  857. # so one script is as good as another.  But avoid the broken or
  858. # incompatible versions:
  859. # SysV /etc/install, /usr/sbin/install
  860. # SunOS /usr/etc/install
  861. # IRIX /sbin/install
  862. # AIX /bin/install
  863. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  864. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  865. # ./install, which can be erroneously created by make from ./install.sh.
  866. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  867. echo "configure:868: checking for a BSD compatible install" >&5
  868. if test -z "$INSTALL"; then
  869. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  870.   echo $ac_n "(cached) $ac_c" 1>&6
  871. else
  872.     IFS="${IFS=     }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  873.   for ac_dir in $PATH; do
  874.     # Account for people who put trailing slashes in PATH elements.
  875.     case "$ac_dir/" in
  876.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  877.     *)
  878.       # OSF1 and SCO ODT 3.0 have their own names for install.
  879.       for ac_prog in ginstall installbsd scoinst install; do
  880.         if test -f $ac_dir/$ac_prog; then
  881.       if test $ac_prog = install &&
  882.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  883.         # AIX install.  It has an incompatible calling convention.
  884.         # OSF/1 installbsd also uses dspmsg, but is usable.
  885.         :
  886.       else
  887.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  888.         break 2
  889.       fi
  890.     fi
  891.       done
  892.       ;;
  893.     esac
  894.   done
  895.   IFS="$ac_save_IFS"
  896.  
  897. fi
  898.   if test "${ac_cv_path_install+set}" = set; then
  899.     INSTALL="$ac_cv_path_install"
  900.   else
  901.     # As a last resort, use the slow shell script.  We don't cache a
  902.     # path for INSTALL within a source directory, because that will
  903.     # break other packages using the cache if that directory is
  904.     # removed, or if the path is relative.
  905.     INSTALL="$ac_install_sh"
  906.   fi
  907. fi
  908. echo "$ac_t""$INSTALL" 1>&6
  909.  
  910. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  911. # It thinks the first close brace ends the variable substitution.
  912. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  913.  
  914. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  915.  
  916.  
  917. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  918. echo "configure:919: checking whether ${MAKE-make} sets \${MAKE}" >&5
  919. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  920. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  921.   echo $ac_n "(cached) $ac_c" 1>&6
  922. else
  923.   cat > conftestmake <<\EOF
  924. all:
  925.     @echo 'ac_maketemp="${MAKE}"'
  926. EOF
  927. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  928. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  929. if test -n "$ac_maketemp"; then
  930.   eval ac_cv_prog_make_${ac_make}_set=yes
  931. else
  932.   eval ac_cv_prog_make_${ac_make}_set=no
  933. fi
  934. rm -f conftestmake
  935. fi
  936. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  937.   echo "$ac_t""yes" 1>&6
  938.   SET_MAKE=
  939. else
  940.   echo "$ac_t""no" 1>&6
  941.   SET_MAKE="MAKE=${MAKE-make}"
  942. fi
  943.  
  944.  
  945. if test "$CFLAGS" = ""
  946. then
  947.     if test "$GCC" = yes
  948.     then
  949.         CFLAGS="-g -O"
  950.     else
  951.         CFLAGS="-O"
  952.     fi
  953. fi
  954.  
  955.  
  956. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  957. echo "configure:958: checking for AIX" >&5
  958. cat > conftest.$ac_ext <<EOF
  959. #line 960 "configure"
  960. #include "confdefs.h"
  961. #ifdef _AIX
  962.   yes
  963. #endif
  964.  
  965. EOF
  966. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  967.   egrep "yes" >/dev/null 2>&1; then
  968.   rm -rf conftest*
  969.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  970. #define _ALL_SOURCE 1
  971. EOF
  972.  
  973. else
  974.   rm -rf conftest*
  975.   echo "$ac_t""no" 1>&6
  976. fi
  977. rm -f conftest*
  978.  
  979.  
  980. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  981. echo "configure:982: checking for POSIXized ISC" >&5
  982. if test -d /etc/conf/kconfig.d &&
  983.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  984. then
  985.   echo "$ac_t""yes" 1>&6
  986.   ISC=yes # If later tests want to check for ISC.
  987.   cat >> confdefs.h <<\EOF
  988. #define _POSIX_SOURCE 1
  989. EOF
  990.  
  991.   if test "$GCC" = yes; then
  992.     CC="$CC -posix"
  993.   else
  994.     CC="$CC -Xp"
  995.   fi
  996. else
  997.   echo "$ac_t""no" 1>&6
  998.   ISC=
  999. fi
  1000.  
  1001. ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  1002. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  1003. echo "configure:1004: checking for minix/config.h" >&5
  1004. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1005.   echo $ac_n "(cached) $ac_c" 1>&6
  1006. else
  1007.   cat > conftest.$ac_ext <<EOF
  1008. #line 1009 "configure"
  1009. #include "confdefs.h"
  1010. #include <minix/config.h>
  1011. EOF
  1012. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1013. { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1014. ac_err=`grep -v '^ *+' conftest.out`
  1015. if test -z "$ac_err"; then
  1016.   rm -rf conftest*
  1017.   eval "ac_cv_header_$ac_safe=yes"
  1018. else
  1019.   echo "$ac_err" >&5
  1020.   echo "configure: failed program was:" >&5
  1021.   cat conftest.$ac_ext >&5
  1022.   rm -rf conftest*
  1023.   eval "ac_cv_header_$ac_safe=no"
  1024. fi
  1025. rm -f conftest*
  1026. fi
  1027. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1028.   echo "$ac_t""yes" 1>&6
  1029.   MINIX=yes
  1030. else
  1031.   echo "$ac_t""no" 1>&6
  1032. MINIX=
  1033. fi
  1034.  
  1035. if test "$MINIX" = yes; then
  1036.   cat >> confdefs.h <<\EOF
  1037. #define _POSIX_SOURCE 1
  1038. EOF
  1039.  
  1040.   cat >> confdefs.h <<\EOF
  1041. #define _POSIX_1_SOURCE 2
  1042. EOF
  1043.  
  1044.   cat >> confdefs.h <<\EOF
  1045. #define _MINIX 1
  1046. EOF
  1047.  
  1048. fi
  1049.  
  1050.  
  1051. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1052. echo "configure:1053: checking for ANSI C header files" >&5
  1053. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1054.   echo $ac_n "(cached) $ac_c" 1>&6
  1055. else
  1056.   cat > conftest.$ac_ext <<EOF
  1057. #line 1058 "configure"
  1058. #include "confdefs.h"
  1059. #include <stdlib.h>
  1060. #include <stdarg.h>
  1061. #include <string.h>
  1062. #include <float.h>
  1063. EOF
  1064. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1065. { (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1066. ac_err=`grep -v '^ *+' conftest.out`
  1067. if test -z "$ac_err"; then
  1068.   rm -rf conftest*
  1069.   ac_cv_header_stdc=yes
  1070. else
  1071.   echo "$ac_err" >&5
  1072.   echo "configure: failed program was:" >&5
  1073.   cat conftest.$ac_ext >&5
  1074.   rm -rf conftest*
  1075.   ac_cv_header_stdc=no
  1076. fi
  1077. rm -f conftest*
  1078.  
  1079. if test $ac_cv_header_stdc = yes; then
  1080.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1081. cat > conftest.$ac_ext <<EOF
  1082. #line 1083 "configure"
  1083. #include "confdefs.h"
  1084. #include <string.h>
  1085. EOF
  1086. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1087.   egrep "memchr" >/dev/null 2>&1; then
  1088.   :
  1089. else
  1090.   rm -rf conftest*
  1091.   ac_cv_header_stdc=no
  1092. fi
  1093. rm -f conftest*
  1094.  
  1095. fi
  1096.  
  1097. if test $ac_cv_header_stdc = yes; then
  1098.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1099. cat > conftest.$ac_ext <<EOF
  1100. #line 1101 "configure"
  1101. #include "confdefs.h"
  1102. #include <stdlib.h>
  1103. EOF
  1104. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1105.   egrep "free" >/dev/null 2>&1; then
  1106.   :
  1107. else
  1108.   rm -rf conftest*
  1109.   ac_cv_header_stdc=no
  1110. fi
  1111. rm -f conftest*
  1112.  
  1113. fi
  1114.  
  1115. if test $ac_cv_header_stdc = yes; then
  1116.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1117. if test "$cross_compiling" = yes; then
  1118.   :
  1119. else
  1120.   cat > conftest.$ac_ext <<EOF
  1121. #line 1122 "configure"
  1122. #include "confdefs.h"
  1123. #include <ctype.h>
  1124. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1125. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1126. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1127. int main () { int i; for (i = 0; i < 256; i++)
  1128. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1129. exit (0); }
  1130.  
  1131. EOF
  1132. if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1133. then
  1134.   :
  1135. else
  1136.   echo "configure: failed program was:" >&5
  1137.   cat conftest.$ac_ext >&5
  1138.   rm -fr conftest*
  1139.   ac_cv_header_stdc=no
  1140. fi
  1141. rm -fr conftest*
  1142. fi
  1143.  
  1144. fi
  1145. fi
  1146.  
  1147. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1148. if test $ac_cv_header_stdc = yes; then
  1149.   cat >> confdefs.h <<\EOF
  1150. #define STDC_HEADERS 1
  1151. EOF
  1152.  
  1153. fi
  1154.  
  1155. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  1156. echo "configure:1157: checking for sys/wait.h that is POSIX.1 compatible" >&5
  1157. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1158.   echo $ac_n "(cached) $ac_c" 1>&6
  1159. else
  1160.   cat > conftest.$ac_ext <<EOF
  1161. #line 1162 "configure"
  1162. #include "confdefs.h"
  1163. #include <sys/types.h>
  1164. #include <sys/wait.h>
  1165. #ifndef WEXITSTATUS
  1166. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1167. #endif
  1168. #ifndef WIFEXITED
  1169. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1170. #endif
  1171. int main() {
  1172. int s;
  1173. wait (&s);
  1174. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1175. ; return 0; }
  1176. EOF
  1177. if { (eval echo configure:1178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1178.   rm -rf conftest*
  1179.   ac_cv_header_sys_wait_h=yes
  1180. else
  1181.   echo "configure: failed program was:" >&5
  1182.   cat conftest.$ac_ext >&5
  1183.   rm -rf conftest*
  1184.   ac_cv_header_sys_wait_h=no
  1185. fi
  1186. rm -f conftest*
  1187. fi
  1188.  
  1189. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  1190. if test $ac_cv_header_sys_wait_h = yes; then
  1191.   cat >> confdefs.h <<\EOF
  1192. #define HAVE_SYS_WAIT_H 1
  1193. EOF
  1194.  
  1195. fi
  1196.  
  1197. for ac_hdr in limits.h locale.h stdarg.h unistd.h signum.h sys/param.h string.h
  1198. do
  1199. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1200. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1201. echo "configure:1202: checking for $ac_hdr" >&5
  1202. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1203.   echo $ac_n "(cached) $ac_c" 1>&6
  1204. else
  1205.   cat > conftest.$ac_ext <<EOF
  1206. #line 1207 "configure"
  1207. #include "confdefs.h"
  1208. #include <$ac_hdr>
  1209. EOF
  1210. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1211. { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1212. ac_err=`grep -v '^ *+' conftest.out`
  1213. if test -z "$ac_err"; then
  1214.   rm -rf conftest*
  1215.   eval "ac_cv_header_$ac_safe=yes"
  1216. else
  1217.   echo "$ac_err" >&5
  1218.   echo "configure: failed program was:" >&5
  1219.   cat conftest.$ac_ext >&5
  1220.   rm -rf conftest*
  1221.   eval "ac_cv_header_$ac_safe=no"
  1222. fi
  1223. rm -f conftest*
  1224. fi
  1225. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1226.   echo "$ac_t""yes" 1>&6
  1227.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1228.   cat >> confdefs.h <<EOF
  1229. #define $ac_tr_hdr 1
  1230. EOF
  1231.  
  1232. else
  1233.   echo "$ac_t""no" 1>&6
  1234. fi
  1235. done
  1236.  
  1237. if test "$ac_cv_header_string_h" = yes
  1238. then
  1239.     for ac_hdr in memory.h
  1240. do
  1241. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1242. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1243. echo "configure:1244: checking for $ac_hdr" >&5
  1244. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1245.   echo $ac_n "(cached) $ac_c" 1>&6
  1246. else
  1247.   cat > conftest.$ac_ext <<EOF
  1248. #line 1249 "configure"
  1249. #include "confdefs.h"
  1250. #include <$ac_hdr>
  1251. EOF
  1252. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1253. { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1254. ac_err=`grep -v '^ *+' conftest.out`
  1255. if test -z "$ac_err"; then
  1256.   rm -rf conftest*
  1257.   eval "ac_cv_header_$ac_safe=yes"
  1258. else
  1259.   echo "$ac_err" >&5
  1260.   echo "configure: failed program was:" >&5
  1261.   cat conftest.$ac_ext >&5
  1262.   rm -rf conftest*
  1263.   eval "ac_cv_header_$ac_safe=no"
  1264. fi
  1265. rm -f conftest*
  1266. fi
  1267. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1268.   echo "$ac_t""yes" 1>&6
  1269.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1270.   cat >> confdefs.h <<EOF
  1271. #define $ac_tr_hdr 1
  1272. EOF
  1273.  
  1274. else
  1275.   echo "$ac_t""no" 1>&6
  1276. fi
  1277. done
  1278.  
  1279. else
  1280.     for ac_hdr in strings.h
  1281. do
  1282. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1283. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1284. echo "configure:1285: checking for $ac_hdr" >&5
  1285. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1286.   echo $ac_n "(cached) $ac_c" 1>&6
  1287. else
  1288.   cat > conftest.$ac_ext <<EOF
  1289. #line 1290 "configure"
  1290. #include "confdefs.h"
  1291. #include <$ac_hdr>
  1292. EOF
  1293. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1294. { (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1295. ac_err=`grep -v '^ *+' conftest.out`
  1296. if test -z "$ac_err"; then
  1297.   rm -rf conftest*
  1298.   eval "ac_cv_header_$ac_safe=yes"
  1299. else
  1300.   echo "$ac_err" >&5
  1301.   echo "configure: failed program was:" >&5
  1302.   cat conftest.$ac_ext >&5
  1303.   rm -rf conftest*
  1304.   eval "ac_cv_header_$ac_safe=no"
  1305. fi
  1306. rm -f conftest*
  1307. fi
  1308. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1309.   echo "$ac_t""yes" 1>&6
  1310.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1311.   cat >> confdefs.h <<EOF
  1312. #define $ac_tr_hdr 1
  1313. EOF
  1314.  
  1315. else
  1316.   echo "$ac_t""no" 1>&6
  1317. fi
  1318. done
  1319.  
  1320. fi
  1321.  
  1322. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1323. echo "configure:1324: checking for pid_t" >&5
  1324. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1325.   echo $ac_n "(cached) $ac_c" 1>&6
  1326. else
  1327.   cat > conftest.$ac_ext <<EOF
  1328. #line 1329 "configure"
  1329. #include "confdefs.h"
  1330. #include <sys/types.h>
  1331. #if STDC_HEADERS
  1332. #include <stdlib.h>
  1333. #include <stddef.h>
  1334. #endif
  1335. EOF
  1336. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1337.   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1338.   rm -rf conftest*
  1339.   ac_cv_type_pid_t=yes
  1340. else
  1341.   rm -rf conftest*
  1342.   ac_cv_type_pid_t=no
  1343. fi
  1344. rm -f conftest*
  1345.  
  1346. fi
  1347. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1348. if test $ac_cv_type_pid_t = no; then
  1349.   cat >> confdefs.h <<\EOF
  1350. #define pid_t int
  1351. EOF
  1352.  
  1353. fi
  1354.  
  1355. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1356. echo "configure:1357: checking return type of signal handlers" >&5
  1357. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1358.   echo $ac_n "(cached) $ac_c" 1>&6
  1359. else
  1360.   cat > conftest.$ac_ext <<EOF
  1361. #line 1362 "configure"
  1362. #include "confdefs.h"
  1363. #include <sys/types.h>
  1364. #include <signal.h>
  1365. #ifdef signal
  1366. #undef signal
  1367. #endif
  1368. #ifdef __cplusplus
  1369. extern "C" void (*signal (int, void (*)(int)))(int);
  1370. #else
  1371. void (*signal ()) ();
  1372. #endif
  1373.  
  1374. int main() {
  1375. int i;
  1376. ; return 0; }
  1377. EOF
  1378. if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1379.   rm -rf conftest*
  1380.   ac_cv_type_signal=void
  1381. else
  1382.   echo "configure: failed program was:" >&5
  1383.   cat conftest.$ac_ext >&5
  1384.   rm -rf conftest*
  1385.   ac_cv_type_signal=int
  1386. fi
  1387. rm -f conftest*
  1388. fi
  1389.  
  1390. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1391. cat >> confdefs.h <<EOF
  1392. #define RETSIGTYPE $ac_cv_type_signal
  1393. EOF
  1394.  
  1395.  
  1396. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1397. echo "configure:1398: checking for size_t" >&5
  1398. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1399.   echo $ac_n "(cached) $ac_c" 1>&6
  1400. else
  1401.   cat > conftest.$ac_ext <<EOF
  1402. #line 1403 "configure"
  1403. #include "confdefs.h"
  1404. #include <sys/types.h>
  1405. #if STDC_HEADERS
  1406. #include <stdlib.h>
  1407. #include <stddef.h>
  1408. #endif
  1409. EOF
  1410. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1411.   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1412.   rm -rf conftest*
  1413.   ac_cv_type_size_t=yes
  1414. else
  1415.   rm -rf conftest*
  1416.   ac_cv_type_size_t=no
  1417. fi
  1418. rm -f conftest*
  1419.  
  1420. fi
  1421. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1422. if test $ac_cv_type_size_t = no; then
  1423.   cat >> confdefs.h <<\EOF
  1424. #define size_t unsigned
  1425. EOF
  1426.  
  1427. fi
  1428.  
  1429. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1430. echo "configure:1431: checking for uid_t in sys/types.h" >&5
  1431. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1432.   echo $ac_n "(cached) $ac_c" 1>&6
  1433. else
  1434.   cat > conftest.$ac_ext <<EOF
  1435. #line 1436 "configure"
  1436. #include "confdefs.h"
  1437. #include <sys/types.h>
  1438. EOF
  1439. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1440.   egrep "uid_t" >/dev/null 2>&1; then
  1441.   rm -rf conftest*
  1442.   ac_cv_type_uid_t=yes
  1443. else
  1444.   rm -rf conftest*
  1445.   ac_cv_type_uid_t=no
  1446. fi
  1447. rm -f conftest*
  1448.  
  1449. fi
  1450.  
  1451. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1452. if test $ac_cv_type_uid_t = no; then
  1453.   cat >> confdefs.h <<\EOF
  1454. #define uid_t int
  1455. EOF
  1456.  
  1457.   cat >> confdefs.h <<\EOF
  1458. #define gid_t int
  1459. EOF
  1460.  
  1461. fi
  1462.  
  1463. echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
  1464. echo "configure:1465: checking type of array argument to getgroups" >&5
  1465. if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
  1466.   echo $ac_n "(cached) $ac_c" 1>&6
  1467. else
  1468.   if test "$cross_compiling" = yes; then
  1469.   ac_cv_type_getgroups=cross
  1470. else
  1471.   cat > conftest.$ac_ext <<EOF
  1472. #line 1473 "configure"
  1473. #include "confdefs.h"
  1474.  
  1475. /* Thanks to Mike Rendell for this test.  */
  1476. #include <sys/types.h>
  1477. #define NGID 256
  1478. #undef MAX
  1479. #define MAX(x, y) ((x) > (y) ? (x) : (y))
  1480. main()
  1481. {
  1482.   gid_t gidset[NGID];
  1483.   int i, n;
  1484.   union { gid_t gval; long lval; }  val;
  1485.  
  1486.   val.lval = -1;
  1487.   for (i = 0; i < NGID; i++)
  1488.     gidset[i] = val.gval;
  1489.   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
  1490.                  gidset);
  1491.   /* Exit non-zero if getgroups seems to require an array of ints.  This
  1492.      happens when gid_t is short but getgroups modifies an array of ints.  */
  1493.   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
  1494. }
  1495.  
  1496. EOF
  1497. if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1498. then
  1499.     ac_cv_type_getgroups=gid_t
  1500. else
  1501.   echo "configure: failed program was:" >&5
  1502.   cat conftest.$ac_ext >&5
  1503.   rm -fr conftest*
  1504.   ac_cv_type_getgroups=int
  1505. fi
  1506. rm -fr conftest*
  1507. fi
  1508.  
  1509. if test $ac_cv_type_getgroups = cross; then
  1510.         cat > conftest.$ac_ext <<EOF
  1511. #line 1512 "configure"
  1512. #include "confdefs.h"
  1513. #include <unistd.h>
  1514. EOF
  1515. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1516.   egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
  1517.   rm -rf conftest*
  1518.   ac_cv_type_getgroups=gid_t
  1519. else
  1520.   rm -rf conftest*
  1521.   ac_cv_type_getgroups=int
  1522. fi
  1523. rm -f conftest*
  1524.  
  1525. fi
  1526. fi
  1527.  
  1528. echo "$ac_t""$ac_cv_type_getgroups" 1>&6
  1529. cat >> confdefs.h <<EOF
  1530. #define GETGROUPS_T $ac_cv_type_getgroups
  1531. EOF
  1532.  
  1533.  
  1534. cat > conftest.$ac_ext <<EOF
  1535. #line 1536 "configure"
  1536. #include "confdefs.h"
  1537. #include <stdio.h>
  1538. EOF
  1539. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1540.   egrep "int.*sprintf" >/dev/null 2>&1; then
  1541.   rm -rf conftest*
  1542.   cat >> confdefs.h <<\EOF
  1543. #define SPRINTF_RET int
  1544. EOF
  1545.  
  1546. else
  1547.   rm -rf conftest*
  1548.   cat >> confdefs.h <<\EOF
  1549. #define SPRINTF_RET char *
  1550. EOF
  1551.  
  1552. fi
  1553. rm -f conftest*
  1554.  
  1555.  
  1556. if test "$YACC" = "bison -y" ||
  1557.  { test -f $srcdir/awktab.c && grep 'alloca *(' $srcdir/awktab.c > /dev/null; }
  1558. then
  1559.     # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1560. # for constant arguments.  Useless!
  1561. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1562. echo "configure:1563: checking for working alloca.h" >&5
  1563. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1564.   echo $ac_n "(cached) $ac_c" 1>&6
  1565. else
  1566.   cat > conftest.$ac_ext <<EOF
  1567. #line 1568 "configure"
  1568. #include "confdefs.h"
  1569. #include <alloca.h>
  1570. int main() {
  1571. char *p = alloca(2 * sizeof(int));
  1572. ; return 0; }
  1573. EOF
  1574. if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1575.   rm -rf conftest*
  1576.   ac_cv_header_alloca_h=yes
  1577. else
  1578.   echo "configure: failed program was:" >&5
  1579.   cat conftest.$ac_ext >&5
  1580.   rm -rf conftest*
  1581.   ac_cv_header_alloca_h=no
  1582. fi
  1583. rm -f conftest*
  1584. fi
  1585.  
  1586. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1587. if test $ac_cv_header_alloca_h = yes; then
  1588.   cat >> confdefs.h <<\EOF
  1589. #define HAVE_ALLOCA_H 1
  1590. EOF
  1591.  
  1592. fi
  1593.  
  1594. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1595. echo "configure:1596: checking for alloca" >&5
  1596. if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  1597.   echo $ac_n "(cached) $ac_c" 1>&6
  1598. else
  1599.   cat > conftest.$ac_ext <<EOF
  1600. #line 1601 "configure"
  1601. #include "confdefs.h"
  1602.  
  1603. #ifdef __GNUC__
  1604. # define alloca __builtin_alloca
  1605. #else
  1606. # if HAVE_ALLOCA_H
  1607. #  include <alloca.h>
  1608. # else
  1609. #  ifdef _AIX
  1610.  #pragma alloca
  1611. #  else
  1612. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1613. char *alloca ();
  1614. #   endif
  1615. #  endif
  1616. # endif
  1617. #endif
  1618.  
  1619. int main() {
  1620. char *p = (char *) alloca(1);
  1621. ; return 0; }
  1622. EOF
  1623. if { (eval echo configure:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1624.   rm -rf conftest*
  1625.   ac_cv_func_alloca_works=yes
  1626. else
  1627.   echo "configure: failed program was:" >&5
  1628.   cat conftest.$ac_ext >&5
  1629.   rm -rf conftest*
  1630.   ac_cv_func_alloca_works=no
  1631. fi
  1632. rm -f conftest*
  1633. fi
  1634.  
  1635. echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
  1636. if test $ac_cv_func_alloca_works = yes; then
  1637.   cat >> confdefs.h <<\EOF
  1638. #define HAVE_ALLOCA 1
  1639. EOF
  1640.  
  1641. fi
  1642.  
  1643. if test $ac_cv_func_alloca_works = no; then
  1644.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1645.   # that cause trouble.  Some versions do not even contain alloca or
  1646.   # contain a buggy version.  If you still want to use their alloca,
  1647.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1648.   ALLOCA=alloca.o
  1649.   cat >> confdefs.h <<\EOF
  1650. #define C_ALLOCA 1
  1651. EOF
  1652.  
  1653.  
  1654. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1655. echo "configure:1656: checking whether alloca needs Cray hooks" >&5
  1656. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1657.   echo $ac_n "(cached) $ac_c" 1>&6
  1658. else
  1659.   cat > conftest.$ac_ext <<EOF
  1660. #line 1661 "configure"
  1661. #include "confdefs.h"
  1662. #if defined(CRAY) && ! defined(CRAY2)
  1663. webecray
  1664. #else
  1665. wenotbecray
  1666. #endif
  1667.  
  1668. EOF
  1669. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1670.   egrep "webecray" >/dev/null 2>&1; then
  1671.   rm -rf conftest*
  1672.   ac_cv_os_cray=yes
  1673. else
  1674.   rm -rf conftest*
  1675.   ac_cv_os_cray=no
  1676. fi
  1677. rm -f conftest*
  1678.  
  1679. fi
  1680.  
  1681. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1682. if test $ac_cv_os_cray = yes; then
  1683. for ac_func in _getb67 GETB67 getb67; do
  1684.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1685. echo "configure:1686: checking for $ac_func" >&5
  1686. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1687.   echo $ac_n "(cached) $ac_c" 1>&6
  1688. else
  1689.   cat > conftest.$ac_ext <<EOF
  1690. #line 1691 "configure"
  1691. #include "confdefs.h"
  1692. /* System header to define __stub macros and hopefully few prototypes,
  1693.     which can conflict with char $ac_func(); below.  */
  1694. #include <assert.h>
  1695. /* Override any gcc2 internal prototype to avoid an error.  */
  1696. /* We use char because int might match the return type of a gcc2
  1697.     builtin and then its argument prototype would still apply.  */
  1698. char $ac_func();
  1699.  
  1700. int main() {
  1701.  
  1702. /* The GNU C library defines this for functions which it implements
  1703.     to always fail with ENOSYS.  Some functions are actually named
  1704.     something starting with __ and the normal name is an alias.  */
  1705. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1706. choke me
  1707. #else
  1708. $ac_func();
  1709. #endif
  1710.  
  1711. ; return 0; }
  1712. EOF
  1713. if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1714.   rm -rf conftest*
  1715.   eval "ac_cv_func_$ac_func=yes"
  1716. else
  1717.   echo "configure: failed program was:" >&5
  1718.   cat conftest.$ac_ext >&5
  1719.   rm -rf conftest*
  1720.   eval "ac_cv_func_$ac_func=no"
  1721. fi
  1722. rm -f conftest*
  1723. fi
  1724.  
  1725. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1726.   echo "$ac_t""yes" 1>&6
  1727.   cat >> confdefs.h <<EOF
  1728. #define CRAY_STACKSEG_END $ac_func
  1729. EOF
  1730.  
  1731.   break
  1732. else
  1733.   echo "$ac_t""no" 1>&6
  1734. fi
  1735.  
  1736. done
  1737. fi
  1738.  
  1739. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1740. echo "configure:1741: checking stack direction for C alloca" >&5
  1741. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1742.   echo $ac_n "(cached) $ac_c" 1>&6
  1743. else
  1744.   if test "$cross_compiling" = yes; then
  1745.   ac_cv_c_stack_direction=0
  1746. else
  1747.   cat > conftest.$ac_ext <<EOF
  1748. #line 1749 "configure"
  1749. #include "confdefs.h"
  1750. find_stack_direction ()
  1751. {
  1752.   static char *addr = 0;
  1753.   auto char dummy;
  1754.   if (addr == 0)
  1755.     {
  1756.       addr = &dummy;
  1757.       return find_stack_direction ();
  1758.     }
  1759.   else
  1760.     return (&dummy > addr) ? 1 : -1;
  1761. }
  1762. main ()
  1763. {
  1764.   exit (find_stack_direction() < 0);
  1765. }
  1766. EOF
  1767. if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  1768. then
  1769.   ac_cv_c_stack_direction=1
  1770. else
  1771.   echo "configure: failed program was:" >&5
  1772.   cat conftest.$ac_ext >&5
  1773.   rm -fr conftest*
  1774.   ac_cv_c_stack_direction=-1
  1775. fi
  1776. rm -fr conftest*
  1777. fi
  1778.  
  1779. fi
  1780.  
  1781. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1782. cat >> confdefs.h <<EOF
  1783. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1784. EOF
  1785.  
  1786. fi
  1787.  
  1788. fi
  1789. cat >> confdefs.h <<\EOF
  1790. #define REGEX_MALLOC 1
  1791. EOF
  1792.  
  1793. echo $ac_n "checking for vprintf""... $ac_c" 1>&6
  1794. echo "configure:1795: checking for vprintf" >&5
  1795. if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  1796.   echo $ac_n "(cached) $ac_c" 1>&6
  1797. else
  1798.   cat > conftest.$ac_ext <<EOF
  1799. #line 1800 "configure"
  1800. #include "confdefs.h"
  1801. /* System header to define __stub macros and hopefully few prototypes,
  1802.     which can conflict with char vprintf(); below.  */
  1803. #include <assert.h>
  1804. /* Override any gcc2 internal prototype to avoid an error.  */
  1805. /* We use char because int might match the return type of a gcc2
  1806.     builtin and then its argument prototype would still apply.  */
  1807. char vprintf();
  1808.  
  1809. int main() {
  1810.  
  1811. /* The GNU C library defines this for functions which it implements
  1812.     to always fail with ENOSYS.  Some functions are actually named
  1813.     something starting with __ and the normal name is an alias.  */
  1814. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1815. choke me
  1816. #else
  1817. vprintf();
  1818. #endif
  1819.  
  1820. ; return 0; }
  1821. EOF
  1822. if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1823.   rm -rf conftest*
  1824.   eval "ac_cv_func_vprintf=yes"
  1825. else
  1826.   echo "configure: failed program was:" >&5
  1827.   cat conftest.$ac_ext >&5
  1828.   rm -rf conftest*
  1829.   eval "ac_cv_func_vprintf=no"
  1830. fi
  1831. rm -f conftest*
  1832. fi
  1833.  
  1834. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1835.   echo "$ac_t""yes" 1>&6
  1836.   cat >> confdefs.h <<\EOF
  1837. #define HAVE_VPRINTF 1
  1838. EOF
  1839.  
  1840. else
  1841.   echo "$ac_t""no" 1>&6
  1842. fi
  1843.  
  1844. if test "$ac_cv_func_vprintf" != yes; then
  1845. echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
  1846. echo "configure:1847: checking for _doprnt" >&5
  1847. if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  1848.   echo $ac_n "(cached) $ac_c" 1>&6
  1849. else
  1850.   cat > conftest.$ac_ext <<EOF
  1851. #line 1852 "configure"
  1852. #include "confdefs.h"
  1853. /* System header to define __stub macros and hopefully few prototypes,
  1854.     which can conflict with char _doprnt(); below.  */
  1855. #include <assert.h>
  1856. /* Override any gcc2 internal prototype to avoid an error.  */
  1857. /* We use char because int might match the return type of a gcc2
  1858.     builtin and then its argument prototype would still apply.  */
  1859. char _doprnt();
  1860.  
  1861. int main() {
  1862.  
  1863. /* The GNU C library defines this for functions which it implements
  1864.     to always fail with ENOSYS.  Some functions are actually named
  1865.     something starting with __ and the normal name is an alias.  */
  1866. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1867. choke me
  1868. #else
  1869. _doprnt();
  1870. #endif
  1871.  
  1872. ; return 0; }
  1873. EOF
  1874. if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1875.   rm -rf conftest*
  1876.   eval "ac_cv_func__doprnt=yes"
  1877. else
  1878.   echo "configure: failed program was:" >&5
  1879.   cat conftest.$ac_ext >&5
  1880.   rm -rf conftest*
  1881.   eval "ac_cv_func__doprnt=no"
  1882. fi
  1883. rm -f conftest*
  1884. fi
  1885.  
  1886. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1887.   echo "$ac_t""yes" 1>&6
  1888.   cat >> confdefs.h <<\EOF
  1889. #define HAVE_DOPRNT 1
  1890. EOF
  1891.  
  1892. else
  1893.   echo "$ac_t""no" 1>&6
  1894. fi
  1895.  
  1896. fi
  1897.  
  1898.  
  1899. echo $ac_n "checking for fmod in -lm""... $ac_c" 1>&6
  1900. echo "configure:1901: checking for fmod in -lm" >&5
  1901. ac_lib_var=`echo m'_'fmod | sed 'y%./+-%__p_%'`
  1902. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1903.   echo $ac_n "(cached) $ac_c" 1>&6
  1904. else
  1905.   ac_save_LIBS="$LIBS"
  1906. LIBS="-lm  $LIBS"
  1907. cat > conftest.$ac_ext <<EOF
  1908. #line 1909 "configure"
  1909. #include "confdefs.h"
  1910. /* Override any gcc2 internal prototype to avoid an error.  */
  1911. /* We use char because int might match the return type of a gcc2
  1912.     builtin and then its argument prototype would still apply.  */
  1913. char fmod();
  1914.  
  1915. int main() {
  1916. fmod()
  1917. ; return 0; }
  1918. EOF
  1919. if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1920.   rm -rf conftest*
  1921.   eval "ac_cv_lib_$ac_lib_var=yes"
  1922. else
  1923.   echo "configure: failed program was:" >&5
  1924.   cat conftest.$ac_ext >&5
  1925.   rm -rf conftest*
  1926.   eval "ac_cv_lib_$ac_lib_var=no"
  1927. fi
  1928. rm -f conftest*
  1929. LIBS="$ac_save_LIBS"
  1930.  
  1931. fi
  1932. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1933.   echo "$ac_t""yes" 1>&6
  1934.     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1935.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1936.   cat >> confdefs.h <<EOF
  1937. #define $ac_tr_lib 1
  1938. EOF
  1939.  
  1940.   LIBS="-lm $LIBS"
  1941.  
  1942. else
  1943.   echo "$ac_t""no" 1>&6
  1944. fi
  1945.  
  1946. for ac_func in madvise memset memcpy memcmp fmod setlocale strchr strerror \
  1947.         strftime strncasecmp strtod system tzset
  1948. do
  1949. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1950. echo "configure:1951: checking for $ac_func" >&5
  1951. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1952.   echo $ac_n "(cached) $ac_c" 1>&6
  1953. else
  1954.   cat > conftest.$ac_ext <<EOF
  1955. #line 1956 "configure"
  1956. #include "confdefs.h"
  1957. /* System header to define __stub macros and hopefully few prototypes,
  1958.     which can conflict with char $ac_func(); below.  */
  1959. #include <assert.h>
  1960. /* Override any gcc2 internal prototype to avoid an error.  */
  1961. /* We use char because int might match the return type of a gcc2
  1962.     builtin and then its argument prototype would still apply.  */
  1963. char $ac_func();
  1964.  
  1965. int main() {
  1966.  
  1967. /* The GNU C library defines this for functions which it implements
  1968.     to always fail with ENOSYS.  Some functions are actually named
  1969.     something starting with __ and the normal name is an alias.  */
  1970. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1971. choke me
  1972. #else
  1973. $ac_func();
  1974. #endif
  1975.  
  1976. ; return 0; }
  1977. EOF
  1978. if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1979.   rm -rf conftest*
  1980.   eval "ac_cv_func_$ac_func=yes"
  1981. else
  1982.   echo "configure: failed program was:" >&5
  1983.   cat conftest.$ac_ext >&5
  1984.   rm -rf conftest*
  1985.   eval "ac_cv_func_$ac_func=no"
  1986. fi
  1987. rm -f conftest*
  1988. fi
  1989.  
  1990. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1991.   echo "$ac_t""yes" 1>&6
  1992.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1993.   cat >> confdefs.h <<EOF
  1994. #define $ac_tr_func 1
  1995. EOF
  1996.  
  1997. else
  1998.   echo "$ac_t""no" 1>&6
  1999. fi
  2000. done
  2001.  
  2002.  
  2003. for ac_hdr in unistd.h
  2004. do
  2005. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2006. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2007. echo "configure:2008: checking for $ac_hdr" >&5
  2008. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2009.   echo $ac_n "(cached) $ac_c" 1>&6
  2010. else
  2011.   cat > conftest.$ac_ext <<EOF
  2012. #line 2013 "configure"
  2013. #include "confdefs.h"
  2014. #include <$ac_hdr>
  2015. EOF
  2016. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2017. { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2018. ac_err=`grep -v '^ *+' conftest.out`
  2019. if test -z "$ac_err"; then
  2020.   rm -rf conftest*
  2021.   eval "ac_cv_header_$ac_safe=yes"
  2022. else
  2023.   echo "$ac_err" >&5
  2024.   echo "configure: failed program was:" >&5
  2025.   cat conftest.$ac_ext >&5
  2026.   rm -rf conftest*
  2027.   eval "ac_cv_header_$ac_safe=no"
  2028. fi
  2029. rm -f conftest*
  2030. fi
  2031. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2032.   echo "$ac_t""yes" 1>&6
  2033.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2034.   cat >> confdefs.h <<EOF
  2035. #define $ac_tr_hdr 1
  2036. EOF
  2037.  
  2038. else
  2039.   echo "$ac_t""no" 1>&6
  2040. fi
  2041. done
  2042.  
  2043. for ac_func in getpagesize
  2044. do
  2045. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2046. echo "configure:2047: checking for $ac_func" >&5
  2047. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2048.   echo $ac_n "(cached) $ac_c" 1>&6
  2049. else
  2050.   cat > conftest.$ac_ext <<EOF
  2051. #line 2052 "configure"
  2052. #include "confdefs.h"
  2053. /* System header to define __stub macros and hopefully few prototypes,
  2054.     which can conflict with char $ac_func(); below.  */
  2055. #include <assert.h>
  2056. /* Override any gcc2 internal prototype to avoid an error.  */
  2057. /* We use char because int might match the return type of a gcc2
  2058.     builtin and then its argument prototype would still apply.  */
  2059. char $ac_func();
  2060.  
  2061. int main() {
  2062.  
  2063. /* The GNU C library defines this for functions which it implements
  2064.     to always fail with ENOSYS.  Some functions are actually named
  2065.     something starting with __ and the normal name is an alias.  */
  2066. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2067. choke me
  2068. #else
  2069. $ac_func();
  2070. #endif
  2071.  
  2072. ; return 0; }
  2073. EOF
  2074. if { (eval echo configure:2075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2075.   rm -rf conftest*
  2076.   eval "ac_cv_func_$ac_func=yes"
  2077. else
  2078.   echo "configure: failed program was:" >&5
  2079.   cat conftest.$ac_ext >&5
  2080.   rm -rf conftest*
  2081.   eval "ac_cv_func_$ac_func=no"
  2082. fi
  2083. rm -f conftest*
  2084. fi
  2085.  
  2086. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2087.   echo "$ac_t""yes" 1>&6
  2088.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2089.   cat >> confdefs.h <<EOF
  2090. #define $ac_tr_func 1
  2091. EOF
  2092.  
  2093. else
  2094.   echo "$ac_t""no" 1>&6
  2095. fi
  2096. done
  2097.  
  2098. echo $ac_n "checking for working mmap""... $ac_c" 1>&6
  2099. echo "configure:2100: checking for working mmap" >&5
  2100. if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  2101.   echo $ac_n "(cached) $ac_c" 1>&6
  2102. else
  2103.   if test "$cross_compiling" = yes; then
  2104.   ac_cv_func_mmap_fixed_mapped=no
  2105. else
  2106.   cat > conftest.$ac_ext <<EOF
  2107. #line 2108 "configure"
  2108. #include "confdefs.h"
  2109.  
  2110. /* Thanks to Mike Haertel and Jim Avera for this test.
  2111.    Here is a matrix of mmap possibilities:
  2112.     mmap private not fixed
  2113.     mmap private fixed at somewhere currently unmapped
  2114.     mmap private fixed at somewhere already mapped
  2115.     mmap shared not fixed
  2116.     mmap shared fixed at somewhere currently unmapped
  2117.     mmap shared fixed at somewhere already mapped
  2118.    For private mappings, we should verify that changes cannot be read()
  2119.    back from the file, nor mmap's back from the file at a different
  2120.    address.  (There have been systems where private was not correctly
  2121.    implemented like the infamous i386 svr4.0, and systems where the
  2122.    VM page cache was not coherent with the filesystem buffer cache
  2123.    like early versions of FreeBSD and possibly contemporary NetBSD.)
  2124.    For shared mappings, we should conversely verify that changes get
  2125.    propogated back to all the places they're supposed to be.
  2126.  
  2127.    Grep wants private fixed already mapped.
  2128.    The main things grep needs to know about mmap are:
  2129.    * does it exist and is it safe to write into the mmap'd area
  2130.    * how to use it (BSD variants)  */
  2131. #include <sys/types.h>
  2132. #include <fcntl.h>
  2133. #include <sys/mman.h>
  2134.  
  2135. /* This mess was copied from the GNU getpagesize.h.  */
  2136. #ifndef HAVE_GETPAGESIZE
  2137. # ifdef HAVE_UNISTD_H
  2138. #  include <unistd.h>
  2139. # endif
  2140.  
  2141. /* Assume that all systems that can run configure have sys/param.h.  */
  2142. # ifndef HAVE_SYS_PARAM_H
  2143. #  define HAVE_SYS_PARAM_H 1
  2144. # endif
  2145.  
  2146. # ifdef _SC_PAGESIZE
  2147. #  define getpagesize() sysconf(_SC_PAGESIZE)
  2148. # else /* no _SC_PAGESIZE */
  2149. #  ifdef HAVE_SYS_PARAM_H
  2150. #   include <sys/param.h>
  2151. #   ifdef EXEC_PAGESIZE
  2152. #    define getpagesize() EXEC_PAGESIZE
  2153. #   else /* no EXEC_PAGESIZE */
  2154. #    ifdef NBPG
  2155. #     define getpagesize() NBPG * CLSIZE
  2156. #     ifndef CLSIZE
  2157. #      define CLSIZE 1
  2158. #     endif /* no CLSIZE */
  2159. #    else /* no NBPG */
  2160. #     ifdef NBPC
  2161. #      define getpagesize() NBPC
  2162. #     else /* no NBPC */
  2163. #      ifdef PAGESIZE
  2164. #       define getpagesize() PAGESIZE
  2165. #      endif /* PAGESIZE */
  2166. #     endif /* no NBPC */
  2167. #    endif /* no NBPG */
  2168. #   endif /* no EXEC_PAGESIZE */
  2169. #  else /* no HAVE_SYS_PARAM_H */
  2170. #   define getpagesize() 8192    /* punt totally */
  2171. #  endif /* no HAVE_SYS_PARAM_H */
  2172. # endif /* no _SC_PAGESIZE */
  2173.  
  2174. #endif /* no HAVE_GETPAGESIZE */
  2175.  
  2176. #ifdef __cplusplus
  2177. extern "C" { void *malloc(unsigned); }
  2178. #else
  2179. char *malloc();
  2180. #endif
  2181.  
  2182. int
  2183. main()
  2184. {
  2185.     char *data, *data2, *data3;
  2186.     int i, pagesize;
  2187.     int fd;
  2188.  
  2189.     pagesize = getpagesize();
  2190.  
  2191.     /*
  2192.      * First, make a file with some known garbage in it.
  2193.      */
  2194.     data = malloc(pagesize);
  2195.     if (!data)
  2196.         exit(1);
  2197.     for (i = 0; i < pagesize; ++i)
  2198.         *(data + i) = rand();
  2199.     umask(0);
  2200.     fd = creat("conftestmmap", 0600);
  2201.     if (fd < 0)
  2202.         exit(1);
  2203.     if (write(fd, data, pagesize) != pagesize)
  2204.         exit(1);
  2205.     close(fd);
  2206.  
  2207.     /*
  2208.      * Next, try to mmap the file at a fixed address which
  2209.      * already has something else allocated at it.  If we can,
  2210.      * also make sure that we see the same garbage.
  2211.      */
  2212.     fd = open("conftestmmap", O_RDWR);
  2213.     if (fd < 0)
  2214.         exit(1);
  2215.     data2 = malloc(2 * pagesize);
  2216.     if (!data2)
  2217.         exit(1);
  2218.     data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
  2219.     if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
  2220.         MAP_PRIVATE | MAP_FIXED, fd, 0L))
  2221.         exit(1);
  2222.     for (i = 0; i < pagesize; ++i)
  2223.         if (*(data + i) != *(data2 + i))
  2224.             exit(1);
  2225.  
  2226.     /*
  2227.      * Finally, make sure that changes to the mapped area
  2228.      * do not percolate back to the file as seen by read().
  2229.      * (This is a bug on some variants of i386 svr4.0.)
  2230.      */
  2231.     for (i = 0; i < pagesize; ++i)
  2232.         *(data2 + i) = *(data2 + i) + 1;
  2233.     data3 = malloc(pagesize);
  2234.     if (!data3)
  2235.         exit(1);
  2236.     if (read(fd, data3, pagesize) != pagesize)
  2237.         exit(1);
  2238.     for (i = 0; i < pagesize; ++i)
  2239.         if (*(data + i) != *(data3 + i))
  2240.             exit(1);
  2241.     close(fd);
  2242.     unlink("conftestmmap");
  2243.     exit(0);
  2244. }
  2245.  
  2246. EOF
  2247. if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2248. then
  2249.   ac_cv_func_mmap_fixed_mapped=yes
  2250. else
  2251.   echo "configure: failed program was:" >&5
  2252.   cat conftest.$ac_ext >&5
  2253.   rm -fr conftest*
  2254.   ac_cv_func_mmap_fixed_mapped=no
  2255. fi
  2256. rm -fr conftest*
  2257. fi
  2258.  
  2259. fi
  2260.  
  2261. echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
  2262. if test $ac_cv_func_mmap_fixed_mapped = yes; then
  2263.   cat >> confdefs.h <<\EOF
  2264. #define HAVE_MMAP 1
  2265. EOF
  2266.  
  2267. fi
  2268.  
  2269.  
  2270. if (uname) > /dev/null 2>&1
  2271. then
  2272.     case `uname` in
  2273.     *VMS*)    cat >> confdefs.h <<\EOF
  2274. #define GETPGRP_VOID 1
  2275. EOF
  2276.  ;;
  2277.     *)    echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  2278. echo "configure:2279: checking whether getpgrp takes no argument" >&5
  2279. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  2280.   echo $ac_n "(cached) $ac_c" 1>&6
  2281. else
  2282.   if test "$cross_compiling" = yes; then
  2283.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  2284. else
  2285.   cat > conftest.$ac_ext <<EOF
  2286. #line 2287 "configure"
  2287. #include "confdefs.h"
  2288.  
  2289. /*
  2290.  * If this system has a BSD-style getpgrp(),
  2291.  * which takes a pid argument, exit unsuccessfully.
  2292.  *
  2293.  * Snarfed from Chet Ramey's bash pgrp.c test program
  2294.  */
  2295. #include <stdio.h>
  2296. #include <sys/types.h>
  2297.  
  2298. int     pid;
  2299. int     pg1, pg2, pg3, pg4;
  2300. int     ng, np, s, child;
  2301.  
  2302. main()
  2303. {
  2304.         pid = getpid();
  2305.         pg1 = getpgrp(0);
  2306.         pg2 = getpgrp();
  2307.         pg3 = getpgrp(pid);
  2308.         pg4 = getpgrp(1);
  2309.  
  2310.         /*
  2311.          * If all of these values are the same, it's pretty sure that
  2312.          * we're on a system that ignores getpgrp's first argument.
  2313.          */
  2314.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  2315.                 exit(0);
  2316.  
  2317.         child = fork();
  2318.         if (child < 0)
  2319.                 exit(1);
  2320.         else if (child == 0) {
  2321.                 np = getpid();
  2322.                 /*
  2323.                  * If this is Sys V, this will not work; pgrp will be
  2324.                  * set to np because setpgrp just changes a pgrp to be
  2325.                  * the same as the pid.
  2326.                  */
  2327.                 setpgrp(np, pg1);
  2328.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  2329.                 if (ng == pg1) {
  2330.                         exit(1);
  2331.                 } else {
  2332.                         exit(0);
  2333.                 }
  2334.         } else {
  2335.                 wait(&s);
  2336.                 exit(s>>8);
  2337.         }
  2338. }
  2339.  
  2340. EOF
  2341. if { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2342. then
  2343.   ac_cv_func_getpgrp_void=yes
  2344. else
  2345.   echo "configure: failed program was:" >&5
  2346.   cat conftest.$ac_ext >&5
  2347.   rm -fr conftest*
  2348.   ac_cv_func_getpgrp_void=no
  2349. fi
  2350. rm -fr conftest*
  2351. fi
  2352.  
  2353.  
  2354. fi
  2355.  
  2356. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  2357. if test $ac_cv_func_getpgrp_void = yes; then
  2358.   cat >> confdefs.h <<\EOF
  2359. #define GETPGRP_VOID 1
  2360. EOF
  2361.  
  2362. fi
  2363.  
  2364.         ;;
  2365.     esac
  2366. else
  2367.     echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
  2368. echo "configure:2369: checking whether getpgrp takes no argument" >&5
  2369. if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
  2370.   echo $ac_n "(cached) $ac_c" 1>&6
  2371. else
  2372.   if test "$cross_compiling" = yes; then
  2373.   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
  2374. else
  2375.   cat > conftest.$ac_ext <<EOF
  2376. #line 2377 "configure"
  2377. #include "confdefs.h"
  2378.  
  2379. /*
  2380.  * If this system has a BSD-style getpgrp(),
  2381.  * which takes a pid argument, exit unsuccessfully.
  2382.  *
  2383.  * Snarfed from Chet Ramey's bash pgrp.c test program
  2384.  */
  2385. #include <stdio.h>
  2386. #include <sys/types.h>
  2387.  
  2388. int     pid;
  2389. int     pg1, pg2, pg3, pg4;
  2390. int     ng, np, s, child;
  2391.  
  2392. main()
  2393. {
  2394.         pid = getpid();
  2395.         pg1 = getpgrp(0);
  2396.         pg2 = getpgrp();
  2397.         pg3 = getpgrp(pid);
  2398.         pg4 = getpgrp(1);
  2399.  
  2400.         /*
  2401.          * If all of these values are the same, it's pretty sure that
  2402.          * we're on a system that ignores getpgrp's first argument.
  2403.          */
  2404.         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  2405.                 exit(0);
  2406.  
  2407.         child = fork();
  2408.         if (child < 0)
  2409.                 exit(1);
  2410.         else if (child == 0) {
  2411.                 np = getpid();
  2412.                 /*
  2413.                  * If this is Sys V, this will not work; pgrp will be
  2414.                  * set to np because setpgrp just changes a pgrp to be
  2415.                  * the same as the pid.
  2416.                  */
  2417.                 setpgrp(np, pg1);
  2418.                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
  2419.                 if (ng == pg1) {
  2420.                         exit(1);
  2421.                 } else {
  2422.                         exit(0);
  2423.                 }
  2424.         } else {
  2425.                 wait(&s);
  2426.                 exit(s>>8);
  2427.         }
  2428. }
  2429.  
  2430. EOF
  2431. if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2432. then
  2433.   ac_cv_func_getpgrp_void=yes
  2434. else
  2435.   echo "configure: failed program was:" >&5
  2436.   cat conftest.$ac_ext >&5
  2437.   rm -fr conftest*
  2438.   ac_cv_func_getpgrp_void=no
  2439. fi
  2440. rm -fr conftest*
  2441. fi
  2442.  
  2443.  
  2444. fi
  2445.  
  2446. echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
  2447. if test $ac_cv_func_getpgrp_void = yes; then
  2448.   cat >> confdefs.h <<\EOF
  2449. #define GETPGRP_VOID 1
  2450. EOF
  2451.  
  2452. fi
  2453.  
  2454. fi
  2455.  
  2456. echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
  2457. echo "configure:2458: checking for st_blksize in struct stat" >&5
  2458. if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  2459.   echo $ac_n "(cached) $ac_c" 1>&6
  2460. else
  2461.   cat > conftest.$ac_ext <<EOF
  2462. #line 2463 "configure"
  2463. #include "confdefs.h"
  2464. #include <sys/types.h>
  2465. #include <sys/stat.h>
  2466. int main() {
  2467. struct stat s; s.st_blksize;
  2468. ; return 0; }
  2469. EOF
  2470. if { (eval echo configure:2471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2471.   rm -rf conftest*
  2472.   ac_cv_struct_st_blksize=yes
  2473. else
  2474.   echo "configure: failed program was:" >&5
  2475.   cat conftest.$ac_ext >&5
  2476.   rm -rf conftest*
  2477.   ac_cv_struct_st_blksize=no
  2478. fi
  2479. rm -f conftest*
  2480. fi
  2481.  
  2482. echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
  2483. if test $ac_cv_struct_st_blksize = yes; then
  2484.   cat >> confdefs.h <<\EOF
  2485. #define HAVE_ST_BLKSIZE 1
  2486. EOF
  2487.  
  2488. fi
  2489.  
  2490. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2491. echo "configure:2492: checking whether time.h and sys/time.h may both be included" >&5
  2492. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2493.   echo $ac_n "(cached) $ac_c" 1>&6
  2494. else
  2495.   cat > conftest.$ac_ext <<EOF
  2496. #line 2497 "configure"
  2497. #include "confdefs.h"
  2498. #include <sys/types.h>
  2499. #include <sys/time.h>
  2500. #include <time.h>
  2501. int main() {
  2502. struct tm *tp;
  2503. ; return 0; }
  2504. EOF
  2505. if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2506.   rm -rf conftest*
  2507.   ac_cv_header_time=yes
  2508. else
  2509.   echo "configure: failed program was:" >&5
  2510.   cat conftest.$ac_ext >&5
  2511.   rm -rf conftest*
  2512.   ac_cv_header_time=no
  2513. fi
  2514. rm -f conftest*
  2515. fi
  2516.  
  2517. echo "$ac_t""$ac_cv_header_time" 1>&6
  2518. if test $ac_cv_header_time = yes; then
  2519.   cat >> confdefs.h <<\EOF
  2520. #define TIME_WITH_SYS_TIME 1
  2521. EOF
  2522.  
  2523. fi
  2524.  
  2525. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2526. echo "configure:2527: checking whether struct tm is in sys/time.h or time.h" >&5
  2527. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2528.   echo $ac_n "(cached) $ac_c" 1>&6
  2529. else
  2530.   cat > conftest.$ac_ext <<EOF
  2531. #line 2532 "configure"
  2532. #include "confdefs.h"
  2533. #include <sys/types.h>
  2534. #include <time.h>
  2535. int main() {
  2536. struct tm *tp; tp->tm_sec;
  2537. ; return 0; }
  2538. EOF
  2539. if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2540.   rm -rf conftest*
  2541.   ac_cv_struct_tm=time.h
  2542. else
  2543.   echo "configure: failed program was:" >&5
  2544.   cat conftest.$ac_ext >&5
  2545.   rm -rf conftest*
  2546.   ac_cv_struct_tm=sys/time.h
  2547. fi
  2548. rm -f conftest*
  2549. fi
  2550.  
  2551. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2552. if test $ac_cv_struct_tm = sys/time.h; then
  2553.   cat >> confdefs.h <<\EOF
  2554. #define TM_IN_SYS_TIME 1
  2555. EOF
  2556.  
  2557. fi
  2558.  
  2559. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  2560. echo "configure:2561: checking for tm_zone in struct tm" >&5
  2561. if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  2562.   echo $ac_n "(cached) $ac_c" 1>&6
  2563. else
  2564.   cat > conftest.$ac_ext <<EOF
  2565. #line 2566 "configure"
  2566. #include "confdefs.h"
  2567. #include <sys/types.h>
  2568. #include <$ac_cv_struct_tm>
  2569. int main() {
  2570. struct tm tm; tm.tm_zone;
  2571. ; return 0; }
  2572. EOF
  2573. if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2574.   rm -rf conftest*
  2575.   ac_cv_struct_tm_zone=yes
  2576. else
  2577.   echo "configure: failed program was:" >&5
  2578.   cat conftest.$ac_ext >&5
  2579.   rm -rf conftest*
  2580.   ac_cv_struct_tm_zone=no
  2581. fi
  2582. rm -f conftest*
  2583. fi
  2584.  
  2585. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  2586. if test "$ac_cv_struct_tm_zone" = yes; then
  2587.   cat >> confdefs.h <<\EOF
  2588. #define HAVE_TM_ZONE 1
  2589. EOF
  2590.  
  2591. else
  2592.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  2593. echo "configure:2594: checking for tzname" >&5
  2594. if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  2595.   echo $ac_n "(cached) $ac_c" 1>&6
  2596. else
  2597.   cat > conftest.$ac_ext <<EOF
  2598. #line 2599 "configure"
  2599. #include "confdefs.h"
  2600. #include <time.h>
  2601. #ifndef tzname /* For SGI.  */
  2602. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  2603. #endif
  2604. int main() {
  2605. atoi(*tzname);
  2606. ; return 0; }
  2607. EOF
  2608. if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  2609.   rm -rf conftest*
  2610.   ac_cv_var_tzname=yes
  2611. else
  2612.   echo "configure: failed program was:" >&5
  2613.   cat conftest.$ac_ext >&5
  2614.   rm -rf conftest*
  2615.   ac_cv_var_tzname=no
  2616. fi
  2617. rm -f conftest*
  2618. fi
  2619.  
  2620. echo "$ac_t""$ac_cv_var_tzname" 1>&6
  2621.   if test $ac_cv_var_tzname = yes; then
  2622.     cat >> confdefs.h <<\EOF
  2623. #define HAVE_TZNAME 1
  2624. EOF
  2625.  
  2626.   fi
  2627. fi
  2628.  
  2629.  
  2630. echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  2631. echo "configure:2632: checking whether char is unsigned" >&5
  2632. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  2633.   echo $ac_n "(cached) $ac_c" 1>&6
  2634. else
  2635.   if test "$GCC" = yes; then
  2636.   # GCC predefines this symbol on systems where it applies.
  2637. cat > conftest.$ac_ext <<EOF
  2638. #line 2639 "configure"
  2639. #include "confdefs.h"
  2640. #ifdef __CHAR_UNSIGNED__
  2641.   yes
  2642. #endif
  2643.  
  2644. EOF
  2645. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2646.   egrep "yes" >/dev/null 2>&1; then
  2647.   rm -rf conftest*
  2648.   ac_cv_c_char_unsigned=yes
  2649. else
  2650.   rm -rf conftest*
  2651.   ac_cv_c_char_unsigned=no
  2652. fi
  2653. rm -f conftest*
  2654.  
  2655. else
  2656. if test "$cross_compiling" = yes; then
  2657.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2658. else
  2659.   cat > conftest.$ac_ext <<EOF
  2660. #line 2661 "configure"
  2661. #include "confdefs.h"
  2662. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  2663. #if !defined(__STDC__) || __STDC__ != 1
  2664. #define volatile
  2665. #endif
  2666. main() {
  2667.   volatile char c = 255; exit(c < 0);
  2668. }
  2669. EOF
  2670. if { (eval echo configure:2671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2671. then
  2672.   ac_cv_c_char_unsigned=yes
  2673. else
  2674.   echo "configure: failed program was:" >&5
  2675.   cat conftest.$ac_ext >&5
  2676.   rm -fr conftest*
  2677.   ac_cv_c_char_unsigned=no
  2678. fi
  2679. rm -fr conftest*
  2680. fi
  2681.  
  2682. fi
  2683. fi
  2684.  
  2685. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  2686. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  2687.   cat >> confdefs.h <<\EOF
  2688. #define __CHAR_UNSIGNED__ 1
  2689. EOF
  2690.  
  2691. fi
  2692.  
  2693. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2694. echo "configure:2695: checking for working const" >&5
  2695. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2696.   echo $ac_n "(cached) $ac_c" 1>&6
  2697. else
  2698.   cat > conftest.$ac_ext <<EOF
  2699. #line 2700 "configure"
  2700. #include "confdefs.h"
  2701.  
  2702. int main() {
  2703.  
  2704. /* Ultrix mips cc rejects this.  */
  2705. typedef int charset[2]; const charset x;
  2706. /* SunOS 4.1.1 cc rejects this.  */
  2707. char const *const *ccp;
  2708. char **p;
  2709. /* NEC SVR4.0.2 mips cc rejects this.  */
  2710. struct point {int x, y;};
  2711. static struct point const zero = {0,0};
  2712. /* AIX XL C 1.02.0.0 rejects this.
  2713.    It does not let you subtract one const X* pointer from another in an arm
  2714.    of an if-expression whose if-part is not a constant expression */
  2715. const char *g = "string";
  2716. ccp = &g + (g ? g-g : 0);
  2717. /* HPUX 7.0 cc rejects these. */
  2718. ++ccp;
  2719. p = (char**) ccp;
  2720. ccp = (char const *const *) p;
  2721. { /* SCO 3.2v4 cc rejects this.  */
  2722.   char *t;
  2723.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2724.  
  2725.   *t++ = 0;
  2726. }
  2727. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2728.   int x[] = {25, 17};
  2729.   const int *foo = &x[0];
  2730.   ++foo;
  2731. }
  2732. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2733.   typedef const int *iptr;
  2734.   iptr p = 0;
  2735.   ++p;
  2736. }
  2737. { /* AIX XL C 1.02.0.0 rejects this saying
  2738.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2739.   struct s { int j; const int *ap[3]; };
  2740.   struct s *b; b->j = 5;
  2741. }
  2742. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2743.   const int foo = 10;
  2744. }
  2745.  
  2746. ; return 0; }
  2747. EOF
  2748. if { (eval echo configure:2749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2749.   rm -rf conftest*
  2750.   ac_cv_c_const=yes
  2751. else
  2752.   echo "configure: failed program was:" >&5
  2753.   cat conftest.$ac_ext >&5
  2754.   rm -rf conftest*
  2755.   ac_cv_c_const=no
  2756. fi
  2757. rm -f conftest*
  2758. fi
  2759.  
  2760. echo "$ac_t""$ac_cv_c_const" 1>&6
  2761. if test $ac_cv_c_const = no; then
  2762.   cat >> confdefs.h <<\EOF
  2763. #define const 
  2764. EOF
  2765.  
  2766. fi
  2767.  
  2768.  
  2769.  
  2770. echo $ac_n "checking for ANSI stringizing capability""... $ac_c" 1>&6
  2771. echo "configure:2772: checking for ANSI stringizing capability" >&5
  2772. if eval "test \"`echo '$''{'gawk_cv_c_stringize'+set}'`\" = set"; then
  2773.   echo $ac_n "(cached) $ac_c" 1>&6
  2774. else
  2775.   cat > conftest.$ac_ext <<EOF
  2776. #line 2777 "configure"
  2777. #include "confdefs.h"
  2778.  
  2779. #define x(y) #y
  2780.  
  2781. char *s = x(teststring);
  2782.  
  2783. EOF
  2784. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2785.   egrep "#teststring" >/dev/null 2>&1; then
  2786.   rm -rf conftest*
  2787.   gawk_cv_c_stringize=no
  2788. else
  2789.   rm -rf conftest*
  2790.   gawk_cv_c_stringize=yes
  2791. fi
  2792. rm -f conftest*
  2793.  
  2794. fi
  2795.  
  2796. if test "${gawk_cv_c_stringize}" = yes
  2797. then
  2798.     cat >> confdefs.h <<\EOF
  2799. #define HAVE_STRINGIZE 1
  2800. EOF
  2801.  
  2802. fi
  2803. echo "$ac_t""${gawk_cv_c_stringize}" 1>&6
  2804.  
  2805.  
  2806. trap '' 1 2 15
  2807. cat > confcache <<\EOF
  2808. # This file is a shell script that caches the results of configure
  2809. # tests run on this system so they can be shared between configure
  2810. # scripts and configure runs.  It is not useful on other systems.
  2811. # If it contains results you don't want to keep, you may remove or edit it.
  2812. #
  2813. # By default, configure uses ./config.cache as the cache file,
  2814. # creating it if it does not exist already.  You can give configure
  2815. # the --cache-file=FILE option to use a different cache file; that is
  2816. # what configure does when it calls configure scripts in
  2817. # subdirectories, so they share the cache.
  2818. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2819. # config.status only pays attention to the cache file if you give it the
  2820. # --recheck option to rerun configure.
  2821. #
  2822. EOF
  2823. # The following way of writing the cache mishandles newlines in values,
  2824. # but we know of no workaround that is simple, portable, and efficient.
  2825. # So, don't put newlines in cache variables' values.
  2826. # Ultrix sh set writes to stderr and can't be redirected directly,
  2827. # and sets the high bit in the cache file unless we assign to the vars.
  2828. (set) 2>&1 |
  2829.   case `(ac_space=' '; set) 2>&1` in
  2830.   *ac_space=\ *)
  2831.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2832.     # turns \\\\ into \\, and sed turns \\ into \).
  2833.     sed -n \
  2834.       -e "s/'/'\\\\''/g" \
  2835.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2836.     ;;
  2837.   *)
  2838.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2839.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2840.     ;;
  2841.   esac >> confcache
  2842. if cmp -s $cache_file confcache; then
  2843.   :
  2844. else
  2845.   if test -w $cache_file; then
  2846.     echo "updating cache $cache_file"
  2847.     cat confcache > $cache_file
  2848.   else
  2849.     echo "not updating unwritable cache $cache_file"
  2850.   fi
  2851. fi
  2852. rm -f confcache
  2853.  
  2854. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2855.  
  2856. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2857. # Let make expand exec_prefix.
  2858. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2859.  
  2860. # Any assignment to VPATH causes Sun make to only execute
  2861. # the first set of double-colon rules, so remove it if not needed.
  2862. # If there is a colon in the path, we need to keep it.
  2863. if test "x$srcdir" = x.; then
  2864.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2865. fi
  2866.  
  2867. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2868.  
  2869. DEFS=-DHAVE_CONFIG_H
  2870.  
  2871. # Without the "./", some shells look in PATH for config.status.
  2872. : ${CONFIG_STATUS=./config.status}
  2873.  
  2874. echo creating $CONFIG_STATUS
  2875. rm -f $CONFIG_STATUS
  2876. cat > $CONFIG_STATUS <<EOF
  2877. #! /bin/sh
  2878. # Generated automatically by configure.
  2879. # Run this file to recreate the current configuration.
  2880. # This directory was configured as follows,
  2881. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2882. #
  2883. # $0 $ac_configure_args
  2884. #
  2885. # Compiler output produced by configure, useful for debugging
  2886. # configure, is in ./config.log if it exists.
  2887.  
  2888. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2889. for ac_option
  2890. do
  2891.   case "\$ac_option" in
  2892.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2893.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2894.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2895.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2896.     echo "$CONFIG_STATUS generated by autoconf version 2.12"
  2897.     exit 0 ;;
  2898.   -help | --help | --hel | --he | --h)
  2899.     echo "\$ac_cs_usage"; exit 0 ;;
  2900.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2901.   esac
  2902. done
  2903.  
  2904. ac_given_srcdir=$srcdir
  2905. ac_given_INSTALL="$INSTALL"
  2906.  
  2907. trap 'rm -fr `echo "Makefile doc/Makefile test/Makefile awklib/Makefile config.h:configh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2908. EOF
  2909. cat >> $CONFIG_STATUS <<EOF
  2910.  
  2911. # Protect against being on the right side of a sed subst in config.status.
  2912. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2913.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2914. $ac_vpsub
  2915. $extrasub
  2916. s%@CFLAGS@%$CFLAGS%g
  2917. s%@CPPFLAGS@%$CPPFLAGS%g
  2918. s%@CXXFLAGS@%$CXXFLAGS%g
  2919. s%@DEFS@%$DEFS%g
  2920. s%@LDFLAGS@%$LDFLAGS%g
  2921. s%@LIBS@%$LIBS%g
  2922. s%@exec_prefix@%$exec_prefix%g
  2923. s%@prefix@%$prefix%g
  2924. s%@program_transform_name@%$program_transform_name%g
  2925. s%@bindir@%$bindir%g
  2926. s%@sbindir@%$sbindir%g
  2927. s%@libexecdir@%$libexecdir%g
  2928. s%@datadir@%$datadir%g
  2929. s%@sysconfdir@%$sysconfdir%g
  2930. s%@sharedstatedir@%$sharedstatedir%g
  2931. s%@localstatedir@%$localstatedir%g
  2932. s%@libdir@%$libdir%g
  2933. s%@includedir@%$includedir%g
  2934. s%@oldincludedir@%$oldincludedir%g
  2935. s%@infodir@%$infodir%g
  2936. s%@mandir@%$mandir%g
  2937. s%@YACC@%$YACC%g
  2938. s%@LN_S@%$LN_S%g
  2939. s%@CC@%$CC%g
  2940. s%@CPP@%$CPP%g
  2941. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2942. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2943. s%@SET_MAKE@%$SET_MAKE%g
  2944. s%@ALLOCA@%$ALLOCA%g
  2945.  
  2946. CEOF
  2947. EOF
  2948.  
  2949. cat >> $CONFIG_STATUS <<\EOF
  2950.  
  2951. # Split the substitutions into bite-sized pieces for seds with
  2952. # small command number limits, like on Digital OSF/1 and HP-UX.
  2953. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2954. ac_file=1 # Number of current file.
  2955. ac_beg=1 # First line for current file.
  2956. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2957. ac_more_lines=:
  2958. ac_sed_cmds=""
  2959. while $ac_more_lines; do
  2960.   if test $ac_beg -gt 1; then
  2961.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2962.   else
  2963.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2964.   fi
  2965.   if test ! -s conftest.s$ac_file; then
  2966.     ac_more_lines=false
  2967.     rm -f conftest.s$ac_file
  2968.   else
  2969.     if test -z "$ac_sed_cmds"; then
  2970.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2971.     else
  2972.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2973.     fi
  2974.     ac_file=`expr $ac_file + 1`
  2975.     ac_beg=$ac_end
  2976.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2977.   fi
  2978. done
  2979. if test -z "$ac_sed_cmds"; then
  2980.   ac_sed_cmds=cat
  2981. fi
  2982. EOF
  2983.  
  2984. cat >> $CONFIG_STATUS <<EOF
  2985.  
  2986. CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile test/Makefile awklib/Makefile"}
  2987. EOF
  2988. cat >> $CONFIG_STATUS <<\EOF
  2989. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2990.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2991.   case "$ac_file" in
  2992.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2993.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2994.   *) ac_file_in="${ac_file}.in" ;;
  2995.   esac
  2996.  
  2997.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2998.  
  2999.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3000.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3001.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3002.     # The file is in a subdirectory.
  3003.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3004.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3005.     # A "../" for each directory in $ac_dir_suffix.
  3006.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3007.   else
  3008.     ac_dir_suffix= ac_dots=
  3009.   fi
  3010.  
  3011.   case "$ac_given_srcdir" in
  3012.   .)  srcdir=.
  3013.       if test -z "$ac_dots"; then top_srcdir=.
  3014.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3015.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3016.   *) # Relative path.
  3017.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3018.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3019.   esac
  3020.  
  3021.   case "$ac_given_INSTALL" in
  3022.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3023.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3024.   esac
  3025.  
  3026.   echo creating "$ac_file"
  3027.   rm -f "$ac_file"
  3028.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3029.   case "$ac_file" in
  3030.   *Makefile*) ac_comsub="1i\\
  3031. # $configure_input" ;;
  3032.   *) ac_comsub= ;;
  3033.   esac
  3034.  
  3035.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3036.   sed -e "$ac_comsub
  3037. s%@configure_input@%$configure_input%g
  3038. s%@srcdir@%$srcdir%g
  3039. s%@top_srcdir@%$top_srcdir%g
  3040. s%@INSTALL@%$INSTALL%g
  3041. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3042. fi; done
  3043. rm -f conftest.s*
  3044.  
  3045. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3046. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3047. #
  3048. # ac_d sets the value in "#define NAME VALUE" lines.
  3049. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3050. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3051. ac_dC='\3'
  3052. ac_dD='%g'
  3053. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3054. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3055. ac_uB='\([     ]\)%\1#\2define\3'
  3056. ac_uC=' '
  3057. ac_uD='\4%g'
  3058. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3059. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3060. ac_eB='$%\1#\2define\3'
  3061. ac_eC=' '
  3062. ac_eD='%g'
  3063.  
  3064. if test "${CONFIG_HEADERS+set}" != set; then
  3065. EOF
  3066. cat >> $CONFIG_STATUS <<EOF
  3067.   CONFIG_HEADERS="config.h:configh.in"
  3068. EOF
  3069. cat >> $CONFIG_STATUS <<\EOF
  3070. fi
  3071. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3072.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3073.   case "$ac_file" in
  3074.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3075.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3076.   *) ac_file_in="${ac_file}.in" ;;
  3077.   esac
  3078.  
  3079.   echo creating $ac_file
  3080.  
  3081.   rm -f conftest.frag conftest.in conftest.out
  3082.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3083.   cat $ac_file_inputs > conftest.in
  3084.  
  3085. EOF
  3086.  
  3087. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3088. # the proper values into config.h.in to produce config.h.  And first:
  3089. # Protect against being on the right side of a sed subst in config.status.
  3090. # Protect against being in an unquoted here document in config.status.
  3091. rm -f conftest.vals
  3092. cat > conftest.hdr <<\EOF
  3093. s/[\\&%]/\\&/g
  3094. s%[\\$`]%\\&%g
  3095. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3096. s%ac_d%ac_u%gp
  3097. s%ac_u%ac_e%gp
  3098. EOF
  3099. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3100. rm -f conftest.hdr
  3101.  
  3102. # This sed command replaces #undef with comments.  This is necessary, for
  3103. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3104. # on some systems where configure will not decide to define it.
  3105. cat >> conftest.vals <<\EOF
  3106. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3107. EOF
  3108.  
  3109. # Break up conftest.vals because some shells have a limit on
  3110. # the size of here documents, and old seds have small limits too.
  3111.  
  3112. rm -f conftest.tail
  3113. while :
  3114. do
  3115.   ac_lines=`grep -c . conftest.vals`
  3116.   # grep -c gives empty output for an empty file on some AIX systems.
  3117.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3118.   # Write a limited-size here document to conftest.frag.
  3119.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3120.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3121.   echo 'CEOF
  3122.   sed -f conftest.frag conftest.in > conftest.out
  3123.   rm -f conftest.in
  3124.   mv conftest.out conftest.in
  3125. ' >> $CONFIG_STATUS
  3126.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3127.   rm -f conftest.vals
  3128.   mv conftest.tail conftest.vals
  3129. done
  3130. rm -f conftest.vals
  3131.  
  3132. cat >> $CONFIG_STATUS <<\EOF
  3133.   rm -f conftest.frag conftest.h
  3134.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3135.   cat conftest.in >> conftest.h
  3136.   rm -f conftest.in
  3137.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3138.     echo "$ac_file is unchanged"
  3139.     rm -f conftest.h
  3140.   else
  3141.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3142.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3143.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3144.       # The file is in a subdirectory.
  3145.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3146.     fi
  3147.     rm -f $ac_file
  3148.     mv conftest.h $ac_file
  3149.   fi
  3150. fi; done
  3151.  
  3152. EOF
  3153. cat >> $CONFIG_STATUS <<EOF
  3154.  
  3155. EOF
  3156. cat >> $CONFIG_STATUS <<\EOF
  3157. date > stamp-h
  3158. exit 0
  3159. EOF
  3160. chmod +x $CONFIG_STATUS
  3161. rm -fr confdefs* $ac_clean_files
  3162. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3163.  
  3164.