home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / fileutils-3.9-src.lha / GNU / src / amiga / fileutils-3.9 / configure < prev    next >
Encoding:
Text File  |  1994-04-25  |  70.0 KB  |  2,582 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.9 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     /bin/echo "configure generated by autoconf version 1.9"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) /bin/echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       /bin/echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       /bin/echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   /bin/echo "configure: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. /bin/echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=src/ls.c
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     /bin/echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     /bin/echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. ac_cpp='${CPP} $CFLAGS'
  314. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  315.  
  316.  
  317.  
  318.  
  319. # We want these before the checks, so the checks can modify their values.
  320. test -z "$CFLAGS" && CFLAGS= auto_cflags=1
  321. test -z "$LDFLAGS" && LDFLAGS=
  322.  
  323. if test -z "$CC"; then
  324.   # Extract the first word of `gcc', so it can be a program name with args.
  325.   set ac_dummy gcc; ac_word=$2
  326.   test -n "$silent" || /bin/echo "checking for $ac_word"
  327.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  328.   for ac_dir in $PATH; do
  329.     test -z "$ac_dir" && ac_dir=.
  330.     if test -f $ac_dir/$ac_word; then
  331.       CC="gcc"
  332.       break
  333.     fi
  334.   done
  335.   IFS="$ac_save_ifs"
  336. fi
  337. test -z "$CC" && CC="cc"
  338. test -n "$CC" && test -n "$verbose" && /bin/echo "    setting CC to $CC"
  339.  
  340. # Find out if we are using GNU C, under whatever name.
  341. cat > conftest.c <<EOF
  342. #ifdef __GNUC__
  343.   yes
  344. #endif
  345. EOF
  346. ${CC-cc} -E conftest.c > conftest.out 2>&1
  347. if egrep yes conftest.out >/dev/null 2>&1; then
  348.   GCC=1 # For later tests.
  349. fi
  350. rm -f conftest*
  351.  
  352.  
  353. # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
  354. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
  355.  
  356.  
  357. test -n "$silent" || /bin/echo "checking how to run the C preprocessor"
  358. if test -z "$CPP"; then
  359.   # This must be in double quotes, not single quotes, because CPP may get
  360.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  361.   # make.  It must be expanded now.
  362.   CPP="${CC-cc} -E"
  363.   cat > conftest.${ac_ext} <<EOF
  364. #include "confdefs.h"
  365. #include <stdio.h>
  366. Syntax Error
  367. EOF
  368. # Some shells (Coherent) do redirections in the wrong order, so need
  369. # the parens.
  370. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  371. if test -z "$ac_err"; then
  372.   :
  373. else
  374.   rm -rf conftest*
  375.   CPP="${CC-cc} -E -traditional-cpp"
  376.   cat > conftest.${ac_ext} <<EOF
  377. #include "confdefs.h"
  378. #include <stdio.h>
  379. Syntax Error
  380. EOF
  381. # Some shells (Coherent) do redirections in the wrong order, so need
  382. # the parens.
  383. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  384. if test -z "$ac_err"; then
  385.   :
  386. else
  387.   rm -rf conftest*
  388.   CPP=/lib/cpp
  389. fi
  390. rm -f conftest*
  391. fi
  392. rm -f conftest*
  393. fi
  394. test -n "$verbose" && /bin/echo "    setting CPP to $CPP"
  395.  
  396. if test -n "$GCC"; then
  397.   test -n "$silent" || /bin/echo "checking whether -traditional is needed"
  398.   ac_pattern="Autoconf.*'x'"
  399.   ac_prog='#include <sgtty.h>
  400. Autoconf TIOCGETP'
  401.   cat > conftest.${ac_ext} <<EOF
  402. #include "confdefs.h"
  403. $ac_prog
  404. EOF
  405. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  406. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  407.   rm -rf conftest*
  408.   ac_need_trad=1
  409.  
  410. fi
  411. rm -f conftest*
  412.  
  413.  
  414.   if test -z "$ac_need_trad"; then
  415.     ac_prog='#include <termio.h>
  416. Autoconf TCGETA'
  417.     cat > conftest.${ac_ext} <<EOF
  418. #include "confdefs.h"
  419. $ac_prog
  420. EOF
  421. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  422. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  423.   rm -rf conftest*
  424.   ac_need_trad=1
  425.  
  426. fi
  427. rm -f conftest*
  428.  
  429.   fi
  430.   test -n "$ac_need_trad" && CC="$CC -traditional"
  431. fi
  432.  
  433. if test -z "$RANLIB"; then
  434.   # Extract the first word of `ranlib', so it can be a program name with args.
  435.   set ac_dummy ranlib; ac_word=$2
  436.   test -n "$silent" || /bin/echo "checking for $ac_word"
  437.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  438.   for ac_dir in $PATH; do
  439.     test -z "$ac_dir" && ac_dir=.
  440.     if test -f $ac_dir/$ac_word; then
  441.       RANLIB="ranlib"
  442.       break
  443.     fi
  444.   done
  445.   IFS="$ac_save_ifs"
  446. fi
  447. test -z "$RANLIB" && RANLIB=":"
  448. test -n "$RANLIB" && test -n "$verbose" && /bin/echo "    setting RANLIB to $RANLIB"
  449.  
  450. for ac_prog in 'bison -y' byacc
  451. do
  452. if test -z "$YACC"; then
  453.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  454.   set ac_dummy $ac_prog; ac_word=$2
  455.   test -n "$silent" || /bin/echo "checking for $ac_word"
  456.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  457.   for ac_dir in $PATH; do
  458.     test -z "$ac_dir" && ac_dir=.
  459.     if test -f $ac_dir/$ac_word; then
  460.       YACC="$ac_prog"
  461.       break
  462.     fi
  463.   done
  464.   IFS="$ac_save_ifs"
  465. fi
  466.  
  467. test -n "$YACC" && test -n "$verbose" && /bin/echo "    setting YACC to $YACC"
  468.  
  469. test -n "$YACC" && break
  470. done
  471. test -n "$YACC" || YACC="yacc"
  472.  
  473. test -n "$silent" || /bin/echo "checking for AIX"
  474. cat > conftest.${ac_ext} <<EOF
  475. #include "confdefs.h"
  476. #ifdef _AIX
  477.   yes
  478. #endif
  479.  
  480. EOF
  481. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  482. if egrep "yes" conftest.out >/dev/null 2>&1; then
  483.   rm -rf conftest*
  484.   
  485. {
  486. test -n "$verbose" && \
  487. /bin/echo "    defining _ALL_SOURCE"
  488. /bin/echo "#define" _ALL_SOURCE "1" >> confdefs.h
  489. DEFS="$DEFS -D_ALL_SOURCE=1"
  490. ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
  491. \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
  492. \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
  493. "
  494. }
  495.  
  496.  
  497. fi
  498. rm -f conftest*
  499.  
  500.  
  501. test -n "$silent" || /bin/echo "checking for minix/config.h"
  502. cat > conftest.${ac_ext} <<EOF
  503. #include "confdefs.h"
  504. #include <minix/config.h>
  505. EOF
  506. # Some shells (Coherent) do redirections in the wrong order, so need
  507. # the parens.
  508. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  509. if test -z "$ac_err"; then
  510.   rm -rf conftest*
  511.   MINIX=1
  512.  
  513. fi
  514. rm -f conftest*
  515.  
  516. # The Minix shell can't assign to the same variable on the same line!
  517. if test -n "$MINIX"; then
  518.   
  519. {
  520. test -n "$verbose" && \
  521. /bin/echo "    defining _POSIX_SOURCE"
  522. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  523. DEFS="$DEFS -D_POSIX_SOURCE=1"
  524. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  525. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  526. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  527. "
  528. }
  529.  
  530.   
  531. {
  532. test -n "$verbose" && \
  533. /bin/echo "    defining" _POSIX_1_SOURCE to be "2"
  534. /bin/echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
  535. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  536. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
  537. \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
  538. \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
  539. "
  540. }
  541.  
  542.   
  543. {
  544. test -n "$verbose" && \
  545. /bin/echo "    defining _MINIX"
  546. /bin/echo "#define" _MINIX "1" >> confdefs.h
  547. DEFS="$DEFS -D_MINIX=1"
  548. ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
  549. \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
  550. \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
  551. "
  552. }
  553.  
  554. fi
  555.  
  556. test -n "$silent" || /bin/echo "checking for POSIXized ISC"
  557. if test -d /gnu/etc/conf/kconfig.d &&
  558.   grep _POSIX_VERSION /gnu/include/sys/unistd.h >/dev/null 2>&1
  559. then
  560.   ISC=1 # If later tests want to check for ISC.
  561.   
  562. {
  563. test -n "$verbose" && \
  564. /bin/echo "    defining _POSIX_SOURCE"
  565. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  566. DEFS="$DEFS -D_POSIX_SOURCE=1"
  567. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  568. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  569. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  570. "
  571. }
  572.  
  573.   if test -n "$GCC"; then
  574.     CC="$CC -posix"
  575.   else
  576.     CC="$CC -Xp"
  577.   fi
  578. fi
  579.  
  580. test -n "$silent" || /bin/echo "checking for major, minor and makedev header"
  581. cat > conftest.${ac_ext} <<EOF
  582. #include "confdefs.h"
  583. #include <sys/types.h>
  584. int main() { return 0; }
  585. int t() { return makedev(0, 0);; return 0; }
  586. EOF
  587. if eval $ac_compile; then
  588.   rm -rf conftest*
  589.   ac_makedev=1
  590.  
  591. fi
  592. rm -f conftest*
  593.  
  594. if test -z "$ac_makedev"; then
  595. test -n "$silent" || /bin/echo "checking for sys/mkdev.h"
  596. cat > conftest.${ac_ext} <<EOF
  597. #include "confdefs.h"
  598. #include <sys/mkdev.h>
  599. EOF
  600. # Some shells (Coherent) do redirections in the wrong order, so need
  601. # the parens.
  602. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  603. if test -z "$ac_err"; then
  604.   rm -rf conftest*
  605.   
  606. {
  607. test -n "$verbose" && \
  608. /bin/echo "    defining MAJOR_IN_MKDEV"
  609. /bin/echo "#define" MAJOR_IN_MKDEV "1" >> confdefs.h
  610. DEFS="$DEFS -DMAJOR_IN_MKDEV=1"
  611. ac_sed_defs="${ac_sed_defs}\${ac_dA}MAJOR_IN_MKDEV\${ac_dB}MAJOR_IN_MKDEV\${ac_dC}1\${ac_dD}
  612. \${ac_uA}MAJOR_IN_MKDEV\${ac_uB}MAJOR_IN_MKDEV\${ac_uC}1\${ac_uD}
  613. \${ac_eA}MAJOR_IN_MKDEV\${ac_eB}MAJOR_IN_MKDEV\${ac_eC}1\${ac_eD}
  614. "
  615. }
  616.  ac_makedev=1
  617.  
  618. fi
  619. rm -f conftest*
  620.  
  621. fi
  622. if test -z "$ac_makedev"; then
  623. test -n "$silent" || /bin/echo "checking for sys/sysmacros.h"
  624. cat > conftest.${ac_ext} <<EOF
  625. #include "confdefs.h"
  626. #include <sys/sysmacros.h>
  627. EOF
  628. # Some shells (Coherent) do redirections in the wrong order, so need
  629. # the parens.
  630. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  631. if test -z "$ac_err"; then
  632.   rm -rf conftest*
  633.   
  634. {
  635. test -n "$verbose" && \
  636. /bin/echo "    defining MAJOR_IN_SYSMACROS"
  637. /bin/echo "#define" MAJOR_IN_SYSMACROS "1" >> confdefs.h
  638. DEFS="$DEFS -DMAJOR_IN_SYSMACROS=1"
  639. ac_sed_defs="${ac_sed_defs}\${ac_dA}MAJOR_IN_SYSMACROS\${ac_dB}MAJOR_IN_SYSMACROS\${ac_dC}1\${ac_dD}
  640. \${ac_uA}MAJOR_IN_SYSMACROS\${ac_uB}MAJOR_IN_SYSMACROS\${ac_uC}1\${ac_uD}
  641. \${ac_eA}MAJOR_IN_SYSMACROS\${ac_eB}MAJOR_IN_SYSMACROS\${ac_eC}1\${ac_eD}
  642. "
  643. }
  644.  
  645.  
  646. fi
  647. rm -f conftest*
  648.  
  649. fi
  650.  
  651. test -n "$silent" || /bin/echo "checking for directory library header"
  652. ac_dir_header=
  653. if test -z "$ac_dir_header"; then
  654.   test -n "$silent" || /bin/echo "checking for dirent.h"
  655. cat > conftest.${ac_ext} <<EOF
  656. #include "confdefs.h"
  657. #include <sys/types.h>
  658. #include <dirent.h>
  659. int main() { return 0; }
  660. int t() { DIR *dirp = 0;; return 0; }
  661. EOF
  662. if eval $ac_compile; then
  663.   rm -rf conftest*
  664.   
  665. {
  666. test -n "$verbose" && \
  667. /bin/echo "    defining DIRENT"
  668. /bin/echo "#define" DIRENT "1" >> confdefs.h
  669. DEFS="$DEFS -DDIRENT=1"
  670. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  671. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  672. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  673. "
  674. }
  675.  ac_dir_header=dirent.h
  676.  
  677. fi
  678. rm -f conftest*
  679. fi
  680. if test -z "$ac_dir_header"; then
  681.   test -n "$silent" || /bin/echo "checking for sys/ndir.h"
  682. cat > conftest.${ac_ext} <<EOF
  683. #include "confdefs.h"
  684. #include <sys/types.h>
  685. #include <sys/ndir.h>
  686. int main() { return 0; }
  687. int t() { DIR *dirp = 0;; return 0; }
  688. EOF
  689. if eval $ac_compile; then
  690.   rm -rf conftest*
  691.   
  692. {
  693. test -n "$verbose" && \
  694. /bin/echo "    defining SYSNDIR"
  695. /bin/echo "#define" SYSNDIR "1" >> confdefs.h
  696. DEFS="$DEFS -DSYSNDIR=1"
  697. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  698. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  699. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  700. "
  701. }
  702.  ac_dir_header=sys/ndir.h
  703.  
  704. fi
  705. rm -f conftest*
  706. fi
  707. if test -z "$ac_dir_header"; then
  708.   test -n "$silent" || /bin/echo "checking for sys/dir.h"
  709. cat > conftest.${ac_ext} <<EOF
  710. #include "confdefs.h"
  711. #include <sys/types.h>
  712. #include <sys/dir.h>
  713. int main() { return 0; }
  714. int t() { DIR *dirp = 0;; return 0; }
  715. EOF
  716. if eval $ac_compile; then
  717.   rm -rf conftest*
  718.   
  719. {
  720. test -n "$verbose" && \
  721. /bin/echo "    defining SYSDIR"
  722. /bin/echo "#define" SYSDIR "1" >> confdefs.h
  723. DEFS="$DEFS -DSYSDIR=1"
  724. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  725. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  726. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  727. "
  728. }
  729.  ac_dir_header=sys/dir.h
  730.  
  731. fi
  732. rm -f conftest*
  733. fi
  734. if test -z "$ac_dir_header"; then
  735.   test -n "$silent" || /bin/echo "checking for ndir.h"
  736. cat > conftest.${ac_ext} <<EOF
  737. #include "confdefs.h"
  738. #include <sys/types.h>
  739. #include <ndir.h>
  740. int main() { return 0; }
  741. int t() { DIR *dirp = 0;; return 0; }
  742. EOF
  743. if eval $ac_compile; then
  744.   rm -rf conftest*
  745.   
  746. {
  747. test -n "$verbose" && \
  748. /bin/echo "    defining NDIR"
  749. /bin/echo "#define" NDIR "1" >> confdefs.h
  750. DEFS="$DEFS -DNDIR=1"
  751. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  752. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  753. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  754. "
  755. }
  756.  ac_dir_header=ndir.h
  757.  
  758. fi
  759. rm -f conftest*
  760. fi
  761.  
  762. test -n "$silent" || /bin/echo "checking for closedir return value"
  763. cat > conftest.${ac_ext} <<EOF
  764. #include "confdefs.h"
  765. #include <sys/types.h>
  766. #include <$ac_dir_header>
  767. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  768. EOF
  769. eval $ac_compile
  770. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  771.   :
  772. else
  773.   
  774. {
  775. test -n "$verbose" && \
  776. /bin/echo "    defining VOID_CLOSEDIR"
  777. /bin/echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  778. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  779. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  780. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  781. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  782. "
  783. }
  784.  
  785. fi
  786. rm -fr conftest*
  787.  
  788. test -n "$silent" || /bin/echo "checking for return type of signal handlers"
  789. cat > conftest.${ac_ext} <<EOF
  790. #include "confdefs.h"
  791. #include <sys/types.h>
  792. #include <signal.h>
  793. #ifdef signal
  794. #undef signal
  795. #endif
  796. extern void (*signal ()) ();
  797. int main() { return 0; }
  798. int t() { int i;; return 0; }
  799. EOF
  800. if eval $ac_compile; then
  801.   rm -rf conftest*
  802.   
  803. {
  804. test -n "$verbose" && \
  805. /bin/echo "    defining" RETSIGTYPE to be "void"
  806. /bin/echo "#define" RETSIGTYPE "void" >> confdefs.h
  807. DEFS="$DEFS -DRETSIGTYPE=void"
  808. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  809. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  810. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  811. "
  812. }
  813.  
  814.  
  815. else
  816.   rm -rf conftest*
  817.   
  818. {
  819. test -n "$verbose" && \
  820. /bin/echo "    defining" RETSIGTYPE to be "int"
  821. /bin/echo "#define" RETSIGTYPE "int" >> confdefs.h
  822. DEFS="$DEFS -DRETSIGTYPE=int"
  823. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  824. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  825. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  826. "
  827. }
  828.  
  829. fi
  830. rm -f conftest*
  831.  
  832.  
  833.  
  834. echo checking how to get list of mounted filesystems
  835. mounted=
  836.  
  837. # DEC Alpha running OSF/1.
  838. cat > conftest.${ac_ext} <<EOF
  839. #include "confdefs.h"
  840.  
  841. #include <sys/types.h>
  842. #include <sys/mount.h>
  843. #include <sys/fs_types.h>
  844. int main() { return 0; }
  845. int t() { struct statfs *stats;
  846. numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ; return 0; }
  847. EOF
  848. if eval $ac_compile; then
  849.   rm -rf conftest*
  850.   
  851. {
  852. test -n "$verbose" && \
  853. /bin/echo "    defining MOUNTED_GETFSSTAT"
  854. /bin/echo "#define" MOUNTED_GETFSSTAT "1" >> confdefs.h
  855. DEFS="$DEFS -DMOUNTED_GETFSSTAT=1"
  856. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_GETFSSTAT\${ac_dB}MOUNTED_GETFSSTAT\${ac_dC}1\${ac_dD}
  857. \${ac_uA}MOUNTED_GETFSSTAT\${ac_uB}MOUNTED_GETFSSTAT\${ac_uC}1\${ac_uD}
  858. \${ac_eA}MOUNTED_GETFSSTAT\${ac_eB}MOUNTED_GETFSSTAT\${ac_eC}1\${ac_eD}
  859. "
  860. }
  861.  mounted=1
  862.  
  863. fi
  864. rm -f conftest*
  865.  
  866. if test -z "$mounted"; then
  867. # SVR4
  868. /bin/echo '#include "confdefs.h"
  869. #include <sys/mnttab.h>' > conftest.${ac_ext}
  870. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  871. if egrep "getmntent" conftest.out >/dev/null 2>&1; then
  872.   rm -rf conftest*
  873.   
  874. {
  875. test -n "$verbose" && \
  876. /bin/echo "    defining MOUNTED_GETMNTENT2"
  877. /bin/echo "#define" MOUNTED_GETMNTENT2 "1" >> confdefs.h
  878. DEFS="$DEFS -DMOUNTED_GETMNTENT2=1"
  879. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_GETMNTENT2\${ac_dB}MOUNTED_GETMNTENT2\${ac_dC}1\${ac_dD}
  880. \${ac_uA}MOUNTED_GETMNTENT2\${ac_uB}MOUNTED_GETMNTENT2\${ac_uC}1\${ac_uD}
  881. \${ac_eA}MOUNTED_GETMNTENT2\${ac_eB}MOUNTED_GETMNTENT2\${ac_eC}1\${ac_eD}
  882. "
  883. }
  884.  mounted=1
  885.  
  886. fi
  887. rm -f conftest*
  888.  
  889. fi
  890. if test -z "$mounted"; then
  891. # AIX.
  892. cat > conftest.${ac_ext} <<EOF
  893. #include "confdefs.h"
  894. #include <fshelp.h>
  895. EOF
  896. # Some shells (Coherent) do redirections in the wrong order, so need
  897. # the parens.
  898. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  899. if test -z "$ac_err"; then
  900.   rm -rf conftest*
  901.   
  902. {
  903. test -n "$verbose" && \
  904. /bin/echo "    defining MOUNTED_VMOUNT"
  905. /bin/echo "#define" MOUNTED_VMOUNT "1" >> confdefs.h
  906. DEFS="$DEFS -DMOUNTED_VMOUNT=1"
  907. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_VMOUNT\${ac_dB}MOUNTED_VMOUNT\${ac_dC}1\${ac_dD}
  908. \${ac_uA}MOUNTED_VMOUNT\${ac_uB}MOUNTED_VMOUNT\${ac_uC}1\${ac_uD}
  909. \${ac_eA}MOUNTED_VMOUNT\${ac_eB}MOUNTED_VMOUNT\${ac_eC}1\${ac_eD}
  910. "
  911. }
  912.  mounted=1
  913.  
  914. fi
  915. rm -f conftest*
  916. fi
  917. if test -z "$mounted"; then
  918. # SVR3
  919. cat > conftest.${ac_ext} <<EOF
  920. #include "confdefs.h"
  921. #include <sys/statfs.h>
  922. #include <sys/fstyp.h>
  923. #include <mnttab.h>
  924. EOF
  925. # Some shells (Coherent) do redirections in the wrong order, so need
  926. # the parens.
  927. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  928. if test -z "$ac_err"; then
  929.   rm -rf conftest*
  930.   
  931. {
  932. test -n "$verbose" && \
  933. /bin/echo "    defining MOUNTED_FREAD_FSTYP"
  934. /bin/echo "#define" MOUNTED_FREAD_FSTYP "1" >> confdefs.h
  935. DEFS="$DEFS -DMOUNTED_FREAD_FSTYP=1"
  936. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_FREAD_FSTYP\${ac_dB}MOUNTED_FREAD_FSTYP\${ac_dC}1\${ac_dD}
  937. \${ac_uA}MOUNTED_FREAD_FSTYP\${ac_uB}MOUNTED_FREAD_FSTYP\${ac_uC}1\${ac_uD}
  938. \${ac_eA}MOUNTED_FREAD_FSTYP\${ac_eB}MOUNTED_FREAD_FSTYP\${ac_eC}1\${ac_eD}
  939. "
  940. }
  941.  mounted=1
  942.  
  943. fi
  944. rm -f conftest*
  945. fi
  946. if test -z "$mounted"; then
  947. # 4.3BSD
  948. cat > conftest.${ac_ext} <<EOF
  949. #include "confdefs.h"
  950. #include <mntent.h>
  951. EOF
  952. # Some shells (Coherent) do redirections in the wrong order, so need
  953. # the parens.
  954. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  955. if test -z "$ac_err"; then
  956.   rm -rf conftest*
  957.   
  958. {
  959. test -n "$verbose" && \
  960. /bin/echo "    defining MOUNTED_GETMNTENT1"
  961. /bin/echo "#define" MOUNTED_GETMNTENT1 "1" >> confdefs.h
  962. DEFS="$DEFS -DMOUNTED_GETMNTENT1=1"
  963. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_GETMNTENT1\${ac_dB}MOUNTED_GETMNTENT1\${ac_dC}1\${ac_dD}
  964. \${ac_uA}MOUNTED_GETMNTENT1\${ac_uB}MOUNTED_GETMNTENT1\${ac_uC}1\${ac_uD}
  965. \${ac_eA}MOUNTED_GETMNTENT1\${ac_eB}MOUNTED_GETMNTENT1\${ac_eC}1\${ac_eD}
  966. "
  967. }
  968.  mounted=1
  969.  
  970. fi
  971. rm -f conftest*
  972. fi
  973. if test -z "$mounted"; then
  974. # 4.4BSD and DEC OSF/1.
  975. /bin/echo '#include "confdefs.h"
  976. #include <sys/mount.h>' > conftest.${ac_ext}
  977. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  978. if egrep "f_type;" conftest.out >/dev/null 2>&1; then
  979.   rm -rf conftest*
  980.   
  981. {
  982. test -n "$verbose" && \
  983. /bin/echo "    defining MOUNTED_GETMNTINFO"
  984. /bin/echo "#define" MOUNTED_GETMNTINFO "1" >> confdefs.h
  985. DEFS="$DEFS -DMOUNTED_GETMNTINFO=1"
  986. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_GETMNTINFO\${ac_dB}MOUNTED_GETMNTINFO\${ac_dC}1\${ac_dD}
  987. \${ac_uA}MOUNTED_GETMNTINFO\${ac_uB}MOUNTED_GETMNTINFO\${ac_uC}1\${ac_uD}
  988. \${ac_eA}MOUNTED_GETMNTINFO\${ac_eB}MOUNTED_GETMNTINFO\${ac_eC}1\${ac_eD}
  989. "
  990. }
  991.  mounted=1
  992.  
  993. fi
  994. rm -f conftest*
  995.  
  996. fi
  997. if test -z "$mounted"; then
  998. # Ultrix
  999. cat > conftest.${ac_ext} <<EOF
  1000. #include "confdefs.h"
  1001. #include <sys/fs_types.h>
  1002. #include <sys/mount.h>
  1003. EOF
  1004. # Some shells (Coherent) do redirections in the wrong order, so need
  1005. # the parens.
  1006. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1007. if test -z "$ac_err"; then
  1008.   rm -rf conftest*
  1009.   
  1010. {
  1011. test -n "$verbose" && \
  1012. /bin/echo "    defining MOUNTED_GETMNT"
  1013. /bin/echo "#define" MOUNTED_GETMNT "1" >> confdefs.h
  1014. DEFS="$DEFS -DMOUNTED_GETMNT=1"
  1015. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_GETMNT\${ac_dB}MOUNTED_GETMNT\${ac_dC}1\${ac_dD}
  1016. \${ac_uA}MOUNTED_GETMNT\${ac_uB}MOUNTED_GETMNT\${ac_uC}1\${ac_uD}
  1017. \${ac_eA}MOUNTED_GETMNT\${ac_eB}MOUNTED_GETMNT\${ac_eC}1\${ac_eD}
  1018. "
  1019. }
  1020.  mounted=1
  1021.  
  1022. fi
  1023. rm -f conftest*
  1024. fi
  1025. if test -z "$mounted"; then
  1026. # SVR2
  1027. cat > conftest.${ac_ext} <<EOF
  1028. #include "confdefs.h"
  1029. #include <mnttab.h>
  1030. EOF
  1031. # Some shells (Coherent) do redirections in the wrong order, so need
  1032. # the parens.
  1033. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1034. if test -z "$ac_err"; then
  1035.   rm -rf conftest*
  1036.   
  1037. {
  1038. test -n "$verbose" && \
  1039. /bin/echo "    defining MOUNTED_FREAD"
  1040. /bin/echo "#define" MOUNTED_FREAD "1" >> confdefs.h
  1041. DEFS="$DEFS -DMOUNTED_FREAD=1"
  1042. ac_sed_defs="${ac_sed_defs}\${ac_dA}MOUNTED_FREAD\${ac_dB}MOUNTED_FREAD\${ac_dC}1\${ac_dD}
  1043. \${ac_uA}MOUNTED_FREAD\${ac_uB}MOUNTED_FREAD\${ac_uC}1\${ac_uD}
  1044. \${ac_eA}MOUNTED_FREAD\${ac_eB}MOUNTED_FREAD\${ac_eC}1\${ac_eD}
  1045. "
  1046. }
  1047.  mounted=1
  1048.  
  1049. fi
  1050. rm -f conftest*
  1051. fi
  1052.  
  1053. echo checking how to get filesystem space usage
  1054. space=
  1055.  
  1056. # DEC Alpha running OSF/1
  1057. cat > conftest.${ac_ext} <<EOF
  1058. #include "confdefs.h"
  1059.  
  1060. #include <sys/types.h>
  1061. #include <sys/mount.h>
  1062. main ()
  1063. {
  1064. struct statfs fsd;
  1065. fsd.f_fsize = 0;
  1066. exit (statfs (".", &fsd, sizeof (struct statfs)));
  1067. }
  1068. EOF
  1069. eval $ac_compile
  1070. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1071.   
  1072. {
  1073. test -n "$verbose" && \
  1074. /bin/echo "    defining STAT_STATFS3_OSF1"
  1075. /bin/echo "#define" STAT_STATFS3_OSF1 "1" >> confdefs.h
  1076. DEFS="$DEFS -DSTAT_STATFS3_OSF1=1"
  1077. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS3_OSF1\${ac_dB}STAT_STATFS3_OSF1\${ac_dC}1\${ac_dD}
  1078. \${ac_uA}STAT_STATFS3_OSF1\${ac_uB}STAT_STATFS3_OSF1\${ac_uC}1\${ac_uD}
  1079. \${ac_eA}STAT_STATFS3_OSF1\${ac_eB}STAT_STATFS3_OSF1\${ac_eC}1\${ac_eD}
  1080. "
  1081. }
  1082.  space=1
  1083.  
  1084. fi
  1085. rm -fr conftest*
  1086. if test -z "$space"; then
  1087. # SVR4
  1088. cat > conftest.${ac_ext} <<EOF
  1089. #include "confdefs.h"
  1090. #include <sys/statvfs.h>
  1091. #include <sys/fstyp.h>
  1092. EOF
  1093. # Some shells (Coherent) do redirections in the wrong order, so need
  1094. # the parens.
  1095. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1096. if test -z "$ac_err"; then
  1097.   rm -rf conftest*
  1098.   
  1099. {
  1100. test -n "$verbose" && \
  1101. /bin/echo "    defining STAT_STATVFS"
  1102. /bin/echo "#define" STAT_STATVFS "1" >> confdefs.h
  1103. DEFS="$DEFS -DSTAT_STATVFS=1"
  1104. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATVFS\${ac_dB}STAT_STATVFS\${ac_dC}1\${ac_dD}
  1105. \${ac_uA}STAT_STATVFS\${ac_uB}STAT_STATVFS\${ac_uC}1\${ac_uD}
  1106. \${ac_eA}STAT_STATVFS\${ac_eB}STAT_STATVFS\${ac_eC}1\${ac_eD}
  1107. "
  1108. }
  1109.  space=1
  1110.  
  1111. fi
  1112. rm -f conftest*
  1113. fi
  1114. if test -z "$space"; then
  1115. # AIX
  1116. /bin/echo '#include "confdefs.h"
  1117. #include <sys/statfs.h>' > conftest.${ac_ext}
  1118. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1119. if egrep "f_nlsdirtype" conftest.out >/dev/null 2>&1; then
  1120.   rm -rf conftest*
  1121.   
  1122. {
  1123. test -n "$verbose" && \
  1124. /bin/echo "    defining STAT_STATFS2_BSIZE"
  1125. /bin/echo "#define" STAT_STATFS2_BSIZE "1" >> confdefs.h
  1126. DEFS="$DEFS -DSTAT_STATFS2_BSIZE=1"
  1127. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_BSIZE\${ac_dB}STAT_STATFS2_BSIZE\${ac_dC}1\${ac_dD}
  1128. \${ac_uA}STAT_STATFS2_BSIZE\${ac_uB}STAT_STATFS2_BSIZE\${ac_uC}1\${ac_uD}
  1129. \${ac_eA}STAT_STATFS2_BSIZE\${ac_eB}STAT_STATFS2_BSIZE\${ac_eC}1\${ac_eD}
  1130. "
  1131. }
  1132.  space=1
  1133.  
  1134. fi
  1135. rm -f conftest*
  1136.  
  1137. fi
  1138. if test -z "$space"; then
  1139. # SVR3
  1140. cat > conftest.${ac_ext} <<EOF
  1141. #include "confdefs.h"
  1142. #include <sys/statfs.h>
  1143. EOF
  1144. # Some shells (Coherent) do redirections in the wrong order, so need
  1145. # the parens.
  1146. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1147. if test -z "$ac_err"; then
  1148.   rm -rf conftest*
  1149.   
  1150. {
  1151. test -n "$verbose" && \
  1152. /bin/echo "    defining STAT_STATFS4"
  1153. /bin/echo "#define" STAT_STATFS4 "1" >> confdefs.h
  1154. DEFS="$DEFS -DSTAT_STATFS4=1"
  1155. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS4\${ac_dB}STAT_STATFS4\${ac_dC}1\${ac_dD}
  1156. \${ac_uA}STAT_STATFS4\${ac_uB}STAT_STATFS4\${ac_uC}1\${ac_uD}
  1157. \${ac_eA}STAT_STATFS4\${ac_eB}STAT_STATFS4\${ac_eC}1\${ac_eD}
  1158. "
  1159. }
  1160.  space=1
  1161.  
  1162. fi
  1163. rm -f conftest*
  1164. fi
  1165. if test -z "$space"; then
  1166. # 4.3BSD
  1167. cat > conftest.${ac_ext} <<EOF
  1168. #include "confdefs.h"
  1169. #include <sys/vfs.h>
  1170. EOF
  1171. # Some shells (Coherent) do redirections in the wrong order, so need
  1172. # the parens.
  1173. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1174. if test -z "$ac_err"; then
  1175.   rm -rf conftest*
  1176.   
  1177. {
  1178. test -n "$verbose" && \
  1179. /bin/echo "    defining STAT_STATFS2_BSIZE"
  1180. /bin/echo "#define" STAT_STATFS2_BSIZE "1" >> confdefs.h
  1181. DEFS="$DEFS -DSTAT_STATFS2_BSIZE=1"
  1182. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_BSIZE\${ac_dB}STAT_STATFS2_BSIZE\${ac_dC}1\${ac_dD}
  1183. \${ac_uA}STAT_STATFS2_BSIZE\${ac_uB}STAT_STATFS2_BSIZE\${ac_uC}1\${ac_uD}
  1184. \${ac_eA}STAT_STATFS2_BSIZE\${ac_eB}STAT_STATFS2_BSIZE\${ac_eC}1\${ac_eD}
  1185. "
  1186. }
  1187.  space=1
  1188.  
  1189. fi
  1190. rm -f conftest*
  1191. fi
  1192. if test -z "$space"; then
  1193. # 4.4BSD
  1194.  
  1195. {
  1196. test -n "$verbose" && \
  1197. /bin/echo "    defining STAT_STATFS2_FSIZE"
  1198. /bin/echo "#define" STAT_STATFS2_FSIZE "1" >> confdefs.h
  1199. DEFS="$DEFS -DSTAT_STATFS2_FSIZE=1"
  1200. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_FSIZE\${ac_dB}STAT_STATFS2_FSIZE\${ac_dC}1\${ac_dD}
  1201. \${ac_uA}STAT_STATFS2_FSIZE\${ac_uB}STAT_STATFS2_FSIZE\${ac_uC}1\${ac_uD}
  1202. \${ac_eA}STAT_STATFS2_FSIZE\${ac_eB}STAT_STATFS2_FSIZE\${ac_eC}1\${ac_eD}
  1203. "
  1204. }
  1205.  space=1
  1206. fi
  1207. if test -z "$space"; then
  1208. # SVR2
  1209. cat > conftest.${ac_ext} <<EOF
  1210. #include "confdefs.h"
  1211. #include <sys/filsys.h>
  1212. EOF
  1213. # Some shells (Coherent) do redirections in the wrong order, so need
  1214. # the parens.
  1215. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1216. if test -z "$ac_err"; then
  1217.   rm -rf conftest*
  1218.   
  1219. {
  1220. test -n "$verbose" && \
  1221. /bin/echo "    defining STAT_READ"
  1222. /bin/echo "#define" STAT_READ "1" >> confdefs.h
  1223. DEFS="$DEFS -DSTAT_READ=1"
  1224. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_READ\${ac_dB}STAT_READ\${ac_dC}1\${ac_dD}
  1225. \${ac_uA}STAT_READ\${ac_uB}STAT_READ\${ac_uC}1\${ac_uD}
  1226. \${ac_eA}STAT_READ\${ac_eB}STAT_READ\${ac_eC}1\${ac_eD}
  1227. "
  1228. }
  1229.  space=1
  1230.  
  1231. fi
  1232. rm -f conftest*
  1233. fi
  1234. if test -z "$space"; then
  1235. # Ultrix
  1236. cat > conftest.${ac_ext} <<EOF
  1237. #include "confdefs.h"
  1238. #include <sys/mount.h>
  1239. EOF
  1240. # Some shells (Coherent) do redirections in the wrong order, so need
  1241. # the parens.
  1242. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1243. if test -z "$ac_err"; then
  1244.   rm -rf conftest*
  1245.   
  1246. {
  1247. test -n "$verbose" && \
  1248. /bin/echo "    defining STAT_STATFS2_FS_DATA"
  1249. /bin/echo "#define" STAT_STATFS2_FS_DATA "1" >> confdefs.h
  1250. DEFS="$DEFS -DSTAT_STATFS2_FS_DATA=1"
  1251. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_STATFS2_FS_DATA\${ac_dB}STAT_STATFS2_FS_DATA\${ac_dC}1\${ac_dD}
  1252. \${ac_uA}STAT_STATFS2_FS_DATA\${ac_uB}STAT_STATFS2_FS_DATA\${ac_uC}1\${ac_uD}
  1253. \${ac_eA}STAT_STATFS2_FS_DATA\${ac_eB}STAT_STATFS2_FS_DATA\${ac_eC}1\${ac_eD}
  1254. "
  1255. }
  1256.  space=1
  1257.  
  1258. fi
  1259. rm -f conftest*
  1260. fi
  1261. if test -n "$mounted" && test -n "$space"; then
  1262.   PROGS="$PROGS df" LIBOBJS="$LIBOBJS fsusage.o mountlist.o"
  1263. fi
  1264.  
  1265. test -n "$silent" || /bin/echo "checking for uid_t in sys/types.h"
  1266. /bin/echo '#include "confdefs.h"
  1267. #include <sys/types.h>' > conftest.${ac_ext}
  1268. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1269. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  1270.   :
  1271. else
  1272.   rm -rf conftest*
  1273.   
  1274. {
  1275. test -n "$verbose" && \
  1276. /bin/echo "    defining" uid_t to be "int"
  1277. /bin/echo "#define" uid_t "int" >> confdefs.h
  1278. DEFS="$DEFS -Duid_t=int"
  1279. ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
  1280. \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
  1281. \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
  1282. "
  1283. }
  1284.  
  1285. {
  1286. test -n "$verbose" && \
  1287. /bin/echo "    defining" gid_t to be "int"
  1288. /bin/echo "#define" gid_t "int" >> confdefs.h
  1289. DEFS="$DEFS -Dgid_t=int"
  1290. ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
  1291. \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
  1292. \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
  1293. "
  1294. }
  1295.  
  1296. fi
  1297. rm -f conftest*
  1298.  
  1299. test -n "$silent" || /bin/echo "checking for type of array argument to getgroups"
  1300. ac_prog='/* Thanks to Mike Rendell for this test.  */
  1301. #include <sys/types.h>
  1302. #define NGID 256
  1303. #undef MAX
  1304. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  1305. main()
  1306. {
  1307.   gid_t gidset[NGID];
  1308.   int i, n;
  1309.   union { gid_t gval; long lval; }  val;
  1310.  
  1311.   val.lval = -1;
  1312.   for (i = 0; i < NGID; i++)
  1313.     gidset[i] = val.gval;
  1314.   n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
  1315.                  gidset);
  1316.   /* Exit non-zero if getgroups seems to require an array of ints.  This
  1317.      happens when gid_t is short but getgroups modifies an array of ints.  */
  1318.   exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
  1319. }'
  1320. cat > conftest.${ac_ext} <<EOF
  1321. #include "confdefs.h"
  1322. $ac_prog
  1323. EOF
  1324. eval $ac_compile
  1325. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1326.   
  1327. {
  1328. test -n "$verbose" && \
  1329. /bin/echo "    defining" GETGROUPS_T to be "gid_t"
  1330. /bin/echo "#define" GETGROUPS_T "gid_t" >> confdefs.h
  1331. DEFS="$DEFS -DGETGROUPS_T=gid_t"
  1332. ac_sed_defs="${ac_sed_defs}\${ac_dA}GETGROUPS_T\${ac_dB}GETGROUPS_T\${ac_dC}gid_t\${ac_dD}
  1333. \${ac_uA}GETGROUPS_T\${ac_uB}GETGROUPS_T\${ac_uC}gid_t\${ac_uD}
  1334. \${ac_eA}GETGROUPS_T\${ac_eB}GETGROUPS_T\${ac_eC}gid_t\${ac_eD}
  1335. "
  1336. }
  1337.  
  1338.  
  1339. else
  1340.   
  1341. {
  1342. test -n "$verbose" && \
  1343. /bin/echo "    defining" GETGROUPS_T to be "int"
  1344. /bin/echo "#define" GETGROUPS_T "int" >> confdefs.h
  1345. DEFS="$DEFS -DGETGROUPS_T=int"
  1346. ac_sed_defs="${ac_sed_defs}\${ac_dA}GETGROUPS_T\${ac_dB}GETGROUPS_T\${ac_dC}int\${ac_dD}
  1347. \${ac_uA}GETGROUPS_T\${ac_uB}GETGROUPS_T\${ac_uC}int\${ac_uD}
  1348. \${ac_eA}GETGROUPS_T\${ac_eB}GETGROUPS_T\${ac_eC}int\${ac_eD}
  1349. "
  1350. }
  1351.  
  1352. fi
  1353. rm -fr conftest*
  1354.  
  1355. test -n "$silent" || /bin/echo "checking size of int"
  1356. ac_size=0
  1357. cat > conftest.${ac_ext} <<EOF
  1358. #include "confdefs.h"
  1359. #include <stdio.h>
  1360. main()
  1361. {
  1362.   FILE *f=fopen("conftestval", "w");
  1363.   if (!f) exit(1);
  1364.   fprintf(f, "%d\n", sizeof(int));
  1365.   exit(0);
  1366. }
  1367. EOF
  1368. eval $ac_compile
  1369. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1370.   ac_size=`cat conftestval`
  1371.  
  1372. fi
  1373. rm -fr conftest*
  1374.  
  1375. {
  1376. test -n "$verbose" && \
  1377. /bin/echo "    defining" SIZEOF_INT to be "$ac_size"
  1378. /bin/echo "#define" SIZEOF_INT "$ac_size" >> confdefs.h
  1379. DEFS="$DEFS -DSIZEOF_INT=$ac_size"
  1380. ac_sed_defs="${ac_sed_defs}\${ac_dA}SIZEOF_INT\${ac_dB}SIZEOF_INT\${ac_dC}$ac_size\${ac_dD}
  1381. \${ac_uA}SIZEOF_INT\${ac_uB}SIZEOF_INT\${ac_uC}$ac_size\${ac_uD}
  1382. \${ac_eA}SIZEOF_INT\${ac_eB}SIZEOF_INT\${ac_eC}$ac_size\${ac_eD}
  1383. "
  1384. }
  1385.  
  1386. ac_prog='/* Ultrix mips cc rejects this.  */
  1387. typedef int charset[2]; const charset x;
  1388. /* SunOS 4.1.1 cc rejects this.  */
  1389. char const *const *ccp;
  1390. char **p;
  1391. /* AIX XL C 1.02.0.0 rejects this.
  1392.    It does not let you subtract one const X* pointer from another in an arm
  1393.    of an if-expression whose if-part is not a constant expression */
  1394. const char *g = "string";
  1395. ccp = &g + (g ? g-g : 0);
  1396. /* HPUX 7.0 cc rejects these. */
  1397. ++ccp;
  1398. p = (char**) ccp;
  1399. ccp = (char const *const *) p;
  1400. { /* SCO 3.2v4 cc rejects this.  */
  1401.   char *t;
  1402.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1403.  
  1404.   *t++ = 0;
  1405. }
  1406. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1407.   int x[] = {25,17};
  1408.   const int *foo = &x[0];
  1409.   ++foo;
  1410. }
  1411. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1412.   typedef const int *iptr;
  1413.   iptr p = 0;
  1414.   ++p;
  1415. }
  1416. { /* AIX XL C 1.02.0.0 rejects this saying
  1417.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1418.   struct s { int j; const int *ap[3]; };
  1419.   struct s *b; b->j = 5;
  1420. }
  1421. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1422.   const int foo = 10;
  1423. }'
  1424. test -n "$silent" || /bin/echo "checking for lack of working const"
  1425. cat > conftest.${ac_ext} <<EOF
  1426. #include "confdefs.h"
  1427.  
  1428. int main() { return 0; }
  1429. int t() { $ac_prog; return 0; }
  1430. EOF
  1431. if eval $ac_compile; then
  1432.   :
  1433. else
  1434.   rm -rf conftest*
  1435.   
  1436. {
  1437. test -n "$verbose" && \
  1438. /bin/echo "    defining" const to be empty
  1439. /bin/echo "#define" const "" >> confdefs.h
  1440. DEFS="$DEFS -Dconst="
  1441. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  1442. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  1443. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  1444. "
  1445. }
  1446.  
  1447. fi
  1448. rm -f conftest*
  1449.  
  1450. test -n "$silent" || /bin/echo "checking for ANSI C header files"
  1451. cat > conftest.${ac_ext} <<EOF
  1452. #include "confdefs.h"
  1453. #include <stdlib.h>
  1454. #include <stdarg.h>
  1455. #include <string.h>
  1456. #include <float.h>
  1457. EOF
  1458. # Some shells (Coherent) do redirections in the wrong order, so need
  1459. # the parens.
  1460. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1461. if test -z "$ac_err"; then
  1462.   rm -rf conftest*
  1463.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1464. /bin/echo '#include "confdefs.h"
  1465. #include <string.h>' > conftest.${ac_ext}
  1466. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1467. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  1468.   rm -rf conftest*
  1469.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1470. cat > conftest.${ac_ext} <<EOF
  1471. #include "confdefs.h"
  1472. #include <ctype.h>
  1473. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1474. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1475. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  1476. int main () { int i; for (i = 0; i < 256; i++)
  1477. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1478. exit (0); }
  1479.  
  1480. EOF
  1481. eval $ac_compile
  1482. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1483.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1484. /bin/echo '#include "confdefs.h"
  1485. #include <stdlib.h>' > conftest.${ac_ext}
  1486. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1487. if egrep "free" conftest.out >/dev/null 2>&1; then
  1488.   rm -rf conftest*
  1489.   
  1490. {
  1491. test -n "$verbose" && \
  1492. /bin/echo "    defining STDC_HEADERS"
  1493. /bin/echo "#define" STDC_HEADERS "1" >> confdefs.h
  1494. DEFS="$DEFS -DSTDC_HEADERS=1"
  1495. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  1496. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  1497. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  1498. "
  1499. }
  1500.  
  1501.  
  1502. fi
  1503. rm -f conftest*
  1504.  
  1505.  
  1506. fi
  1507. rm -fr conftest*
  1508.  
  1509. fi
  1510. rm -f conftest*
  1511.  
  1512.  
  1513. fi
  1514. rm -f conftest*
  1515.  
  1516. test -n "$silent" || /bin/echo "checking for struct tm in time.h"
  1517. cat > conftest.${ac_ext} <<EOF
  1518. #include "confdefs.h"
  1519. #include <sys/types.h>
  1520. #include <time.h>
  1521. int main() { return 0; }
  1522. int t() { struct tm *tp; tp->tm_sec;; return 0; }
  1523. EOF
  1524. if eval $ac_compile; then
  1525.   :
  1526. else
  1527.   rm -rf conftest*
  1528.   
  1529. {
  1530. test -n "$verbose" && \
  1531. /bin/echo "    defining TM_IN_SYS_TIME"
  1532. /bin/echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
  1533. DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  1534. ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
  1535. \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
  1536. \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
  1537. "
  1538. }
  1539.  
  1540. fi
  1541. rm -f conftest*
  1542.  
  1543. test -n "$silent" || /bin/echo "checking for whether time.h and sys/time.h may both be included"
  1544. cat > conftest.${ac_ext} <<EOF
  1545. #include "confdefs.h"
  1546. #include <sys/types.h>
  1547. #include <sys/time.h>
  1548. #include <time.h>
  1549. int main() { return 0; }
  1550. int t() { struct tm *tp;; return 0; }
  1551. EOF
  1552. if eval $ac_compile; then
  1553.   rm -rf conftest*
  1554.   
  1555. {
  1556. test -n "$verbose" && \
  1557. /bin/echo "    defining TIME_WITH_SYS_TIME"
  1558. /bin/echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  1559. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  1560. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  1561. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  1562. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  1563. "
  1564. }
  1565.  
  1566.  
  1567. fi
  1568. rm -f conftest*
  1569.  
  1570. test -n "$silent" || /bin/echo "checking for broken stat file mode macros"
  1571. cat > conftest.${ac_ext} <<EOF
  1572. #include "confdefs.h"
  1573. #include <sys/types.h>
  1574. #include <sys/stat.h>
  1575. #ifdef S_ISBLK
  1576. #if S_ISBLK (S_IFDIR)
  1577. You lose.
  1578. #endif
  1579. #ifdef S_IFCHR
  1580. #if S_ISBLK (S_IFCHR)
  1581. You lose.
  1582. #endif
  1583. #endif /* S_IFCHR */
  1584. #endif /* S_ISBLK */
  1585. #ifdef S_ISLNK
  1586. #if S_ISLNK (S_IFREG)
  1587. You lose.
  1588. #endif
  1589. #endif /* S_ISLNK */
  1590. #ifdef S_ISSOCK
  1591. #if S_ISSOCK (S_IFREG)
  1592. You lose.
  1593. #endif
  1594. #endif /* S_ISSOCK */
  1595.  
  1596. EOF
  1597. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1598. if egrep "You lose" conftest.out >/dev/null 2>&1; then
  1599.   rm -rf conftest*
  1600.   
  1601. {
  1602. test -n "$verbose" && \
  1603. /bin/echo "    defining STAT_MACROS_BROKEN"
  1604. /bin/echo "#define" STAT_MACROS_BROKEN "1" >> confdefs.h
  1605. DEFS="$DEFS -DSTAT_MACROS_BROKEN=1"
  1606. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_MACROS_BROKEN\${ac_dB}STAT_MACROS_BROKEN\${ac_dC}1\${ac_dD}
  1607. \${ac_uA}STAT_MACROS_BROKEN\${ac_uB}STAT_MACROS_BROKEN\${ac_uC}1\${ac_uD}
  1608. \${ac_eA}STAT_MACROS_BROKEN\${ac_eB}STAT_MACROS_BROKEN\${ac_eC}1\${ac_eD}
  1609. "
  1610. }
  1611.  
  1612.  
  1613. fi
  1614. rm -f conftest*
  1615.  
  1616. for ac_hdr in string.h fcntl.h limits.h sys/time.h errno.h unistd.h
  1617. do
  1618. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  1619. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  1620. cat > conftest.${ac_ext} <<EOF
  1621. #include "confdefs.h"
  1622. #include <${ac_hdr}>
  1623. EOF
  1624. # Some shells (Coherent) do redirections in the wrong order, so need
  1625. # the parens.
  1626. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1627. if test -z "$ac_err"; then
  1628.   rm -rf conftest*
  1629.   
  1630. {
  1631. test -n "$verbose" && \
  1632. /bin/echo "    defining ${ac_tr_hdr}"
  1633. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  1634. DEFS="$DEFS -D${ac_tr_hdr}=1"
  1635. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  1636. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  1637. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  1638. "
  1639. }
  1640.  
  1641.  
  1642. fi
  1643. rm -f conftest*
  1644. done
  1645.  
  1646. for ac_func in fnmatch mkdir mktime stpcpy strdup strstr rename
  1647. do
  1648. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  1649. cat > conftest.${ac_ext} <<EOF
  1650. #include "confdefs.h"
  1651. #include <ctype.h>
  1652. int main() { return 0; }
  1653. int t() { 
  1654. /* The GNU C library defines this for functions which it implements
  1655.     to always fail with ENOSYS.  Some functions are actually named
  1656.     something starting with __ and the normal name is an alias.  */
  1657. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1658. choke me
  1659. #else
  1660. /* Override any gcc2 internal prototype to avoid an error.  */
  1661. extern char ${ac_func}(); ${ac_func}();
  1662. #endif
  1663. ; return 0; }
  1664. EOF
  1665. if eval $ac_compile; then
  1666.   :
  1667. else
  1668.   rm -rf conftest*
  1669.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  1670. test -n "$verbose" && /bin/echo "    using ${ac_func}.o instead"
  1671. fi
  1672. rm -f conftest*
  1673.  
  1674. done
  1675.  
  1676. for ac_func in strerror ftime getcwd mkfifo memcpy bcopy gettimeofday
  1677. do
  1678. ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  1679. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  1680. cat > conftest.${ac_ext} <<EOF
  1681. #include "confdefs.h"
  1682. #include <ctype.h>
  1683. int main() { return 0; }
  1684. int t() { 
  1685. /* The GNU C library defines this for functions which it implements
  1686.     to always fail with ENOSYS.  Some functions are actually named
  1687.     something starting with __ and the normal name is an alias.  */
  1688. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1689. choke me
  1690. #else
  1691. /* Override any gcc2 internal prototype to avoid an error.  */
  1692. extern char ${ac_func}(); ${ac_func}();
  1693. #endif
  1694. ; return 0; }
  1695. EOF
  1696. if eval $ac_compile; then
  1697.   rm -rf conftest*
  1698.   {
  1699. test -n "$verbose" && \
  1700. /bin/echo "    defining ${ac_tr_func}"
  1701. /bin/echo "#define" ${ac_tr_func} "1" >> confdefs.h
  1702. DEFS="$DEFS -D${ac_tr_func}=1"
  1703. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  1704. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  1705. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  1706. "
  1707. }
  1708.  
  1709.  
  1710. fi
  1711. rm -f conftest*
  1712. done
  1713.  
  1714. test -n "$silent" || /bin/echo "checking for ftruncate"
  1715. cat > conftest.${ac_ext} <<EOF
  1716. #include "confdefs.h"
  1717.  
  1718. int main() { return 0; }
  1719. int t() { ftruncate();; return 0; }
  1720. EOF
  1721. if eval $ac_compile; then
  1722.   rm -rf conftest*
  1723.   
  1724. {
  1725. test -n "$verbose" && \
  1726. /bin/echo "    defining HAVE_FTRUNCATE"
  1727. /bin/echo "#define" HAVE_FTRUNCATE "1" >> confdefs.h
  1728. DEFS="$DEFS -DHAVE_FTRUNCATE=1"
  1729. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FTRUNCATE\${ac_dB}HAVE_FTRUNCATE\${ac_dC}1\${ac_dD}
  1730. \${ac_uA}HAVE_FTRUNCATE\${ac_uB}HAVE_FTRUNCATE\${ac_uC}1\${ac_uD}
  1731. \${ac_eA}HAVE_FTRUNCATE\${ac_eB}HAVE_FTRUNCATE\${ac_eC}1\${ac_eD}
  1732. "
  1733. }
  1734.  
  1735.  
  1736. else
  1737.   rm -rf conftest*
  1738.   ftruncate_missing=1
  1739. fi
  1740. rm -f conftest*
  1741.  
  1742. if test -n "$ftruncate_missing"; then
  1743. test -n "$silent" || /bin/echo "checking for fcntl emulation of ftruncate"
  1744. cat > conftest.${ac_ext} <<EOF
  1745. #include "confdefs.h"
  1746. #include <sys/types.h>
  1747. #include <fcntl.h>
  1748. int main() { return 0; }
  1749. int t() { 
  1750. #if !defined(F_CHSIZE) && !defined(F_FREESP)
  1751. chsize();
  1752. #endif
  1753. ; return 0; }
  1754. EOF
  1755. if eval $ac_compile; then
  1756.   rm -rf conftest*
  1757.   
  1758. {
  1759. test -n "$verbose" && \
  1760. /bin/echo "    defining HAVE_FTRUNCATE"
  1761. /bin/echo "#define" HAVE_FTRUNCATE "1" >> confdefs.h
  1762. DEFS="$DEFS -DHAVE_FTRUNCATE=1"
  1763. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_FTRUNCATE\${ac_dB}HAVE_FTRUNCATE\${ac_dC}1\${ac_dD}
  1764. \${ac_uA}HAVE_FTRUNCATE\${ac_uB}HAVE_FTRUNCATE\${ac_uC}1\${ac_uD}
  1765. \${ac_eA}HAVE_FTRUNCATE\${ac_eB}HAVE_FTRUNCATE\${ac_eC}1\${ac_eD}
  1766. "
  1767. }
  1768.  LIBOBJS="$LIBOBJS ftruncate.o"
  1769.  
  1770. fi
  1771. rm -f conftest*
  1772.  
  1773. fi
  1774.  
  1775. case "$LIBOBJS" in
  1776. *rename.o*)
  1777.   LIBPROGS="$LIBPROGS mvdir"
  1778.   ;;
  1779. esac
  1780.  
  1781. test -n "$silent" || /bin/echo "checking for vprintf"
  1782. cat > conftest.${ac_ext} <<EOF
  1783. #include "confdefs.h"
  1784.  
  1785. int main() { return 0; }
  1786. int t() { vprintf();; return 0; }
  1787. EOF
  1788. if eval $ac_compile; then
  1789.   rm -rf conftest*
  1790.   
  1791. {
  1792. test -n "$verbose" && \
  1793. /bin/echo "    defining HAVE_VPRINTF"
  1794. /bin/echo "#define" HAVE_VPRINTF "1" >> confdefs.h
  1795. DEFS="$DEFS -DHAVE_VPRINTF=1"
  1796. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VPRINTF\${ac_dB}HAVE_VPRINTF\${ac_dC}1\${ac_dD}
  1797. \${ac_uA}HAVE_VPRINTF\${ac_uB}HAVE_VPRINTF\${ac_uC}1\${ac_uD}
  1798. \${ac_eA}HAVE_VPRINTF\${ac_eB}HAVE_VPRINTF\${ac_eC}1\${ac_eD}
  1799. "
  1800. }
  1801.  
  1802.  
  1803. else
  1804.   rm -rf conftest*
  1805.   ac_vprintf_missing=1
  1806. fi
  1807. rm -f conftest*
  1808.  
  1809. if test -n "$ac_vprintf_missing"; then
  1810. test -n "$silent" || /bin/echo "checking for _doprnt"
  1811. cat > conftest.${ac_ext} <<EOF
  1812. #include "confdefs.h"
  1813.  
  1814. int main() { return 0; }
  1815. int t() { _doprnt();; return 0; }
  1816. EOF
  1817. if eval $ac_compile; then
  1818.   rm -rf conftest*
  1819.   
  1820. {
  1821. test -n "$verbose" && \
  1822. /bin/echo "    defining HAVE_DOPRNT"
  1823. /bin/echo "#define" HAVE_DOPRNT "1" >> confdefs.h
  1824. DEFS="$DEFS -DHAVE_DOPRNT=1"
  1825. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_DOPRNT\${ac_dB}HAVE_DOPRNT\${ac_dC}1\${ac_dD}
  1826. \${ac_uA}HAVE_DOPRNT\${ac_uB}HAVE_DOPRNT\${ac_uC}1\${ac_uD}
  1827. \${ac_eA}HAVE_DOPRNT\${ac_eB}HAVE_DOPRNT\${ac_eC}1\${ac_eD}
  1828. "
  1829. }
  1830.  
  1831.  
  1832. fi
  1833. rm -f conftest*
  1834.  
  1835. fi
  1836.  
  1837. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1838. # for constant arguments.  Useless!
  1839. test -n "$silent" || /bin/echo "checking for working alloca.h"
  1840. cat > conftest.${ac_ext} <<EOF
  1841. #include "confdefs.h"
  1842. #include <alloca.h>
  1843. int main() { return 0; }
  1844. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  1845. EOF
  1846. if eval $ac_compile; then
  1847.   rm -rf conftest*
  1848.   
  1849. {
  1850. test -n "$verbose" && \
  1851. /bin/echo "    defining HAVE_ALLOCA_H"
  1852. /bin/echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  1853. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  1854. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  1855. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  1856. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  1857. "
  1858. }
  1859.  
  1860.  
  1861. fi
  1862. rm -f conftest*
  1863.  
  1864. ac_decl="#ifdef __GNUC__
  1865. #define alloca __builtin_alloca
  1866. #else
  1867. #if HAVE_ALLOCA_H
  1868. #include <alloca.h>
  1869. #else
  1870. #ifdef _AIX
  1871.  #pragma alloca
  1872. #else
  1873. char *alloca ();
  1874. #endif
  1875. #endif
  1876. #endif
  1877. "
  1878. test -n "$silent" || /bin/echo "checking for alloca"
  1879. cat > conftest.${ac_ext} <<EOF
  1880. #include "confdefs.h"
  1881. $ac_decl
  1882. int main() { return 0; }
  1883. int t() { char *p = (char *) alloca(1);; return 0; }
  1884. EOF
  1885. if eval $ac_compile; then
  1886.   rm -rf conftest*
  1887.   
  1888. {
  1889. test -n "$verbose" && \
  1890. /bin/echo "    defining HAVE_ALLOCA"
  1891. /bin/echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  1892. DEFS="$DEFS -DHAVE_ALLOCA=1"
  1893. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  1894. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  1895. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  1896. "
  1897. }
  1898.  
  1899.  
  1900. else
  1901.   rm -rf conftest*
  1902.   ac_alloca_missing=1
  1903. cat > conftest.${ac_ext} <<EOF
  1904. #include "confdefs.h"
  1905.  
  1906. #if defined(CRAY) && ! defined(CRAY2)
  1907. winnitude
  1908. #else
  1909. lossage
  1910. #endif
  1911.  
  1912. EOF
  1913. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1914. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  1915.   rm -rf conftest*
  1916.   test -n "$silent" || /bin/echo "checking for _getb67"
  1917. cat > conftest.${ac_ext} <<EOF
  1918. #include "confdefs.h"
  1919. #include <ctype.h>
  1920. int main() { return 0; }
  1921. int t() { 
  1922. /* The GNU C library defines this for functions which it implements
  1923.     to always fail with ENOSYS.  Some functions are actually named
  1924.     something starting with __ and the normal name is an alias.  */
  1925. #if defined (__stub__getb67) || defined (__stub____getb67)
  1926. choke me
  1927. #else
  1928. /* Override any gcc2 internal prototype to avoid an error.  */
  1929. extern char _getb67(); _getb67();
  1930. #endif
  1931. ; return 0; }
  1932. EOF
  1933. if eval $ac_compile; then
  1934.   rm -rf conftest*
  1935.   {
  1936. test -n "$verbose" && \
  1937. /bin/echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  1938. /bin/echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  1939. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  1940. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  1941. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  1942. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  1943. "
  1944. }
  1945.  
  1946.  
  1947. else
  1948.   rm -rf conftest*
  1949.   test -n "$silent" || /bin/echo "checking for GETB67"
  1950. cat > conftest.${ac_ext} <<EOF
  1951. #include "confdefs.h"
  1952. #include <ctype.h>
  1953. int main() { return 0; }
  1954. int t() { 
  1955. /* The GNU C library defines this for functions which it implements
  1956.     to always fail with ENOSYS.  Some functions are actually named
  1957.     something starting with __ and the normal name is an alias.  */
  1958. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1959. choke me
  1960. #else
  1961. /* Override any gcc2 internal prototype to avoid an error.  */
  1962. extern char GETB67(); GETB67();
  1963. #endif
  1964. ; return 0; }
  1965. EOF
  1966. if eval $ac_compile; then
  1967.   rm -rf conftest*
  1968.   {
  1969. test -n "$verbose" && \
  1970. /bin/echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  1971. /bin/echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  1972. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  1973. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  1974. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  1975. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  1976. "
  1977. }
  1978.  
  1979.  
  1980. else
  1981.   rm -rf conftest*
  1982.   test -n "$silent" || /bin/echo "checking for getb67"
  1983. cat > conftest.${ac_ext} <<EOF
  1984. #include "confdefs.h"
  1985. #include <ctype.h>
  1986. int main() { return 0; }
  1987. int t() { 
  1988. /* The GNU C library defines this for functions which it implements
  1989.     to always fail with ENOSYS.  Some functions are actually named
  1990.     something starting with __ and the normal name is an alias.  */
  1991. #if defined (__stub_getb67) || defined (__stub___getb67)
  1992. choke me
  1993. #else
  1994. /* Override any gcc2 internal prototype to avoid an error.  */
  1995. extern char getb67(); getb67();
  1996. #endif
  1997. ; return 0; }
  1998. EOF
  1999. if eval $ac_compile; then
  2000.   rm -rf conftest*
  2001.   {
  2002. test -n "$verbose" && \
  2003. /bin/echo "    defining" CRAY_STACKSEG_END to be "getb67"
  2004. /bin/echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  2005. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  2006. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  2007. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  2008. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  2009. "
  2010. }
  2011.  
  2012.  
  2013. fi
  2014. rm -f conftest*
  2015.  
  2016. fi
  2017. rm -f conftest*
  2018.  
  2019. fi
  2020. rm -f conftest*
  2021.  
  2022.  
  2023. fi
  2024. rm -f conftest*
  2025.  
  2026.  
  2027. fi
  2028. rm -f conftest*
  2029.  
  2030. if test -n "$ac_alloca_missing"; then
  2031.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2032.   # that cause trouble.  Some versions do not even contain alloca or
  2033.   # contain a buggy version.  If you still want to use their alloca,
  2034.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2035.   ALLOCA=alloca.o
  2036.   
  2037. {
  2038. test -n "$verbose" && \
  2039. /bin/echo "    defining C_ALLOCA"
  2040. /bin/echo "#define" C_ALLOCA "1" >> confdefs.h
  2041. DEFS="$DEFS -DC_ALLOCA=1"
  2042. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  2043. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  2044. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  2045. "
  2046. }
  2047.  
  2048.  
  2049.   test -n "$silent" || /bin/echo "checking stack direction for C alloca"
  2050.   test -n "$silent" || /bin/echo "checking whether cross-compiling"
  2051. # If we cannot run a trivial program, we must be cross compiling.
  2052. cat > conftest.${ac_ext} <<EOF
  2053. #include "confdefs.h"
  2054. main(){exit(0);}
  2055. EOF
  2056. eval $ac_compile
  2057. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2058.   :
  2059. else
  2060.   cross_compiling=1
  2061. fi
  2062. rm -fr conftest*
  2063.  
  2064. if test -n "$cross_compiling"
  2065. then
  2066.   
  2067. {
  2068. test -n "$verbose" && \
  2069. /bin/echo "    defining" STACK_DIRECTION to be "0"
  2070. /bin/echo "#define" STACK_DIRECTION "0" >> confdefs.h
  2071. DEFS="$DEFS -DSTACK_DIRECTION=0"
  2072. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  2073. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  2074. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  2075. "
  2076. }
  2077.  
  2078. else
  2079. cat > conftest.${ac_ext} <<EOF
  2080. #include "confdefs.h"
  2081. find_stack_direction ()
  2082. {
  2083.   static char *addr = 0;
  2084.   auto char dummy;
  2085.   if (addr == 0)
  2086.     {
  2087.       addr = &dummy;
  2088.       return find_stack_direction ();
  2089.     }
  2090.   else
  2091.     return (&dummy > addr) ? 1 : -1;
  2092. }
  2093. main ()
  2094. {
  2095.   exit (find_stack_direction() < 0);
  2096. }
  2097. EOF
  2098. eval $ac_compile
  2099. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2100.   
  2101. {
  2102. test -n "$verbose" && \
  2103. /bin/echo "    defining" STACK_DIRECTION to be "1"
  2104. /bin/echo "#define" STACK_DIRECTION "1" >> confdefs.h
  2105. DEFS="$DEFS -DSTACK_DIRECTION=1"
  2106. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  2107. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  2108. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  2109. "
  2110. }
  2111.  
  2112.  
  2113. else
  2114.   
  2115. {
  2116. test -n "$verbose" && \
  2117. /bin/echo "    defining" STACK_DIRECTION to be "-1"
  2118. /bin/echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  2119. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  2120. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  2121. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  2122. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  2123. "
  2124. }
  2125.  
  2126. fi
  2127. fi
  2128. rm -fr conftest*
  2129. fi
  2130.  
  2131. test -n "$silent" || /bin/echo "checking for st_blocks in struct stat"
  2132. cat > conftest.${ac_ext} <<EOF
  2133. #include "confdefs.h"
  2134. #include <sys/types.h>
  2135. #include <sys/stat.h>
  2136. int main() { return 0; }
  2137. int t() { struct stat s; s.st_blocks;; return 0; }
  2138. EOF
  2139. if eval $ac_compile; then
  2140.   rm -rf conftest*
  2141.   
  2142. {
  2143. test -n "$verbose" && \
  2144. /bin/echo "    defining HAVE_ST_BLOCKS"
  2145. /bin/echo "#define" HAVE_ST_BLOCKS "1" >> confdefs.h
  2146. DEFS="$DEFS -DHAVE_ST_BLOCKS=1"
  2147. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ST_BLOCKS\${ac_dB}HAVE_ST_BLOCKS\${ac_dC}1\${ac_dD}
  2148. \${ac_uA}HAVE_ST_BLOCKS\${ac_uB}HAVE_ST_BLOCKS\${ac_uC}1\${ac_uD}
  2149. \${ac_eA}HAVE_ST_BLOCKS\${ac_eB}HAVE_ST_BLOCKS\${ac_eC}1\${ac_eD}
  2150. "
  2151. }
  2152.  
  2153.  
  2154. else
  2155.   rm -rf conftest*
  2156.   LIBOBJS="$LIBOBJS fileblocks.o"
  2157. fi
  2158. rm -f conftest*
  2159.  
  2160. test -n "$silent" || /bin/echo "checking utime with null argument"
  2161. rm -f conftestdata; > conftestdata
  2162. # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
  2163. cat > conftest.${ac_ext} <<EOF
  2164. #include "confdefs.h"
  2165. #include <sys/types.h>
  2166. #include <sys/stat.h>
  2167. main() {
  2168. struct stat s, t;
  2169. exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
  2170. && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
  2171. && t.st_mtime - s.st_mtime < 120));
  2172. }
  2173. EOF
  2174. eval $ac_compile
  2175. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2176.   
  2177. {
  2178. test -n "$verbose" && \
  2179. /bin/echo "    defining HAVE_UTIME_NULL"
  2180. /bin/echo "#define" HAVE_UTIME_NULL "1" >> confdefs.h
  2181. DEFS="$DEFS -DHAVE_UTIME_NULL=1"
  2182. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UTIME_NULL\${ac_dB}HAVE_UTIME_NULL\${ac_dC}1\${ac_dD}
  2183. \${ac_uA}HAVE_UTIME_NULL\${ac_uB}HAVE_UTIME_NULL\${ac_uC}1\${ac_uD}
  2184. \${ac_eA}HAVE_UTIME_NULL\${ac_eB}HAVE_UTIME_NULL\${ac_eC}1\${ac_eD}
  2185. "
  2186. }
  2187.  
  2188.  
  2189. fi
  2190. rm -fr conftest*
  2191. rm -f core
  2192.  
  2193. test -n "$silent" || /bin/echo "checking for Xenix"
  2194. cat > conftest.${ac_ext} <<EOF
  2195. #include "confdefs.h"
  2196. #if defined(M_XENIX) && !defined(M_UNIX)
  2197.   yes
  2198. #endif
  2199.  
  2200. EOF
  2201. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2202. if egrep "yes" conftest.out >/dev/null 2>&1; then
  2203.   rm -rf conftest*
  2204.   XENIX=1
  2205.  
  2206. fi
  2207. rm -f conftest*
  2208.  
  2209. if test -n "$XENIX"; then
  2210.   LIBS="$LIBS -lx"
  2211.   case "$DEFS" in
  2212.   *SYSNDIR*) ;;
  2213.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  2214.   esac
  2215. fi
  2216.  
  2217. ac_save_LIBS="${LIBS}"
  2218. LIBS="${LIBS} -lsun"
  2219. ac_have_lib=""
  2220. test -n "$silent" || /bin/echo "checking for -lsun"
  2221. cat > conftest.${ac_ext} <<EOF
  2222. #include "confdefs.h"
  2223.  
  2224. int main() { return 0; }
  2225. int t() { main();; return 0; }
  2226. EOF
  2227. if eval $ac_compile; then
  2228.   rm -rf conftest*
  2229.   ac_have_lib="1"
  2230.  
  2231. fi
  2232. rm -f conftest*
  2233. LIBS="${ac_save_LIBS}"
  2234. if test -n "${ac_have_lib}"; then
  2235.    :; LIBS="$LIBS -lsun"
  2236. else
  2237.    :; 
  2238. fi
  2239.  
  2240.  
  2241. ac_save_LIBS="${LIBS}"
  2242. LIBS="${LIBS} -lseq"
  2243. ac_have_lib=""
  2244. test -n "$silent" || /bin/echo "checking for -lseq"
  2245. cat > conftest.${ac_ext} <<EOF
  2246. #include "confdefs.h"
  2247.  
  2248. int main() { return 0; }
  2249. int t() { main();; return 0; }
  2250. EOF
  2251. if eval $ac_compile; then
  2252.   rm -rf conftest*
  2253.   ac_have_lib="1"
  2254.  
  2255. fi
  2256. rm -f conftest*
  2257. LIBS="${ac_save_LIBS}"
  2258. if test -n "${ac_have_lib}"; then
  2259.    :; LIBS="$LIBS -lseq"
  2260. else
  2261.    :; 
  2262. fi
  2263.  
  2264.  
  2265. # Check for libypsec.a on Dolphin M88K machines.
  2266. ac_save_LIBS="${LIBS}"
  2267. LIBS="${LIBS} -lypsec"
  2268. ac_have_lib=""
  2269. test -n "$silent" || /bin/echo "checking for -lypsec"
  2270. cat > conftest.${ac_ext} <<EOF
  2271. #include "confdefs.h"
  2272.  
  2273. int main() { return 0; }
  2274. int t() { main();; return 0; }
  2275. EOF
  2276. if eval $ac_compile; then
  2277.   rm -rf conftest*
  2278.   ac_have_lib="1"
  2279.  
  2280. fi
  2281. rm -f conftest*
  2282. LIBS="${ac_save_LIBS}"
  2283. if test -n "${ac_have_lib}"; then
  2284.    
  2285. {
  2286. test -n "$verbose" && \
  2287. /bin/echo "    defining HAVE_LIBYPSEC"
  2288. /bin/echo "#define" HAVE_LIBYPSEC "1" >> confdefs.h
  2289. DEFS="$DEFS -DHAVE_LIBYPSEC=1"
  2290. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBYPSEC\${ac_dB}HAVE_LIBYPSEC\${ac_dC}1\${ac_dD}
  2291. \${ac_uA}HAVE_LIBYPSEC\${ac_uB}HAVE_LIBYPSEC\${ac_uC}1\${ac_uD}
  2292. \${ac_eA}HAVE_LIBYPSEC\${ac_eB}HAVE_LIBYPSEC\${ac_eC}1\${ac_eD}
  2293. "
  2294. }
  2295.  
  2296.    LIBS="${LIBS} -lypsec"
  2297. fi
  2298.  
  2299.  
  2300. # m88k running dgux 5.4 needs this
  2301. ac_save_LIBS="${LIBS}"
  2302. LIBS="${LIBS} -ldgc"
  2303. ac_have_lib=""
  2304. test -n "$silent" || /bin/echo "checking for -ldgc"
  2305. cat > conftest.${ac_ext} <<EOF
  2306. #include "confdefs.h"
  2307.  
  2308. int main() { return 0; }
  2309. int t() { main();; return 0; }
  2310. EOF
  2311. if eval $ac_compile; then
  2312.   rm -rf conftest*
  2313.   ac_have_lib="1"
  2314.  
  2315. fi
  2316. rm -f conftest*
  2317. LIBS="${ac_save_LIBS}"
  2318. if test -n "${ac_have_lib}"; then
  2319.    
  2320. {
  2321. test -n "$verbose" && \
  2322. /bin/echo "    defining HAVE_LIBDGC"
  2323. /bin/echo "#define" HAVE_LIBDGC "1" >> confdefs.h
  2324. DEFS="$DEFS -DHAVE_LIBDGC=1"
  2325. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDGC\${ac_dB}HAVE_LIBDGC\${ac_dC}1\${ac_dD}
  2326. \${ac_uA}HAVE_LIBDGC\${ac_uB}HAVE_LIBDGC\${ac_uC}1\${ac_uD}
  2327. \${ac_eA}HAVE_LIBDGC\${ac_eB}HAVE_LIBDGC\${ac_eC}1\${ac_eD}
  2328. "
  2329. }
  2330.  
  2331.    LIBS="${LIBS} -ldgc"
  2332. fi
  2333.  
  2334.  
  2335. echo checking for AFS
  2336. false && 
  2337. {
  2338. test -n "$verbose" && \
  2339. /bin/echo "    defining AFS"
  2340. /bin/echo "#define" AFS "1" >> confdefs.h
  2341. DEFS="$DEFS -DAFS=1"
  2342. ac_sed_defs="${ac_sed_defs}\${ac_dA}AFS\${ac_dB}AFS\${ac_dC}1\${ac_dD}
  2343. \${ac_uA}AFS\${ac_uB}AFS\${ac_uC}1\${ac_uD}
  2344. \${ac_eA}AFS\${ac_eB}AFS\${ac_eC}1\${ac_eD}
  2345. "
  2346. }
  2347.  
  2348.  
  2349. # Set default prefixes.
  2350. if test -n "$prefix"; then
  2351.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  2352.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2353. fi
  2354. if test -n "$exec_prefix"; then
  2355.   ac_prsub="$ac_prsub
  2356. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2357. fi
  2358. # Any assignment to VPATH causes Sun make to only execute
  2359. # the first set of double-colon rules, so remove it if not needed.
  2360. # If there is a colon in the path, we need to keep it.
  2361. if test "x$srcdir" = x.; then
  2362.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2363. fi
  2364.  
  2365. # Quote sed substitution magic chars in DEFS.
  2366. cat >conftest.def <<EOF
  2367. $DEFS
  2368. EOF
  2369. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2370. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2371. rm -f conftest.def
  2372. # Substitute for predefined variables.
  2373.  
  2374. trap 'rm -f config.status; exit 1' 1 2 15
  2375. /bin/echo creating config.status
  2376. rm -f config.status
  2377. cat > config.status <<EOF
  2378. #!/bin/sh
  2379. # Generated automatically by configure.
  2380. # Run this file to recreate the current configuration.
  2381. # This directory was configured as follows,
  2382. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2383. #
  2384. # $0 $configure_args
  2385.  
  2386. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2387. for ac_option
  2388. do
  2389.   case "\$ac_option" in
  2390.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2391.     /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2392.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2393.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2394.     /bin/echo "config.status generated by autoconf version 1.9"
  2395.     exit 0 ;;
  2396.   -help | --help | --hel | --he | --h)
  2397.     /bin/echo "\$ac_cs_usage"; exit 0 ;;
  2398.   *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
  2399.   esac
  2400. done
  2401.  
  2402. trap 'rm -fr Makefile lib/Makefile src/Makefile man/Makefile config.h conftest*; exit 1' 1 2 15
  2403. PROGS='$PROGS'
  2404. LIBPROGS='$LIBPROGS'
  2405. CC='$CC'
  2406. CFLAGS='$CFLAGS'
  2407. LDFLAGS='$LDFLAGS'
  2408. CPP='$CPP'
  2409. RANLIB='$RANLIB'
  2410. YACC='$YACC'
  2411. LIBOBJS='$LIBOBJS'
  2412. ALLOCA='$ALLOCA'
  2413. LIBS='$LIBS'
  2414. srcdir='$srcdir'
  2415. top_srcdir='$top_srcdir'
  2416. prefix='$prefix'
  2417. exec_prefix='$exec_prefix'
  2418. ac_prsub='$ac_prsub'
  2419. ac_vpsub='$ac_vpsub'
  2420. extrasub='$extrasub'
  2421. EOF
  2422. cat >> config.status <<\EOF
  2423.  
  2424. ac_given_srcdir=$srcdir
  2425.  
  2426. CONFIG_FILES=${CONFIG_FILES-"Makefile lib/Makefile src/Makefile man/Makefile"}
  2427. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2428.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2429.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2430.   if test "$ac_dir" != "$ac_file"; then
  2431.     # The file is in a subdirectory.
  2432.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2433.     ac_dir_suffix="/$ac_dir"
  2434.   else
  2435.     ac_dir_suffix=
  2436.   fi
  2437.  
  2438.   # A "../" for each directory in $ac_dir_suffix.
  2439.   ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2440.   case "$ac_given_srcdir" in
  2441.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  2442.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2443.   *) # Relative path.
  2444.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2445.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2446.   esac
  2447.  
  2448.   /bin/echo creating "$ac_file"
  2449.   rm -f "$ac_file"
  2450.   comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
  2451.   case "$ac_file" in
  2452.     *.c | *.h | *.C | *.cc | *.m )  /bin/echo "/* $comment_str */" > "$ac_file" ;;
  2453.     * )          /bin/echo "# $comment_str"     > "$ac_file" ;;
  2454.   esac
  2455.   sed -e "
  2456. $ac_prsub
  2457. $ac_vpsub
  2458. $extrasub
  2459. s%@PROGS@%$PROGS%g
  2460. s%@LIBPROGS@%$LIBPROGS%g
  2461. s%@CC@%$CC%g
  2462. s%@CFLAGS@%$CFLAGS%g
  2463. s%@LDFLAGS@%$LDFLAGS%g
  2464. s%@CPP@%$CPP%g
  2465. s%@RANLIB@%$RANLIB%g
  2466. s%@YACC@%$YACC%g
  2467. s%@LIBOBJS@%$LIBOBJS%g
  2468. s%@ALLOCA@%$ALLOCA%g
  2469. s%@LIBS@%$LIBS%g
  2470. s%@srcdir@%$srcdir%g
  2471. s%@top_srcdir@%$top_srcdir%g
  2472. s%@prefix@%$prefix%g
  2473. s%@exec_prefix@%$exec_prefix%g
  2474. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2475. fi; done
  2476.  
  2477. # These sed commands are put into ac_sed_defs when defining a macro.
  2478. # They are broken into pieces to make the sed script easier to manage.
  2479. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2480. # is the cpp macro being defined and VALUE is the value it is being given.
  2481. # Each defining turns into a single global substitution command.
  2482. # Hopefully no one uses "!" as a variable value.
  2483. # Other candidates for the sed separators, like , and @, do get used.
  2484. #
  2485. # ac_d sets the value in "#define NAME VALUE" lines.
  2486. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2487. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2488. ac_dC='\3'
  2489. ac_dD='!g'
  2490. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2491. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2492. ac_uB='\([     ]\)!\1#\2define\3'
  2493. ac_uC=' '
  2494. ac_uD='\4!g'
  2495. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2496. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2497. ac_eB='$!\1#\2define\3'
  2498. ac_eC=' '
  2499. ac_eD='!g'
  2500. rm -f conftest.sed
  2501. EOF
  2502. # Turn off quoting long enough to insert the sed commands.
  2503. rm -f conftest.sh
  2504. cat > conftest.sh <<EOF
  2505. $ac_sed_defs
  2506. EOF
  2507.  
  2508. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2509. # on the size of here documents.
  2510.  
  2511. # Maximum number of lines to put in a single here document.
  2512. ac_max_sh_lines=9
  2513.  
  2514. while :
  2515. do
  2516.   # wc gives bogus results for an empty file on some AIX systems.
  2517.   ac_lines=`grep -c . conftest.sh`
  2518.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2519.   rm -f conftest.s1 conftest.s2
  2520.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  2521.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  2522.   # Write a limited-size here document to append to conftest.sed.
  2523.   /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2524.   cat conftest.s1 >> config.status
  2525.   /bin/echo 'CONFEOF' >> config.status
  2526.   rm -f conftest.s1 conftest.sh
  2527.   mv conftest.s2 conftest.sh
  2528. done
  2529. rm -f conftest.sh
  2530.  
  2531. # Now back to your regularly scheduled config.status.
  2532. cat >> config.status <<\EOF
  2533. # This sed command replaces #undef's with comments.  This is necessary, for
  2534. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2535. # on some systems where configure will not decide to define it in
  2536. # config.h.
  2537. cat >> conftest.sed <<\CONFEOF
  2538. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2539. CONFEOF
  2540. rm -f conftest.h
  2541. # Break up the sed commands because old seds have small limits.
  2542. ac_max_sed_lines=20
  2543.  
  2544. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2545. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2546.   /bin/echo creating $ac_file
  2547.  
  2548.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2549.   while :
  2550.   do
  2551.     ac_lines=`grep -c . conftest.sed`
  2552.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2553.     rm -f conftest.s1 conftest.s2 conftest.h2
  2554.     sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
  2555.     sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
  2556.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  2557.     rm -f conftest.s1 conftest.h1 conftest.sed
  2558.     mv conftest.h2 conftest.h1
  2559.     mv conftest.s2 conftest.sed
  2560.   done
  2561.   rm -f conftest.sed conftest.h
  2562.   /bin/echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2563.   cat conftest.h1 >> conftest.h
  2564.   rm -f conftest.h1
  2565.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2566.     # The file exists and we would not be changing it.
  2567.     /bin/echo "$ac_file is unchanged"
  2568.     rm -f conftest.h
  2569.   else
  2570.     rm -f $ac_file
  2571.     mv conftest.h $ac_file
  2572.   fi
  2573. fi; done
  2574.  
  2575.  
  2576.  
  2577. exit 0
  2578. EOF
  2579. chmod +x config.status
  2580. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  2581.  
  2582.