home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / CLISP-2.LHA / CLISP960530-ki.lha / ffcall / trampoline / configure < prev    next >
Encoding:
Text File  |  1996-06-12  |  85.6 KB  |  3,486 lines

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