home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / fileutils-3.12-src.lha / fileutils-3.12 / configure < prev    next >
Encoding:
Text File  |  1994-11-12  |  92.7 KB  |  3,764 lines

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